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
package it.unibas.lunatic.model.dependency; public class FormulaSymbol implements IFormulaValue { private Object value; public FormulaSymbol(Object value) { this.value = value; } public Object getValue() { if (true) throw new UnsupportedOperationException(); return value; } public boolean isNull() { return false; } public boolean isVariable() { return false; } public IFormulaValue clone() { try { return (IFormulaValue) super.clone(); } catch (CloneNotSupportedException ex) { throw new IllegalArgumentException("Unable to clone FormulaValue " + ex.getLocalizedMessage()); } } @Override public String toString() { return value.toString(); // return "\"" + value.toString() + "\""; } public String toSaveString() { return value.toString(); } public String toLongString() { if (true) throw new UnsupportedOperationException(); return "Constant : " + value.toString(); } }
donatellosantoro/Llunatic
lunaticEngine/src/it/unibas/lunatic/model/dependency/FormulaSymbol.java
Java
gpl-3.0
1,083
# WolframAlpha Client v1.3 Python Client built against the [Wolfram|Alpha](http://wolframalpha.com) v2.0 API. Original project is hosted on [bitbucket](http://bitbucket.org/jaraco/wolframalpha). ## Installation * Clone git archive via the following command; `git clone https://github.com/bmikolaj/wolframalpha.git wolframalpha` * Change directories via `cd wolframalpha` * Run the following command to install; `sudo python setup.sh install` ## Usage Basic usage is pretty simple. Create the client with your App ID (request from Wolfram Alpha); import wolframalpha client = wolframalpha.Client(app_id) Then, you can send queries, which return Result objects; res = client.query('temperature in Washington, DC on October 3, 2012') If you need to need to specify an assumption, you can do the following; res = client.query('1s + 1s','*C.s-_*Unit-') This will assume s is a unit instead of a varaible Result objects have `pods` attribute (a Pod is an answer from Wolfram Alpha); for pod in res.pods: do_something_with(pod) You may also query for simply the pods which have 'Result' titles; print(next(res.results).text) ## Changelog * v1.3 (21 October 2014) Added assumption option to query * v1.2 (08 June 2014) Release by [jaraco](http://bitbucket.org/jaraco/wolframalpha) forked ## Authors [Brian Mikolajczyk](https://github.com/bmikolaj), brianm12@gmail.com [Jason R. Coombs](http://bitbucket.org/jaraco), jaraco@jaraco.com ## Legal Copyright (c) 2014, Brian Mikolajczyk, brianm12@gmail.com ### Licence Please see file LICENCE. ### Copying Please see file COPYING.
bmikolaj/wolframalpha
README.md
Markdown
gpl-3.0
1,640
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM 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. OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class Foam::surfaceToCell Description A topoSetSource to select cells based on relation to surface. Selects: - all cells inside/outside/cut by surface - all cells inside/outside surface ('useSurfaceOrientation', requires closed surface) - cells with centre nearer than XXX to surface - cells with centre nearer than XXX to surface \b and with normal at nearest point to centre and cell-corners differing by more than YYY (i.e., point of high curvature) SourceFiles surfaceToCell.C \*---------------------------------------------------------------------------*/ #ifndef surfaceToCell_H #define surfaceToCell_H #include "topoSetSource.H" #include "Map.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { class triSurfaceSearch; class triSurface; /*---------------------------------------------------------------------------*\ Class surfaceToCell Declaration \*---------------------------------------------------------------------------*/ class surfaceToCell : public topoSetSource { // Private Data //- Name of surface file const fileName surfName_; //- Points which are outside const pointField outsidePoints_; //- Include cut cells const bool includeCut_; //- Include inside cells const bool includeInside_; //- Include outside cells const bool includeOutside_; //- Determine inside/outside purely using geometric test // (does not allow includeCut) const bool useSurfaceOrientation_; //- If > 0 : include cells with distance from cellCentre to surface // less than nearDist. const scalar nearDist_; //- If > -1 : include cells with normals at nearest surface points // varying more than curvature_. const scalar curvature_; //- triSurface to search on. On pointer since can be external. const triSurface* surfPtr_; //- Search engine on surface. const triSurfaceSearch* querySurfPtr_; //- Whether I allocated above surface ptrs or whether they are // external. const bool IOwnPtrs_; // Private Member Functions //- Find index of nearest triangle to point. Returns triangle or -1 if // not found within search span. // Cache result under pointi. static label getNearest ( const triSurfaceSearch& querySurf, const label pointi, const point& pt, const vector& searchSpan, Map<label>& cache ); //- Return true if surface normal of nearest points to vertices on // cell differ from that on cell centre. Points cached in // pointToNearest. bool differingPointNormals ( const triSurfaceSearch& querySurf, const vector& span, const label celli, const label cellTriI, Map<label>& pointToNearest ) const; //- Depending on surface add to or delete from cellSet. void combine(topoSet& set, const bool add) const; //- Check values at construction time. void checkSettings() const; const triSurfaceSearch& querySurf() const { return *querySurfPtr_; } public: //- Runtime type information TypeName("surfaceToCell"); // Constructors //- Construct from components surfaceToCell ( const polyMesh& mesh, const fileName& surfName, const pointField& outsidePoints, const bool includeCut, const bool includeInside, const bool includeOutside, const bool useSurfaceOrientation, const scalar nearDist, const scalar curvature ); //- Construct from components (supplied surface, surfaceSearch) surfaceToCell ( const polyMesh& mesh, const fileName& surfName, const triSurface& surf, const triSurfaceSearch& querySurf, const pointField& outsidePoints, const bool includeCut, const bool includeInside, const bool includeOutside, const bool useSurfaceOrientation, const scalar nearDist, const scalar curvature ); //- Construct from dictionary surfaceToCell ( const polyMesh& mesh, const dictionary& dict ); //- Destructor virtual ~surfaceToCell(); // Member Functions virtual sourceType setType() const { return CELLSETSOURCE; } virtual void applyToSet ( const topoSetSource::setAction action, topoSet& ) const; }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif // ************************************************************************* //
OpenFOAM/OpenFOAM-dev
src/meshTools/sets/cellSources/surfaceToCell/surfaceToCell.H
C++
gpl-3.0
6,316
/* Copyright 2009 Last.fm Ltd. - Primarily authored by Max Howell, Jono Cole and Doug Mansell This file is part of liblastfm. liblastfm 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. liblastfm 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 liblastfm. If not, see <http://www.gnu.org/licenses/>. */ #ifndef NDIS_EVENTS_H #define NDIS_EVENTS_H #include <windows.h> #include <atlbase.h> #include <WbemCli.h> class NdisEvents { public: NdisEvents(); ~NdisEvents(); HRESULT registerForNdisEvents(); virtual void onConnectionUp(BSTR name) = 0; virtual void onConnectionDown(BSTR name) = 0; private: CComPtr<IWbemLocator> m_pLocator; CComPtr<IWbemServices> m_pServices; class WmiSink *m_pSink; }; #endif
lfranchi/liblastfm
src/ws/win/NdisEvents.h
C
gpl-3.0
1,214
# This file is part of PlexPy. # # PlexPy 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. # # PlexPy 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 PlexPy. If not, see <http://www.gnu.org/licenses/>. from plexpy import logger, notifiers, plextv, pmsconnect, common, log_reader, datafactory, graphs, users from plexpy.helpers import checked, radio from mako.lookup import TemplateLookup from mako import exceptions import plexpy import threading import cherrypy import hashlib import random import json import os try: # pylint:disable=E0611 # ignore this error because we are catching the ImportError from collections import OrderedDict # pylint:enable=E0611 except ImportError: # Python 2.6.x fallback, from libs from ordereddict import OrderedDict def serve_template(templatename, **kwargs): interface_dir = os.path.join(str(plexpy.PROG_DIR), 'data/interfaces/') template_dir = os.path.join(str(interface_dir), plexpy.CONFIG.INTERFACE) _hplookup = TemplateLookup(directories=[template_dir]) try: template = _hplookup.get_template(templatename) return template.render(**kwargs) except: return exceptions.html_error_template().render() class WebInterface(object): def __init__(self): self.interface_dir = os.path.join(str(plexpy.PROG_DIR), 'data/') @cherrypy.expose def index(self): if plexpy.CONFIG.FIRST_RUN_COMPLETE: raise cherrypy.HTTPRedirect("home") else: raise cherrypy.HTTPRedirect("welcome") @cherrypy.expose def home(self): config = { "home_stats_length": plexpy.CONFIG.HOME_STATS_LENGTH, "home_stats_type": plexpy.CONFIG.HOME_STATS_TYPE, "home_stats_count": plexpy.CONFIG.HOME_STATS_COUNT, "pms_identifier": plexpy.CONFIG.PMS_IDENTIFIER, } return serve_template(templatename="index.html", title="Home", config=config) @cherrypy.expose def welcome(self, **kwargs): config = { "launch_browser": checked(plexpy.CONFIG.LAUNCH_BROWSER), "refresh_users_on_startup": checked(plexpy.CONFIG.REFRESH_USERS_ON_STARTUP), "pms_identifier": plexpy.CONFIG.PMS_IDENTIFIER, "pms_ip": plexpy.CONFIG.PMS_IP, "pms_is_remote": checked(plexpy.CONFIG.PMS_IS_REMOTE), "pms_port": plexpy.CONFIG.PMS_PORT, "pms_token": plexpy.CONFIG.PMS_TOKEN, "pms_ssl": checked(plexpy.CONFIG.PMS_SSL), "pms_uuid": plexpy.CONFIG.PMS_UUID, "tv_notify_enable": checked(plexpy.CONFIG.TV_NOTIFY_ENABLE), "movie_notify_enable": checked(plexpy.CONFIG.MOVIE_NOTIFY_ENABLE), "music_notify_enable": checked(plexpy.CONFIG.MUSIC_NOTIFY_ENABLE), "tv_notify_on_start": checked(plexpy.CONFIG.TV_NOTIFY_ON_START), "movie_notify_on_start": checked(plexpy.CONFIG.MOVIE_NOTIFY_ON_START), "music_notify_on_start": checked(plexpy.CONFIG.MUSIC_NOTIFY_ON_START), "video_logging_enable": checked(plexpy.CONFIG.VIDEO_LOGGING_ENABLE), "music_logging_enable": checked(plexpy.CONFIG.MUSIC_LOGGING_ENABLE), "logging_ignore_interval": plexpy.CONFIG.LOGGING_IGNORE_INTERVAL, "check_github": checked(plexpy.CONFIG.CHECK_GITHUB) } # The setup wizard just refreshes the page on submit so we must redirect to home if config set. # Also redirecting to home if a PMS token already exists - will remove this in future. if plexpy.CONFIG.FIRST_RUN_COMPLETE or plexpy.CONFIG.PMS_TOKEN: raise cherrypy.HTTPRedirect("home") else: return serve_template(templatename="welcome.html", title="Welcome", config=config) @cherrypy.expose def get_date_formats(self): if plexpy.CONFIG.DATE_FORMAT: date_format = plexpy.CONFIG.DATE_FORMAT else: date_format = 'YYYY-MM-DD' if plexpy.CONFIG.TIME_FORMAT: time_format = plexpy.CONFIG.TIME_FORMAT else: time_format = 'HH:mm' formats = {'date_format': date_format, 'time_format': time_format} cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps(formats) @cherrypy.expose def home_stats(self, time_range='30', stat_type='0', stat_count='5', **kwargs): data_factory = datafactory.DataFactory() stats_data = data_factory.get_home_stats(time_range=time_range, stat_type=stat_type, stat_count=stat_count) return serve_template(templatename="home_stats.html", title="Stats", data=stats_data) @cherrypy.expose def library_stats(self, **kwargs): pms_connect = pmsconnect.PmsConnect() stats_data = pms_connect.get_library_stats() return serve_template(templatename="library_stats.html", title="Library Stats", data=stats_data) @cherrypy.expose def history(self): return serve_template(templatename="history.html", title="History") @cherrypy.expose def users(self): return serve_template(templatename="users.html", title="Users") @cherrypy.expose def graphs(self): return serve_template(templatename="graphs.html", title="Graphs") @cherrypy.expose def sync(self): return serve_template(templatename="sync.html", title="Synced Items") @cherrypy.expose def user(self, user=None, user_id=None): user_data = users.Users() if user_id: try: user_details = user_data.get_user_details(user_id=user_id) except: logger.warn("Unable to retrieve friendly name for user_id %s " % user_id) elif user: try: user_details = user_data.get_user_details(user=user) except: logger.warn("Unable to retrieve friendly name for user %s " % user) else: logger.debug(u"User page requested but no parameters received.") raise cherrypy.HTTPRedirect("home") return serve_template(templatename="user.html", title="User", data=user_details) @cherrypy.expose def edit_user_dialog(self, user=None, user_id=None, **kwargs): user_data = users.Users() if user_id: result = user_data.get_user_friendly_name(user_id=user_id) status_message = '' elif user: result = user_data.get_user_friendly_name(user=user) status_message = '' else: result = None status_message = 'An error occured.' return serve_template(templatename="edit_user.html", title="Edit User", data=result, status_message=status_message) @cherrypy.expose def edit_user(self, user=None, user_id=None, friendly_name=None, **kwargs): if 'do_notify' in kwargs: do_notify = kwargs.get('do_notify') else: do_notify = 0 if 'keep_history' in kwargs: keep_history = kwargs.get('keep_history') else: keep_history = 0 if 'thumb' in kwargs: custom_avatar = kwargs['thumb'] else: custom_avatar = '' user_data = users.Users() if user_id: try: user_data.set_user_friendly_name(user_id=user_id, friendly_name=friendly_name, do_notify=do_notify, keep_history=keep_history) user_data.set_user_profile_url(user_id=user_id, profile_url=custom_avatar) status_message = "Successfully updated user." return status_message except: status_message = "Failed to update user." return status_message if user: try: user_data.set_user_friendly_name(user=user, friendly_name=friendly_name, do_notify=do_notify, keep_history=keep_history) user_data.set_user_profile_url(user=user, profile_url=custom_avatar) status_message = "Successfully updated user." return status_message except: status_message = "Failed to update user." return status_message @cherrypy.expose def get_stream_data(self, row_id=None, user=None, **kwargs): data_factory = datafactory.DataFactory() stream_data = data_factory.get_stream_details(row_id) return serve_template(templatename="stream_data.html", title="Stream Data", data=stream_data, user=user) @cherrypy.expose def get_ip_address_details(self, ip_address=None, **kwargs): import socket try: socket.inet_aton(ip_address) except socket.error: ip_address = None return serve_template(templatename="ip_address_modal.html", title="IP Address Details", data=ip_address) @cherrypy.expose def get_user_list(self, **kwargs): user_data = users.Users() user_list = user_data.get_user_list(kwargs=kwargs) cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps(user_list) @cherrypy.expose def checkGithub(self): from plexpy import versioncheck versioncheck.checkGithub() raise cherrypy.HTTPRedirect("home") @cherrypy.expose def logs(self): return serve_template(templatename="logs.html", title="Log", lineList=plexpy.LOG_LIST) @cherrypy.expose def clearLogs(self): plexpy.LOG_LIST = [] logger.info("Web logs cleared") raise cherrypy.HTTPRedirect("logs") @cherrypy.expose def toggleVerbose(self): plexpy.VERBOSE = not plexpy.VERBOSE logger.initLogger(console=not plexpy.QUIET, log_dir=plexpy.CONFIG.LOG_DIR, verbose=plexpy.VERBOSE) logger.info("Verbose toggled, set to %s", plexpy.VERBOSE) logger.debug("If you read this message, debug logging is available") raise cherrypy.HTTPRedirect("logs") @cherrypy.expose def getLog(self, start=0, length=100, **kwargs): start = int(start) length = int(length) search_value = "" search_regex = "" order_column = 0 order_dir = "desc" if 'order[0][dir]' in kwargs: order_dir = kwargs.get('order[0][dir]', "desc") if 'order[0][column]' in kwargs: order_column = kwargs.get('order[0][column]', "0") if 'search[value]' in kwargs: search_value = kwargs.get('search[value]', "") if 'search[regex]' in kwargs: search_regex = kwargs.get('search[regex]', "") filtered = [] if search_value == "": filtered = plexpy.LOG_LIST[::] else: filtered = [row for row in plexpy.LOG_LIST for column in row if search_value.lower() in column.lower()] sortcolumn = 0 if order_column == '1': sortcolumn = 2 elif order_column == '2': sortcolumn = 1 filtered.sort(key=lambda x: x[sortcolumn], reverse=order_dir == "desc") rows = filtered[start:(start + length)] rows = [[row[0], row[2], row[1]] for row in rows] return json.dumps({ 'recordsFiltered': len(filtered), 'recordsTotal': len(plexpy.LOG_LIST), 'data': rows, }) @cherrypy.expose def get_plex_log(self, window=1000, **kwargs): log_lines = [] try: log_lines = {'data': log_reader.get_log_tail(window=window)} except: logger.warn("Unable to retrieve Plex Logs.") cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps(log_lines) @cherrypy.expose def generateAPI(self): apikey = hashlib.sha224(str(random.getrandbits(256))).hexdigest()[0:32] logger.info("New API generated") return apikey @cherrypy.expose def settings(self): interface_dir = os.path.join(plexpy.PROG_DIR, 'data/interfaces/') interface_list = [name for name in os.listdir(interface_dir) if os.path.isdir(os.path.join(interface_dir, name))] # Initialise blank passwords so we do not expose them in the html forms # but users are still able to clear them if plexpy.CONFIG.HTTP_PASSWORD != '': http_password = ' ' else: http_password = '' config = { "http_host": plexpy.CONFIG.HTTP_HOST, "http_username": plexpy.CONFIG.HTTP_USERNAME, "http_port": plexpy.CONFIG.HTTP_PORT, "http_password": http_password, "launch_browser": checked(plexpy.CONFIG.LAUNCH_BROWSER), "enable_https": checked(plexpy.CONFIG.ENABLE_HTTPS), "https_cert": plexpy.CONFIG.HTTPS_CERT, "https_key": plexpy.CONFIG.HTTPS_KEY, "api_enabled": checked(plexpy.CONFIG.API_ENABLED), "api_key": plexpy.CONFIG.API_KEY, "update_db_interval": plexpy.CONFIG.UPDATE_DB_INTERVAL, "freeze_db": checked(plexpy.CONFIG.FREEZE_DB), "log_dir": plexpy.CONFIG.LOG_DIR, "cache_dir": plexpy.CONFIG.CACHE_DIR, "check_github": checked(plexpy.CONFIG.CHECK_GITHUB), "interface_list": interface_list, "growl_enabled": checked(plexpy.CONFIG.GROWL_ENABLED), "growl_host": plexpy.CONFIG.GROWL_HOST, "growl_password": plexpy.CONFIG.GROWL_PASSWORD, "prowl_enabled": checked(plexpy.CONFIG.PROWL_ENABLED), "prowl_keys": plexpy.CONFIG.PROWL_KEYS, "prowl_priority": plexpy.CONFIG.PROWL_PRIORITY, "xbmc_enabled": checked(plexpy.CONFIG.XBMC_ENABLED), "xbmc_host": plexpy.CONFIG.XBMC_HOST, "xbmc_username": plexpy.CONFIG.XBMC_USERNAME, "xbmc_password": plexpy.CONFIG.XBMC_PASSWORD, "plex_enabled": checked(plexpy.CONFIG.PLEX_ENABLED), "plex_client_host": plexpy.CONFIG.PLEX_CLIENT_HOST, "plex_username": plexpy.CONFIG.PLEX_USERNAME, "plex_password": plexpy.CONFIG.PLEX_PASSWORD, "nma_enabled": checked(plexpy.CONFIG.NMA_ENABLED), "nma_apikey": plexpy.CONFIG.NMA_APIKEY, "nma_priority": int(plexpy.CONFIG.NMA_PRIORITY), "pushalot_enabled": checked(plexpy.CONFIG.PUSHALOT_ENABLED), "pushalot_apikey": plexpy.CONFIG.PUSHALOT_APIKEY, "pushover_enabled": checked(plexpy.CONFIG.PUSHOVER_ENABLED), "pushover_keys": plexpy.CONFIG.PUSHOVER_KEYS, "pushover_apitoken": plexpy.CONFIG.PUSHOVER_APITOKEN, "pushover_priority": plexpy.CONFIG.PUSHOVER_PRIORITY, "pushbullet_enabled": checked(plexpy.CONFIG.PUSHBULLET_ENABLED), "pushbullet_apikey": plexpy.CONFIG.PUSHBULLET_APIKEY, "pushbullet_deviceid": plexpy.CONFIG.PUSHBULLET_DEVICEID, "twitter_enabled": checked(plexpy.CONFIG.TWITTER_ENABLED), "osx_notify_enabled": checked(plexpy.CONFIG.OSX_NOTIFY_ENABLED), "osx_notify_app": plexpy.CONFIG.OSX_NOTIFY_APP, "boxcar_enabled": checked(plexpy.CONFIG.BOXCAR_ENABLED), "boxcar_token": plexpy.CONFIG.BOXCAR_TOKEN, "cache_sizemb": plexpy.CONFIG.CACHE_SIZEMB, "email_enabled": checked(plexpy.CONFIG.EMAIL_ENABLED), "email_from": plexpy.CONFIG.EMAIL_FROM, "email_to": plexpy.CONFIG.EMAIL_TO, "email_smtp_server": plexpy.CONFIG.EMAIL_SMTP_SERVER, "email_smtp_user": plexpy.CONFIG.EMAIL_SMTP_USER, "email_smtp_password": plexpy.CONFIG.EMAIL_SMTP_PASSWORD, "email_smtp_port": int(plexpy.CONFIG.EMAIL_SMTP_PORT), "email_tls": checked(plexpy.CONFIG.EMAIL_TLS), "pms_identifier": plexpy.CONFIG.PMS_IDENTIFIER, "pms_ip": plexpy.CONFIG.PMS_IP, "pms_logs_folder": plexpy.CONFIG.PMS_LOGS_FOLDER, "pms_port": plexpy.CONFIG.PMS_PORT, "pms_token": plexpy.CONFIG.PMS_TOKEN, "pms_ssl": checked(plexpy.CONFIG.PMS_SSL), "pms_use_bif": checked(plexpy.CONFIG.PMS_USE_BIF), "pms_uuid": plexpy.CONFIG.PMS_UUID, "plexwatch_database": plexpy.CONFIG.PLEXWATCH_DATABASE, "date_format": plexpy.CONFIG.DATE_FORMAT, "time_format": plexpy.CONFIG.TIME_FORMAT, "grouping_global_history": checked(plexpy.CONFIG.GROUPING_GLOBAL_HISTORY), "grouping_user_history": checked(plexpy.CONFIG.GROUPING_USER_HISTORY), "grouping_charts": checked(plexpy.CONFIG.GROUPING_CHARTS), "tv_notify_enable": checked(plexpy.CONFIG.TV_NOTIFY_ENABLE), "movie_notify_enable": checked(plexpy.CONFIG.MOVIE_NOTIFY_ENABLE), "music_notify_enable": checked(plexpy.CONFIG.MUSIC_NOTIFY_ENABLE), "tv_notify_on_start": checked(plexpy.CONFIG.TV_NOTIFY_ON_START), "movie_notify_on_start": checked(plexpy.CONFIG.MOVIE_NOTIFY_ON_START), "music_notify_on_start": checked(plexpy.CONFIG.MUSIC_NOTIFY_ON_START), "tv_notify_on_stop": checked(plexpy.CONFIG.TV_NOTIFY_ON_STOP), "movie_notify_on_stop": checked(plexpy.CONFIG.MOVIE_NOTIFY_ON_STOP), "music_notify_on_stop": checked(plexpy.CONFIG.MUSIC_NOTIFY_ON_STOP), "tv_notify_on_pause": checked(plexpy.CONFIG.TV_NOTIFY_ON_PAUSE), "movie_notify_on_pause": checked(plexpy.CONFIG.MOVIE_NOTIFY_ON_PAUSE), "music_notify_on_pause": checked(plexpy.CONFIG.MUSIC_NOTIFY_ON_PAUSE), "monitoring_interval": plexpy.CONFIG.MONITORING_INTERVAL, "refresh_users_interval": plexpy.CONFIG.REFRESH_USERS_INTERVAL, "refresh_users_on_startup": checked(plexpy.CONFIG.REFRESH_USERS_ON_STARTUP), "ip_logging_enable": checked(plexpy.CONFIG.IP_LOGGING_ENABLE), "video_logging_enable": checked(plexpy.CONFIG.VIDEO_LOGGING_ENABLE), "music_logging_enable": checked(plexpy.CONFIG.MUSIC_LOGGING_ENABLE), "logging_ignore_interval": plexpy.CONFIG.LOGGING_IGNORE_INTERVAL, "pms_is_remote": checked(plexpy.CONFIG.PMS_IS_REMOTE), "notify_watched_percent": plexpy.CONFIG.NOTIFY_WATCHED_PERCENT, "notify_on_start_subject_text": plexpy.CONFIG.NOTIFY_ON_START_SUBJECT_TEXT, "notify_on_start_body_text": plexpy.CONFIG.NOTIFY_ON_START_BODY_TEXT, "notify_on_stop_subject_text": plexpy.CONFIG.NOTIFY_ON_STOP_SUBJECT_TEXT, "notify_on_stop_body_text": plexpy.CONFIG.NOTIFY_ON_STOP_BODY_TEXT, "notify_on_pause_subject_text": plexpy.CONFIG.NOTIFY_ON_PAUSE_SUBJECT_TEXT, "notify_on_pause_body_text": plexpy.CONFIG.NOTIFY_ON_PAUSE_BODY_TEXT, "notify_on_resume_subject_text": plexpy.CONFIG.NOTIFY_ON_RESUME_SUBJECT_TEXT, "notify_on_resume_body_text": plexpy.CONFIG.NOTIFY_ON_RESUME_BODY_TEXT, "notify_on_buffer_subject_text": plexpy.CONFIG.NOTIFY_ON_BUFFER_SUBJECT_TEXT, "notify_on_buffer_body_text": plexpy.CONFIG.NOTIFY_ON_BUFFER_BODY_TEXT, "notify_on_watched_subject_text": plexpy.CONFIG.NOTIFY_ON_WATCHED_SUBJECT_TEXT, "notify_on_watched_body_text": plexpy.CONFIG.NOTIFY_ON_WATCHED_BODY_TEXT, "home_stats_length": plexpy.CONFIG.HOME_STATS_LENGTH, "home_stats_type": checked(plexpy.CONFIG.HOME_STATS_TYPE), "home_stats_count": plexpy.CONFIG.HOME_STATS_COUNT, "buffer_threshold": plexpy.CONFIG.BUFFER_THRESHOLD, "buffer_wait": plexpy.CONFIG.BUFFER_WAIT } return serve_template(templatename="settings.html", title="Settings", config=config) @cherrypy.expose def configUpdate(self, **kwargs): # Handle the variable config options. Note - keys with False values aren't getting passed checked_configs = [ "launch_browser", "enable_https", "api_enabled", "freeze_db", "growl_enabled", "prowl_enabled", "xbmc_enabled", "check_github", "plex_enabled", "nma_enabled", "pushalot_enabled", "pushover_enabled", "pushbullet_enabled", "twitter_enabled", "osx_notify_enabled", "boxcar_enabled", "email_enabled", "email_tls", "grouping_global_history", "grouping_user_history", "grouping_charts", "pms_use_bif", "pms_ssl", "tv_notify_enable", "movie_notify_enable", "music_notify_enable", "tv_notify_on_start", "movie_notify_on_start", "music_notify_on_start", "tv_notify_on_stop", "movie_notify_on_stop", "music_notify_on_stop", "tv_notify_on_pause", "movie_notify_on_pause", "music_notify_on_pause", "refresh_users_on_startup", "ip_logging_enable", "video_logging_enable", "music_logging_enable", "pms_is_remote", "home_stats_type" ] for checked_config in checked_configs: if checked_config not in kwargs: # checked items should be zero or one. if they were not sent then the item was not checked kwargs[checked_config] = 0 # If http password exists in config, do not overwrite when blank value received if 'http_password' in kwargs: if kwargs['http_password'] == ' ' and plexpy.CONFIG.HTTP_PASSWORD != '': kwargs['http_password'] = plexpy.CONFIG.HTTP_PASSWORD for plain_config, use_config in [(x[4:], x) for x in kwargs if x.startswith('use_')]: # the use prefix is fairly nice in the html, but does not match the actual config kwargs[plain_config] = kwargs[use_config] del kwargs[use_config] # Check if we should refresh our data refresh_users = False reschedule = False if 'monitoring_interval' in kwargs and 'refresh_users_interval' in kwargs: if (kwargs['monitoring_interval'] != str(plexpy.CONFIG.MONITORING_INTERVAL)) or \ (kwargs['refresh_users_interval'] != str(plexpy.CONFIG.REFRESH_USERS_INTERVAL)): reschedule = True if 'pms_ip' in kwargs: if kwargs['pms_ip'] != plexpy.CONFIG.PMS_IP: refresh_users = True plexpy.CONFIG.process_kwargs(kwargs) # Write the config plexpy.CONFIG.write() # Get new server URLs for SSL communications. plextv.get_real_pms_url() # Reconfigure scheduler if intervals changed if reschedule: plexpy.initialize_scheduler() # Refresh users table if our server IP changes. if refresh_users: threading.Thread(target=plextv.refresh_users).start() raise cherrypy.HTTPRedirect("settings") @cherrypy.expose def set_notification_config(self, **kwargs): # Handle the variable config options. Note - keys with False values aren't getting passed checked_configs = [ "email_tls" ] for checked_config in checked_configs: if checked_config not in kwargs: # checked items should be zero or one. if they were not sent then the item was not checked kwargs[checked_config] = 0 for plain_config, use_config in [(x[4:], x) for x in kwargs if x.startswith('use_')]: # the use prefix is fairly nice in the html, but does not match the actual config kwargs[plain_config] = kwargs[use_config] del kwargs[use_config] plexpy.CONFIG.process_kwargs(kwargs) # Write the config plexpy.CONFIG.write() cherrypy.response.status = 200 @cherrypy.expose def do_state_change(self, signal, title, timer): message = title quote = self.random_arnold_quotes() plexpy.SIGNAL = signal return serve_template(templatename="shutdown.html", title=title, message=message, timer=timer, quote=quote) @cherrypy.expose def get_history(self, user=None, user_id=None, **kwargs): custom_where=[] if user_id: custom_where = [['user_id', user_id]] elif user: custom_where = [['user', user]] if 'rating_key' in kwargs: rating_key = kwargs.get('rating_key', "") custom_where = [['rating_key', rating_key]] if 'parent_rating_key' in kwargs: rating_key = kwargs.get('parent_rating_key', "") custom_where = [['parent_rating_key', rating_key]] if 'grandparent_rating_key' in kwargs: rating_key = kwargs.get('grandparent_rating_key', "") custom_where = [['grandparent_rating_key', rating_key]] if 'start_date' in kwargs: start_date = kwargs.get('start_date', "") custom_where = [['strftime("%Y-%m-%d", datetime(date, "unixepoch", "localtime"))', start_date]] data_factory = datafactory.DataFactory() history = data_factory.get_history(kwargs=kwargs, custom_where=custom_where) cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps(history) @cherrypy.expose def history_table_modal(self, start_date=None, **kwargs): return serve_template(templatename="history_table_modal.html", title="History Data", data=start_date) @cherrypy.expose def shutdown(self): return self.do_state_change('shutdown', 'Shutting Down', 15) @cherrypy.expose def restart(self): return self.do_state_change('restart', 'Restarting', 30) @cherrypy.expose def update(self): return self.do_state_change('update', 'Updating', 120) @cherrypy.expose def api(self, *args, **kwargs): from plexpy.api import Api a = Api() a.checkParams(*args, **kwargs) return a.fetchData() @cherrypy.expose def twitterStep1(self): cherrypy.response.headers['Cache-Control'] = "max-age=0,no-cache,no-store" tweet = notifiers.TwitterNotifier() return tweet._get_authorization() @cherrypy.expose def twitterStep2(self, key): cherrypy.response.headers['Cache-Control'] = "max-age=0,no-cache,no-store" tweet = notifiers.TwitterNotifier() result = tweet._get_credentials(key) logger.info(u"result: " + str(result)) if result: return "Key verification successful" else: return "Unable to verify key" @cherrypy.expose def testTwitter(self): cherrypy.response.headers['Cache-Control'] = "max-age=0,no-cache,no-store" tweet = notifiers.TwitterNotifier() result = tweet.test_notify() if result: return "Tweet successful, check your twitter to make sure it worked" else: return "Error sending tweet" @cherrypy.expose def osxnotifyregister(self, app): cherrypy.response.headers['Cache-Control'] = "max-age=0,no-cache,no-store" from osxnotify import registerapp as osxnotify result, msg = osxnotify.registerapp(app) if result: osx_notify = notifiers.OSX_NOTIFY() osx_notify.notify('Registered', result, 'Success :-)') logger.info('Registered %s, to re-register a different app, delete this app first' % result) else: logger.warn(msg) return msg @cherrypy.expose def get_pms_token(self): token = plextv.PlexTV() result = token.get_token() if result: return result else: logger.warn('Unable to retrieve Plex.tv token.') return False @cherrypy.expose def get_pms_sessions_json(self, **kwargs): pms_connect = pmsconnect.PmsConnect() result = pms_connect.get_sessions('json') if result: cherrypy.response.headers['Content-type'] = 'application/json' return result else: logger.warn('Unable to retrieve data.') return False @cherrypy.expose def get_current_activity(self, **kwargs): try: pms_connect = pmsconnect.PmsConnect() result = pms_connect.get_current_activity() except: return serve_template(templatename="current_activity.html", data=None) if result: return serve_template(templatename="current_activity.html", data=result) else: logger.warn('Unable to retrieve data.') return serve_template(templatename="current_activity.html", data=None) @cherrypy.expose def get_current_activity_header(self, **kwargs): try: pms_connect = pmsconnect.PmsConnect() result = pms_connect.get_current_activity() except IOError, e: return serve_template(templatename="current_activity_header.html", data=None) if result: return serve_template(templatename="current_activity_header.html", data=result['stream_count']) else: logger.warn('Unable to retrieve data.') return serve_template(templatename="current_activity_header.html", data=None) @cherrypy.expose def get_recently_added(self, count='0', **kwargs): try: pms_connect = pmsconnect.PmsConnect() result = pms_connect.get_recently_added_details(count) except IOError, e: return serve_template(templatename="recently_added.html", data=None) if result: return serve_template(templatename="recently_added.html", data=result['recently_added']) else: logger.warn('Unable to retrieve data.') return serve_template(templatename="recently_added.html", data=None) @cherrypy.expose def pms_image_proxy(self, img='', width='0', height='0', fallback=None, **kwargs): try: pms_connect = pmsconnect.PmsConnect() result = pms_connect.get_image(img, width, height) cherrypy.response.headers['Content-type'] = result[1] return result[0] except: logger.warn('Image proxy queried but errors occured.') if fallback == 'poster': logger.info('Trying fallback image...') try: fallback_image = open(self.interface_dir + common.DEFAULT_POSTER_THUMB, 'rb') cherrypy.response.headers['Content-type'] = 'image/png' return fallback_image except IOError, e: logger.error('Unable to read fallback image. %s' % e) elif fallback == 'cover': logger.info('Trying fallback image...') try: fallback_image = open(self.interface_dir + common.DEFAULT_COVER_THUMB, 'rb') cherrypy.response.headers['Content-type'] = 'image/png' return fallback_image except IOError, e: logger.error('Unable to read fallback image. %s' % e) return None @cherrypy.expose def info(self, item_id=None, source=None, **kwargs): metadata = None config = { "pms_identifier": plexpy.CONFIG.PMS_IDENTIFIER } if source == 'history': data_factory = datafactory.DataFactory() metadata = data_factory.get_metadata_details(row_id=item_id) else: pms_connect = pmsconnect.PmsConnect() result = pms_connect.get_metadata_details(rating_key=item_id) if result: metadata = result['metadata'] if metadata: return serve_template(templatename="info.html", data=metadata, title="Info", config=config) else: logger.warn('Unable to retrieve data.') return serve_template(templatename="info.html", data=None, title="Info") @cherrypy.expose def get_user_recently_watched(self, user=None, user_id=None, limit='10', **kwargs): data_factory = datafactory.DataFactory() result = data_factory.get_recently_watched(user_id=user_id, user=user, limit=limit) if result: return serve_template(templatename="user_recently_watched.html", data=result, title="Recently Watched") else: logger.warn('Unable to retrieve data.') return serve_template(templatename="user_recently_watched.html", data=None, title="Recently Watched") @cherrypy.expose def get_user_watch_time_stats(self, user=None, user_id=None, **kwargs): user_data = users.Users() result = user_data.get_user_watch_time_stats(user_id=user_id, user=user) if result: return serve_template(templatename="user_watch_time_stats.html", data=result, title="Watch Stats") else: logger.warn('Unable to retrieve data.') return serve_template(templatename="user_watch_time_stats.html", data=None, title="Watch Stats") @cherrypy.expose def get_user_platform_stats(self, user=None, user_id=None, **kwargs): user_data = users.Users() result = user_data.get_user_platform_stats(user_id=user_id, user=user) if result: return serve_template(templatename="user_platform_stats.html", data=result, title="Platform Stats") else: logger.warn('Unable to retrieve data.') return serve_template(templatename="user_platform_stats.html", data=None, title="Platform Stats") @cherrypy.expose def get_item_children(self, rating_key='', **kwargs): pms_connect = pmsconnect.PmsConnect() result = pms_connect.get_item_children(rating_key) if result: return serve_template(templatename="info_children_list.html", data=result, title="Children List") else: logger.warn('Unable to retrieve data.') return serve_template(templatename="info_children_list.html", data=None, title="Children List") @cherrypy.expose def get_metadata_json(self, rating_key='', **kwargs): pms_connect = pmsconnect.PmsConnect() result = pms_connect.get_metadata(rating_key, 'json') if result: cherrypy.response.headers['Content-type'] = 'application/json' return result else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_metadata_xml(self, rating_key='', **kwargs): pms_connect = pmsconnect.PmsConnect() result = pms_connect.get_metadata(rating_key) if result: cherrypy.response.headers['Content-type'] = 'application/xml' return result else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_recently_added_json(self, count='0', **kwargs): pms_connect = pmsconnect.PmsConnect() result = pms_connect.get_recently_added(count, 'json') if result: cherrypy.response.headers['Content-type'] = 'application/json' return result else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_episode_list_json(self, rating_key='', **kwargs): pms_connect = pmsconnect.PmsConnect() result = pms_connect.get_episode_list(rating_key, 'json') if result: cherrypy.response.headers['Content-type'] = 'application/json' return result else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_user_ips(self, user_id=None, user=None, **kwargs): custom_where=[] if user_id: custom_where = [['user_id', user_id]] elif user: custom_where = [['user', user]] user_data = users.Users() history = user_data.get_user_unique_ips(kwargs=kwargs, custom_where=custom_where) cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps(history) @cherrypy.expose def get_plays_by_date(self, time_range='30', y_axis='plays', **kwargs): graph = graphs.Graphs() result = graph.get_total_plays_per_day(time_range=time_range, y_axis=y_axis) if result: cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps(result) else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_plays_by_dayofweek(self, time_range='30', y_axis='plays', **kwargs): graph = graphs.Graphs() result = graph.get_total_plays_per_dayofweek(time_range=time_range, y_axis=y_axis) if result: cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps(result) else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_plays_by_hourofday(self, time_range='30', y_axis='plays', **kwargs): graph = graphs.Graphs() result = graph.get_total_plays_per_hourofday(time_range=time_range, y_axis=y_axis) if result: cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps(result) else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_plays_per_month(self, y_axis='plays', **kwargs): graph = graphs.Graphs() result = graph.get_total_plays_per_month(y_axis=y_axis) if result: cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps(result) else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_plays_by_top_10_platforms(self, time_range='30', y_axis='plays', **kwargs): graph = graphs.Graphs() result = graph.get_total_plays_by_top_10_platforms(time_range=time_range, y_axis=y_axis) if result: cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps(result) else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_plays_by_top_10_users(self, time_range='30', y_axis='plays', **kwargs): graph = graphs.Graphs() result = graph.get_total_plays_by_top_10_users(time_range=time_range, y_axis=y_axis) if result: cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps(result) else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_plays_by_stream_type(self, time_range='30', y_axis='plays', **kwargs): graph = graphs.Graphs() result = graph.get_total_plays_per_stream_type(time_range=time_range, y_axis=y_axis) if result: cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps(result) else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_plays_by_source_resolution(self, time_range='30', y_axis='plays', **kwargs): graph = graphs.Graphs() result = graph.get_total_plays_by_source_resolution(time_range=time_range, y_axis=y_axis) if result: cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps(result) else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_plays_by_stream_resolution(self, time_range='30', y_axis='plays', **kwargs): graph = graphs.Graphs() result = graph.get_total_plays_by_stream_resolution(time_range=time_range, y_axis=y_axis) if result: cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps(result) else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_stream_type_by_top_10_users(self, time_range='30', y_axis='plays', **kwargs): graph = graphs.Graphs() result = graph.get_stream_type_by_top_10_users(time_range=time_range, y_axis=y_axis) if result: cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps(result) else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_stream_type_by_top_10_platforms(self, time_range='30', y_axis='plays', **kwargs): graph = graphs.Graphs() result = graph.get_stream_type_by_top_10_platforms(time_range=time_range, y_axis=y_axis) if result: cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps(result) else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_friends_list(self, **kwargs): plex_tv = plextv.PlexTV() result = plex_tv.get_plextv_friends('json') if result: cherrypy.response.headers['Content-type'] = 'application/json' return result else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_user_details(self, **kwargs): plex_tv = plextv.PlexTV() result = plex_tv.get_plextv_user_details('json') if result: cherrypy.response.headers['Content-type'] = 'application/json' return result else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_server_list(self, **kwargs): plex_tv = plextv.PlexTV() result = plex_tv.get_plextv_server_list('json') if result: cherrypy.response.headers['Content-type'] = 'application/json' return result else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_sync_lists(self, machine_id='', **kwargs): plex_tv = plextv.PlexTV() result = plex_tv.get_plextv_sync_lists(machine_id=machine_id, output_format='json') if result: cherrypy.response.headers['Content-type'] = 'application/json' return result else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_servers(self, **kwargs): pms_connect = pmsconnect.PmsConnect() result = pms_connect.get_server_list(output_format='json') if result: cherrypy.response.headers['Content-type'] = 'application/json' return result else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_servers_info(self, **kwargs): pms_connect = pmsconnect.PmsConnect() result = pms_connect.get_servers_info() if result: cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps(result) else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_server_prefs(self, **kwargs): pms_connect = pmsconnect.PmsConnect() result = pms_connect.get_server_prefs(output_format='json') if result: cherrypy.response.headers['Content-type'] = 'application/json' return result else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_activity(self, **kwargs): pms_connect = pmsconnect.PmsConnect() result = pms_connect.get_current_activity() if result: cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps(result) else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_full_users_list(self, **kwargs): plex_tv = plextv.PlexTV() result = plex_tv.get_full_users_list() if result: cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps(result) else: logger.warn('Unable to retrieve data.') @cherrypy.expose def refresh_users_list(self, **kwargs): threading.Thread(target=plextv.refresh_users).start() logger.info('Manual user list refresh requested.') @cherrypy.expose def get_sync(self, machine_id=None, user_id=None, **kwargs): pms_connect = pmsconnect.PmsConnect() server_id = pms_connect.get_server_identity() plex_tv = plextv.PlexTV() if not machine_id: result = plex_tv.get_synced_items(machine_id=server_id['machine_identifier'], user_id=user_id) else: result = plex_tv.get_synced_items(machine_id=machine_id, user_id=user_id) if result: output = {"data": result} else: logger.warn('Unable to retrieve sync data for user.') output = {"data": []} cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps(output) @cherrypy.expose def get_sync_item(self, sync_id, **kwargs): pms_connect = pmsconnect.PmsConnect() result = pms_connect.get_sync_item(sync_id, output_format='json') if result: cherrypy.response.headers['Content-type'] = 'application/json' return result else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_sync_transcode_queue(self, **kwargs): pms_connect = pmsconnect.PmsConnect() result = pms_connect.get_sync_transcode_queue(output_format='json') if result: cherrypy.response.headers['Content-type'] = 'application/json' return result else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_server_pref(self, pref=None, **kwargs): pms_connect = pmsconnect.PmsConnect() result = pms_connect.get_server_pref(pref=pref) if result: return result else: logger.warn('Unable to retrieve data.') @cherrypy.expose def get_plexwatch_export_data(self, database_path=None, table_name=None, import_ignore_interval=0, **kwargs): from plexpy import plexwatch_import db_check_msg = plexwatch_import.validate_database(database=database_path, table_name=table_name) if db_check_msg == 'success': threading.Thread(target=plexwatch_import.import_from_plexwatch, kwargs={'database': database_path, 'table_name': table_name, 'import_ignore_interval': import_ignore_interval}).start() return 'Import has started. Check the PlexPy logs to monitor any problems.' else: return db_check_msg @cherrypy.expose def plexwatch_import(self, **kwargs): return serve_template(templatename="plexwatch_import.html", title="Import PlexWatch Database") @cherrypy.expose def get_server_id(self, hostname=None, port=None, **kwargs): from plexpy import http_handler if hostname and port: request_handler = http_handler.HTTPHandler(host=hostname, port=port, token=None) uri = '/identity' request = request_handler.make_request(uri=uri, proto='http', request_type='GET', output_format='', no_token=True) if request: cherrypy.response.headers['Content-type'] = 'application/xml' return request else: logger.warn('Unable to retrieve data.') return None else: return None @cherrypy.expose def random_arnold_quotes(self, **kwargs): from random import randint quote_list = ['To crush your enemies, see them driven before you, and to hear the lamentation of their women!', 'Your clothes, give them to me, now!', 'Do it!', 'If it bleeds, we can kill it', 'See you at the party Richter!', 'Let off some steam, Bennett', 'I\'ll be back', 'Get to the chopper!', 'Hasta La Vista, Baby!', 'It\'s not a tumor!', 'Dillon, you son of a bitch!', 'Benny!! Screw you!!', 'Stop whining! You kids are soft. You lack discipline.', 'Nice night for a walk.', 'Stick around!', 'I need your clothes, your boots and your motorcycle.', 'No, it\'s not a tumor. It\'s not a tumor!', 'I LIED!', 'See you at the party, Richter!', 'Are you Sarah Conner?', 'I\'m a cop you idiot!', 'Come with me if you want to live.', 'Who is your daddy and what does he do?' ] random_number = randint(0, len(quote_list) - 1) return quote_list[int(random_number)] @cherrypy.expose def get_notification_agent_config(self, config_id, **kwargs): config = notifiers.get_notification_agent_config(config_id=config_id) checkboxes = {'email_tls': checked(plexpy.CONFIG.EMAIL_TLS)} return serve_template(templatename="notification_config.html", title="Notification Configuration", data=config, checkboxes=checkboxes) @cherrypy.expose def get_notification_agent_triggers(self, config_id, **kwargs): if config_id.isdigit(): agents = notifiers.available_notification_agents() for agent in agents: if int(config_id) == agent['id']: this_agent = agent break else: this_agent = None else: return None return serve_template(templatename="notification_triggers_modal.html", title="Notification Triggers", data=this_agent) @cherrypy.expose def delete_history_rows(self, row_id, **kwargs): data_factory = datafactory.DataFactory() if row_id: delete_row = data_factory.delete_session_history_rows(row_id=row_id) if delete_row: cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps({'message': delete_row}) else: cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps({'message': 'no data received'}) @cherrypy.expose def delete_all_user_history(self, user_id, **kwargs): data_factory = datafactory.DataFactory() if user_id: delete_row = data_factory.delete_all_user_history(user_id=user_id) if delete_row: cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps({'message': delete_row}) else: cherrypy.response.headers['Content-type'] = 'application/json' return json.dumps({'message': 'no data received'})
gnowxilef/plexpy
plexpy/webserve.py
Python
gpl-3.0
52,488
namespace _02.Rotate_and_Sum { using System; using System.Linq; public class Program { public static void Main() { var arr = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); int k = int.Parse(Console.ReadLine()); var sum = new int[arr.Length]; for (int i = 0; i < k; i++) { RotateArray(arr); SumArrays(sum, arr); } Console.WriteLine(string.Join(" ", sum)); } private static void SumArrays(int[] arr1, int[] arr2) { for (int i = 0; i < arr1.Length; i++) arr1[i] += arr2[i]; } private static void RotateArray(int[] arr) { var original = arr.Clone() as int[]; arr[0] = original[arr.Length - 1]; for (int i = 1; i < arr.Length; i++) arr[i] = original[i - 1]; } } }
martinmladenov/SoftUni-Solutions
Programming Fundamentals/Exercises/12. Arrays - Exercises/02. Rotate and Sum/Program.cs
C#
gpl-3.0
965
/***************************************************************************** * Copyright (c) 2014 Ted John * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. * * This file is part of OpenRCT2. * * OpenRCT2 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 <ctype.h> #include "addresses.h" #include "localisation/localisation.h" #include "object.h" #include "platform/osinterface.h" #include "platform/platform.h" #include "util/sawyercoding.h" int object_entry_compare(rct_object_entry *a, rct_object_entry *b); int object_calculate_checksum(rct_object_entry *entry, char *data, int dataLength); int object_paint(int type, int eax, int ebx, int ecx, int edx, int esi, int edi, int ebp); rct_object_entry *object_get_next(rct_object_entry *entry); /** * * rct2: 0x006A985D */ int object_load(int groupIndex, rct_object_entry *entry) { RCT2_GLOBAL(0xF42B64, uint32) = groupIndex; //part of 6a9866 rct_object_entry *installedObject = RCT2_GLOBAL(RCT2_ADDRESS_INSTALLED_OBJECT_LIST, rct_object_entry*); if (!(RCT2_GLOBAL(0xF42B6C, uint32))){ RCT2_GLOBAL(0xF42BD9, uint8) = 0; return 1; } for (int i = 0; i < RCT2_GLOBAL(0x00F42B6C, sint32); i++) { if (object_entry_compare(installedObject, entry)){ char path[260]; char *objectPath = (char*)installedObject + 16; subsitute_path(path, RCT2_ADDRESS(RCT2_ADDRESS_OBJECT_DATA_PATH, char), objectPath); rct_object_entry openedEntry; FILE *file = fopen(path, "rb"); if (file != NULL) { fread(&openedEntry, sizeof(rct_object_entry), 1, file); if (object_entry_compare(&openedEntry, entry)) { // Get chunk size char *pos = (char*)installedObject + 16; do { pos++; } while (*(pos - 1) != 0); // Read chunk int chunkSize = *((uint32*)pos); char *chunk; if (chunkSize == 0xFFFFFFFF) { chunk = rct2_malloc(0x600000); chunkSize = sawyercoding_read_chunk(file, chunk); chunk = rct2_realloc(chunk, chunkSize); } else { chunk = rct2_malloc(chunkSize); chunkSize = sawyercoding_read_chunk(file, chunk); } fclose(file); // Calculate and check checksum if (object_calculate_checksum(&openedEntry, chunk, chunkSize) != openedEntry.checksum) { RCT2_GLOBAL(0x00F42BD9, uint8) = 2; rct2_free(chunk); return 0; } if (object_paint(openedEntry.flags & 0x0F, 2, 0, openedEntry.flags & 0x0F, 0, (int)chunk, 0, 0)) { RCT2_GLOBAL(0x00F42BD9, uint8) = 3; rct2_free(chunk); return 0; } int yyy = RCT2_GLOBAL(0x009ADAF0, uint32); if (yyy >= 0x4726E){ RCT2_GLOBAL(0x00F42BD9, uint8) = 4; rct2_free(chunk); return 0; } //B84 is openedEntry int ebp = openedEntry.flags & 0x0F; int esi = RCT2_ADDRESS(0x98D97C, uint32)[ebp * 2]; int ecx = groupIndex; if (ecx == -1){ for (int ecx = 0; ((sint32*)esi)[ecx] != -1; ecx++){ if ((ecx + 1) >= object_entry_group_counts[ebp]){ RCT2_GLOBAL(0x00F42BD9, uint8) = 5; rct2_free(chunk); return 0; } } } ((char**)esi)[ecx] = chunk; int* edx = (int*)( ecx * 20 + RCT2_ADDRESS(0x98D980, uint32)[ebp * 2]); memcpy(edx, (int*)&openedEntry, 20); if (RCT2_GLOBAL(0x9ADAFD, uint8) == 0)return 1; object_paint(ecx, 0, ecx, ebp, 0, (int)chunk, 0, 0); return 1; } fclose(file); } } installedObject = object_get_next(installedObject); } //6a991f // Installed Object can not be found. return 0; //return !(RCT2_CALLPROC_X(0x006A985D, 0, 0, groupIndex, 0, 0, 0, (int)entry) & 0x400); } /** rct2: 0x006a9f42 * ebx : file * ebp : entry */ int sub_6A9F42(FILE *file, rct_object_entry* entry){ int eax = 0, entryGroupIndex = 0, type = 0, edx = 0, edi = 0, ebp = (int)entry, chunk = 0; RCT2_CALLFUNC_X(0x6A9DA2, &eax, &entryGroupIndex, &type, &edx, &chunk, &edi, &ebp); if (eax == 0) return 0; object_paint(type, 1, entryGroupIndex, type, edx, chunk, edi, ebp); rct_object_entry* installed_entry = (rct_object_entry*)(entryGroupIndex * 20 + RCT2_ADDRESS(0x98D980, uint32)[type * 2]); uint8* dst_buffer = malloc(0x600000); memcpy(dst_buffer, (void*)installed_entry, 16); uint32 size_dst = 16; sawyercoding_chunk_header chunkHeader; // Encoding type (not used anymore) RCT2_GLOBAL(0x9E3CBD, uint8) = object_entry_group_encoding[type]; chunkHeader.encoding = object_entry_group_encoding[type]; chunkHeader.length = *(uint32*)(((uint8*)installed_entry + 16)); size_dst += sawyercoding_write_chunk_buffer(dst_buffer+16, (uint8*)chunk, chunkHeader); fwrite(dst_buffer, 1, size_dst, file); free(dst_buffer); return 1; } /** * * rct2: 0x006AA2B7 */ int object_load_packed(FILE *file) { object_unload_all(); rct_object_entry* entry = RCT2_ADDRESS(0xF42B84, rct_object_entry); fread((void*)entry, 16, 1, file); uint8* chunk = rct2_malloc(0x600000); uint32 chunkSize = sawyercoding_read_chunk(file, chunk); chunk = rct2_realloc(chunk, chunkSize); if (chunk == NULL){ return 0; } if (object_calculate_checksum(entry, chunk, chunkSize) != entry->checksum){ rct2_free(chunk); return 0; } if (object_paint(entry->flags & 0x0F, 2, 0, entry->flags & 0x0F, 0, (int)chunk, 0, 0)) { rct2_free(chunk); return 0; } int yyy = RCT2_GLOBAL(0x009ADAF0, uint32); if (yyy >= 0x4726E){ rct2_free(chunk); return 0; } int type = entry->flags & 0x0F; // ecx int entryGroupIndex = 0; for (; entryGroupIndex < object_entry_group_counts[type]; entryGroupIndex++){ if (RCT2_ADDRESS(0x98D97C, uint32*)[type * 2][entryGroupIndex] == -1){ break; } } if (entryGroupIndex == object_entry_group_counts[type]){ rct2_free(chunk); return 0; } RCT2_ADDRESS(0x98D97C, uint8**)[type * 2][entryGroupIndex] = chunk; int* edx = (int*)(entryGroupIndex * 20 + RCT2_ADDRESS(0x98D980, uint32)[type * 2]); memcpy(edx, (int*)entry, 16); *(edx + 4) = chunkSize; //esi rct_object_entry *installedObject = RCT2_GLOBAL(RCT2_ADDRESS_INSTALLED_OBJECT_LIST, rct_object_entry*); if (RCT2_GLOBAL(0xF42B6C, uint32)){ for (uint32 i = 0; i < RCT2_GLOBAL(0xF42B6C, uint32); ++i){ if (object_entry_compare(entry, installedObject)){ object_unload_all(); return 0; } installedObject = object_get_next(installedObject); } } //Installing new data //format_string(0x141ED68, 3163, 0); //Code for updating progress bar removed. char path[260]; char objectPath[13] = { 0 }; for (int i = 0; i < 8; ++i){ if (entry->name[i] != ' ') objectPath[i] = toupper(entry->name[i]); else objectPath[i] = '\0'; } subsitute_path(path, RCT2_ADDRESS(RCT2_ADDRESS_OBJECT_DATA_PATH, char), objectPath); char* last_char = path + strlen(path); strcat(path, ".DAT"); // for (; platform_file_exists(path);){ for (char* curr_char = last_char - 1;; --curr_char){ if (*curr_char == '\\'){ subsitute_path(path, RCT2_ADDRESS(RCT2_ADDRESS_OBJECT_DATA_PATH, char), "00000000.DAT"); char* last_char = path + strlen(path); break; } if (*curr_char < '0') *curr_char = '0'; else if (*curr_char == '9') *curr_char = 'A'; else if (*curr_char == 'Z') *curr_char = '0'; else (*curr_char)++; if (*curr_char != '0') break; } } // Removed progress bar code // The following section cannot be finished until 6A9F42 is finished // Run the game once with vanila rct2 to not reach this part of code. RCT2_ERROR("Function not finished. Please run this save once with vanila rct2."); FILE* obj_file = fopen(path, "wb"); if (obj_file){ // Removed progress bar code sub_6A9F42(obj_file, entry); fclose(obj_file); // Removed progress bar code object_unload_all(); // Removed progress bar code return 1; } else{ object_unload_all(); return 0; } //create file //6aa48C int eax = 1;//, ebx = 0, ecx = 0, edx = 0, esi = 0, edi = 0, ebp = 0; //RCT2_CALLFUNC_X(0x006AA2B7, &eax, &ebx, &ecx, &edx, &esi, &edi, &ebp); return eax; } /** * * rct2: 0x006A9CAF */ void object_unload(int groupIndex, rct_object_entry_extended *entry) { RCT2_CALLPROC_X(0x006A9CAF, 0, groupIndex, 0, 0, 0, 0, (int)entry); } int object_entry_compare(rct_object_entry *a, rct_object_entry *b) { if (a->flags & 0xF0) { if ((a->flags & 0x0F) != (b->flags & 0x0F)) return 0; if (*((uint32*)a->name) != *((uint32*)b->name)) return 0; if (*((uint32*)(&a->name[4])) != *((uint32*)(&b->name[4]))) return 0; } else { if (a->flags != b->flags) return 0; if (*((uint32*)a->name) != *((uint32*)b->name)) return 0; if (*((uint32*)(&a->name[4])) != *((uint32*)(&b->name[4]))) return 0; if (a->checksum != b->checksum) return 0; } return 1; } int object_calculate_checksum(rct_object_entry *entry, char *data, int dataLength) { int i; char *eee = (char*)entry; int checksum = 0xF369A75B; char *ccc = (char*)&checksum; *ccc ^= eee[0]; checksum = rol32(checksum, 11); for (i = 4; i < 12; i++) { *ccc ^= eee[i]; checksum = rol32(checksum, 11); } for (i = 0; i < dataLength; i++) { *ccc ^= data[i]; checksum = rol32(checksum, 11); } return checksum; } /** * rct2: 0x66B355 part * If al is 0 * chunk : esi */ int object_scenario_load_custom_text(char* chunk){ int ebp = (int)(&((uint32*)chunk)[2]); int edx = 0; int eax, ebx, ecx, edi; RCT2_CALLFUNC_X(0x6A9E24, &eax, &ebx, &ecx, &edx, (int*)&chunk, &edi, &ebp); *((uint16*)chunk) = eax; edx++; RCT2_CALLFUNC_X(0x6A9E24, &eax, &ebx, &ecx, &edx, (int*)&chunk, &edi, &ebp); *((uint16*)chunk + 1) = eax; edx++; RCT2_CALLFUNC_X(0x6A9E24, &eax, &ebx, &ecx, &edx, (int*)&chunk, &edi, &ebp); *((uint16*)chunk + 2) = eax; if (RCT2_GLOBAL(0x9ADAF4, int) == -1)return 0; else *(RCT2_GLOBAL(0x9ADAF4, uint32*)) = 0; return 1; } int object_paint(int type, int eax, int ebx, int ecx, int edx, int esi, int edi, int ebp) { if (type == 10){ if (eax == 0) return object_scenario_load_custom_text((char*)esi); } return RCT2_CALLPROC_X(RCT2_ADDRESS(0x0098D9D4, uint32)[type], eax, ebx, ecx, edx, esi, edi, ebp) & 0x100; } /** * * rct2: 0x006A9428 */ int object_get_scenario_text(rct_object_entry *entry) { // RCT2_CALLPROC_X(0x006A9428, 0, 0, 0, 0, 0, 0, (int)entry); return; int i; rct_object_entry *installedObject = RCT2_GLOBAL(RCT2_ADDRESS_INSTALLED_OBJECT_LIST, rct_object_entry*); for (i = 0; i < RCT2_GLOBAL(0x00F42B6C, sint32); i++) { if (object_entry_compare(installedObject, entry)) { char path[260]; char *objectPath = (char*)installedObject + 16; subsitute_path(path, RCT2_ADDRESS(RCT2_ADDRESS_OBJECT_DATA_PATH, char), objectPath); rct_object_entry openedEntry; FILE *file = fopen(path, "rb"); if (file != NULL) { fread(&openedEntry, sizeof(rct_object_entry), 1, file); if (object_entry_compare(&openedEntry, entry)) { // Get chunk size char *pos = (char*)installedObject + 16; do { pos++; } while (*(pos - 1) != 0); // Read chunk int chunkSize = *((uint32*)pos); char *chunk; if (chunkSize == 0xFFFFFFFF) { chunk = malloc(0x600000); chunkSize = sawyercoding_read_chunk(file, chunk); chunk = realloc(chunk, chunkSize); } else { chunk = malloc(chunkSize); sawyercoding_read_chunk(file, chunk); } fclose(file); // Calculate and check checksum if (object_calculate_checksum(&openedEntry, chunk, chunkSize) != openedEntry.checksum) { RCT2_GLOBAL(0x00F42BD9, uint8) = 2; free(chunk); return 0; } if (object_paint(openedEntry.flags & 0x0F, 2, 0, 0, 0, (int)chunk, 0, 0)) { RCT2_GLOBAL(0x00F42BD9, uint8) = 3; free(chunk); return 0; } int yyy = RCT2_GLOBAL(0x009ADAF0, uint32); RCT2_GLOBAL(0x009ADAF0, uint32) = 0x726E; RCT2_GLOBAL(0x009ADAF8, uint32) = (int)chunk; *((rct_object_entry*)0x00F42BC8) = openedEntry; RCT2_GLOBAL(0x009ADAFC, uint8) = 255; RCT2_GLOBAL(0x009ADAFD, uint8) = 1; object_paint(openedEntry.flags & 0x0F, 0, 0, 0, 0, (int)chunk, 0, 0); RCT2_GLOBAL(0x009ADAFC, uint8) = 0; RCT2_GLOBAL(0x009ADAFD, uint8) = 0; RCT2_GLOBAL(0x009ADAF0, uint32) = yyy; return 1; } fclose(file); } } installedObject = object_get_next(installedObject); } RCT2_GLOBAL(0x00F42BD9, uint8) = 0; return 0; } /** * * rct2: 0x006A982D */ void object_free_scenario_text() { if (RCT2_GLOBAL(0x009ADAF8, void*) != NULL) { free(RCT2_GLOBAL(0x009ADAF8, void*)); RCT2_GLOBAL(0x009ADAF8, void*) = NULL; } } int object_get_length(rct_object_entry *entry) { return (int)object_get_next(entry) - (int)entry; } rct_object_entry *object_get_next(rct_object_entry *entry) { char *pos = (char*)entry; // Skip sizeof(rct_object_entry) pos += 16; // Skip filename do { pos++; } while (*(pos - 1) != 0); // Skip pos += 4; // Skip name do { pos++; } while (*(pos - 1) != 0); // Skip size of chunk pos += 4; // Skip pos += *pos++ * 16; // Skip theme objects pos += *pos++ * 16; // Skip pos += 4; return (rct_object_entry*)pos; }
Corsleutel/OpenRCT2
src/object.c
C
gpl-3.0
13,706
import store from "@/store"; import { modV } from "@/modv"; import Vue from "vue"; const state = { width: 200, height: 200, previewX: 0, previewY: 0, previewWidth: 0, previewHeight: 0 }; // getters const getters = { width: state => state.width, height: state => state.height, area: state => state.width * state.height, dimensions: state => ({ width: state.width, height: state.height }), previewValues: state => ({ width: state.previewWidth, height: state.previewHeight, x: state.previewX, y: state.previewY }) }; // actions const actions = { updateSize({ state }) { store.dispatch("size/setDimensions", { width: state.width, height: state.height }); }, setDimensions({ commit, state }, { width, height }) { let widthShadow = width; let heightShadow = height; const largestWindowReference = store.getters[ "windows/largestWindowReference" ](); if ( widthShadow >= largestWindowReference.innerWidth && heightShadow >= largestWindowReference.innerHeight ) { if (store.getters["user/constrainToOneOne"]) { if (widthShadow > heightShadow) { widthShadow = heightShadow; } else { heightShadow = widthShadow; } } commit("setDimensions", { width: widthShadow, height: heightShadow }); let dpr = window.devicePixelRatio || 1; if (!store.getters["user/useRetina"]) dpr = 1; modV.resize(state.width, state.height, dpr); store.dispatch("modVModules/resizeActive"); store.dispatch("layers/resize", { width: state.width, height: state.height, dpr }); store.dispatch("windows/resize", { width: state.width, height: state.height, dpr }); store.dispatch("size/calculatePreviewCanvasValues"); } }, resizePreviewCanvas() { modV.previewCanvas.width = modV.previewCanvas.clientWidth; modV.previewCanvas.height = modV.previewCanvas.clientHeight; store.dispatch("size/calculatePreviewCanvasValues"); }, calculatePreviewCanvasValues({ commit, state }) { // thanks to http://ninolopezweb.com/2016/05/18/how-to-preserve-html5-canvas-aspect-ratio/ // for great aspect ratio advice! const widthToHeight = state.width / state.height; let newWidth = modV.previewCanvas.width; let newHeight = modV.previewCanvas.height; const newWidthToHeight = newWidth / newHeight; if (newWidthToHeight > widthToHeight) { newWidth = Math.round(newHeight * widthToHeight); } else { newHeight = Math.round(newWidth / widthToHeight); } commit("setPreviewValues", { x: Math.round(modV.previewCanvas.width / 2 - newWidth / 2), y: Math.round(modV.previewCanvas.height / 2 - newHeight / 2), width: newWidth, height: newHeight }); } }; // mutations const mutations = { setWidth(state, { width }) { Vue.set(state, "width", width); }, setHeight(state, { height }) { Vue.set(state, "height", height); }, setDimensions(state, { width, height }) { Vue.set(state, "width", width); Vue.set(state, "height", height); }, setPreviewValues(state, { width, height, x, y }) { Vue.set(state, "previewWidth", width); Vue.set(state, "previewHeight", height); Vue.set(state, "previewX", x); Vue.set(state, "previewY", y); } }; export default { namespaced: true, state, getters, actions, mutations };
2xAA/modV
src/store/modules/size.js
JavaScript
gpl-3.0
3,477
<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>&quot;asmail/resources/inbox&quot; | 3NProtocols demo</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="../assets/css/main.css"> <script src="../assets/js/modernizr.js"></script> </head> <body> <header> <div class="tsd-page-toolbar"> <div class="container"> <div class="table-wrap"> <div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base=".."> <div class="field"> <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> <input id="tsd-search-field" type="text" /> </div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li> </ul> <a href="../index.html" class="title">3NProtocols demo</a> </div> <div class="table-cell" id="tsd-widgets"> <div id="tsd-filter"> <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> <div class="tsd-filter-group"> <div class="tsd-select" id="tsd-filter-visibility"> <span class="tsd-select-label">All</span> <ul class="tsd-select-list"> <li data-value="public">Public</li> <li data-value="protected">Public/Protected</li> <li data-value="private" class="selected">All</li> </ul> </div> <input type="checkbox" id="tsd-filter-inherited" checked /> <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label> <input type="checkbox" id="tsd-filter-externals" checked /> <label class="tsd-widget" for="tsd-filter-externals">Externals</label> <input type="checkbox" id="tsd-filter-only-exported" /> <label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label> </div> </div> <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a> </div> </div> </div> </div> <div class="tsd-page-title"> <div class="container"> <ul class="tsd-breadcrumb"> <li> <a href="../globals.html">Globals</a> </li> <li> <a href="_asmail_resources_inbox_.html">&quot;asmail/resources/inbox&quot;</a> </li> </ul> <h1>External module &quot;asmail/resources/inbox&quot;</h1> </div> </div> </header> <div class="container container-main"> <div class="row"> <div class="col-8 col-content"> <section class="tsd-panel-group tsd-index-group"> <h2>Index</h2> <section class="tsd-panel tsd-index-panel"> <div class="tsd-index-content"> <section class="tsd-index-section "> <h3>Classes</h3> <ul class="tsd-index-list"> <li class="tsd-kind-class tsd-parent-kind-external-module"><a href="../classes/_asmail_resources_inbox_.inbox.html" class="tsd-kind-icon">Inbox</a></li> </ul> </section> <section class="tsd-index-section "> <h3>Interfaces</h3> <ul class="tsd-index-list"> <li class="tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported"><a href="../interfaces/_asmail_resources_inbox_.anonsenderinvites.html" class="tsd-kind-icon">Anon<wbr>Sender<wbr>Invites</a></li> <li class="tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported"><a href="../interfaces/_asmail_resources_inbox_.anonsenderpolicy.html" class="tsd-kind-icon">Anon<wbr>Sender<wbr>Policy</a></li> <li class="tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported"><a href="../interfaces/_asmail_resources_inbox_.authsenderinvites.html" class="tsd-kind-icon">Auth<wbr>Sender<wbr>Invites</a></li> <li class="tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported"><a href="../interfaces/_asmail_resources_inbox_.authsenderpolicy.html" class="tsd-kind-icon">Auth<wbr>Sender<wbr>Policy</a></li> <li class="tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported"><a href="../interfaces/_asmail_resources_inbox_.blacklist.html" class="tsd-kind-icon">Blacklist</a></li> <li class="tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported"><a href="../interfaces/_asmail_resources_inbox_.msgobjsizes.html" class="tsd-kind-icon">Msg<wbr>Obj<wbr>Sizes</a></li> <li class="tsd-kind-interface tsd-parent-kind-external-module"><a href="../interfaces/_asmail_resources_inbox_.objreader.html" class="tsd-kind-icon">Obj<wbr>Reader</a></li> <li class="tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported"><a href="../interfaces/_asmail_resources_inbox_.whitelist.html" class="tsd-kind-icon">Whitelist</a></li> </ul> </section> <section class="tsd-index-section tsd-is-not-exported"> <h3>Variables</h3> <ul class="tsd-index-list"> <li class="tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"><a href="_asmail_resources_inbox_.html#default_file_read_buffer_size" class="tsd-kind-icon">DEFAULT_<wbr>FILE_<wbr>READ_<wbr>BUFFER_<wbr>SIZE</a></li> <li class="tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"><a href="_asmail_resources_inbox_.html#default_file_write_buffer_size" class="tsd-kind-icon">DEFAULT_<wbr>FILE_<wbr>WRITE_<wbr>BUFFER_<wbr>SIZE</a></li> <li class="tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"><a href="_asmail_resources_inbox_.html#xsp_header_file_name_end" class="tsd-kind-icon">XSP_<wbr>HEADER_<wbr>FILE_<wbr>NAME_<wbr>END</a></li> <li class="tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"><a href="_asmail_resources_inbox_.html#xsp_segs_file_name_end" class="tsd-kind-icon">XSP_<wbr>SEGS_<wbr>FILE_<wbr>NAME_<wbr>END</a></li> <li class="tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"><a href="_asmail_resources_inbox_.html#exec" class="tsd-kind-icon">exec</a></li> </ul> </section> <section class="tsd-index-section tsd-is-not-exported"> <h3>Functions</h3> <ul class="tsd-index-list"> <li class="tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"><a href="_asmail_resources_inbox_.html#genmsgidandmakefolder" class="tsd-kind-icon">gen<wbr>Msg<wbr>IdAnd<wbr>Make<wbr>Folder</a></li> <li class="tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"><a href="_asmail_resources_inbox_.html#readjsonfile" class="tsd-kind-icon">readJSONFile</a></li> <li class="tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"><a href="_asmail_resources_inbox_.html#setdefaultparameters" class="tsd-kind-icon">set<wbr>Default<wbr>Parameters</a></li> <li class="tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"><a href="_asmail_resources_inbox_.html#writejsonfile" class="tsd-kind-icon">writeJSONFile</a></li> </ul> </section> <section class="tsd-index-section "> <h3>Object literals</h3> <ul class="tsd-index-list"> <li class="tsd-kind-object-literal tsd-parent-kind-external-module"><a href="_asmail_resources_inbox_.html#sc" class="tsd-kind-icon">SC</a></li> </ul> </section> </div> </section> </section> <section class="tsd-panel-group tsd-member-group tsd-is-not-exported"> <h2>Variables</h2> <section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"> <a name="default_file_read_buffer_size" class="tsd-anchor"></a> <h3>DEFAULT_<wbr>FILE_<wbr>READ_<wbr>BUFFER_<wbr>SIZE</h3> <div class="tsd-signature tsd-kind-icon">DEFAULT_<wbr>FILE_<wbr>READ_<wbr>BUFFER_<wbr>SIZE<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in asmail/resources/inbox.ts:49</li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"> <a name="default_file_write_buffer_size" class="tsd-anchor"></a> <h3>DEFAULT_<wbr>FILE_<wbr>WRITE_<wbr>BUFFER_<wbr>SIZE</h3> <div class="tsd-signature tsd-kind-icon">DEFAULT_<wbr>FILE_<wbr>WRITE_<wbr>BUFFER_<wbr>SIZE<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in asmail/resources/inbox.ts:48</li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"> <a name="xsp_header_file_name_end" class="tsd-anchor"></a> <h3>XSP_<wbr>HEADER_<wbr>FILE_<wbr>NAME_<wbr>END</h3> <div class="tsd-signature tsd-kind-icon">XSP_<wbr>HEADER_<wbr>FILE_<wbr>NAME_<wbr>END<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div> <aside class="tsd-sources"> <ul> <li>Defined in asmail/resources/inbox.ts:51</li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"> <a name="xsp_segs_file_name_end" class="tsd-anchor"></a> <h3>XSP_<wbr>SEGS_<wbr>FILE_<wbr>NAME_<wbr>END</h3> <div class="tsd-signature tsd-kind-icon">XSP_<wbr>SEGS_<wbr>FILE_<wbr>NAME_<wbr>END<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div> <aside class="tsd-sources"> <ul> <li>Defined in asmail/resources/inbox.ts:52</li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"> <a name="exec" class="tsd-anchor"></a> <h3>exec</h3> <div class="tsd-signature tsd-kind-icon">exec<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">exec</span></div> <aside class="tsd-sources"> <ul> <li>Defined in asmail/resources/inbox.ts:21</li> </ul> </aside> </section> </section> <section class="tsd-panel-group tsd-member-group tsd-is-not-exported"> <h2>Functions</h2> <section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"> <a name="genmsgidandmakefolder" class="tsd-anchor"></a> <h3>gen<wbr>Msg<wbr>IdAnd<wbr>Make<wbr>Folder</h3> <ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon">gen<wbr>Msg<wbr>IdAnd<wbr>Make<wbr>Folder<span class="tsd-signature-symbol">(</span>delivPath<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in asmail/resources/inbox.ts:697</li> </ul> </aside> <div class="tsd-comment tsd-typography"> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>delivPath: <span class="tsd-signature-type">string</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></h4> <p>a promise, resolvable to generated msg id, when folder for a message is created in the delivery folder.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"> <a name="readjsonfile" class="tsd-anchor"></a> <h3>readJSONFile</h3> <ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon">readJSONFile<span class="tsd-signature-symbol">(</span>path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in asmail/resources/inbox.ts:656</li> </ul> </aside> <div class="tsd-comment tsd-typography"> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>path: <span class="tsd-signature-type">string</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4> <p>a promise, resolvable to json object, read from the named file.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"> <a name="setdefaultparameters" class="tsd-anchor"></a> <h3>set<wbr>Default<wbr>Parameters</h3> <ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon">set<wbr>Default<wbr>Parameters<span class="tsd-signature-symbol">(</span>inbox<span class="tsd-signature-symbol">: </span><a href="../classes/_asmail_resources_inbox_.inbox.html" class="tsd-signature-type">Inbox</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in asmail/resources/inbox.ts:664</li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>inbox: <a href="../classes/_asmail_resources_inbox_.inbox.html" class="tsd-signature-type">Inbox</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"> <a name="writejsonfile" class="tsd-anchor"></a> <h3>writeJSONFile</h3> <ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon">writeJSONFile<span class="tsd-signature-symbol">(</span>json<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in asmail/resources/inbox.ts:643</li> </ul> </aside> <div class="tsd-comment tsd-typography"> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>json: <span class="tsd-signature-type">any</span></h5> </li> <li> <h5>path: <span class="tsd-signature-type">string</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4> <p>a promise, resolvable, when given json object has been written to named file.</p> </li> </ul> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Object literals</h2> <section class="tsd-panel tsd-member tsd-kind-object-literal tsd-parent-kind-external-module"> <a name="sc" class="tsd-anchor"></a> <h3>SC</h3> <div class="tsd-signature tsd-kind-icon">SC<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div> <aside class="tsd-sources"> <ul> <li>Defined in asmail/resources/inbox.ts:39</li> </ul> </aside> <section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-object-literal"> <a name="sc.msg_unknown" class="tsd-anchor"></a> <h3>MSG_<wbr>UNKNOWN</h3> <div class="tsd-signature tsd-kind-icon">MSG_<wbr>UNKNOWN<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div> <aside class="tsd-sources"> <ul> <li>Defined in asmail/resources/inbox.ts:42</li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-object-literal"> <a name="sc.obj_exist" class="tsd-anchor"></a> <h3>OBJ_<wbr>EXIST</h3> <div class="tsd-signature tsd-kind-icon">OBJ_<wbr>EXIST<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div> <aside class="tsd-sources"> <ul> <li>Defined in asmail/resources/inbox.ts:40</li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-object-literal"> <a name="sc.obj_unknown" class="tsd-anchor"></a> <h3>OBJ_<wbr>UNKNOWN</h3> <div class="tsd-signature tsd-kind-icon">OBJ_<wbr>UNKNOWN<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div> <aside class="tsd-sources"> <ul> <li>Defined in asmail/resources/inbox.ts:43</li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-object-literal"> <a name="sc.user_unknown" class="tsd-anchor"></a> <h3>USER_<wbr>UNKNOWN</h3> <div class="tsd-signature tsd-kind-icon">USER_<wbr>UNKNOWN<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div> <aside class="tsd-sources"> <ul> <li>Defined in asmail/resources/inbox.ts:41</li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-object-literal"> <a name="sc.write_overflow" class="tsd-anchor"></a> <h3>WRITE_<wbr>OVERFLOW</h3> <div class="tsd-signature tsd-kind-icon">WRITE_<wbr>OVERFLOW<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div> <aside class="tsd-sources"> <ul> <li>Defined in asmail/resources/inbox.ts:44</li> </ul> </aside> </section> </section> </section> </div> <div class="col-4 col-menu menu-sticky-wrap menu-highlight"> <nav class="tsd-navigation primary"> <ul> <li class="globals "> <a href="../globals.html"><em>Globals</em></a> </li> <li class="current tsd-kind-external-module"> <a href="_asmail_resources_inbox_.html">"asmail/resources/inbox"</a> </li> </ul> </nav> <nav class="tsd-navigation secondary menu-sticky"> <ul class="before-current"> <li class=" tsd-kind-class tsd-parent-kind-external-module"> <a href="../classes/_asmail_resources_inbox_.inbox.html" class="tsd-kind-icon">Inbox</a> </li> <li class=" tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported"> <a href="../interfaces/_asmail_resources_inbox_.anonsenderinvites.html" class="tsd-kind-icon">Anon<wbr>Sender<wbr>Invites</a> </li> <li class=" tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported"> <a href="../interfaces/_asmail_resources_inbox_.anonsenderpolicy.html" class="tsd-kind-icon">Anon<wbr>Sender<wbr>Policy</a> </li> <li class=" tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported"> <a href="../interfaces/_asmail_resources_inbox_.authsenderinvites.html" class="tsd-kind-icon">Auth<wbr>Sender<wbr>Invites</a> </li> <li class=" tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported"> <a href="../interfaces/_asmail_resources_inbox_.authsenderpolicy.html" class="tsd-kind-icon">Auth<wbr>Sender<wbr>Policy</a> </li> <li class=" tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported"> <a href="../interfaces/_asmail_resources_inbox_.blacklist.html" class="tsd-kind-icon">Blacklist</a> </li> <li class=" tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported"> <a href="../interfaces/_asmail_resources_inbox_.msgobjsizes.html" class="tsd-kind-icon">Msg<wbr>Obj<wbr>Sizes</a> </li> <li class=" tsd-kind-interface tsd-parent-kind-external-module"> <a href="../interfaces/_asmail_resources_inbox_.objreader.html" class="tsd-kind-icon">Obj<wbr>Reader</a> </li> <li class=" tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported"> <a href="../interfaces/_asmail_resources_inbox_.whitelist.html" class="tsd-kind-icon">Whitelist</a> </li> <li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"> <a href="_asmail_resources_inbox_.html#default_file_read_buffer_size" class="tsd-kind-icon">DEFAULT_<wbr>FILE_<wbr>READ_<wbr>BUFFER_<wbr>SIZE</a> </li> <li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"> <a href="_asmail_resources_inbox_.html#default_file_write_buffer_size" class="tsd-kind-icon">DEFAULT_<wbr>FILE_<wbr>WRITE_<wbr>BUFFER_<wbr>SIZE</a> </li> <li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"> <a href="_asmail_resources_inbox_.html#xsp_header_file_name_end" class="tsd-kind-icon">XSP_<wbr>HEADER_<wbr>FILE_<wbr>NAME_<wbr>END</a> </li> <li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"> <a href="_asmail_resources_inbox_.html#xsp_segs_file_name_end" class="tsd-kind-icon">XSP_<wbr>SEGS_<wbr>FILE_<wbr>NAME_<wbr>END</a> </li> <li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"> <a href="_asmail_resources_inbox_.html#exec" class="tsd-kind-icon">exec</a> </li> <li class=" tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"> <a href="_asmail_resources_inbox_.html#genmsgidandmakefolder" class="tsd-kind-icon">gen<wbr>Msg<wbr>IdAnd<wbr>Make<wbr>Folder</a> </li> <li class=" tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"> <a href="_asmail_resources_inbox_.html#readjsonfile" class="tsd-kind-icon">readJSONFile</a> </li> <li class=" tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"> <a href="_asmail_resources_inbox_.html#setdefaultparameters" class="tsd-kind-icon">set<wbr>Default<wbr>Parameters</a> </li> <li class=" tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"> <a href="_asmail_resources_inbox_.html#writejsonfile" class="tsd-kind-icon">writeJSONFile</a> </li> <li class=" tsd-kind-object-literal tsd-parent-kind-external-module"> <a href="_asmail_resources_inbox_.html#sc" class="tsd-kind-icon">SC</a> </li> </ul> </nav> </div> </div> </div> <footer class="with-border-bottom"> <div class="container"> <h2>Legend</h2> <div class="tsd-legend-group"> <ul class="tsd-legend"> <li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li> <li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li> <li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li> <li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li> <li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li> <li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li> <li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li> <li class="tsd-kind-enum-member"><span class="tsd-kind-icon">Enumeration member</span></li> <li class="tsd-kind-property tsd-parent-kind-enum"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method tsd-parent-kind-enum"><span class="tsd-kind-icon">Method</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li> <li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li> <li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li> <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li> <li class="tsd-kind-index-signature tsd-parent-kind-interface"><span class="tsd-kind-icon">Index signature</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li> <li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li> <li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li> <li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li> <li class="tsd-kind-index-signature tsd-parent-kind-class"><span class="tsd-kind-icon">Index signature</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li> <li class="tsd-kind-call-signature tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li> </ul> </div> </div> </footer> <div class="container tsd-generator"> <p>Generated using <a href="http://typedoc.io" target="_blank">TypeDoc</a></p> </div> <div class="overlay"></div> <script src="../assets/js/main.js"></script> <script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script> </body> </html>
3nsoft/3nweb-protocols
dist/code-docs/modules/_asmail_resources_inbox_.html
HTML
gpl-3.0
29,481
<?php // __________ ___ __ ______ // // ___ ____/_____ __ | / /_______ /_ // // __ __/ _ __ `/_ | /| / /_ _ \_ __ \ // // _ /___ / /_/ /__ |/ |/ / / __/ /_/ / // // /_____/ \__,_/ ____/|__/ \___//_.___/ // // Eaweb, cadriciel pour applicatons web en php // Modifié le: 20 juin 2015 /* * ROADS Modification des requêtes en fonction des paramètres indiqués */ Class ROADS { public $roads; public $config; public function __construct() { } public function LOAD($config) { $this->config = $config; if($this->config['useRoads'] == True AND !empty($this->config['rules'])) { foreach($this->config['rules'] as $key => $value) { if($_SESSION['_PAGE_REQUEST_'] == $key) { $_SESSION['_PAGE_REQUEST_'] = $value; } } } } } $ROADS = new ROADS();
florian959/eaweb
system/ROADS.php
PHP
gpl-3.0
853
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Xamarin.Forms; namespace ImageCircleProject { public class App : Application { public App() { // The root page of your application MainPage = new MainPage(); } protected override void OnStart() { // Handle when your app starts } protected override void OnSleep() { // Handle when your app sleeps } protected override void OnResume() { // Handle when your app resumes } } }
Emixam23/XamarinByEmixam23
Detailed Part/Controls/ImageCircleProject/ImageCircleProject/ImageCircleProject/App.cs
C#
gpl-3.0
641
/* * Copyright 2012 Marcos Lordello Chaim, José Carlos Maldonado, Mario Jino, * CCSL-ICMC <ccsl.icmc.usp.br> * * This file is part of POKE-TOOL. * * POKE-TOOL 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/>. */ /* ** salvagrf.c %I% %Y% %E% %U% */ #include <stdio.h> #include <stdlib.h> #include "newpokelib.h" #include "util.h" #include "header.h" #include "hparserg.h" #include "hrotsem.h" /* Declaracao de Variaveis Globais */ extern int num_no; extern int only_glb_used; extern FILE * arqfonte; extern DESPOINTER names; extern NODEINFO info_no; extern struct grafo * graph; extern table_element * pvarname; void elimina_variaveis_locais PROTO ((void)); /*******************************************************************/ /* salva_grafo_def(NODEINFO,char*) */ /* Autor: Marcos L. Chaim */ /* Data: 26/12/94 */ /* Versao: 1.0 */ /* */ /* */ /* funcao: salva o grafo def em arquivo no diretorio da funcao. */ /* */ /* Entradas: ponteiro para estrutura info_no e nome do diretorio. */ /* */ /* Saida: nenhuma. */ /* */ /*******************************************************************/ void salva_grafo_def(info_no,dir) NODEINFO info_no; char * dir; { /* Declaracao de Variaveis Locais */ FILE * grafodef, *def_use_ptr; int i; char filename[300]; struct no * node; /* Cria diretorio da funcao */ cria_dir(dir); /* Cria grafo def */ #ifdef TURBO_C strcpy(filename,".\\"); #else strcpy(filename,"./"); #endif strcat(filename,dir); #ifdef TURBO_C strcat(filename,"\\"); #else strcat(filename,"/"); #endif strcat(filename,"grafodef.tes"); grafodef = (FILE *) fopen(filename,"w"); if(grafodef == (FILE *) NULL) error("* * Erro Fatal: Nao consegui abrir o arquivo grafodef.tes * *"); /* Cria arquivo def-use-ptr */ #ifdef TURBO_C strcpy(filename,".\\"); #else strcpy(filename,"./"); #endif strcat(filename,dir); #ifdef TURBO_C strcat(filename,"\\"); #else strcat(filename,"/"); #endif /* strcat(filename,"def-use-ptr.tes"); def_use_ptr = (FILE *) fopen(filename,"w"); if(def_use_ptr == (FILE *) NULL) error("* * Erro Fatal: Nao consegui abrir o arquivo def-use-ptr.tes * *"); */ fprintf(grafodef,"VARIAVEIS DEFINIDAS nos NOS do modulo %s\n\n", dir); fprintf(grafodef,"Variaveis Definidas = Vars Defs\n"); fprintf(grafodef,"Variaveis Usos Computacionais = Vars C-Usos\n"); fprintf(grafodef,"Variaveis Usos Predicativos = Vars P-Usos\n"); fprintf(grafodef,"Variaveis possivelmente definidas por Referencia = Vars Refs\n\n"); /* fprintf(def_use_ptr,"VARIAVEIS DEFINIDAS nos NOS do modulo %s\n\n", dir); fprintf(def_use_ptr,"Variaveis Definidas = Vars Defs\n"); fprintf(def_use_ptr,"Variaveis Usos Computacionais = Vars C-Usos\n"); fprintf(def_use_ptr,"Variaveis Usos Predicativos = Vars P-Usos\n"); fprintf(def_use_ptr,"Variaveis possivelmente definidas por Referencia = Vars Refs\n\n"); */ for(i=1;i>=1 && i <= num_no; ++i) { int j; fprintf(grafodef,"\n\n\nNO' %2d\n",i); fprintf(grafodef,"\nVars Defs : "); /* fprintf(def_use_ptr,"\n\n\nNO' %2d\n",i); fprintf(def_use_ptr,"\nVars Defs : "); */ for(j=0; j>=0 && j <= get_name_counter(); ++j) if(test_bit(j,&(info_no[i].defg_i))) { print_names(grafodef,pvarname,j); fprintf(grafodef," "); /* fprintf(def_use_ptr,"#%d ",j); fprintf(def_use_ptr,"%ld %ld %ld\n",info_no[i].s_defg_i.vec_var_source[j].linha,info_no[i].s_defg_i.vec_var_source[j].inicio,info_no[i].s_defg_i.vec_var_source[j].comp); print_names(def_use_ptr,pvarname,j); fprintf(def_use_ptr,":"); v_source_print(&(info_no[i].s_defg_i), j,arqfonte,def_use_ptr); fprintf(def_use_ptr,"\n"); */ } fprintf(grafodef,"\n"); /* fprintf(def_use_ptr,"\n"); */ fprintf(grafodef,"\nVars Refs : "); /* fprintf(def_use_ptr,"\nVars Refs : "); */ for(j=0; j>=0 && j <= get_name_counter(); ++j) if(test_bit(j,&(info_no[i].def_ref))) { print_names(grafodef,pvarname,j); fprintf(grafodef," "); /* fprintf(def_use_ptr,"#%d ",j); fprintf(def_use_ptr,"%ld %ld %ld\n",info_no[i].s_def_ref.vec_var_source[j].linha,info_no[i].s_def_ref.vec_var_source[j].inicio,info_no[i].s_def_ref.vec_var_source[j].comp); print_names(def_use_ptr,pvarname,j); fprintf(def_use_ptr,":"); v_source_print(&(info_no[i].s_def_ref), j,arqfonte,def_use_ptr); fprintf(def_use_ptr,"\n"); */ } fprintf(grafodef,"\n"); fprintf(grafodef,"\nVars C-Usos : "); for(j=0; j>=0 && j <= get_name_counter(); ++j) if(test_bit(j,&(info_no[i].c_use))) { print_names(grafodef,pvarname,j); fprintf(grafodef," "); /* fprintf(def_use_ptr,"#%d ",j); fprintf(def_use_ptr,"%ld %ld %ld\n",info_no[i].s_c_use.vec_var_source[j].linha,info_no[i].s_c_use.vec_var_source[j].inicio,info_no[i].s_c_use.vec_var_source[j].comp); print_names(def_use_ptr,pvarname,j); fprintf(def_use_ptr,":"); v_source_print(&(info_no[i].s_c_use), j,arqfonte,def_use_ptr); fprintf(def_use_ptr,"\n"); */ } fprintf(grafodef,"\n"); /* fprintf(def_use_ptr,"\n"); */ if(!empty_bit(&(info_no[i].p_use))) { fprintf(grafodef,"\nVars P-Usos : \n"); /*fprintf(def_use_ptr,"\nVars P-Usos : \n");*/ for(node = graph[i].list_suc; node != NULL; node=node->proximo) { fprintf(grafodef,"(%d,%d) ", i, node->num); /*fprintf(def_use_ptr,"(%d,%d) ", i, node->num);*/ } fprintf(grafodef,": "); /*fprintf(def_use_ptr,": ");*/ for(j=0; j>=0 && j <= get_name_counter(); ++j) if(test_bit(j,&(info_no[i].p_use))) { print_names(grafodef,pvarname,j); fprintf(grafodef," "); /*fprintf(def_use_ptr,"#%d ",j); fprintf(def_use_ptr,"%ld %ld %ld\n",info_no[i].s_p_use.vec_var_source[j].linha,info_no[i].s_p_use.vec_var_source[j].inicio,info_no[i].s_p_use.vec_var_source[j].comp); print_names(def_use_ptr,pvarname,j); fprintf(def_use_ptr,":"); v_source_print(&(info_no[i].s_p_use), j,arqfonte,def_use_ptr); fprintf(def_use_ptr,"\n"); */ } fprintf(grafodef,"\n"); /*fprintf(def_use_ptr,"\n");*/ } } fclose(grafodef); /* fecha o arquivo grafo def */ /*fclose(def_use_ptr);*/ } /*******************************************************************/ /* salva_tab_var_def(NODEINFO,char*) */ /* Autor: Marcos L. Chaim */ /* Data: 26/12/94 */ /* Versao: 1.0 */ /* */ /* */ /* funcao: salva a tab_var_def da funcao em arquivo no seu */ /* diretorio. */ /* */ /* */ /* Entradas: ponteiro para estrutura info_no e nome do diretorio. */ /* */ /* Saida: nenhuma. */ /* */ /*******************************************************************/ void salva_tab_var_def(info_no,dir) NODEINFO info_no; char * dir; { FILE * tabvardef; int i; char filename[300]; DESPOINTER aux_names; /* Cria diretorio para a funcao */ cria_dir(dir); /* Cria a tabela de variaveis definidas */ #ifdef TURBO_C strcpy(filename,".\\"); #else strcpy(filename,"./"); #endif strcat(filename,dir); #ifdef TURBO_C strcat(filename,"\\"); #else strcat(filename,"/"); #endif strcat(filename,"tabvardef.tes"); tabvardef = (FILE *) fopen(filename,"w"); if(tabvardef == (FILE *) NULL) error("* * Erro Fatal: Nao consegui abrir o arquivo tabvardef.tes * *"); fprintf(tabvardef,"# Tabela de Variaveis Definidas do Modulo %s\n\n", dir); /* Imprime as variaveis e seus numeros de identificacao*/ fprintf(tabvardef,"$ %d\n",get_name_counter()); for(i=0; i < get_name_counter(); ++i) { fprintf(tabvardef,"@ %d ", i); print_names(tabvardef,pvarname,i); fprintf(tabvardef,"\n"); } fprintf(tabvardef,"@@\n"); /* Imprime Grafo Sintetico */ fprintf(tabvardef,"\n# Grafo Def Sintetico do Modulo %s\n", dir); for(i=1;i>=1 && i <= num_no; ++i) { int j; fprintf(tabvardef,"\n@@ %2d",i); fprintf(tabvardef,"\nDefs: "); for(j=0; j>=0 && j < get_name_counter(); ++j) if(test_bit(j,&(info_no[i].defg_i))) fprintf(tabvardef," %2d ",j); fprintf(tabvardef,"@"); fprintf(tabvardef,"\nC-Uses: "); for(j=0; j>=0 && j < get_name_counter(); ++j) if(test_bit(j,&(info_no[i].c_use))) fprintf(tabvardef," %2d ",j); fprintf(tabvardef,"@"); fprintf(tabvardef,"\nP-Uses: "); for(j=0; j>=0 && j < get_name_counter(); ++j) if(test_bit(j,&(info_no[i].p_use))) fprintf(tabvardef," %2d ",j); fprintf(tabvardef,"@"); fprintf(tabvardef,"\nRefs: "); for(j=0; j>=0 && j < get_name_counter(); ++j) if(test_bit(j,&(info_no[i].def_ref))) fprintf(tabvardef," %2d ",j); fprintf(tabvardef,"@"); fprintf(tabvardef,"\nUndefs: "); for(j=0; j>=0 && j < get_name_counter(); ++j) if(!test_bit(j,&(info_no[i].undef))) fprintf(tabvardef," %2d ",j); fprintf(tabvardef,"@"); } fclose(tabvardef); /* fecha o arquivo grafo def */ } /*******************************************************************/ /* gerencia_fim_func(char *) */ /* Autor: Marcos L. Chaim */ /* Data: 26/12/94 */ /* Versao: 1.0 */ /* */ /* */ /* funcao: funcao que executa todas as atividades relativas ao fi- */ /* nal da analise sintatica. */ /* */ /* Entradas: ponteiro para nome da funcao. */ /* */ /* Saida: nenhuma. */ /* */ /*******************************************************************/ void gerencia_fim_func(nome) char * nome; { int i,j, found; if(only_glb_used) { /* Elimina variaveis globais que nao sao usadas pelo menos uma vez */ for(j=0; j>=0 && j <= get_name_counter(); ++j) if(test_bit(j,&(info_no[0].defg_i))) { found = FALSE; for(i=1;i>=1 && i <= num_no; ++i) if(test_bit(j,&(info_no[i].c_use)) || test_bit(j,&(info_no[i].p_use))) { found = TRUE; break; } if(!found) reset_bit(j,&(info_no[1].defg_i)); } } salva_grafo_def(info_no,nome); salva_tab_var_def(info_no,nome); } void elimina_variaveis_locais() { DESPOINTER aux_names, prev_names; prev_names=names; aux_names=names; while(aux_names != (DESPOINTER) NULL) { if(aux_names->id < 100) { if(prev_names==aux_names) { names=prev_names=aux_names->next; free(aux_names); aux_names=prev_names; continue; } else { prev_names->next=aux_names->next; free(aux_names); aux_names=prev_names; } } else { prev_names=aux_names; } aux_names=aux_names->next; } } /* ** Fim salvagrf.c */
magsilva/poketool
pokernel/salvagrf.c
C
gpl-3.0
13,481
<?php /** * Makes our changes to the CSS * * @param string $css * @param theme_config $theme * @return string */ function arialist_usurt_process_css($css, $theme) { // Set the link color if (!empty($theme->settings->linkcolor)) { $linkcolor = $theme->settings->linkcolor; } else { $linkcolor = null; } $css = arialist_usurt_set_linkcolor($css, $linkcolor); // Set the region width if (!empty($theme->settings->regionwidth)) { $regionwidth = $theme->settings->regionwidth; } else { $regionwidth = null; } $css = arialist_usurt_set_regionwidth($css, $regionwidth); // Set the custom CSS if (!empty($theme->settings->customcss)) { $customcss = $theme->settings->customcss; } else { $customcss = null; } $css = arialist_usurt_set_customcss($css, $customcss); // Return the CSS return $css; } /** * Sets the background colour variable in CSS * * @param string $css * @param mixed $backgroundcolor * @return string */ function arialist_usurt_set_linkcolor($css, $linkcolor) { $tag = '[[setting:linkcolor]]'; $replacement = $linkcolor; if (is_null($replacement)) { $replacement = '#f25f0f'; } $css = str_replace($tag, $replacement, $css); return $css; } /** * Sets the region width variable in CSS * * @param string $css * @param mixed $regionwidth * @return string */ function arialist_usurt_set_regionwidth($css, $regionwidth) { $tag = '[[setting:regionwidth]]'; $doubletag = '[[setting:regionwidthdouble]]'; $replacement = $regionwidth; if (is_null($replacement)) { $replacement = 250; } $css = str_replace($tag, $replacement.'px', $css); $css = str_replace($doubletag, ($replacement*2).'px', $css); return $css; } /** * Sets the custom css variable in CSS * * @param string $css * @param mixed $customcss * @return string */ function arialist_usurt_set_customcss($css, $customcss) { $tag = '[[setting:customcss]]'; $replacement = $customcss; if (is_null($replacement)) { $replacement = ''; } $css = str_replace($tag, $replacement, $css); return $css; }
mbeloshitsky/moodle
theme/arialist_usurt/lib.php
PHP
gpl-3.0
2,204
#!/bin/bash run_test() { echo "checking that adding a file to a package works" # make some files/dirs echo "set compatible" > "${TEMP_LOCAL}/.vimrc2" echo "# hi" > "${TEMP_LOCAL}/.zshrc" # copy the repo cp -r "${BASE_DIR}/test/repo" "${TEMP_LOCAL}" ls -a "${TEMP_LOCAL}" echo "no" | exe -d "${TEMP_LOCAL}/repo" -t "${TEMP_LOCAL}/" -B desktop1 add "${TEMP_LOCAL}/.vimrc2" -p vim # make sure it exited ok local last="$?" [[ "$last" != "0" ]] && return $last # link should not be created! assert_link "${TEMP_LOCAL}/.vimrc2" "${TEMP_LOCAL}/repo/vim/files/.vimrc2" && return 1 assert "file should not exist in repo" ! -e "${TEMP_LOCAL}/repo/vim/files/.vimrc2" || return 1 return 0 }
swalladge/dotfiles-manager
test/integration_tests/test_add_file_no.sh
Shell
gpl-3.0
762
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>MaRIONet : Register for Manycore Summer School</title> <link rel="stylesheet" href="https://unpkg.com/purecss@0.6.1/build/pure-min.css"> <!--[if lte IE 8]> <link rel="stylesheet" href="https://purecss.io/combo/1.18.13?/css/layouts/side-menu-old-ie.css"> <![endif]--> <!--[if gt IE 8]><!--> <link rel="stylesheet" href="https://purecss.io/combo/1.18.13?/css/layouts/side-menu.css"> <!--<![endif]--> <!--[if lt IE 9]> <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.js"></script> <![endif]--> </head> <body> <div id="layout"> <!-- Menu toggle --> <a href="#menu" id="menuLink" class="menu-link"> <!-- random icon --> <span></span> </a> <div id="menu"> <div class="pure-menu"> <a class="pure-menu-heading" href="#">Menu</a> <ul class="pure-menu-list"> <li class="pure-menu-item"> <a href="index.html" class="pure-menu-link">Home</a> </li> <li class="pure-menu-item"> <a href="http://gow.epsrc.ac.uk/NGBOViewGrant.aspx?GrantRef=EP/P006434/1" class="pure-menu-link">About</a> </li> <li class="pure-menu-item" class="menu-item-divided pure-menu-selected"> <a href="form.html" class="pure-menu-link">Register</a> </li> <li class="pure-menu-item" class="menu-item-divided pure-menu-selected"> <a href="members.html" class="pure-menu-link">Members</a> </li> <li class="pure-menu-item" class="menu-item-divided pure-menu-selected"> <a href="events.html" class="pure-menu-link">Events</a> </li> <li class="pure-menu-item" class="menu-item-divided pure-menu-selected"> <a href="joining.html" class="pure-menu-link">Joining</a> </li> <li class="pure-menu-item"> <a href="contact.html" class="pure-menu-link">Contact</a> </li> </ul> </div> </div> <div id="main"> <div class="header"> <img class="pure-img" src="marionet_logo.png" alt="marionet logo"> </div> <div class="content"> <form class="pure-form pure-form-aligned" action="register.php" method="post"> <legend> <a href="summerschool.html">Manycore Summer School 2018</a> Application Form </legend> <fieldset> <div class="pure-control-group"> <label for="name">My name</label> <input id="name" type="text" name="name" placeholder="My name is ..." required> </div> <div class="pure-control-group"> <label for="affiliation">My affiliation</label> <input id="affiliation" type="text" name="affiliation" placeholder="University of ..." required> </div> <div class="pure-control-group"> <label for="email">My email address</label> <input id="email" type="email" name="email" placeholder="foo@somewhere.ac.uk" required> </div> <div class="pure-control-group"> <label for="reqs">Special requirements, e.g. diet, accessibility</label> <input id="reqs" name="reqs" type="text" placeholder="Anything we should know?"> </div> <hr/> <label for="accommodation">Will I need accommodation in Glasgow?</label> <div id="accommodation"> <label for="choice1" class="pure-radio"> <input type="radio" id="choice1" name="accomm" value="none"> Not needed</label> <label for="choice2" class="pure-radio"> <input type="radio" id="choice2" name="accomm" value="sun2fri" checked> 5 nights from Sun 15 to Fri 20 July</label> <label for="choice3" class="pure-radio"> <input type="radio" id="choice3" name="accomm" value="mon2fri"> 4 nights from Mon 16 to Fri 20 July</label> </div> <hr/> <div class="pure-control-group"> <label for="motivation">Why do I want to attend the manycore summer school? (&lt;= 50 words)</label> <textarea id="motivation" name="motivation" placeholder="I want to attend because ..." rows="6"></textarea> </div> <hr/> <div class="pure-control-group"> <label for="supername">My supervisor's name</label> <input id="supername" type="text" name="supername" placeholder="Prof Su Pervisor" required> </div> <i>Note we require a personal reference from your supervisor, to be emailed to <a href="mailto:n.harth.1@research.gla.ac.uk">n.harth.1@research.gla.ac.uk</a></i> <hr/> <button type="submit" class="pure-button pure-button-primary">Submit</button> </fieldset> </form> </div> </div> <!-- main --> </div> <script src="https://purecss.io/combo/1.18.13?/js/ui.js"></script> </body> </html>
annalito/MaRIONet
ss_form.html
HTML
gpl-3.0
4,874
(function($, _){ /** * @summary A reference to the jQuery object the plugin is registered with. * @memberof FooGallery * @function $ * @type {jQuery} * @description This is used internally for all jQuery operations to help work around issues where multiple jQuery libraries have been included in a single page. * @example {@caption The following shows the issue when multiple jQuery's are included in a single page.}{@lang xml} * <script src="jquery-1.12.4.js"></script> * <script src="foogallery.js"></script> * <script src="jquery-2.2.4.js"></script> * <script> * jQuery(function($){ * $(".selector").foogallery(); // => This would throw a TypeError: $(...).foogallery is not a function * }); * </script> * @example {@caption The reason the above throws an error is that the `$.fn.foogallery` function is registered to the first instance of jQuery in the page however the instance used to create the ready callback and actually try to execute `$(...).foogallery()` is the second. To resolve this issue ideally you would remove the second instance of jQuery however you can use the `FooGallery.$` member to ensure you are always working with the instance of jQuery the plugin was registered with.}{@lang xml} * <script src="jquery-1.12.4.js"></script> * <script src="foogallery.js"></script> * <script src="jquery-2.2.4.js"></script> * <script> * FooGallery.$(function($){ * $(".selector").foogallery(); // => It works! * }); * </script> */ _.$ = $; /** * @summary The jQuery plugin namespace. * @external "jQuery.fn" * @see {@link http://learn.jquery.com/plugins/basic-plugin-creation/|How to Create a Basic Plugin | jQuery Learning Center} */ })( // dependencies jQuery, /** * @summary The core namespace for the plugin containing all its code. * @namespace FooGallery * @description This plugin houses all it's code within a single `FooGallery` global variable to prevent polluting the global namespace and to make accessing its various members simpler. * @example {@caption As this namespace is registered as a global on the `window` object, it can be accessed using the `window.` prefix.} * var fg = window.FooGallery; * @example {@caption Or without it.} * var fg = FooGallery; * @example {@caption When using this namespace I would recommend aliasing it to a short variable name such as `fg` or as used internally `_`.} * // alias the FooGallery namespace * var _ = FooGallery; * @example {@caption This is not required but lets us write less code and allows the alias to be minified by compressors like UglifyJS. How you choose to alias the namespace is up to you. You can use the simple `var` method as seen above or supply the namespace as a parameter when creating a new scope as seen below.} * // create a new scope to work in passing the namespace as a parameter * (function(_){ * * // use `_.` to access members and methods * * })(FooGallery); */ window.FooGallery = window.FooGallery || {} );
fooplugins/foogallery-client-side
src/core/js/__foogallery.js
JavaScript
gpl-3.0
3,019
# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext help: @echo "Please use \`make <target>' where <target> is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: -rm -rf $(BUILDDIR)/* html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/modularitytestingframework.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/modularitytestingframework.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/modularitytestingframework" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/modularitytestingframework" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b custom-man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt."
fedora-modularity/meta-test-family
docs/Makefile
Makefile
gpl-3.0
5,651
/* * Geoide Composer, configuration tool for Geoide Viewer * Copyright (C) 2016 IDgis * See license: * https://github.com/IDgis/geoide-admin/blob/master/LICENSE */ import './startup.js'; import './jsonapi.js'; import './json_gv_api.js'; import './json_map_api.js'; import './parse_capabilities.js';
IDgis/geoide-admin
imports/startup/server/index.js
JavaScript
gpl-3.0
306
# Jiubei – Level 3 Reckless Rogue (Arcane Trickster) 200 years ago, the universities were at the heart of Xin culture. Any parent with means would do whatever they could to prepare their child for the entrance exams. Youths with a talent for wizardry who passed the tests brought honor to their family, and could look forward to a position in the government. A rare few might become archmages, taking up positions of power in the university. Such men had the ear of the emperor, and the respect of all learned men. If Jiubei had been born 200 years ago, he would have been the greatest wizard in his generation. Jiubei is a thin man, but he drinks like a horse. He is an intelligent man, but no sage in Cijing would have him as a student. He is a noble man, but today, he lives in squalor. In short, he is a man full of contradictions, containing within himself high and low, cunning and recklesness, wisdom and ignorance. He speaks of his past with bitterness. A night of drinking ended in roaring flames, sparked by his own errant magic. The university expelled him, as it was not the first time he had made trouble. His family disowned him, and he shed his family’s name. Jiubei had nowhere to go, so he came here, into the slums of Cijing. We welcomed him. It was partly because he seemed so pitiful that first night, like an old man, swaddled in his blanket. He had been burned in the fire, and had no money for medicine. But we were also curious. What was it that they taught at the university? Were our mothers’ stories of wizards mere fantasy, or did such power exist? He is quick to condemn his old teachers, but he has found much success employing their lessons. The people of Cijing were unprepared for his magic, and expected nothing but virtue from a young student of the university. He has by this time succeeded in many robberies, and other crimes besides. Despite this, he must save all his money, for I have never seen him eat, and he wears the same clothes as the day I met him. He does not speak of the future, but I do not think he will stay here long. The cunning and ambition for which the university accepted him as a student still smolder within him. Some day, I will wake up to find that he has taken his things, and I will never see him again.
Kumarbis/southlandsNPCs
Jiubei.md
Markdown
gpl-3.0
2,311
import Entity from "./entity"; class DerivedEntity { constructor(public entity: Entity) { } }; export default DerivedEntity;
marianc/node-server-typescript-client
Client/modules/utils/dal/common/entities/derivedEntity.ts
TypeScript
gpl-3.0
133
/* 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 * \author Jaap Versteegh <j.r.versteegh@gmail.com> * Test program for the 9 DOF module */ #include <iostream> #include <chrono> #include <thread> #include <iomanip> #include <cmath> #include <signal.h> #include "../include/types.h" #include "../include/i2cbus.h" #include "../include/chips.h" #include "../include/errors.h" using namespace mru; using namespace std; using namespace std::chrono; ostream& operator<<(ostream& o, const Vector<double>& v) { o << fixed << setprecision(3); o << setw(8) << v.x(); o << setw(8) << v.y(); o << setw(8) << v.z(); o << " :" << setw(8) << sqrt(v.squared_length()); return o; } bool volatile quit = false; void signal_handler(int sig) { quit = true; } int main(int argc, char* argv[]) { signal(SIGINT, &signal_handler); cout << "Sparkfun 9 DOF stick" << endl; cout << "Press 'CTRL-C' to quit." << endl; cout << "Set \"NINEDOF_SAMPLE_RATE\" for other rates than 1Hz." << endl; cout << "Set \"NINEDOF_I2C_BUS\" for i2c bus other than 0." << endl; cout << "Time, Compass, Acceleration, Gyro, Gyro Temp." << endl; char *i2c_bus = getenv("NINEDOF_I2C_BUS"); int busno = 0; if (i2c_bus != 0) { busno = atoi(i2c_bus); } try { I2C_bus bus(busno); boost::filesystem::path calibration_file = argv[0]; calibration_file.remove_filename(); calibration_file /= "calibration/9dof.ini"; HMC5843 compass(bus); ADXL345 acceleration(bus); ITG3200 gyro(bus); compass.initialize(calibration_file); acceleration.initialize(calibration_file); gyro.initialize(calibration_file); int wait = 1000; char *sample_rate = getenv("NINEDOF_SAMPLE_RATE"); if (sample_rate != 0) { wait = 1000 / atoi(sample_rate); } system_clock::time_point next_time = high_resolution_clock::now(); while (!quit) { next_time += milliseconds(wait); this_thread::sleep_until(next_time); compass.poll(); acceleration.poll(); gyro.poll(); /* cout << compass.data().time << " ## " << compass.data().vector << " ## " << acceleration.data().vector << " ## " << gyro.data().vector << " ## " << setw(8) << gyro.data().value << endl; */ } compass.finalize(); acceleration.finalize(); gyro.finalize(); cout << "Finalized." << endl; return 0; } catch (const Error& e) { cerr << "=========================" << endl; cerr << e.get_message() << endl; cerr << "=========================" << endl; return 1; } }
jrversteegh/ninedof
tools/ninedof.cpp
C++
gpl-3.0
3,189
<?php // +-----------------------------------------------------------------------+ // | Copyright (c) 2002-2003 Richard Heyes | // | All rights reserved. | // | | // | Redistribution and use in source and binary forms, with or without | // | modification, are permitted provided that the following conditions | // | are met: | // | | // | o Redistributions of source code must retain the above copyright | // | notice, this list of conditions and the following disclaimer. | // | o Redistributions in binary form must reproduce the above copyright | // | notice, this list of conditions and the following disclaimer in the | // | documentation and/or other materials provided with the distribution.| // | o The names of the authors may not be used to endorse or promote | // | products derived from this software without specific prior written | // | permission. | // | | // | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | // | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | // | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | // | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | // | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | // | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | // | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | // | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | // | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | // | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | // | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | // | | // +-----------------------------------------------------------------------+ // | Author: Richard Heyes <richard@php.net> | // +-----------------------------------------------------------------------+ // /** * Client implementation of various SASL mechanisms * * @author Richard Heyes <richard@php.net> * @author Michael Weibel <michael.weibel@amiadogroup.com> (made it work for PHP5) * @access public * @version 1.0.1 * @package Auth_SASL */ require_once(dirname(__FILE__) . '/SASL/Exception.php'); class Auth_SASL { /** * Factory class. Returns an object of the request * type. * * @param string $type One of: Anonymous * Plain * CramMD5 * DigestMD5 * Types are not case sensitive */ public static function factory($type) { switch (strtolower($type)) { case 'anonymous': $filename = 'SASL/Anonymous.php'; $classname = 'Auth_SASL_Anonymous'; break; case 'login': $filename = 'SASL/Login.php'; $classname = 'Auth_SASL_Login'; break; case 'plain': $filename = 'SASL/Plain.php'; $classname = 'Auth_SASL_Plain'; break; case 'external': $filename = 'SASL/External.php'; $classname = 'Auth_SASL_External'; break; case 'crammd5': case 'cram-md5': $filename = 'SASL/CramMD5.php'; $classname = 'Auth_SASL_CramMD5'; break; case 'digestmd5': // $msg = 'Deprecated mechanism name. Use IANA-registered name: DIGEST-MD5.'; case 'digest-md5': $filename = 'SASL/DigestMD5.php'; $classname = 'Auth_SASL_DigestMD5'; break; default: throw new Auth_SASL_Exception('Invalid SASL mechanism type ("' . $type .'")'); break; } require_once(dirname(__FILE__) . '/' . $filename); $obj = new $classname(); return $obj; } }
deependhulla/powermail-debian9
files/rootdir/usr/local/src/groupoffice-6.2/groupoffice-6.2-setup-www/go/vendor/pear/Auth/SASL.php
PHP
gpl-3.0
4,504
/* * AMD 10Gb Ethernet driver * * This file is available to you under your choice of the following two * licenses: * * License 1: GPLv2 * * Copyright (c) 2014-2016 Advanced Micro Devices, Inc. * * This file is free software; you may copy, redistribute 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 file is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * This file incorporates work covered by the following copyright and * permission notice: * The Synopsys DWC ETHER XGMAC Software Driver and documentation * (hereinafter "Software") is an unsupported proprietary work of Synopsys, * Inc. unless otherwise expressly agreed to in writing between Synopsys * and you. * * The Software IS NOT an item of Licensed Software or Licensed Product * under any End User Software License Agreement or Agreement for Licensed * Product with Synopsys or any supplement thereto. Permission is hereby * granted, free of charge, to any person obtaining a copy of this software * annotated with this license and 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. * * THIS SOFTWARE IS BEING DISTRIBUTED BY SYNOPSYS SOLELY ON AN "AS IS" * BASIS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE HEREBY DISCLAIMED. IN NO EVENT SHALL SYNOPSYS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * * * License 2: Modified BSD * * Copyright (c) 2014-2016 Advanced Micro Devices, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Advanced Micro Devices, Inc. nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This file incorporates work covered by the following copyright and * permission notice: * The Synopsys DWC ETHER XGMAC Software Driver and documentation * (hereinafter "Software") is an unsupported proprietary work of Synopsys, * Inc. unless otherwise expressly agreed to in writing between Synopsys * and you. * * The Software IS NOT an item of Licensed Software or Licensed Product * under any End User Software License Agreement or Agreement for Licensed * Product with Synopsys or any supplement thereto. Permission is hereby * granted, free of charge, to any person obtaining a copy of this software * annotated with this license and 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. * * THIS SOFTWARE IS BEING DISTRIBUTED BY SYNOPSYS SOLELY ON AN "AS IS" * BASIS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE HEREBY DISCLAIMED. IN NO EVENT SHALL SYNOPSYS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #include <linux/module.h> #include <linux/device.h> #include <linux/platform_device.h> #include <linux/spinlock.h> #include <linux/netdevice.h> #include <linux/etherdevice.h> #include <linux/io.h> #include <linux/of.h> #include <linux/of_net.h> #include <linux/of_address.h> #include <linux/of_platform.h> #include <linux/clk.h> #include <linux/property.h> #include <linux/acpi.h> #include <linux/mdio.h> #include "xgbe.h" #include "xgbe-common.h" MODULE_AUTHOR("Tom Lendacky <thomas.lendacky@amd.com>"); MODULE_LICENSE("Dual BSD/GPL"); MODULE_VERSION(XGBE_DRV_VERSION); MODULE_DESCRIPTION(XGBE_DRV_DESC); static int debug = -1; module_param(debug, int, S_IWUSR | S_IRUGO); MODULE_PARM_DESC(debug, " Network interface message level setting"); static const u32 default_msg_level = (NETIF_MSG_LINK | NETIF_MSG_IFDOWN | NETIF_MSG_IFUP); static const u32 xgbe_serdes_blwc[] = { XGBE_SPEED_1000_BLWC, XGBE_SPEED_2500_BLWC, XGBE_SPEED_10000_BLWC, }; static const u32 xgbe_serdes_cdr_rate[] = { XGBE_SPEED_1000_CDR, XGBE_SPEED_2500_CDR, XGBE_SPEED_10000_CDR, }; static const u32 xgbe_serdes_pq_skew[] = { XGBE_SPEED_1000_PQ, XGBE_SPEED_2500_PQ, XGBE_SPEED_10000_PQ, }; static const u32 xgbe_serdes_tx_amp[] = { XGBE_SPEED_1000_TXAMP, XGBE_SPEED_2500_TXAMP, XGBE_SPEED_10000_TXAMP, }; static const u32 xgbe_serdes_dfe_tap_cfg[] = { XGBE_SPEED_1000_DFE_TAP_CONFIG, XGBE_SPEED_2500_DFE_TAP_CONFIG, XGBE_SPEED_10000_DFE_TAP_CONFIG, }; static const u32 xgbe_serdes_dfe_tap_ena[] = { XGBE_SPEED_1000_DFE_TAP_ENABLE, XGBE_SPEED_2500_DFE_TAP_ENABLE, XGBE_SPEED_10000_DFE_TAP_ENABLE, }; static void xgbe_default_config(struct xgbe_prv_data *pdata) { DBGPR("-->xgbe_default_config\n"); pdata->pblx8 = DMA_PBL_X8_ENABLE; pdata->tx_sf_mode = MTL_TSF_ENABLE; pdata->tx_threshold = MTL_TX_THRESHOLD_64; pdata->tx_pbl = DMA_PBL_16; pdata->tx_osp_mode = DMA_OSP_ENABLE; pdata->rx_sf_mode = MTL_RSF_DISABLE; pdata->rx_threshold = MTL_RX_THRESHOLD_64; pdata->rx_pbl = DMA_PBL_16; pdata->pause_autoneg = 1; pdata->tx_pause = 1; pdata->rx_pause = 1; pdata->phy_speed = SPEED_UNKNOWN; pdata->power_down = 0; DBGPR("<--xgbe_default_config\n"); } static void xgbe_init_all_fptrs(struct xgbe_prv_data *pdata) { xgbe_init_function_ptrs_dev(&pdata->hw_if); xgbe_init_function_ptrs_phy(&pdata->phy_if); xgbe_init_function_ptrs_desc(&pdata->desc_if); } #ifdef CONFIG_ACPI static int xgbe_acpi_support(struct xgbe_prv_data *pdata) { struct device *dev = pdata->dev; u32 property; int ret; /* Obtain the system clock setting */ ret = device_property_read_u32(dev, XGBE_ACPI_DMA_FREQ, &property); if (ret) { dev_err(dev, "unable to obtain %s property\n", XGBE_ACPI_DMA_FREQ); return ret; } pdata->sysclk_rate = property; /* Obtain the PTP clock setting */ ret = device_property_read_u32(dev, XGBE_ACPI_PTP_FREQ, &property); if (ret) { dev_err(dev, "unable to obtain %s property\n", XGBE_ACPI_PTP_FREQ); return ret; } pdata->ptpclk_rate = property; return 0; } #else /* CONFIG_ACPI */ static int xgbe_acpi_support(struct xgbe_prv_data *pdata) { return -EINVAL; } #endif /* CONFIG_ACPI */ #ifdef CONFIG_OF static int xgbe_of_support(struct xgbe_prv_data *pdata) { struct device *dev = pdata->dev; /* Obtain the system clock setting */ pdata->sysclk = devm_clk_get(dev, XGBE_DMA_CLOCK); if (IS_ERR(pdata->sysclk)) { dev_err(dev, "dma devm_clk_get failed\n"); return PTR_ERR(pdata->sysclk); } pdata->sysclk_rate = clk_get_rate(pdata->sysclk); /* Obtain the PTP clock setting */ pdata->ptpclk = devm_clk_get(dev, XGBE_PTP_CLOCK); if (IS_ERR(pdata->ptpclk)) { dev_err(dev, "ptp devm_clk_get failed\n"); return PTR_ERR(pdata->ptpclk); } pdata->ptpclk_rate = clk_get_rate(pdata->ptpclk); return 0; } static struct platform_device *xgbe_of_get_phy_pdev(struct xgbe_prv_data *pdata) { struct device *dev = pdata->dev; struct device_node *phy_node; struct platform_device *phy_pdev; phy_node = of_parse_phandle(dev->of_node, "phy-handle", 0); if (phy_node) { /* Old style device tree: * The XGBE and PHY resources are separate */ phy_pdev = of_find_device_by_node(phy_node); of_node_put(phy_node); } else { /* New style device tree: * The XGBE and PHY resources are grouped together with * the PHY resources listed last */ get_device(dev); phy_pdev = pdata->pdev; } return phy_pdev; } #else /* CONFIG_OF */ static int xgbe_of_support(struct xgbe_prv_data *pdata) { return -EINVAL; } static struct platform_device *xgbe_of_get_phy_pdev(struct xgbe_prv_data *pdata) { return NULL; } #endif /* CONFIG_OF */ static unsigned int xgbe_resource_count(struct platform_device *pdev, unsigned int type) { unsigned int count; int i; for (i = 0, count = 0; i < pdev->num_resources; i++) { struct resource *res = &pdev->resource[i]; if (type == resource_type(res)) { count++; } } return count; } static struct platform_device *xgbe_get_phy_pdev(struct xgbe_prv_data *pdata) { struct platform_device *phy_pdev; if (pdata->use_acpi) { get_device(pdata->dev); phy_pdev = pdata->pdev; } else { phy_pdev = xgbe_of_get_phy_pdev(pdata); } return phy_pdev; } static int xgbe_probe(struct platform_device *pdev) { struct xgbe_prv_data *pdata; struct net_device *netdev; struct device *dev = &pdev->dev, *phy_dev; struct platform_device *phy_pdev; struct resource *res; const char *phy_mode; unsigned int i, phy_memnum, phy_irqnum; enum dev_dma_attr attr; int ret; DBGPR("--> xgbe_probe\n"); netdev = alloc_etherdev_mq(sizeof(struct xgbe_prv_data), XGBE_MAX_DMA_CHANNELS); if (!netdev) { dev_err(dev, "alloc_etherdev failed\n"); ret = -ENOMEM; goto err_alloc; } SET_NETDEV_DEV(netdev, dev); pdata = netdev_priv(netdev); pdata->netdev = netdev; pdata->pdev = pdev; pdata->adev = ACPI_COMPANION(dev); pdata->dev = dev; platform_set_drvdata(pdev, netdev); spin_lock_init(&pdata->lock); spin_lock_init(&pdata->xpcs_lock); mutex_init(&pdata->rss_mutex); spin_lock_init(&pdata->tstamp_lock); pdata->msg_enable = netif_msg_init(debug, default_msg_level); set_bit(XGBE_DOWN, &pdata->dev_state); /* Check if we should use ACPI or DT */ pdata->use_acpi = dev->of_node ? 0 : 1; phy_pdev = xgbe_get_phy_pdev(pdata); if (!phy_pdev) { dev_err(dev, "unable to obtain phy device\n"); ret = -EINVAL; goto err_phydev; } phy_dev = &phy_pdev->dev; if (pdev == phy_pdev) { /* New style device tree or ACPI: * The XGBE and PHY resources are grouped together with * the PHY resources listed last */ phy_memnum = xgbe_resource_count(pdev, IORESOURCE_MEM) - 3; phy_irqnum = xgbe_resource_count(pdev, IORESOURCE_IRQ) - 1; } else { /* Old style device tree: * The XGBE and PHY resources are separate */ phy_memnum = 0; phy_irqnum = 0; } /* Set and validate the number of descriptors for a ring */ BUILD_BUG_ON_NOT_POWER_OF_2(XGBE_TX_DESC_CNT); pdata->tx_desc_count = XGBE_TX_DESC_CNT; if (pdata->tx_desc_count & (pdata->tx_desc_count - 1)) { dev_err(dev, "tx descriptor count (%d) is not valid\n", pdata->tx_desc_count); ret = -EINVAL; goto err_io; } BUILD_BUG_ON_NOT_POWER_OF_2(XGBE_RX_DESC_CNT); pdata->rx_desc_count = XGBE_RX_DESC_CNT; if (pdata->rx_desc_count & (pdata->rx_desc_count - 1)) { dev_err(dev, "rx descriptor count (%d) is not valid\n", pdata->rx_desc_count); ret = -EINVAL; goto err_io; } /* Obtain the mmio areas for the device */ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); pdata->xgmac_regs = devm_ioremap_resource(dev, res); if (IS_ERR(pdata->xgmac_regs)) { dev_err(dev, "xgmac ioremap failed\n"); ret = PTR_ERR(pdata->xgmac_regs); goto err_io; } if (netif_msg_probe(pdata)) { dev_dbg(dev, "xgmac_regs = %p\n", pdata->xgmac_regs); } res = platform_get_resource(pdev, IORESOURCE_MEM, 1); pdata->xpcs_regs = devm_ioremap_resource(dev, res); if (IS_ERR(pdata->xpcs_regs)) { dev_err(dev, "xpcs ioremap failed\n"); ret = PTR_ERR(pdata->xpcs_regs); goto err_io; } if (netif_msg_probe(pdata)) { dev_dbg(dev, "xpcs_regs = %p\n", pdata->xpcs_regs); } res = platform_get_resource(phy_pdev, IORESOURCE_MEM, phy_memnum++); pdata->rxtx_regs = devm_ioremap_resource(dev, res); if (IS_ERR(pdata->rxtx_regs)) { dev_err(dev, "rxtx ioremap failed\n"); ret = PTR_ERR(pdata->rxtx_regs); goto err_io; } if (netif_msg_probe(pdata)) { dev_dbg(dev, "rxtx_regs = %p\n", pdata->rxtx_regs); } res = platform_get_resource(phy_pdev, IORESOURCE_MEM, phy_memnum++); pdata->sir0_regs = devm_ioremap_resource(dev, res); if (IS_ERR(pdata->sir0_regs)) { dev_err(dev, "sir0 ioremap failed\n"); ret = PTR_ERR(pdata->sir0_regs); goto err_io; } if (netif_msg_probe(pdata)) { dev_dbg(dev, "sir0_regs = %p\n", pdata->sir0_regs); } res = platform_get_resource(phy_pdev, IORESOURCE_MEM, phy_memnum++); pdata->sir1_regs = devm_ioremap_resource(dev, res); if (IS_ERR(pdata->sir1_regs)) { dev_err(dev, "sir1 ioremap failed\n"); ret = PTR_ERR(pdata->sir1_regs); goto err_io; } if (netif_msg_probe(pdata)) { dev_dbg(dev, "sir1_regs = %p\n", pdata->sir1_regs); } /* Retrieve the MAC address */ ret = device_property_read_u8_array(dev, XGBE_MAC_ADDR_PROPERTY, pdata->mac_addr, sizeof(pdata->mac_addr)); if (ret || !is_valid_ether_addr(pdata->mac_addr)) { dev_err(dev, "invalid %s property\n", XGBE_MAC_ADDR_PROPERTY); if (!ret) { ret = -EINVAL; } goto err_io; } /* Retrieve the PHY mode - it must be "xgmii" */ ret = device_property_read_string(dev, XGBE_PHY_MODE_PROPERTY, &phy_mode); if (ret || strcmp(phy_mode, phy_modes(PHY_INTERFACE_MODE_XGMII))) { dev_err(dev, "invalid %s property\n", XGBE_PHY_MODE_PROPERTY); if (!ret) { ret = -EINVAL; } goto err_io; } pdata->phy_mode = PHY_INTERFACE_MODE_XGMII; /* Check for per channel interrupt support */ if (device_property_present(dev, XGBE_DMA_IRQS_PROPERTY)) { pdata->per_channel_irq = 1; } /* Retrieve the PHY speedset */ ret = device_property_read_u32(phy_dev, XGBE_SPEEDSET_PROPERTY, &pdata->speed_set); if (ret) { dev_err(dev, "invalid %s property\n", XGBE_SPEEDSET_PROPERTY); goto err_io; } switch (pdata->speed_set) { case XGBE_SPEEDSET_1000_10000: case XGBE_SPEEDSET_2500_10000: break; default: dev_err(dev, "invalid %s property\n", XGBE_SPEEDSET_PROPERTY); ret = -EINVAL; goto err_io; } /* Retrieve the PHY configuration properties */ if (device_property_present(phy_dev, XGBE_BLWC_PROPERTY)) { ret = device_property_read_u32_array(phy_dev, XGBE_BLWC_PROPERTY, pdata->serdes_blwc, XGBE_SPEEDS); if (ret) { dev_err(dev, "invalid %s property\n", XGBE_BLWC_PROPERTY); goto err_io; } } else { memcpy(pdata->serdes_blwc, xgbe_serdes_blwc, sizeof(pdata->serdes_blwc)); } if (device_property_present(phy_dev, XGBE_CDR_RATE_PROPERTY)) { ret = device_property_read_u32_array(phy_dev, XGBE_CDR_RATE_PROPERTY, pdata->serdes_cdr_rate, XGBE_SPEEDS); if (ret) { dev_err(dev, "invalid %s property\n", XGBE_CDR_RATE_PROPERTY); goto err_io; } } else { memcpy(pdata->serdes_cdr_rate, xgbe_serdes_cdr_rate, sizeof(pdata->serdes_cdr_rate)); } if (device_property_present(phy_dev, XGBE_PQ_SKEW_PROPERTY)) { ret = device_property_read_u32_array(phy_dev, XGBE_PQ_SKEW_PROPERTY, pdata->serdes_pq_skew, XGBE_SPEEDS); if (ret) { dev_err(dev, "invalid %s property\n", XGBE_PQ_SKEW_PROPERTY); goto err_io; } } else { memcpy(pdata->serdes_pq_skew, xgbe_serdes_pq_skew, sizeof(pdata->serdes_pq_skew)); } if (device_property_present(phy_dev, XGBE_TX_AMP_PROPERTY)) { ret = device_property_read_u32_array(phy_dev, XGBE_TX_AMP_PROPERTY, pdata->serdes_tx_amp, XGBE_SPEEDS); if (ret) { dev_err(dev, "invalid %s property\n", XGBE_TX_AMP_PROPERTY); goto err_io; } } else { memcpy(pdata->serdes_tx_amp, xgbe_serdes_tx_amp, sizeof(pdata->serdes_tx_amp)); } if (device_property_present(phy_dev, XGBE_DFE_CFG_PROPERTY)) { ret = device_property_read_u32_array(phy_dev, XGBE_DFE_CFG_PROPERTY, pdata->serdes_dfe_tap_cfg, XGBE_SPEEDS); if (ret) { dev_err(dev, "invalid %s property\n", XGBE_DFE_CFG_PROPERTY); goto err_io; } } else { memcpy(pdata->serdes_dfe_tap_cfg, xgbe_serdes_dfe_tap_cfg, sizeof(pdata->serdes_dfe_tap_cfg)); } if (device_property_present(phy_dev, XGBE_DFE_ENA_PROPERTY)) { ret = device_property_read_u32_array(phy_dev, XGBE_DFE_ENA_PROPERTY, pdata->serdes_dfe_tap_ena, XGBE_SPEEDS); if (ret) { dev_err(dev, "invalid %s property\n", XGBE_DFE_ENA_PROPERTY); goto err_io; } } else { memcpy(pdata->serdes_dfe_tap_ena, xgbe_serdes_dfe_tap_ena, sizeof(pdata->serdes_dfe_tap_ena)); } /* Obtain device settings unique to ACPI/OF */ if (pdata->use_acpi) { ret = xgbe_acpi_support(pdata); } else { ret = xgbe_of_support(pdata); } if (ret) { goto err_io; } /* Set the DMA coherency values */ attr = device_get_dma_attr(dev); if (attr == DEV_DMA_NOT_SUPPORTED) { dev_err(dev, "DMA is not supported"); goto err_io; } pdata->coherent = (attr == DEV_DMA_COHERENT); if (pdata->coherent) { pdata->axdomain = XGBE_DMA_OS_AXDOMAIN; pdata->arcache = XGBE_DMA_OS_ARCACHE; pdata->awcache = XGBE_DMA_OS_AWCACHE; } else { pdata->axdomain = XGBE_DMA_SYS_AXDOMAIN; pdata->arcache = XGBE_DMA_SYS_ARCACHE; pdata->awcache = XGBE_DMA_SYS_AWCACHE; } /* Get the device interrupt */ ret = platform_get_irq(pdev, 0); if (ret < 0) { dev_err(dev, "platform_get_irq 0 failed\n"); goto err_io; } pdata->dev_irq = ret; /* Get the auto-negotiation interrupt */ ret = platform_get_irq(phy_pdev, phy_irqnum++); if (ret < 0) { dev_err(dev, "platform_get_irq phy 0 failed\n"); goto err_io; } pdata->an_irq = ret; netdev->irq = pdata->dev_irq; netdev->base_addr = (unsigned long)pdata->xgmac_regs; memcpy(netdev->dev_addr, pdata->mac_addr, netdev->addr_len); /* Set all the function pointers */ xgbe_init_all_fptrs(pdata); /* Issue software reset to device */ pdata->hw_if.exit(pdata); /* Populate the hardware features */ xgbe_get_all_hw_features(pdata); /* Set default configuration data */ xgbe_default_config(pdata); /* Set the DMA mask */ ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(pdata->hw_feat.dma_width)); if (ret) { dev_err(dev, "dma_set_mask_and_coherent failed\n"); goto err_io; } /* Calculate the number of Tx and Rx rings to be created * -Tx (DMA) Channels map 1-to-1 to Tx Queues so set * the number of Tx queues to the number of Tx channels * enabled * -Rx (DMA) Channels do not map 1-to-1 so use the actual * number of Rx queues */ pdata->tx_ring_count = min_t(unsigned int, num_online_cpus(), pdata->hw_feat.tx_ch_cnt); pdata->tx_q_count = pdata->tx_ring_count; ret = netif_set_real_num_tx_queues(netdev, pdata->tx_ring_count); if (ret) { dev_err(dev, "error setting real tx queue count\n"); goto err_io; } pdata->rx_ring_count = min_t(unsigned int, netif_get_num_default_rss_queues(), pdata->hw_feat.rx_ch_cnt); pdata->rx_q_count = pdata->hw_feat.rx_q_cnt; ret = netif_set_real_num_rx_queues(netdev, pdata->rx_ring_count); if (ret) { dev_err(dev, "error setting real rx queue count\n"); goto err_io; } /* Initialize RSS hash key and lookup table */ netdev_rss_key_fill(pdata->rss_key, sizeof(pdata->rss_key)); for (i = 0; i < XGBE_RSS_MAX_TABLE_SIZE; i++) XGMAC_SET_BITS(pdata->rss_table[i], MAC_RSSDR, DMCH, i % pdata->rx_ring_count); XGMAC_SET_BITS(pdata->rss_options, MAC_RSSCR, IP2TE, 1); XGMAC_SET_BITS(pdata->rss_options, MAC_RSSCR, TCP4TE, 1); XGMAC_SET_BITS(pdata->rss_options, MAC_RSSCR, UDP4TE, 1); /* Call MDIO/PHY initialization routine */ pdata->phy_if.phy_init(pdata); /* Set device operations */ netdev->netdev_ops = xgbe_get_netdev_ops(); netdev->ethtool_ops = xgbe_get_ethtool_ops(); #ifdef CONFIG_AMD_XGBE_DCB netdev->dcbnl_ops = xgbe_get_dcbnl_ops(); #endif /* Set device features */ netdev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM | NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_GRO | NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_FILTER; if (pdata->hw_feat.rss) { netdev->hw_features |= NETIF_F_RXHASH; } netdev->vlan_features |= NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | NETIF_F_TSO | NETIF_F_TSO6; netdev->features |= netdev->hw_features; pdata->netdev_features = netdev->features; netdev->priv_flags |= IFF_UNICAST_FLT; /* Use default watchdog timeout */ netdev->watchdog_timeo = 0; xgbe_init_rx_coalesce(pdata); xgbe_init_tx_coalesce(pdata); netif_carrier_off(netdev); ret = register_netdev(netdev); if (ret) { dev_err(dev, "net device registration failed\n"); goto err_io; } /* Create the PHY/ANEG name based on netdev name */ snprintf(pdata->an_name, sizeof(pdata->an_name) - 1, "%s-pcs", netdev_name(netdev)); /* Create workqueues */ pdata->dev_workqueue = create_singlethread_workqueue(netdev_name(netdev)); if (!pdata->dev_workqueue) { netdev_err(netdev, "device workqueue creation failed\n"); ret = -ENOMEM; goto err_netdev; } pdata->an_workqueue = create_singlethread_workqueue(pdata->an_name); if (!pdata->an_workqueue) { netdev_err(netdev, "phy workqueue creation failed\n"); ret = -ENOMEM; goto err_wq; } xgbe_ptp_register(pdata); xgbe_debugfs_init(pdata); platform_device_put(phy_pdev); netdev_notice(netdev, "net device enabled\n"); DBGPR("<-- xgbe_probe\n"); return 0; err_wq: destroy_workqueue(pdata->dev_workqueue); err_netdev: unregister_netdev(netdev); err_io: platform_device_put(phy_pdev); err_phydev: free_netdev(netdev); err_alloc: dev_notice(dev, "net device not enabled\n"); return ret; } static int xgbe_remove(struct platform_device *pdev) { struct net_device *netdev = platform_get_drvdata(pdev); struct xgbe_prv_data *pdata = netdev_priv(netdev); DBGPR("-->xgbe_remove\n"); xgbe_debugfs_exit(pdata); xgbe_ptp_unregister(pdata); flush_workqueue(pdata->an_workqueue); destroy_workqueue(pdata->an_workqueue); flush_workqueue(pdata->dev_workqueue); destroy_workqueue(pdata->dev_workqueue); unregister_netdev(netdev); free_netdev(netdev); DBGPR("<--xgbe_remove\n"); return 0; } #ifdef CONFIG_PM static int xgbe_suspend(struct device *dev) { struct net_device *netdev = dev_get_drvdata(dev); struct xgbe_prv_data *pdata = netdev_priv(netdev); int ret = 0; DBGPR("-->xgbe_suspend\n"); if (netif_running(netdev)) { ret = xgbe_powerdown(netdev, XGMAC_DRIVER_CONTEXT); } pdata->lpm_ctrl = XMDIO_READ(pdata, MDIO_MMD_PCS, MDIO_CTRL1); pdata->lpm_ctrl |= MDIO_CTRL1_LPOWER; XMDIO_WRITE(pdata, MDIO_MMD_PCS, MDIO_CTRL1, pdata->lpm_ctrl); DBGPR("<--xgbe_suspend\n"); return ret; } static int xgbe_resume(struct device *dev) { struct net_device *netdev = dev_get_drvdata(dev); struct xgbe_prv_data *pdata = netdev_priv(netdev); int ret = 0; DBGPR("-->xgbe_resume\n"); pdata->lpm_ctrl &= ~MDIO_CTRL1_LPOWER; XMDIO_WRITE(pdata, MDIO_MMD_PCS, MDIO_CTRL1, pdata->lpm_ctrl); if (netif_running(netdev)) { ret = xgbe_powerup(netdev, XGMAC_DRIVER_CONTEXT); /* Schedule a restart in case the link or phy state changed * while we were powered down. */ schedule_work(&pdata->restart_work); } DBGPR("<--xgbe_resume\n"); return ret; } #endif /* CONFIG_PM */ #ifdef CONFIG_ACPI static const struct acpi_device_id xgbe_acpi_match[] = { { "AMDI8001", 0 }, {}, }; MODULE_DEVICE_TABLE(acpi, xgbe_acpi_match); #endif #ifdef CONFIG_OF static const struct of_device_id xgbe_of_match[] = { { .compatible = "amd,xgbe-seattle-v1a", }, {}, }; MODULE_DEVICE_TABLE(of, xgbe_of_match); #endif static SIMPLE_DEV_PM_OPS(xgbe_pm_ops, xgbe_suspend, xgbe_resume); static struct platform_driver xgbe_driver = { .driver = { .name = "amd-xgbe", #ifdef CONFIG_ACPI .acpi_match_table = xgbe_acpi_match, #endif #ifdef CONFIG_OF .of_match_table = xgbe_of_match, #endif .pm = &xgbe_pm_ops, }, .probe = xgbe_probe, .remove = xgbe_remove, }; module_platform_driver(xgbe_driver);
williamfdevine/PrettyLinux
drivers/net/ethernet/amd/xgbe/xgbe-main.c
C
gpl-3.0
27,117
{% include "fa-decoration.html" with title=title|default:"Interviews list" icon=icon|default:"fa-calendar" %} {% if interviews_list %} <table class="table table-condensed table-bordered table-hover {{ datatable_style |default:"dataTable" }}"> <thead> <tr> <th>applicant</th> <th>type</th> <th>date</th> <th>interviewer</th> <th>status</th> </tr> </thead> <tbody> {% for interview in interviews_list %} <tr> <td><a href="{% url "applicant_detail" interview.applicant.id %}">{{ interview.applicant }}</a></td> <td><a href="{% url "interview_detail" interview.id %}">{{interview.type}}</a></td> <td>{{ interview.date }}</td> <td><a href="{% url "employee" interview.interviewer.id %}">{{ interview.interviewer }}</a></td> <td><div class="{{ interview.status.css_class }}">{{ interview.status }}</div></td> </tr> {% endfor %} </tbody> </table> {% else %} <p>No interview found.</p> {% endif %}
gdebure/cream
recruitment/templates/interview_table.html
HTML
gpl-3.0
1,030
<!DOCTYPE html> <html xml:lang="en-GB" lang="en-GB" xmlns="http://www.w3.org/1999/xhtml"> <head lang="en-GB"> <title>Ross Gammon’s Family Tree - Events</title> <meta charset="UTF-8" /> <meta name ="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1" /> <meta name ="apple-mobile-web-app-capable" content="yes" /> <meta name="generator" content="Gramps 4.2.8 http://gramps-project.org/" /> <meta name="author" content="" /> <link href="../../../images/favicon2.ico" rel="shortcut icon" type="image/x-icon" /> <link href="../../../css/narrative-screen.css" media="screen" rel="stylesheet" type="text/css" /> <link href="../../../css/narrative-print.css" media="print" rel="stylesheet" type="text/css" /> </head> <body> <div id="header"> <h1 id="SiteTitle">Ross Gammon’s Family Tree</h1> </div> <div class="wrapper" id="nav" role="navigation"> <div class="container"> <ul class="menu" id="dropmenu"> <li><a href="../../../individuals.html" title="Individuals">Individuals</a></li> <li><a href="../../../index.html" title="Surnames">Surnames</a></li> <li><a href="../../../families.html" title="Families">Families</a></li> <li class = "CurrentSection"><a href="../../../events.html" title="Events">Events</a></li> <li><a href="../../../places.html" title="Places">Places</a></li> <li><a href="../../../sources.html" title="Sources">Sources</a></li> <li><a href="../../../repositories.html" title="Repositories">Repositories</a></li> <li><a href="../../../media.html" title="Media">Media</a></li> <li><a href="../../../thumbnails.html" title="Thumbnails">Thumbnails</a></li> </ul> </div> </div> <div class="content" id="EventDetail"> <h3>Birth</h3> <table class="infolist eventlist"> <tbody> <tr> <td class="ColumnAttribute">Gramps ID</td> <td class="ColumnGRAMPSID">E18567</td> </tr> <tr> <td class="ColumnAttribute">Date</td> <td class="ColumnColumnDate"> 1845 </td> </tr> </tbody> </table> <div class="subsection" id="sourcerefs"> <h4>Source References</h4> <ol> <li> <a href="../../../src/7/b/d15f60787994aaacae323820cb7.html" title="Letter from Mary Avery 15/06/07" name ="sref1"> Letter from Mary Avery 15/06/07 <span class="grampsid"> [S0385]</span> </a> <ol> <li id="sref1a"> <ul> <li> Confidence: Low </li> </ul> </li> </ol> </li> </ol> </div> <div class="subsection" id="references"> <h4>References</h4> <ol class="Col1" role="Volume-n-Page"type = 1> <li> <a href="../../../ppl/2/0/d15f6098f1a8a8f4665f0c7202.html"> REED, Samuel <span class="grampsid"> [I18265]</span> </a> </li> </ol> </div> </div> <div class="fullclear"></div> <div id="footer"> <p id="createdate"> Generated by <a href="http://gramps-project.org/">Gramps</a> 4.2.8<br />Last change was the 2015-08-05 19:55:29<br />Created for <a href="../../../ppl/9/e/d15f5fb48902c4fc1b421d249e9.html">GAMMON, Francis</a> </p> <p id="copyright"> </p> </div> </body> </html>
RossGammon/the-gammons.net
RossFamilyTree/evt/6/1/d15f6098f1e6ea18d5c0406d216.html
HTML
gpl-3.0
3,161
"""treetools: Tools for transforming treebank trees. transformations: constants and utilities Author: Wolfgang Maier <maierw@hhu.de> """ from . import trees # Head rules for PTB (WSJ) from Collins (1999, p. 240) HEAD_RULES_PTB = { 'adjp' : [('left-to-right', 'nns qp nn $ advp jj vbn vbg adjp jjr np jjs dt fw rbr rbs sbar rb')], 'advp' : [('right-to-left', 'rb rbr rbs fw advp to cd jjr jj in np jjs nn')], 'conjp' : [('right-to-left', 'cc rb in')], 'frag' : [('right-to-left', '')], 'intj' : [('left-to-right', '')], 'lst' : [('right-to-left', 'ls :')], 'nac' : [('left-to-right', 'nn nns nnp nnps np nac ex $ cd qp prp vbg jj jjs jjr adjp fw')], 'pp' : [('right-to-left', 'in to vbg vbn rp fw')], 'prn' : [('left-to-right', '')], 'prt' : [('right-to-left', 'rp')], 'qp' : [('left-to-right', ' $ in nns nn jj rb dt cd ncd qp jjr jjs')], 'rrc' : [('right-to-left', 'vp np advp adjp pp')], 's' : [('left-to-right', ' to in vp s sbar adjp ucp np')], 'sbar' : [('left-to-right', 'whnp whpp whadvp whadjp in dt s sq sinv sbar frag')], 'sbarq' : [('left-to-right', 'sq s sinv sbarq frag')], 'sinv' : [('left-to-right', 'vbz vbd vbp vb md vp s sinv adjp np')], 'sq' : [('left-to-right', 'vbz vbd vbp vb md vp sq')], 'ucp' : [('right-to-left', '')], 'vp' : [('left-to-right', 'to vbd vbn md vbz vb vbg vbp vp adjp nn nns np')], 'whadjp' : [('left-to-right', 'cc wrb jj adjp')], 'whadvp' : [('right-to-left', 'cc wrb')], 'whnp' : [('left-to-right', 'wdt wp wp$ whadjp whpp whnp')], 'whpp' : [('right-to-left', 'in to fw')] } # Head rules for NeGra/TIGER from rparse # almost identical to corresponding rules from Stanford parser HEAD_RULES_NEGRA = { 's' : [('right-to-left', 'vvfin vvimp'), ('right-to-left', 'vp cvp'), ('right-to-left', 'vmfin vafin vaimp'), ('right-to-left', 's cs')], 'vp' : [('right-to-left', 'vvinf vvizu vvpp'), ('right-to-left', 'vz vainf vminf vmpp vapp pp')], 'vz' : [('right-to-left', 'vvinf vainf vminf vvfin vvizu'), ('left-to-right', 'prtzu appr ptkzu')], 'np' : [('right-to-left', 'nn ne mpn np cnp pn car')], 'ap' : [('right-to-left', 'adjd adja cap aa adv')], 'pp' : [('left-to-right', 'kokom appr proav')], 'co' : [('left-to-right', '')], 'avp' : [('right-to-left', 'adv avp adjd proav pp')], 'aa' : [('right-to-left', 'adjd adja')], 'cnp' : [('right-to-left', 'nn ne mpn np cnp pn car')], 'cap' : [('right-to-left', 'adjd adja cap aa adv')], 'cpp' : [('right-to-left', 'appr proav pp cpp')], 'cs' : [('right-to-left', 's cs')], 'cvp' : [('right-to-left', 'vz')], 'cvz' : [('right-to-left', 'vz')], 'cavp' : [('right-to-left', 'adv avp adjd pwav appr ptkvz')], 'mpn' : [('right-to-left', 'ne fm card')], 'nm' : [('right-to-left', 'card nn')], 'cac' : [('right-to-left', 'appr avp')], 'ch' : [('right-to-left', '')], 'mta' : [('right-to-left', 'adja adjd nn')], 'ccp' : [('right-to-left', 'avp')], 'dl' : [('left-to-right', '')], 'isu' : [('right-to-left', '')], 'ql' : [('right-to-left', '')], '-' : [('right-to-left', 'pp')], 'cd' : [('right-to-left', 'cd')], 'nn' : [('right-to-left', 'nn')], 'nr' : [('right-to-left', 'nr')], 'vroot' : [('left-to-right', '$. $')] } def get_headpos_by_rule(parent_label, children_label, rules, default=0): """Given parent and children labels and head rules, return position of lexical head. """ if not parent_label.lower() in rules: return default for hrule in rules[parent_label.lower()]: if len(hrule[1]) == 0: if hrule[0] == 'left-to-right': return len(children_label) - 1 elif hrule[0] == 'right-to_left': return 0 else: raise ValueError("unknown head rule direction") for label in hrule[1]: if hrule[0] == 'left-to-right': for i, child_label in enumerate(children_label): parsed_label = trees.parse_label(child_label.lower()) if parsed_label.label.lower() == label: return i elif hrule[0] == 'right-to-left': for i, child_label in \ zip(reversed(range(len(children_label))), reversed(children_label)): parsed_label = trees.parse_label(child_label.lower()) if parsed_label.label.lower() == label: return i return 0 else: raise ValueError("unknown head rule direction") return 0
wmaier/treetools
trees/transformconst.py
Python
gpl-3.0
4,747
@CHARSET "UTF-8"; /************940px宽**************/ .container, .row { width: 940px; margin: 0 auto; } .navbar-fixed-top .container {width: 940px;} .row > [class *="span"]:first-child {margin-left: 0;} .row > .module-list-div [class *="span"]:first-child {margin-left: 0;} .row {margin-left: 0;} .span1, .span2, .span3, .span4, .span5, .span6, .span7, .span8, .span9, .span10, .span11, .span12, .span13, .span14, .span15, .span16 { float: left; margin-left: 20px; } .span16 {width: 940px;} .span15 {width: 880px;} .span14 {width: 820px;} .span13 {width: 760px;} .span12 {width: 700px;} .span11 {width: 640px;} .span10 {width: 580px;} .span9 {width: 520px;} .span8 {width: 460px;} .span7 {width: 400px;} .span6 {width: 340px;} .span5 {width: 280px;} .span4 {width: 220px;} .span3 {width: 160px;} .span2 {width: 100px;} .span1 {width: 40px;} .offset16 {margin-left: 980px;} .offset15 {margin-left: 920px;} .offset14 {margin-left: 860px;} .offset13 {margin-left: 800px;} .offset12 {margin-left: 740px;} .offset11 {margin-left: 680px;} .offset10 {margin-left: 620px;} .offset9 {margin-left: 560px;} .offset8 {margin-left: 500px;} .offset7 {margin-left: 440px;} .offset6 {margin-left: 380px;} .offset5 {margin-left: 320px;} .offset4 {margin-left: 260px;} .offset3 {margin-left: 200px;} .offset2 {margin-left: 140px;} .offset1 {margin-left: 80px;} .span13>[class *="span"]:first-child {margin-left: 0;} .span13>.span8 {margin-left: 0;} .span13>.span13 {margin-left: 0;} input.span16, textarea.span16, .uneditable-input.span16 {width: 926px;} input.span15, textarea.span15, .uneditable-input.span15 {width: 866px;} input.span14, textarea.span14, .uneditable-input.span14 {width: 806px;} input.span13, textarea.span13, .uneditable-input.span13 {width: 746px;} input.span12, textarea.span12, .uneditable-input.span12 {width: 686px;} input.span11, textarea.span11, .uneditable-input.span11 {width: 626px;} input.span10, textarea.span10, .uneditable-input.span10 {width: 566px;} input.span9, textarea.span9, .uneditable-input.span9 {width: 506px;} input.span8, textarea.span8, .uneditable-input.span8 {width: 446px;} input.span7, textarea.span7, .uneditable-input.span7 {width: 386px;} input.span6, textarea.span6, .uneditable-input.span6 {width: 326px;} input.span5, textarea.span5, .uneditable-input.span5 {width: 266px;} input.span4, textarea.span4, .uneditable-input.span4 {width: 206px;} input.span3, textarea.span3, .uneditable-input.span3 {width: 146px;} input.span2, textarea.span2, .uneditable-input.span2 {width: 86px;} input.span1, textarea.span1, .uneditable-input.span1 {width: 26px;} .logo-div .logo-img { width: auto; max-width: 193px; display: block; margin: 0 auto; } .label-div .news-list h1 { max-width: 490px; } .label-div .label-title span a { padding-right: 2px; } .label-div .label-main ul.event-list h1 { font-size: 16px; font-weight: normal; *font-weight: bold; height: 22px; width: 300px; overflow: hidden; } .label-div .news-view h1 { width: 520px; } .clearfix.t-15.pl-25 div.pull-left { width: 480px; } .topic-title h1 { width: 450px; } .clearfix.t-15 div.pull-left { width: 500px; } .topic-catalog .span6 { padding-right: 0; } .topic-catalog .span6 ul.clearfix.pull-left.pl-40 { padding-left: 10px; } .topic-catalog .OF-label { margin-left: 15px; padding-left: 12px; padding-right: 11px; } .fun_list .span1.border-r { padding-right: 15px; } .label-div-none .label-main .people-list ul li { padding-right: 13px; padding-left: 4px; } .related-div .video-list .span2 { padding-right: 10px; } .classifyDIV { width: 480px; } /**************IE6兼容***************/ .navbar-inner { _width: 940px; _height: 40px; _overflow: hidden; } .navbar ul.nav li { _float: left; } .navbar ul.nav li a { _color: #FFF; _float: left; _padding: 10px 20px; _margin: 0; } .navbar ul.nav li a:hover{ _background-color: #2885C8; } .navbar ul.nav.login-none li.dropdown a b.caret { _display: none; } .navbar ul.nav.library-fun li a { _padding: 5px 8px 2px; _background: #2E2E2E; } .navbar ul.nav.library-fun li.active a, .navbar ul.nav.library-fun li a:hover { _background: #666; } .navbar ul.nav li.dropdown.active a { _background-color: #2885C8; _color: #FFF; } .row.home-index .span13 { _width: 760px; } .row.home-index .span13, .row.home-index .span13 .span8 { _margin-left: 0px; } .row.home-index .span13 .span8 .label-div { _width: 443px; _overflow: hidden; } .row.home-index .span13 .span5 .label-div { _width: 263px; _overflow: hidden; } .row.home-index .span13 .span5 .label-div .label-title span { _width: 170px; } .row.home-index .span3 { _width: 160px; _overflow: hidden; } .row.home-index .span3 img { _width: 160px; _display: block; _overflow: hidden; } .row.home-index .span3 .label-div img { _width: 128px; _display: block; _overflow: hidden; } .news-slides { _width: 428px; _height: 372px; _overflow: hidden; } .news-slides .slides-list .slides-css { _width: 428px; _height: 260px; _overflow: hidden; position: relative; } .news-slides .slides-list .slides-css img { _width: 428px; _height: 260px; _overflow: hidden; } .label-div .label-main .news-slides .intro h1 {_height: 32px;_overflow: hidden;} .news-slides .slides-list .slides-icon { position: absolute; _right: 5px; _bottom: 10px; _height: 12px; } .label-div .label-main .news-list .span3 { width: 160px; overflow: hidden; _margin-left: 10px; } .label-div .label-main .news-list .span3 img { width: 160px; height: 135px; overflow: hidden; display: block; } .news-slides .slides-list .slides-icon { position: absolute; _top: 240px; } .label-div .label-main .topic-list .span1, .label-div .label-main .group-list .span1 { width: 40px; overflow: hidden; _margin-left: 10px; } .label-div .label-main .topic-list .span1 img, .label-div .label-main .group-list .span1 img { width: 40px; height: 40px; overflow: hidden; display: block; } .label-main .video-list { _padding-bottom: 30px; } .label-main .video-list .video-img img { _width: 166px; _height: 100px; _overflow: hidden; _display: block; } .event-slides { _width: 428px; _height: 215px; _overflow: hidden; } .event-slides .slides-list-event .slides-css-event { _width: 428px; _height: 80px; _overflow: hidden; position: relative; } .event-slides .slides-list-event .slides-icon-event { position: absolute; _top: 60px; } .classifySearch {position: relative;} .classifySearch .search-input {_width: 200px;_position: absolute;_right: 0px;} .label-div .label-main .event-div { _width: 445px; _overflow: hidden; } .label-div .label-main .event-index a img { _width: 430px; _height: 80px; _overflow: hidden; } .label-div-none .group-list .span1 { _width: 40px; _overflow: hidden; _margin-left: 10px; } .label-div-none .group-list .span1 img { _width: 40px; _height: 40px; _overflow: hidden; } .label-div-none .label-main .people-list ul li, .label-div .label-main .people-list ul li img { _width: 50px; _height: 50px; _overflow: hidden; } .group-view .span2 { _width: 100px; _overflow: hidden; _margin-left: 10px; } .group-view .offset2.intro { _padding-left: 20px; } .group-view .span2 img { _width: 100px; _height: 100px; _overflow: hidden; } .related-div .topic-list .span1 { _width: 40px; _overflow: hidden; _margin-left: 10px; } .related-div .topic-list .span1 img { _width: 40px; _height: 40px; _overflow: hidden; } .fun_list .span1.border-r { _margin-left: 10px; } .row .span12 { _margin-left: 0; _width: 700px; } .row .span12 .label-div.topic-hot .view-main .view-content .span3 { _width: 160px; } .row .span12 .label-div.topic-hot .view-main .view-content .span3 img { _width: 160px; _overflow: hidden; } .row .span12 .label-div.topic-hot .view-main .view-content .span4 { _width: 220px; } .row .span12 .label-div.topic-hot .view-main .view-content .span4 img { _width: 220px; _overflow: hidden; } .row .span12 .label-div.topic-hot .view-main .view-content .span5 { _width: 280px; } .row .span12 .label-div.topic-hot .view-main .view-content .span5 img { _width: 280px; _overflow: hidden; } .row .span12 .label-div.topic-hot .view-main .view-content .span6 { _width: 340px; } .row .span12 .label-div.topic-hot .view-main .view-content .span6 img { _width: 340px; _overflow: hidden; } .row .span12 .label-div.topic-hot .view-main .view-content .span7 { _width: 400px; _overflow:hidden; } .row .span12 .label-div.topic-hot .view-main .view-content .span8 { _width: 460px; } .row .span4 {_width: 220px;float: left;} .row .span4 img {_width: 195px;_overflow: hidden; } .index-list .docu-top-right {width: 592px;} .index-list-1 .docu-top-right {width: 268px;} .index-list-1 .docu-top-right-1 {width: 260px;} .docu-list, .images-list { width: 658px; } .docu-list .list-li { margin-right: 11px; } .docu-list .list-li:nth-child(5) { margin-right: 0; } .docu-list .list-li .title { _height: 40px; _line-height: 20px; } .name-css {max-width: 100px;_width: 100px;} .index-top .span6 {_width: 340px;} .index-top .span3 {_width: 160px;} .pic-1 a img {height: 198px;_width: 330px;} .pic-2 a img, .pic-3 a img {height: 94px;} .pic-2 a img {_width: 160x;} .pic-3 a img {_width: 75x;} .video-divList .video-img img {width: 160px;} .docu-div .docu-img.span2 {_margin-left: 10px;} .collections-div .docu-img.span2, .collections-video-div .docu-img.span2, .video-divList.span3, .video-div .span2, .image-div .span2 {_margin-left: 10px;} .collections-video-div .docu-img.span2 img, .video-div .span2 .video-img img, .image-div .span2 .docu-img img {_width: 100px; } /******图片预览*******/ .image-view .view_middle .pic_main {width: 520px;} .image-view .view_middle .pic_main .pic_main_div { width: 520px; } .image-view .view_middle .pic_main .pic_img{width: 520px;} .image-view .view_middle .pic_main .pic_img img{max-width: 520px;max-height: 450px;_width: 520px;_height: 450px;} .image-view .view_middle .pic_main .pic_intro{width: 520px;padding-top: 40px;} .mark_left, .mark_right {height: 380px;width: 260px;} .mark_right {left: 260px;} .image-view .view_middle .pic_thum{margin-right: 0px;} .image-view .view_top .top_page{margin-left:160px;_margin-left:140px;} .input-lib {_width: 350px;} .images-list {height: 168px;_height: 166px;} .videos-list {height: 160px;_height: 160px;} .images-list .list-li, .videos-list .list-li {margin-right: 14px;} .logo-lib {padding-left: 1em;} .footer-info {display: none;} .home-other a img {_width: 26px;_height: 26px;} .home-other a {margin-right: 3px;_margin-right: 2px;} .none-960 {display: none;} .input-lib input.span7 {_width: 336px;}
flowstone/HTML-Templates
20036_医疗器械/style/biodiscover-IE940.css
CSS
gpl-3.0
10,609
<?php /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * * Copyright (c) 2001-2013 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * \***************************************************************************/ if (!defined('_ECRIRE_INC_VERSION')) return; // http://doc.spip.org/@inc_instituer_breve_dist function inc_instituer_breve_dist($id_breve, $statut=-1) { if ($statut == -1) return ""; $liste_statuts = array( // statut => array(titre,image) 'prop' => array(_T('item_breve_proposee'),''), 'publie' => array(_T('item_breve_validee'),''), 'refuse' => array(_T('item_breve_refusee'),'') ); if (!in_array($statut, array_keys($liste_statuts))) $liste_statuts[$statut] = array($statut,''); $res = "<ul id='instituer_breve-$id_breve' class='instituer_breve instituer'>" . "<li>" . _T('entree_breve_publiee') ."<ul>"; $href = redirige_action_auteur('editer_breve',$id_breve,'breves_voir', "id_breve=$id_breve"); foreach($liste_statuts as $s=>$affiche){ $href = parametre_url($href,'statut',$s); if ($s==$statut) $res .= "<li class='$s selected'>" . puce_statut($s) . $affiche[0] . '</li>'; else $res .= "<li class='$s'><a href='$href' onclick='return confirm(confirm_changer_statut);'>" . puce_statut($s) . $affiche[0] . '</a></li>'; } $res .= "</ul></li></ul>"; return $res; } ?>
VertigeASBL/genrespluriels
ecrire/inc/instituer_breve.php
PHP
gpl-3.0
1,828
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors // License: GNU General Public License v3. See license.txt frappe.query_reports["GSTR-1"] = { "filters": [ { "fieldname":"company", "label": __("Company"), "fieldtype": "Link", "options": "Company", "reqd": 1, "default": frappe.defaults.get_user_default("Company") }, { "fieldname":"from_date", "label": __("From Date"), "fieldtype": "Date", "reqd": 1, "default": frappe.datetime.add_months(frappe.datetime.get_today(), -3), "width": "80" }, { "fieldname":"to_date", "label": __("To Date"), "fieldtype": "Date", "reqd": 1, "default": frappe.datetime.get_today() }, { "fieldname":"type_of_business", "label": __("Type of Business"), "fieldtype": "Select", "reqd": 1, "options": ["B2B", "B2C Large", "B2C Small"], "default": "B2B" } ] }
tfroehlich82/erpnext
erpnext/regional/report/gstr_1/gstr_1.js
JavaScript
gpl-3.0
893
/* * 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. */ #include <termios.h> #include <unistd.h> pid_t forkpty(int *master, int *slave, const struct termios *termp, const struct winsize *winp);
s20121035/rk3288_android5.1_repo
packages/apps/Terminal/jni/forkpty.h
C
gpl-3.0
768
#!/usr/bin/env python # # Author: Pablo Iranzo Gomez (Pablo.Iranzo@redhat.com) # # Description: Script for setting the keyring password for RHEV scripts # # Requires: python keyring # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 2 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. import optparse import keyring from rhev_functions import * description = """ RHEV-keyring is a script for mantaining the keyring used by rhev script for storing password """ # Option parsing p = optparse.OptionParser("rhev-clone.py [arguments]", description=description) p.add_option("-u", "--user", dest="username", help="Username to connect to RHEVM API", metavar="admin@internal", default=False) p.add_option("-w", "--password", dest="password", help="Password to use with username", metavar="admin", default=False) p.add_option("-W", action="store_true", dest="askpassword", help="Ask for password", metavar="admin", default=False) p.add_option('-q', "--query", action="store_true", dest="query", help="Query the values stored", default=False) (options, args) = p.parse_args() if options.askpassword: options.password = getpass.getpass("Enter password: ") # keyring.set_password('redhat', 'kerberos', '<password>') # remotepasseval = keyring.get_password('redhat', 'kerberos') if options.query: print "Username: %s" % keyring.get_password('rhevm-utils', 'username') print "Password: %s" % keyring.get_password('rhevm-utils', 'password') if options.username: keyring.set_password('rhevm-utils', 'username', options.username) if options.password: keyring.set_password('rhevm-utils', 'password', options.password)
DragonRoman/rhevm-utils
rhev-keyring.py
Python
gpl-3.0
2,000
#include <linux/types.h> #include <linux/errno.h> #include <asm/uaccess.h> #include <asm/sfp-machine.h> #include <math-emu/soft-fp.h> #include <math-emu/double.h> #include <math-emu/single.h> int fnmsubs(void *frD, void *frA, void *frB, void *frC) { FP_DECL_D(R); FP_DECL_D(A); FP_DECL_D(B); FP_DECL_D(C); FP_DECL_D(T); FP_DECL_EX; #ifdef DEBUG printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); #endif FP_UNPACK_DP(A, frA); FP_UNPACK_DP(B, frB); FP_UNPACK_DP(C, frC); #ifdef DEBUG printk("A: %ld %lu %lu %ld (%ld)\n", A_s, A_f1, A_f0, A_e, A_c); printk("B: %ld %lu %lu %ld (%ld)\n", B_s, B_f1, B_f0, B_e, B_c); printk("C: %ld %lu %lu %ld (%ld)\n", C_s, C_f1, C_f0, C_e, C_c); #endif if ((A_c == FP_CLS_INF && C_c == FP_CLS_ZERO) || (A_c == FP_CLS_ZERO && C_c == FP_CLS_INF)) { FP_SET_EXCEPTION(EFLAG_VXIMZ); } FP_MUL_D(T, A, C); if (B_c != FP_CLS_NAN) { B_s ^= 1; } if (T_s != B_s && T_c == FP_CLS_INF && B_c == FP_CLS_INF) { FP_SET_EXCEPTION(EFLAG_VXISI); } FP_ADD_D(R, T, B); if (R_c != FP_CLS_NAN) { R_s ^= 1; } #ifdef DEBUG printk("D: %ld %lu %lu %ld (%ld)\n", R_s, R_f1, R_f0, R_e, R_c); #endif __FP_PACK_DS(frD, R); return FP_CUR_EXCEPTIONS; }
williamfdevine/PrettyLinux
arch/powerpc/math-emu/fnmsubs.c
C
gpl-3.0
1,213
<!DOCTYPE html> <html> <!-- Created on March 31, 2014 by texi2html 1.82 --> <!-- texi2html was written by: Lionel Cons <Lionel.Cons@cern.ch> (original author) Karl Berry <karl@freefriends.org> Olaf Bachmann <obachman@mathematik.uni-kl.de> and many others. Maintained by: Many creative people. Send bugs and suggestions to <texi2html-bug@nongnu.org> --> <head> <title>FFmpeg documentation : ffplay </title> <meta name="description" content="ffplay Documentation: "> <meta name="keywords" content="FFmpeg documentation : ffplay "> <meta name="Generator" content="texi2html 1.82"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="stylesheet" type="text/css" href="default.css" /> <link rel="icon" href="favicon.png" type="image/png" /> </head> <body> <div id="container"> <div id="body"> <a name="SEC_Top"></a> <h1 class="settitle">ffplay Documentation</h1> <a name="SEC_Contents"></a> <h1>Table of Contents</h1> <div class="contents"> <ul class="toc"> <li><a name="toc-Synopsis" href="#Synopsis">1. Synopsis</a></li> <li><a name="toc-Description" href="#Description">2. Description</a></li> <li><a name="toc-Options" href="#Options">3. Options</a> <ul class="toc"> <li><a name="toc-Stream-specifiers-1" href="#Stream-specifiers-1">3.1 Stream specifiers</a></li> <li><a name="toc-Generic-options" href="#Generic-options">3.2 Generic options</a></li> <li><a name="toc-AVOptions" href="#AVOptions">3.3 AVOptions</a></li> <li><a name="toc-Main-options" href="#Main-options">3.4 Main options</a></li> <li><a name="toc-Advanced-options" href="#Advanced-options">3.5 Advanced options</a></li> <li><a name="toc-While-playing" href="#While-playing">3.6 While playing</a></li> </ul></li> <li><a name="toc-See-Also" href="#See-Also">4. See Also</a></li> <li><a name="toc-Authors" href="#Authors">5. Authors</a></li> </ul> </div> <a name="Synopsis"></a> <h1 class="chapter"><a href="ffplay.html#toc-Synopsis">1. Synopsis</a></h1> <p>ffplay [<var>options</var>] [&lsquo;<tt>input_file</tt>&rsquo;] </p> <a name="Description"></a> <h1 class="chapter"><a href="ffplay.html#toc-Description">2. Description</a></h1> <p>FFplay is a very simple and portable media player using the FFmpeg libraries and the SDL library. It is mostly used as a testbed for the various FFmpeg APIs. </p> <a name="Options"></a> <h1 class="chapter"><a href="ffplay.html#toc-Options">3. Options</a></h1> <p>All the numerical options, if not specified otherwise, accept a string representing a number as input, which may be followed by one of the SI unit prefixes, for example: &rsquo;K&rsquo;, &rsquo;M&rsquo;, or &rsquo;G&rsquo;. </p> <p>If &rsquo;i&rsquo; is appended to the SI unit prefix, the complete prefix will be interpreted as a unit prefix for binary multiplies, which are based on powers of 1024 instead of powers of 1000. Appending &rsquo;B&rsquo; to the SI unit prefix multiplies the value by 8. This allows using, for example: &rsquo;KB&rsquo;, &rsquo;MiB&rsquo;, &rsquo;G&rsquo; and &rsquo;B&rsquo; as number suffixes. </p> <p>Options which do not take arguments are boolean options, and set the corresponding value to true. They can be set to false by prefixing the option name with &quot;no&quot;. For example using &quot;-nofoo&quot; will set the boolean option with name &quot;foo&quot; to false. </p> <p><a name="Stream-specifiers"></a> </p><a name="Stream-specifiers-1"></a> <h2 class="section"><a href="ffplay.html#toc-Stream-specifiers-1">3.1 Stream specifiers</a></h2> <p>Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers are used to precisely specify which stream(s) a given option belongs to. </p> <p>A stream specifier is a string generally appended to the option name and separated from it by a colon. E.g. <code>-codec:a:1 ac3</code> contains the <code>a:1</code> stream specifier, which matches the second audio stream. Therefore, it would select the ac3 codec for the second audio stream. </p> <p>A stream specifier can match several streams, so that the option is applied to all of them. E.g. the stream specifier in <code>-b:a 128k</code> matches all audio streams. </p> <p>An empty stream specifier matches all streams. For example, <code>-codec copy</code> or <code>-codec: copy</code> would copy all the streams without reencoding. </p> <p>Possible forms of stream specifiers are: </p><dl compact="compact"> <dt> &lsquo;<samp><var>stream_index</var></samp>&rsquo;</dt> <dd><p>Matches the stream with this index. E.g. <code>-threads:1 4</code> would set the thread count for the second stream to 4. </p></dd> <dt> &lsquo;<samp><var>stream_type</var>[:<var>stream_index</var>]</samp>&rsquo;</dt> <dd><p><var>stream_type</var> is one of following: &rsquo;v&rsquo; for video, &rsquo;a&rsquo; for audio, &rsquo;s&rsquo; for subtitle, &rsquo;d&rsquo; for data, and &rsquo;t&rsquo; for attachments. If <var>stream_index</var> is given, then it matches stream number <var>stream_index</var> of this type. Otherwise, it matches all streams of this type. </p></dd> <dt> &lsquo;<samp>p:<var>program_id</var>[:<var>stream_index</var>]</samp>&rsquo;</dt> <dd><p>If <var>stream_index</var> is given, then it matches the stream with number <var>stream_index</var> in the program with the id <var>program_id</var>. Otherwise, it matches all streams in the program. </p></dd> <dt> &lsquo;<samp>#<var>stream_id</var> or i:<var>stream_id</var></samp>&rsquo;</dt> <dd><p>Match the stream by stream id (e.g. PID in MPEG-TS container). </p></dd> </dl> <a name="Generic-options"></a> <h2 class="section"><a href="ffplay.html#toc-Generic-options">3.2 Generic options</a></h2> <p>These options are shared amongst the ff* tools. </p> <dl compact="compact"> <dt> &lsquo;<samp>-L</samp>&rsquo;</dt> <dd><p>Show license. </p> </dd> <dt> &lsquo;<samp>-h, -?, -help, --help [<var>arg</var>]</samp>&rsquo;</dt> <dd><p>Show help. An optional parameter may be specified to print help about a specific item. If no argument is specified, only basic (non advanced) tool options are shown. </p> <p>Possible values of <var>arg</var> are: </p><dl compact="compact"> <dt> &lsquo;<samp>long</samp>&rsquo;</dt> <dd><p>Print advanced tool options in addition to the basic tool options. </p> </dd> <dt> &lsquo;<samp>full</samp>&rsquo;</dt> <dd><p>Print complete list of options, including shared and private options for encoders, decoders, demuxers, muxers, filters, etc. </p> </dd> <dt> &lsquo;<samp>decoder=<var>decoder_name</var></samp>&rsquo;</dt> <dd><p>Print detailed information about the decoder named <var>decoder_name</var>. Use the &lsquo;<samp>-decoders</samp>&rsquo; option to get a list of all decoders. </p> </dd> <dt> &lsquo;<samp>encoder=<var>encoder_name</var></samp>&rsquo;</dt> <dd><p>Print detailed information about the encoder named <var>encoder_name</var>. Use the &lsquo;<samp>-encoders</samp>&rsquo; option to get a list of all encoders. </p> </dd> <dt> &lsquo;<samp>demuxer=<var>demuxer_name</var></samp>&rsquo;</dt> <dd><p>Print detailed information about the demuxer named <var>demuxer_name</var>. Use the &lsquo;<samp>-formats</samp>&rsquo; option to get a list of all demuxers and muxers. </p> </dd> <dt> &lsquo;<samp>muxer=<var>muxer_name</var></samp>&rsquo;</dt> <dd><p>Print detailed information about the muxer named <var>muxer_name</var>. Use the &lsquo;<samp>-formats</samp>&rsquo; option to get a list of all muxers and demuxers. </p> </dd> <dt> &lsquo;<samp>filter=<var>filter_name</var></samp>&rsquo;</dt> <dd><p>Print detailed information about the filter name <var>filter_name</var>. Use the &lsquo;<samp>-filters</samp>&rsquo; option to get a list of all filters. </p></dd> </dl> </dd> <dt> &lsquo;<samp>-version</samp>&rsquo;</dt> <dd><p>Show version. </p> </dd> <dt> &lsquo;<samp>-formats</samp>&rsquo;</dt> <dd><p>Show available formats. </p> </dd> <dt> &lsquo;<samp>-codecs</samp>&rsquo;</dt> <dd><p>Show all codecs known to libavcodec. </p> <p>Note that the term &rsquo;codec&rsquo; is used throughout this documentation as a shortcut for what is more correctly called a media bitstream format. </p> </dd> <dt> &lsquo;<samp>-decoders</samp>&rsquo;</dt> <dd><p>Show available decoders. </p> </dd> <dt> &lsquo;<samp>-encoders</samp>&rsquo;</dt> <dd><p>Show all available encoders. </p> </dd> <dt> &lsquo;<samp>-bsfs</samp>&rsquo;</dt> <dd><p>Show available bitstream filters. </p> </dd> <dt> &lsquo;<samp>-protocols</samp>&rsquo;</dt> <dd><p>Show available protocols. </p> </dd> <dt> &lsquo;<samp>-filters</samp>&rsquo;</dt> <dd><p>Show available libavfilter filters. </p> </dd> <dt> &lsquo;<samp>-pix_fmts</samp>&rsquo;</dt> <dd><p>Show available pixel formats. </p> </dd> <dt> &lsquo;<samp>-sample_fmts</samp>&rsquo;</dt> <dd><p>Show available sample formats. </p> </dd> <dt> &lsquo;<samp>-layouts</samp>&rsquo;</dt> <dd><p>Show channel names and standard channel layouts. </p> </dd> <dt> &lsquo;<samp>-colors</samp>&rsquo;</dt> <dd><p>Show recognized color names. </p> </dd> <dt> &lsquo;<samp>-loglevel [repeat+]<var>loglevel</var> | -v [repeat+]<var>loglevel</var></samp>&rsquo;</dt> <dd><p>Set the logging level used by the library. Adding &quot;repeat+&quot; indicates that repeated log output should not be compressed to the first line and the &quot;Last message repeated n times&quot; line will be omitted. &quot;repeat&quot; can also be used alone. If &quot;repeat&quot; is used alone, and with no prior loglevel set, the default loglevel will be used. If multiple loglevel parameters are given, using &rsquo;repeat&rsquo; will not change the loglevel. <var>loglevel</var> is a number or a string containing one of the following values: </p><dl compact="compact"> <dt> &lsquo;<samp>quiet</samp>&rsquo;</dt> <dd><p>Show nothing at all; be silent. </p></dd> <dt> &lsquo;<samp>panic</samp>&rsquo;</dt> <dd><p>Only show fatal errors which could lead the process to crash, such as and assert failure. This is not currently used for anything. </p></dd> <dt> &lsquo;<samp>fatal</samp>&rsquo;</dt> <dd><p>Only show fatal errors. These are errors after which the process absolutely cannot continue after. </p></dd> <dt> &lsquo;<samp>error</samp>&rsquo;</dt> <dd><p>Show all errors, including ones which can be recovered from. </p></dd> <dt> &lsquo;<samp>warning</samp>&rsquo;</dt> <dd><p>Show all warnings and errors. Any message related to possibly incorrect or unexpected events will be shown. </p></dd> <dt> &lsquo;<samp>info</samp>&rsquo;</dt> <dd><p>Show informative messages during processing. This is in addition to warnings and errors. This is the default value. </p></dd> <dt> &lsquo;<samp>verbose</samp>&rsquo;</dt> <dd><p>Same as <code>info</code>, except more verbose. </p></dd> <dt> &lsquo;<samp>debug</samp>&rsquo;</dt> <dd><p>Show everything, including debugging information. </p></dd> </dl> <p>By default the program logs to stderr, if coloring is supported by the terminal, colors are used to mark errors and warnings. Log coloring can be disabled setting the environment variable <code>AV_LOG_FORCE_NOCOLOR</code> or <code>NO_COLOR</code>, or can be forced setting the environment variable <code>AV_LOG_FORCE_COLOR</code>. The use of the environment variable <code>NO_COLOR</code> is deprecated and will be dropped in a following FFmpeg version. </p> </dd> <dt> &lsquo;<samp>-report</samp>&rsquo;</dt> <dd><p>Dump full command line and console output to a file named <code><var>program</var>-<var>YYYYMMDD</var>-<var>HHMMSS</var>.log</code> in the current directory. This file can be useful for bug reports. It also implies <code>-loglevel verbose</code>. </p> <p>Setting the environment variable <code>FFREPORT</code> to any value has the same effect. If the value is a &rsquo;:&rsquo;-separated key=value sequence, these options will affect the report; options values must be escaped if they contain special characters or the options delimiter &rsquo;:&rsquo; (see the &ldquo;Quoting and escaping&rdquo; section in the ffmpeg-utils manual). The following option is recognized: </p><dl compact="compact"> <dt> &lsquo;<samp>file</samp>&rsquo;</dt> <dd><p>set the file name to use for the report; <code>%p</code> is expanded to the name of the program, <code>%t</code> is expanded to a timestamp, <code>%%</code> is expanded to a plain <code>%</code> </p></dd> </dl> <p>Errors in parsing the environment variable are not fatal, and will not appear in the report. </p> </dd> <dt> &lsquo;<samp>-hide_banner</samp>&rsquo;</dt> <dd><p>Suppress printing banner. </p> <p>All FFmpeg tools will normally show a copyright notice, build options and library versions. This option can be used to suppress printing this information. </p> </dd> <dt> &lsquo;<samp>-cpuflags flags (<em>global</em>)</samp>&rsquo;</dt> <dd><p>Allows setting and clearing cpu flags. This option is intended for testing. Do not use it unless you know what you&rsquo;re doing. </p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -cpuflags -sse+mmx ... ffmpeg -cpuflags mmx ... ffmpeg -cpuflags 0 ... </pre></td></tr></table> <p>Possible flags for this option are: </p><dl compact="compact"> <dt> &lsquo;<samp>x86</samp>&rsquo;</dt> <dd><dl compact="compact"> <dt> &lsquo;<samp>mmx</samp>&rsquo;</dt> <dt> &lsquo;<samp>mmxext</samp>&rsquo;</dt> <dt> &lsquo;<samp>sse</samp>&rsquo;</dt> <dt> &lsquo;<samp>sse2</samp>&rsquo;</dt> <dt> &lsquo;<samp>sse2slow</samp>&rsquo;</dt> <dt> &lsquo;<samp>sse3</samp>&rsquo;</dt> <dt> &lsquo;<samp>sse3slow</samp>&rsquo;</dt> <dt> &lsquo;<samp>ssse3</samp>&rsquo;</dt> <dt> &lsquo;<samp>atom</samp>&rsquo;</dt> <dt> &lsquo;<samp>sse4.1</samp>&rsquo;</dt> <dt> &lsquo;<samp>sse4.2</samp>&rsquo;</dt> <dt> &lsquo;<samp>avx</samp>&rsquo;</dt> <dt> &lsquo;<samp>xop</samp>&rsquo;</dt> <dt> &lsquo;<samp>fma4</samp>&rsquo;</dt> <dt> &lsquo;<samp>3dnow</samp>&rsquo;</dt> <dt> &lsquo;<samp>3dnowext</samp>&rsquo;</dt> <dt> &lsquo;<samp>cmov</samp>&rsquo;</dt> </dl> </dd> <dt> &lsquo;<samp>ARM</samp>&rsquo;</dt> <dd><dl compact="compact"> <dt> &lsquo;<samp>armv5te</samp>&rsquo;</dt> <dt> &lsquo;<samp>armv6</samp>&rsquo;</dt> <dt> &lsquo;<samp>armv6t2</samp>&rsquo;</dt> <dt> &lsquo;<samp>vfp</samp>&rsquo;</dt> <dt> &lsquo;<samp>vfpv3</samp>&rsquo;</dt> <dt> &lsquo;<samp>neon</samp>&rsquo;</dt> </dl> </dd> <dt> &lsquo;<samp>PowerPC</samp>&rsquo;</dt> <dd><dl compact="compact"> <dt> &lsquo;<samp>altivec</samp>&rsquo;</dt> </dl> </dd> <dt> &lsquo;<samp>Specific Processors</samp>&rsquo;</dt> <dd><dl compact="compact"> <dt> &lsquo;<samp>pentium2</samp>&rsquo;</dt> <dt> &lsquo;<samp>pentium3</samp>&rsquo;</dt> <dt> &lsquo;<samp>pentium4</samp>&rsquo;</dt> <dt> &lsquo;<samp>k6</samp>&rsquo;</dt> <dt> &lsquo;<samp>k62</samp>&rsquo;</dt> <dt> &lsquo;<samp>athlon</samp>&rsquo;</dt> <dt> &lsquo;<samp>athlonxp</samp>&rsquo;</dt> <dt> &lsquo;<samp>k8</samp>&rsquo;</dt> </dl> </dd> </dl> </dd> <dt> &lsquo;<samp>-opencl_bench</samp>&rsquo;</dt> <dd><p>Benchmark all available OpenCL devices and show the results. This option is only available when FFmpeg has been compiled with <code>--enable-opencl</code>. </p> </dd> <dt> &lsquo;<samp>-opencl_options options (<em>global</em>)</samp>&rsquo;</dt> <dd><p>Set OpenCL environment options. This option is only available when FFmpeg has been compiled with <code>--enable-opencl</code>. </p> <p><var>options</var> must be a list of <var>key</var>=<var>value</var> option pairs separated by &rsquo;:&rsquo;. See the &ldquo;OpenCL Options&rdquo; section in the ffmpeg-utils manual for the list of supported options. </p></dd> </dl> <a name="AVOptions"></a> <h2 class="section"><a href="ffplay.html#toc-AVOptions">3.3 AVOptions</a></h2> <p>These options are provided directly by the libavformat, libavdevice and libavcodec libraries. To see the list of available AVOptions, use the &lsquo;<samp>-help</samp>&rsquo; option. They are separated into two categories: </p><dl compact="compact"> <dt> &lsquo;<samp>generic</samp>&rsquo;</dt> <dd><p>These options can be set for any container, codec or device. Generic options are listed under AVFormatContext options for containers/devices and under AVCodecContext options for codecs. </p></dd> <dt> &lsquo;<samp>private</samp>&rsquo;</dt> <dd><p>These options are specific to the given container, device or codec. Private options are listed under their corresponding containers/devices/codecs. </p></dd> </dl> <p>For example to write an ID3v2.3 header instead of a default ID3v2.4 to an MP3 file, use the &lsquo;<samp>id3v2_version</samp>&rsquo; private option of the MP3 muxer: </p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i input.flac -id3v2_version 3 out.mp3 </pre></td></tr></table> <p>All codec AVOptions are per-stream, and thus a stream specifier should be attached to them. </p> <p>Note: the &lsquo;<samp>-nooption</samp>&rsquo; syntax cannot be used for boolean AVOptions, use &lsquo;<samp>-option 0</samp>&rsquo;/&lsquo;<samp>-option 1</samp>&rsquo;. </p> <p>Note: the old undocumented way of specifying per-stream AVOptions by prepending v/a/s to the options name is now obsolete and will be removed soon. </p> <a name="Main-options"></a> <h2 class="section"><a href="ffplay.html#toc-Main-options">3.4 Main options</a></h2> <dl compact="compact"> <dt> &lsquo;<samp>-x <var>width</var></samp>&rsquo;</dt> <dd><p>Force displayed width. </p></dd> <dt> &lsquo;<samp>-y <var>height</var></samp>&rsquo;</dt> <dd><p>Force displayed height. </p></dd> <dt> &lsquo;<samp>-s <var>size</var></samp>&rsquo;</dt> <dd><p>Set frame size (WxH or abbreviation), needed for videos which do not contain a header with the frame size like raw YUV. This option has been deprecated in favor of private options, try -video_size. </p></dd> <dt> &lsquo;<samp>-an</samp>&rsquo;</dt> <dd><p>Disable audio. </p></dd> <dt> &lsquo;<samp>-vn</samp>&rsquo;</dt> <dd><p>Disable video. </p></dd> <dt> &lsquo;<samp>-ss <var>pos</var></samp>&rsquo;</dt> <dd><p>Seek to a given position in seconds. </p></dd> <dt> &lsquo;<samp>-t <var>duration</var></samp>&rsquo;</dt> <dd><p>play &lt;duration&gt; seconds of audio/video </p></dd> <dt> &lsquo;<samp>-bytes</samp>&rsquo;</dt> <dd><p>Seek by bytes. </p></dd> <dt> &lsquo;<samp>-nodisp</samp>&rsquo;</dt> <dd><p>Disable graphical display. </p></dd> <dt> &lsquo;<samp>-f <var>fmt</var></samp>&rsquo;</dt> <dd><p>Force format. </p></dd> <dt> &lsquo;<samp>-window_title <var>title</var></samp>&rsquo;</dt> <dd><p>Set window title (default is the input filename). </p></dd> <dt> &lsquo;<samp>-loop <var>number</var></samp>&rsquo;</dt> <dd><p>Loops movie playback &lt;number&gt; times. 0 means forever. </p></dd> <dt> &lsquo;<samp>-showmode <var>mode</var></samp>&rsquo;</dt> <dd><p>Set the show mode to use. Available values for <var>mode</var> are: </p><dl compact="compact"> <dt> &lsquo;<samp>0, video</samp>&rsquo;</dt> <dd><p>show video </p></dd> <dt> &lsquo;<samp>1, waves</samp>&rsquo;</dt> <dd><p>show audio waves </p></dd> <dt> &lsquo;<samp>2, rdft</samp>&rsquo;</dt> <dd><p>show audio frequency band using RDFT ((Inverse) Real Discrete Fourier Transform) </p></dd> </dl> <p>Default value is &quot;video&quot;, if video is not present or cannot be played &quot;rdft&quot; is automatically selected. </p> <p>You can interactively cycle through the available show modes by pressing the key &lt;w&gt;. </p> </dd> <dt> &lsquo;<samp>-vf <var>filtergraph</var></samp>&rsquo;</dt> <dd><p>Create the filtergraph specified by <var>filtergraph</var> and use it to filter the video stream. </p> <p><var>filtergraph</var> is a description of the filtergraph to apply to the stream, and must have a single video input and a single video output. In the filtergraph, the input is associated to the label <code>in</code>, and the output to the label <code>out</code>. See the ffmpeg-filters manual for more information about the filtergraph syntax. </p> </dd> <dt> &lsquo;<samp>-af <var>filtergraph</var></samp>&rsquo;</dt> <dd><p><var>filtergraph</var> is a description of the filtergraph to apply to the input audio. Use the option &quot;-filters&quot; to show all the available filters (including sources and sinks). </p> </dd> <dt> &lsquo;<samp>-i <var>input_file</var></samp>&rsquo;</dt> <dd><p>Read <var>input_file</var>. </p></dd> </dl> <a name="Advanced-options"></a> <h2 class="section"><a href="ffplay.html#toc-Advanced-options">3.5 Advanced options</a></h2> <dl compact="compact"> <dt> &lsquo;<samp>-pix_fmt <var>format</var></samp>&rsquo;</dt> <dd><p>Set pixel format. This option has been deprecated in favor of private options, try -pixel_format. </p> </dd> <dt> &lsquo;<samp>-stats</samp>&rsquo;</dt> <dd><p>Print several playback statistics, in particular show the stream duration, the codec parameters, the current position in the stream and the audio/video synchronisation drift. It is on by default, to explicitly disable it you need to specify <code>-nostats</code>. </p> </dd> <dt> &lsquo;<samp>-bug</samp>&rsquo;</dt> <dd><p>Work around bugs. </p></dd> <dt> &lsquo;<samp>-fast</samp>&rsquo;</dt> <dd><p>Non-spec-compliant optimizations. </p></dd> <dt> &lsquo;<samp>-genpts</samp>&rsquo;</dt> <dd><p>Generate pts. </p></dd> <dt> &lsquo;<samp>-rtp_tcp</samp>&rsquo;</dt> <dd><p>Force RTP/TCP protocol usage instead of RTP/UDP. It is only meaningful if you are streaming with the RTSP protocol. </p></dd> <dt> &lsquo;<samp>-sync <var>type</var></samp>&rsquo;</dt> <dd><p>Set the master clock to audio (<code>type=audio</code>), video (<code>type=video</code>) or external (<code>type=ext</code>). Default is audio. The master clock is used to control audio-video synchronization. Most media players use audio as master clock, but in some cases (streaming or high quality broadcast) it is necessary to change that. This option is mainly used for debugging purposes. </p></dd> <dt> &lsquo;<samp>-threads <var>count</var></samp>&rsquo;</dt> <dd><p>Set the thread count. </p></dd> <dt> &lsquo;<samp>-ast <var>audio_stream_number</var></samp>&rsquo;</dt> <dd><p>Select the desired audio stream number, counting from 0. The number refers to the list of all the input audio streams. If it is greater than the number of audio streams minus one, then the last one is selected, if it is negative the audio playback is disabled. </p></dd> <dt> &lsquo;<samp>-vst <var>video_stream_number</var></samp>&rsquo;</dt> <dd><p>Select the desired video stream number, counting from 0. The number refers to the list of all the input video streams. If it is greater than the number of video streams minus one, then the last one is selected, if it is negative the video playback is disabled. </p></dd> <dt> &lsquo;<samp>-sst <var>subtitle_stream_number</var></samp>&rsquo;</dt> <dd><p>Select the desired subtitle stream number, counting from 0. The number refers to the list of all the input subtitle streams. If it is greater than the number of subtitle streams minus one, then the last one is selected, if it is negative the subtitle rendering is disabled. </p></dd> <dt> &lsquo;<samp>-autoexit</samp>&rsquo;</dt> <dd><p>Exit when video is done playing. </p></dd> <dt> &lsquo;<samp>-exitonkeydown</samp>&rsquo;</dt> <dd><p>Exit if any key is pressed. </p></dd> <dt> &lsquo;<samp>-exitonmousedown</samp>&rsquo;</dt> <dd><p>Exit if any mouse button is pressed. </p> </dd> <dt> &lsquo;<samp>-codec:<var>media_specifier</var> <var>codec_name</var></samp>&rsquo;</dt> <dd><p>Force a specific decoder implementation for the stream identified by <var>media_specifier</var>, which can assume the values <code>a</code> (audio), <code>v</code> (video), and <code>s</code> subtitle. </p> </dd> <dt> &lsquo;<samp>-acodec <var>codec_name</var></samp>&rsquo;</dt> <dd><p>Force a specific audio decoder. </p> </dd> <dt> &lsquo;<samp>-vcodec <var>codec_name</var></samp>&rsquo;</dt> <dd><p>Force a specific video decoder. </p> </dd> <dt> &lsquo;<samp>-scodec <var>codec_name</var></samp>&rsquo;</dt> <dd><p>Force a specific subtitle decoder. </p></dd> </dl> <a name="While-playing"></a> <h2 class="section"><a href="ffplay.html#toc-While-playing">3.6 While playing</a></h2> <dl compact="compact"> <dt> &lt;q, ESC&gt;</dt> <dd><p>Quit. </p> </dd> <dt> &lt;f&gt;</dt> <dd><p>Toggle full screen. </p> </dd> <dt> &lt;p, SPC&gt;</dt> <dd><p>Pause. </p> </dd> <dt> &lt;a&gt;</dt> <dd><p>Cycle audio channel in the curret program. </p> </dd> <dt> &lt;v&gt;</dt> <dd><p>Cycle video channel. </p> </dd> <dt> &lt;t&gt;</dt> <dd><p>Cycle subtitle channel in the current program. </p> </dd> <dt> &lt;c&gt;</dt> <dd><p>Cycle program. </p> </dd> <dt> &lt;w&gt;</dt> <dd><p>Show audio waves. </p> </dd> <dt> &lt;s&gt;</dt> <dd><p>Step to the next frame. </p> <p>Pause if the stream is not already paused, step to the next video frame, and pause. </p> </dd> <dt> &lt;left/right&gt;</dt> <dd><p>Seek backward/forward 10 seconds. </p> </dd> <dt> &lt;down/up&gt;</dt> <dd><p>Seek backward/forward 1 minute. </p> </dd> <dt> &lt;page down/page up&gt;</dt> <dd><p>Seek to the previous/next chapter. or if there are no chapters Seek backward/forward 10 minutes. </p> </dd> <dt> &lt;mouse click&gt;</dt> <dd><p>Seek to percentage in file corresponding to fraction of width. </p> </dd> </dl> <a name="See-Also"></a> <h1 class="chapter"><a href="ffplay.html#toc-See-Also">4. See Also</a></h1> <p><a href="ffplay-all.html">ffmpeg-all</a>, <a href="ffmpeg.html">ffmpeg</a>, <a href="ffprobe.html">ffprobe</a>, <a href="ffserver.html">ffserver</a>, <a href="ffmpeg-utils.html">ffmpeg-utils</a>, <a href="ffmpeg-scaler.html">ffmpeg-scaler</a>, <a href="ffmpeg-resampler.html">ffmpeg-resampler</a>, <a href="ffmpeg-codecs.html">ffmpeg-codecs</a>, <a href="ffmpeg-bitstream-filters.html">ffmpeg-bitstream-filters</a>, <a href="ffmpeg-formats.html">ffmpeg-formats</a>, <a href="ffmpeg-devices.html">ffmpeg-devices</a>, <a href="ffmpeg-protocols.html">ffmpeg-protocols</a>, <a href="ffmpeg-filters.html">ffmpeg-filters</a> </p> <a name="Authors"></a> <h1 class="chapter"><a href="ffplay.html#toc-Authors">5. Authors</a></h1> <p>The FFmpeg developers. </p> <p>For details about the authorship, see the Git history of the project (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command <code>git log</code> in the FFmpeg source directory, or browsing the online repository at <a href="http://source.ffmpeg.org">http://source.ffmpeg.org</a>. </p> <p>Maintainers for the specific components are listed in the file &lsquo;<tt>MAINTAINERS</tt>&rsquo; in the source code tree. </p> <footer class="footer pagination-right"> <span class="label label-info">This document was generated by <em>Kyle Schwarz</em> on <em>March 31, 2014</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.</span></footer></div></div></body>
C5E3B7BD/-R-Frozen-Image-Grabber
ffmpeg/doc/ffplay.html
HTML
gpl-3.0
26,698
<?php /** * @author Semenov Alexander <semenov@skeeks.com> * @link http://skeeks.com/ * @copyright 2010 SkeekS (СкикС) * @date 13.09.2016 */ namespace skeeks\cms\savedFilters; use skeeks\cms\components\Cms; use skeeks\cms\models\CmsContentElement; use skeeks\cms\relatedProperties\models\RelatedPropertiesModel; use skeeks\cms\relatedProperties\PropertyType; use skeeks\cms\savedFilters\models\SavedFilters; use skeeks\cms\widgets\ColorInput; use skeeks\cms\widgets\formInputs\EditedSelect; use yii\helpers\ArrayHelper; use yii\helpers\Json; use yii\widgets\ActiveForm; /** * Class RelatedHandlerSavedFilter * * @package skeeks\cms\savedFilters */ class RelatedHandlerSavedFilter extends PropertyType { public $code = self::CODE_STRING; public $name = ""; public function init() { parent::init(); if(!$this->name) { $this->name = \Yii::t('skeeks/savedFilters', 'Saved filter'); } } public function attributeLabels() { return array_merge(parent::attributeLabels(), [ //'showDefaultPalette' => \Yii::t('skeeks/cms','Show extended palette of colors'), ]); } public function rules() { return ArrayHelper::merge(parent::rules(), [ //['showDefaultPalette', 'string'], ]); } /** * @return \yii\widgets\ActiveField */ public function renderForActiveForm() { $field = parent::renderForActiveForm(); $field->widget(EditedSelect::class, [ 'controllerRoute' => '/savedFilters/admin-saved-filters', 'items' => ArrayHelper::map(SavedFilters::find()->all(), 'id', 'name') ]); return $field; } /** * @return string */ public function renderConfigForm(ActiveForm $activeForm) { } /** * @varsion > 3.0.2 * * @return $this */ public function addRules() { $this->property->relatedPropertiesModel->addRule($this->property->code, 'safe'); return $this; } }
skeeks-cms/cms-saved-filters
src/RelatedHandlerSavedFilter.php
PHP
gpl-3.0
2,083
package tsdb.util.processingchain; import java.util.Arrays; /** * Processing chain with multiple chains as source and one additional entry * immutable (Fields should not be changed.) * @author woellauer */ public class ProcessingChainMultiSources implements ProcessingChain { public final ProcessingChain[] sources; public final ProcessingChainEntry entry; public static ProcessingChainMultiSources of(ProcessingChainSupplier[] sources, ProcessingChainEntry entry) { if(sources==null) { sources = new ProcessingChainSupplier[0]; } if(entry==null) { entry = ProcessingChainEntry.createUnknown(); } ProcessingChain[] chains = Arrays.stream(sources).map(it -> it == null ? ProcessingChain.createUnknown() : it.getProcessingChain()).toArray(ProcessingChain[]::new); return of(chains,entry); } public static ProcessingChainMultiSources of(ProcessingChain[] sources, ProcessingChainEntry entry) { if(sources==null) { sources = new ProcessingChain[0]; } for(int i=0;i<sources.length;i++) { if(sources[i]==null) { sources[i] = ProcessingChain.createUnknown(); } } if(entry==null) { entry = ProcessingChainEntry.createUnknown(); } return new ProcessingChainMultiSources(sources,entry); } public static ProcessingChainMultiSources of(ProcessingChainSupplier primarySource, ProcessingChainSupplier[] secondarySources, ProcessingChainEntry entry) { if(primarySource==null) { primarySource = ProcessingChainSupplier.createUnknown(); } if(secondarySources==null) { secondarySources = new ProcessingChainSupplier[0]; } return of(merge(primarySource,secondarySources), entry); } private ProcessingChainMultiSources(ProcessingChain[] sources, ProcessingChainEntry entry) { this.sources = sources; this.entry = entry; } private static ProcessingChainSupplier[] merge(ProcessingChainSupplier primarySource, ProcessingChainSupplier[] secondarySources) { ProcessingChainSupplier[] itSources = new ProcessingChainSupplier[secondarySources.length+1]; itSources[0] = primarySource; for(int i=0;i<secondarySources.length;i++) { itSources[i+1] = secondarySources[i]; } return itSources; } @Override public String getText() { String s="("; for(ProcessingChain e:sources) { s+=e.getText()+" "; } s+=") -> "+entry.getProcessingTitle(); return s; } }
environmentalinformatics-marburg/tubedb
src/tsdb/util/processingchain/ProcessingChainMultiSources.java
Java
gpl-3.0
2,423
# Failles et vulnérabilités * [Open Web Application Security Project (OWASP)](https://www.owasp.org/index.php/Main_Page) * [Log Injection](https://www.owasp.org/index.php/Log_Injection)
Elian-0x/Ressources
vuln/README.md
Markdown
gpl-3.0
189
module SnapsHelper end
fma16/Snapchat_storifyer
app/helpers/snaps_helper.rb
Ruby
gpl-3.0
23
#!/usr/bin/python import os,sys,re #Check the OS Version RELEASE_FILE = "/etc/redhat-release" RWM_FILE = "/etc/httpd/conf.modules.d/00-base.conf" if os.path.isfile(RELEASE_FILE): f=open(RELEASE_FILE,"r") rel_list = f.read().split() if rel_list[2] == "release" and tuple(rel_list[3].split(".")) < ('8','5'): print("so far good") else: raise("Unable to find the OS version") #Check Apache installed #TODO # #Test if the rewrite module file present if os.path.isfile(RWM_FILE): print("re write") ##print sys.version_info ##if sys.version_info < (2,7): ## print "This programm works only with the Python 2.7"###
sujith7c/py-system-tools
en_mod_rw.py
Python
gpl-3.0
636
#pragma interface #include <QtCore/QAbstractAnimation> #include "ruby++/module.h" #include "ruby++/symbol.h" namespace R_Qt { extern void init_animation(RPP::Module mQt, RPP::Class cControl); extern RPP::Symbol QAbstractAnimation_State2Symbol(QAbstractAnimation::State state); } // namespace R_Qt
EugeneBrazwick/Midibox
lib/urqtCore/animation.h
C
gpl-3.0
300
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>DMULTI1_04d.txt</title> <link href="prism.css" rel="stylesheet" /> </head> <body> <h1> A highlighted Plain Text version of DMULTI1_04d.txt Basic Program</h1> <pre><code class="language-basic"><script>2! RE-STORE "MULTI1.04d" 4 !*************************************************************** 6 !* * 8 !* * 10 !* NIST MultiCal De-embedding Progam * 12 !* * 14 !* Version 1.04d 01/27/04 * 16 !* * 18 !* * 20 !*************************************************************** 22 ! 24!Edit at label "Disk:" to alter disk drive list. 26!Edit the following line to alter bus address of network analyzer: 28 Igpib=7 ! Interface select code of HPIB interface 30 Inwa_hp=Igpib*100+16 ! GPIB port address of HP ANA's 32 Inwa_wilt=Igpib*100+6 ! GPIB port address of Wiltron 360 ANA 34 Igraph=Igpib*100+5 ! GPIB address of plotter 36 Igraph=9 ! Default plotter address for HTBasic 38 Iprint=Igpib*100+1 ! GPIB address of printer 40 Ilpt=26 ! LPT1 on PC (except HTBasic which sets printer automatically 42 Printnum=Iprint ! Print to GPIB; set to Ilpt to print on PC 44 Serialnum=9 ! Serial port address of HP9000 for data dump 46 ! 48 ! PC owners using HTBasic - 50 ! Your HTBasic version must support complex arithmetic 52 ! Only HTBasic versions 4.0 and greater will support ANAs 54 ! Add CONFIGURE DUMP TO "your format here" to your AUTOST file 56 ! Add CONFIGURE BDAT MSB FIRST for compatibility with HP Basic 58 ! 60* 62* 64* 66* 68* 70* 72* 73* 74* 76* 77* 78* 79* 80* 81* 82* 83* 84* 85* 86* 87* 88* 89* 90* 91* 92* 93* 94* 95* 96* 97* 98* 99* 100* 101* 102* 103* 104* 105* 106* 107* 108* 110* 112* 114* 116* 118* 120* 122* 124* 126* 128* 130* 132* 134* 136* 138* 140* 142* 144* 146* 148* 150* 152* 154* 156* 158* 160* 162* 164* 166* 168* 170* 172* 174* 176* 178* 180* 182* 184* 186* 188* 190* 192* 194* 196* 198* 200* 202* 204* 206* 208* 210* 212* 214* 216* 218* 220* 222* 224* 226* 228* 230* 232* 234* 236* 238* 240* 242* 244* 246* 248* 250* 252* 254* 256* 258* 260* 262* 264* 266* 268* 270* 272* 274* 276* 278* 280* 282* 284* 286* 288* 290* 292* 294* 296* 298* 300* 302* 304* 306* 308* 310* 312* 313* 314* 316* 318* 320* 321* 323* 324* 326* 328* 330* 332* 334* 336* 337* 338* 339* 341* 342* 343* 344* 346* 348* 350* 352* 354* 356* 358* 360* 362* 364* 366* 368* 370* 372* 374* 376* 378* 380* 382* 384* 386* 388* 390* 392* 394* 396* 398* 400* 402* 404* 406* 408* 410* 412* 414* 416* 418* 420* 422* 424* 426* 428* 430* 432* 434* 436* 438* 440* 442* 444* 446* 448* 450* 452* 454* 456* 458* 460* 462* 464* 466* 468* 470* 472* 474* 476* 478* 480* 482* 484* 486* 488* 490* 492* 494* 496* 498* 500* 502* 504* 506* 508* 510* 512* 514* 516* 518* 520* 522* 524* 526* 528* 530* 532* 534* 536* 538* 540* 542* 544* 546* 548* 550* 552* 554* 556* 558* 560* 562* 564* 566* 568* 570* 572* 574* 576* 578* 580* 582* 584* 586* 588* 590* 592* 594* 596* 598* 600* 602* 604* 606* 608* 610* 612* 614* 616* 618* 620* 622* 624* 626* 628* 630* 632* 634* 636* 638* 640* 642* 644* 646* 648* 650* 652* 654* 656* 658* 660* 662* 664* 666* 668* 670* 672* 674* 676* 678* 680* 682* 684* 686* 688* 690* 692* 694* 696* 698* 700* 702* 704* 706* 708* 710* 712* 714* 716* 718* 720* 722* 724* 726* 728* 730* 732* 734* 736* 738* 740* 742* 744* 746* 748* 750* 752* 754* 756* 758* 760* 762* 764* 766* 768* 770* 772* 774* 776* 778* 780* 782* 784* 786* 788* 790* 792* 794* 796* 798* 800* 802* 804* 806* 808* 810* 812* 814* 816* 818* 820* 822* 824* 826* 828* 830* 832* 834* 836* 838* 840* 842* 844* 846* 848* 850* 852* 854* 856* 858* 860* 862* 864* 866* 868* 870* 872* 874* 876* 878* 880* 882* 884* 886* 888* 890* 892* 894* 896* 898* 900* 902* 904* 906* 908* 910* 912* 914* 916* 918* 920* 922* 924* 926* 928* 930* 932* 934* 936* 938* 940* 942* 944* 946* 948* 950* 952* 954* 956* 958* 960* 962* 964* 966* 968* 970* 972* 974* 976* 978* 980* 982* 984* 986* 988* 990* 992* 994* 996* 998* 1000* 1002* 1004* 1006* 1008* 1010* 1012* 1014* 1016* 1018* 1020* 1022* 1024* 1026* 1028* 1030* 1032* 1034* 1036* 1038* 1040* 1042* 1044* 1046* 1048* 1050* 1052* 1054* 1056* 1058* 1060* 1062* 1064* 1066* 1068* 1070* 1072* 1074* 1076* 1078* 1080* 1082* 1084* 1086* 1088* 1090* 1092* 1094* 1096* 1098* 1100* 1102* 1104* 1106* 1108* 1110* 1112* 1114* 1116* 1118* 1120* 1122* 1124* 1126* 1128* 1130* 1132* 1134* 1136* 1138* 1140* 1142* 1144* 1146* 1148* 1150* 1152* 1154* 1156* 1158* 1159* 1160* 1161* 1162* 1163* 1164* 1166* 1168* 1170* 1172* 1174* 1176* 1178* 1180* 1182* 1184* 1186* 1188* 1190* 1192* 1194* 1196* 1198* 1200* 1202* 1204* 1206* 1208* 1210* 1212* 1214* 1216* 1218* 1220* 1222* 1224* 1226* 1228* 1230* 1232* 1234* 1236* 1238* 1240* 1242* 1244* 1246* 1247* 1248* 1249* 1250* 1251* 1252* 1254* 1256* 1258* 1260* 1262* 1264* 1266* 1268* 1270* 1272* 1274* 1276* 1278* 1280* 1282* 1284* 1286* 1288* 1290* 1292* 1294* 1296* 1298* 1300* 1302* 1304* 1306* 1308* 1310* 1312* 1314* 1316* 1318* 1320* 1322* 1324* 1325* 1326* 1328* 1330* 1332* 1334* 1336* 1338* 1340* 1342* 1344* 1346* 1348* 1350* 1352* 1354* 1356* 1358* 1360* 1362* 1364* 1366* 1368* 1370* 1372* 1374* 1376* 1378* 1380* 1382* 1384* 1386* 1388* 1390* 1392* 1394* 1396* 1398* 1400* 1402* 1404* 1406* 1408* 1410* 1412* 1414* 1416* 1418* 1420* 1422* 1424* 1426* 1428* 1430* 1432* 1434* 1436* 1438* 1440* 1442* 1444* 1446* 1448* 1450* 1452* 1454* 1456* 1458* 1460* 1462* 1464* 1466* 1468* 1470* 1472* 1474* 1476* 1478* 1480* 1482* 1484* 1486* 1488* 1490* 1492* 1494* 1496* 1498* 1500* 1502* 1504* 1506* 1508* 1510* 1512* 1514* 1516* 1518* 1520* 1522* 1524* 1526* 1528* 1530* 1532* 1534* 1536* 1538* 1540* 1542* 1544* 1546* 1548* 1550* 1552* 1554* 1556* 1558* 1560* 1562* 1564* 1566* 1568* 1570* 1572* 1574* 1576* 1578* 1580* 1582* 1584* 1586* 1588* 1590* 1592* 1594* 1596* 1598* 1600* 1602* 1604* 1606* 1608* 1610* 1612* 1614* 1616* 1618* 1620* 1622* 1624* 1626* 1628* 1630* 1632* 1634* 1636* 1638* 1640* 1642* 1644* 1646* 1648* 1650* 1652* 1654* 1656* 1658* 1660* 1662* 1664* 1666* 1668* 1670* 1672* 1674* 1676* 1678* 1680* 1682* 1684* 1686* 1688* 1690* 1692* 1694* 1696* 1698* 1700* 1702* 1704* 1706* 1708* 1710* 1712* 1714* 1716* 1718* 1720* 1722* 1724* 1726* 1728* 1730* 1732* 1734* 1736* 1738* 1740* 1742* 1744* 1746* 1748* 1750* 1752* 1754* 1756* 1758* 1760* 1762* 1764* 1766* 1768* 1770* 1772* 1774* 1776* 1778* 1780* 1782* 1784* 1786* 1788* 1790* 1792* 1794* 1796* 1798* 1800* 1802* 1804* 1806* 1808* 1810* 1812* 1814* 1816* 1818* 1820* 1822* 1824* 1826* 1828* 1830* 1832* 1834* 1836* 1838* 1840* 1842* 1844* 1846* 1848* 1850* 1852* 1854* 1856* 1858* 1860* 1862* 1864* 1866* 1868* 1870* 1872* 1874* 1876* 1878* 1880* 1882* 1884* 1886* 1888* 1890* 1892* 1894* 1896* 1898* 1900* 1902* 1904* 1906* 1908* 1910* 1912* 1914* 1916* 1918* 1920* 1922* 1924* 1926* 1928* 1930* 1932* 1934* 1936* 1938* 1940* 1942* 1944* 1946* 1948* 1950* 1952* 1954* 1956* 1958* 1960* 1962* 1964* 1966* 1968* 1970* 1972* 1974* 1976* 1978* 1980* 1982* 1984* 1986* 1988* 1990* 1992* 1994* 1996* 1998* 2000* 2002* 2004* 2006* 2008* 2010* 2012* 2014* 2016* 2018* 2020* 2022* 2024* 2026* 2028* 2030* 2032* 2034* 2036* 2038* 2040* 2042* 2044* 2046* 2048* 2050* 2052* 2054* 2056* 2058* 2060* 2062* 2064* 2066* 2068* 2070* 2072* 2074* 2076* 2078* 2080* 2082* 2084* 2086* 2088* 2090* 2092* 2094* 2096* 2098* 2100* 2102* 2104* 2106* 2108* 2110* 2112* 2114* 2116* 2118* 2120* 2122* 2124* 2126* 2128* 2130* 2132* 2134* 2136* 2138* 2140* 2142* 2144* 2146* 2148* 2150* 2152* 2154* 2156* 2158* 2160* 2162* 2164* 2166* 2168* 2170* 2172* 2174* 2176* 2178* 2180* 2182* 2184* 2186* 2188* 2190* 2192* 2194* 2196* 2198* 2200* 2202* 2204* 2206* 2208* 2210* 2212* 2214* 2216* 2218* 2220* 2222* 2224* 2226* 2228* 2230* 2232* 2234* 2236* 2238* 2240* 2242* 2244* 2246* 2248* 2250* 2252* 2254* 2256* 2258* 2260* 2262* 2264* 2266* 2268* 2270* 2272* 2274* 2276* 2278* 2280* 2282* 2284* 2286* 2288* 2290* 2292* 2294* 2296* 2298* 2300* 2302* 2304* 2306* 2308* 2310* 2312* 2314* 2316* 2318* 2320* 2322* 2324* 2326* 2328* 2330* 2332* 2334* 2336* 2338* 2340* 2342* 2344* 2346* 2348* 2350* 2352* 2354* 2356* 2358* 2360* 2362* 2364* 2366* 2368* 2370* 2372* 2374* 2376* 2378* 2380* 2382* 2384* 2386* 2388* 2390* 2392* 2394* 2396* 2398* 2400* 2402* 2404* 2406* 2408* 2410* 2412* 2414* 2416* 2418* 2420* 2422* 2424* 2426* 2428* 2430* 2432* 2434* 2436* 2438* 2440* 2442* 2444* 2446* 2448* 2450* 2452* 2454* 2456* 2458* 2460* 2462* 2464* 2466* 2468* 2470* 2472* 2474* 2476* 2478* 2480* 2482* 2484* 2486* 2488* 2490* 2492* 2494* 2496* 2498* 2500* 2502* 2504* 2506* 2508* 2510* 2512* 2514* 2516* 2518* 2520* 2522* 2524* 2526* 2528* 2530* 2532* 2534* 2536* 2538* 2540* 2542* 2544* 2546* 2548* 2550* 2552* 2554* 2556* 2558* 2560* 2562* 2564* 2566* 2568* 2570* 2572* 2574* 2576* 2578* 2580* 2582* 2584* 2586* 2588* 2590* 2592* 2594* 2596* 2598* 2600* 2602* 2604* 2606* 2608* 2610* 2612* 2614* 2616* 2618* 2620* 2622* 2624* 2626* 2628* 2630* 2632* 2634* 2636* 2638* 2640* 2642* 2644* 2646* 2648* 2650* 2652* 2654* 2656* 2658* 2660* 2662* 2664* 2666* 2668* 2670* 2672* 2674* 2676* 2678* 2680* 2682* 2684* 2686* 2688* 2690* 2692* 2694* 2696* 2698* 2700* 2702* 2704* 2706* 2708* 2710* 2712* 2714* 2716* 2718* 2720* 2722* 2724* 2726* 2728* 2730* 2732* 2734* 2736* 2738* 2740* 2742* 2744* 2746* 2748* 2750* 2752* 2754* 2756* 2758* 2760* 2762* 2764* 2766* 2768* 2770* 2772* 2774* 2776* 2778* 2780* 2782* 2784* 2786* 2788* 2790* 2792* 2794* 2796* 2798* 2800* 2802* 2804* 2806* 2808* 2810* 2812* 2814* 2816* 2818* 2820* 2822* 2824* 2826* 2828* 2830* 2832* 2834* 2836* 2838* 2840* 2842* 2844* 2846* 2848* 2850* 2852* 2854* 2856* 2858* 2860* 2862* 2864* 2866* 2868* 2870* 2872* 2874* 2876* 2878* 2880* 2882* 2884* 2886* 2888* 2890* 2892* 2894* 2896* 2898* 2900* 2902* 2904* 2906* 2908* 2910* 2912* 2914* 2916* 2918* 2920* 2922* 2924* 2926* 2928* 2930* 2932* 2934* 2936* 2938* 2940* 2942* 2944* 2946* 2948* 2950* 2952* 2954* 2956* 2958* 2960* 2962* 2964* 2966* 2968* 2970* 2972* 2974* 2976* 2977* 2978* 2980* 2982* 2984* 2986* 2988* 2990* 2992* 2994* 2996* 2998* 3000* 3002* 3004* 3006* 3008* 3010* 3012* 3014* 3016* 3018* 3020* 3022* 3024* 3026* 3028* 3032* 3034* 3036* 3038* 3040* 3042* 3044* 3046* 3048* 3050* 3052* 3054* 3056* 3058* 3060* 3062* 3064* 3066* 3068* 3070* 3072* 3074* 3076* 3078* 3080* 3082* 3084* 3086* 3088* 3090* 3092* 3094* 3096* 3098* 3100* 3102* 3104* 3106* 3108* 3110* 3112* 3114* 3116* 3118* 3120* 3122* 3124* 3126* 3128* 3130* 3132* 3134* 3136* 3138* 3140* 3142* 3144* 3146* 3148* 3150* 3152* 3154* 3156* 3158* 3160* 3162* 3164* 3166* 3168* 3170* 3172* 3174* 3176* 3178* 3180* 3182* 3184* 3186* 3188* 3190* 3192* 3194* 3196* 3198* 3200* 3202* 3204* 3206* 3208* 3210* 3212* 3214* 3216* 3218* 3220* 3222* 3224* 3226* 3228* 3230* 3232* 3234* 3236* 3238* 3240* 3242* 3244* 3246* 3248* 3250* 3252* 3254* 3256* 3258* 3260* 3262* 3264* 3266* 3268* 3270* 3272* 3274* 3276* 3278* 3280* 3282* 3284* 3286* 3288* 3290* 3292* 3294* 3296* 3298* 3300* 3302* 3304* 3306* 3308* 3310* 3312* 3314* 3316* 3318* 3320* 3322* 3324* 3326* 3328* 3330* 3332* 3334* 3336* 3338* 3340* 3342* 3344* 3346* 3348* 3350* 3352* 3354* 3356* 3358* 3360* 3362* 3364* 3366* 3368* 3370* 3372* 3374* 3376* 3378* 3380* 3382* 3384* 3386* 3388* 3390* 3392* 3394* 3396* 3398* 3400* 3402* 3404* 3406* 3408* 3410* 3412* 3414* 3416* 3418* 3420* 3422* 3424* 3426* 3428* 3430* 3432* 3434* 3436* 3438* 3440* 3442* 3444* 3446* 3448* 3450* 3454* 3456* 3458* 3462* 3464* 3466* 3468* 3470* 3472* 3474* 3476* 3478* 3480* 3482* 3484* 3486* 3488* 3490* 3492* 3494* 3496* 3498* 3500* 3502* 3504* 3506* 3508* 3510* 3512* 3514* 3516* 3518* 3520* 3522* 3524* 3526* 3528* 3530* 3532* 3534* 3536* 3538* 3540* 3542* 3544* 3546* 3548* 3550* 3552* 3554* 3556* 3558* 3560* 3562* 3564* 3566* 3568* 3570* 3572* 3574* 3576* 3578* 3580* 3582* 3584* 3586* 3588* 3590* 3592* 3594* 3596* 3598* 3600* 3602* 3604* 3606* 3608* 3610* 3612* 3614* 3616* 3618* 3620* 3622* 3624* 3626* 3628* 3630* 3632* 3634* 3636* 3638* 3640* 3642* 3644* 3646* 3648* 3650* 3652* 3654* 3656* 3658* 3660* 3662* 3664* 3666* 3668* 3670* 3672* 3674* 3676* 3678* 3680* 3682* 3684* 3686* 3688* 3690* 3692* 3694* 3696* 3698* 3700* 3702* 3704* 3706* 3708* 3710* 3712* 3714* 3716* 3718* 3720* 3722* 3724* 3726* 3728* 3730* 3732* 3734* 3736* 3738* 3740* 3742* 3744* 3746* 3748* 3750* 3752* 3754* 3756* 3758* 3760* 3762* 3764* 3766* 3768* 3770* 3772* 3774* 3776* 3778* 3780* 3782* 3784* 3786* 3788* 3790* 3792* 3794* 3796* 3798* 3800* 3802* 3804* 3806* 3808* 3810* 3812* 3814* 3816* 3818* 3820* 3822* 3824* 3826* 3828* 3830* 3832* 3834* 3836* 3838* 3840* 3842* 3844* 3846* 3848* 3850* 3851* 3852* 3853* 3854* 3856* 3857* 3858* 3860* 3861* 3862* 3863* 3864* 3865* 3866* 3867* 3868* 3869* 3870* 3871* 3872* 3874* 3876* 3878* 3880* 3882* 3884* 3886* 3888* 3890* 3892* 3894* 3896* 3898* 3900* 3902* 3904* 3906* 3908* 3910* 3911* 3912* 3913* 3914* 3915* 3916* 3917* 3918* 3919* 3920* 3931* 3932* 3933* 3934* 3935* 3936* 3937* 3938* 3939* 3940* 3941* 3942* 3943* 3944* 3945* 3946* 3947* 3948* 3949* 3950* 3951* 3952* 3958* 3959* 3960* 3961* 3962* 3967* 3968* 3969* 3976* 3978* 3979* 3980* 3981* 3982* 3983* 3984* 3985* 3986* 3987* 3988* 3989* 3990* 3991* 3992* 3993* 3994* 3995* 3996* 3997* 3998* 3999* 4000* 4001* 4002* 4003* 4004* 4005* 4006* 4007* 4008* 4009* 4010* 4011* 4012* 4013* 4014* 4015* 4016* 4017* 4018* 4019* 4020* 4021* 4022* 4023* 4024* 4025* 4026* 4027* 4028* 4029* 4032* 4034* 4036* 4038* 4040* 4042* 4044* 4046* 4048* 4050* 4052* 4054* 4056* 4058* 4060* 4062* 4064* 4066* 4068* 4070* 4072* 4074* 4076* 4078* 4080* 4082* 4084* 4086* 4088* 4090* 4092* 4094* 4096* 4098* 4100* 4102* 4104* 4106* 4108* 4110* 4112* 4114* 4116* 4118* 4120* 4122* 4124* 4126* 4128* 4130* 4132* 4134* 4136* 4138* 4140* 4142* 4144* 4146* 4148* 4150* 4152* 4154* 4156* 4158* 4160* 4162* 4164* 4166* 4168* 4170* 4172* 4174* 4176* 4178* 4180* 4182* 4184* 4186* 4188* 4190* 4192* 4194* 4196* 4198* 4200* 4202* 4204* 4206* 4208* 4210* 4212* 4214* 4216* 4218* 4220* 4222* 4224* 4226* 4228* 4230* 4232* 4234* 4236* 4238* 4240* 4242* 4244* 4246* 4248* 4250* 4252* 4254* 4256* 4258* 4260* 4262* 4264* 4266* 4268* 4270* 4272* 4274* 4276* 4278* 4280* 4282* 4284* 4286* 4288* 4290* 4292* 4294* 4296* 4298* 4300* 4302* 4304* 4306* 4308* 4310* 4312* 4314* 4316* 4318* 4320* 4322* 4324* 4326* 4328* 4330* 4332* 4334* 4336* 4338* 4340* 4342* 4344* 4346* 4348* 4350* 4352* 4354* 4356* 4358* 4360* 4362* 4364* 4366* 4368* 4370* 4372* 4374* 4376* 4378* 4380* 4382* 4384* 4386* 4388* 4390* 4392* 4394* 4396* 4398* 4400* 4402* 4404* 4406* 4408* 4410* 4412* 4414* 4416* 4418* 4420* 4422* 4424* 4426* 4428* 4430* 4432* 4434* 4436* 4438* 4440* 4441* 4442* 4444* 4446* 4448* 4450* 4452* 4454* 4456* 4458* 4460* 4462* 4464* 4466* 4468* 4470* 4472* 4474* 4476* 4478* 4480* 4482* 4484* 4486* 4488* 4490* 4491* 4492* 4494* 4496* 4498* 4500* 4502* 4504* 4506* 4508* 4510* 4512* 4514* 4516* 4518* 4520* 4522* 4524* 4526* 4528* 4530* 4532* 4534* 4536* 4538* 4540* 4542* 4544* 4546* 4548* 4550* 4552* 4554* 4556* 4558* 4560* 4562* 4564* 4566* 4568* 4570* 4572* 4574* 4576* 4578* 4580* 4582* 4584* 4586* 4588* 4590* 4592* 4594* 4596* 4598* 4600* 4602* 4604* 4606* 4608* 4610* 4612* 4614* 4616* 4618* 4620* 4622* 4624* 4626* 4628* 4630* 4632* 4634* 4636* 4638* 4640* 4642* 4644* 4646* 4648* 4650* 4652* 4654* 4656* 4658* 4660* 4662* 4664* 4666* 4668* 4670* 4672* 4674* 4676* 4678* 4680* 4682* 4684* 4686* 4688* 4690* 4692* 4694* 4696* 4698* 4700* 4702* 4704* 4706* 4708* 4710* 4712* 4714* 4716* 4718* 4720* 4722* 4724* 4726* 4728* 4730* 4732* 4734* 4736* 4738* 4740* 4742* 4744* 4746* 4748* 4750* 4752* 4754* 4756* 4758* 4760* 4762* 4764* 4766* 4768* 4770* 4772* 4774* 4776* 4778* 4780* 4782* 4784* 4786* 4788* 4790* 4792* 4794* 4796* 4798* 4800* 4802* 4804* 4806* 4808* 4810* 4812* 4814* 4816* 4818* 4820* 4822* 4824* 4826* 4828* 4830* 4832* 4834* 4836* 4838* 4840* 4842* 4844* 4846* 4848* 4850* 4852* 4854* 4856* 4858* 4860* 4862* 4864* 4866* 4868* 4870* 4872* 4874* 4876* 4878* 4880* 4882* 4884* 4886* 4888* 4890* 4892* 4894* 4896* 4898* 4900* 4902* 4904* 4906* 4908* 4910* 4912* 4914* 4916* 4918* 4920* 4922* 4924* 4926* 4928* 4930* 4932* 4934* 4936* 4938* 4940* 4942* 4944* 4946* 4948* 4950* 4952* 4954* 4956* 4958* 4960* 4962* 4964* 4966* 4968* 4970* 4972* 4974* 4976* 4978* 4980* 4982* 4984* 4986* 4988* 4990* 4992* 4994* 4996* 4998* 5000* 5002* 5004* 5006* 5008* 5010* 5012* 5014* 5016* 5018* 5020* 5022* 5024* 5026* 5028* 5030* 5032* 5034* 5036* 5038* 5040* 5042* 5044* 5046* 5048* 5050* 5052* 5054* 5056* 5058* 5060* 5062* 5064* 5066* 5068* 5070* 5072* 5074* 5076* 5078* 5080* 5082* 5084* 5086* 5088* 5090* 5092* 5094* 5096* 5098* 5100* 5102* 5104* 5106* 5108* 5110* 5112* 5114* 5116* 5118* 5120* 5122* 5124* 5126* 5128* 5130* 5132* 5134* 5136* 5138* 5140* 5142* 5144* 5146* 5148* 5150* 5152* 5154* 5156* 5158* 5160* 5162* 5164* 5166* 5168* 5170* 5172* 5174* 5176* 5178* 5180* 5182* 5184* 5186* 5188* 5190* 5192* 5194* 5196* 5198* 5200* 5202* 5204* 5206* 5208* 5210* 5212* 5214* 5216* 5218* 5220* 5222* 5224* 5226* 5228* 5230* 5232* 5234* 5236* 5238* 5240* 5242* 5244* 5246* 5248* 5250* 5252* 5254* 5256* 5258* 5260* 5262* 5264* 5266* 5268* 5270* 5272* 5274* 5276* 5278* 5280* 5282* 5284* 5286* 5288* 5290* 5292* 5294* 5296* 5298* 5300* 5302* 5304* 5306* 5308* 5310* 5312* 5314* 5316* 5318* 5320* 5322* 5324* 5326* 5328* 5330* 5332* 5334* 5336* 5338* 5340* 5342* 5344* 5346* 5348* 5350* 5352* 5354* 5356* 5358* 5360* 5362* 5364* 5366* 5368* 5370* 5372* 5374* 5376* 5378* 5380* 5382* 5384* 5386* 5388* 5390* 5392* 5394* 5396* 5398* 5400* 5402* 5404* 5406* 5408* 5410* 5412* 5414* 5416* 5418* 5420* 5422* 5424* 5426* 5428* 5430* 5432* 5434* 5436* 5438* 5440* 5442* 5444* 5446* 5448* 5450* 5452* 5454* 5456* 5458* 5460* 5462* 5464* 5466* 5468* 5470* 5472* 5474* 5476* 5478* 5480* 5482* 5484* 5486* 5488* 5490* 5492* 5494* 5496* 5498* 5500 ! ................ customize system drives here .................. 5502 ! Follow format. After unit specifier, description is 5504 ! optional but recommended. 5506 ! ................................................................ 5508 ! 5510 Disc$(Dd+1)=":,700,0 - hard drive" 5512 Disc$(Dd+2)=":,700,0,1 - hard drive volume 1" 5514 Disc$(Dd+3)=":,700,1 - single microfloppy" 5516 Disc$(Dd+4)=":,1400,0 - hard drive" 5518 Disc$(Dd+5)=":,1400,0,1 - hard drive volume 1" 5520 Disc$(Dd+6)=":,1400,0,2 - hard drive volume 2" 5522 Disc$(Dd+7)=":,1400,1 - single microfloppy" 5524 Disc$(Dd+8)=":,702,0 - left microfloppy" 5526 Disc$(Dd+9)=":,702,1 - right microfloppy" 5528 Disc$(Dd+10)=":,1402,0 - left microfloppy" 5530 Disc$(Dd+11)=":,1402,1 - right microfloppy" 5532 Disc$(Dd+12)=":,4,1 - left internal series 200" 5534 Disc$(Dd+13)=":,4,0 - right internal series 200" 5536 Disc$(Dd+14)="Prompt for device address " 5538 ! 5540 Dd=Dd+14 ! add the number of drive specifiers above (inc. prompt) 5542 ! ! only 14 fit on a single screen 5544 ! ................................................................ 5546* 5548* 5550* 5552* 5554* 5556* 5558* 5560* 5562* 5564* 5566* 5568* 5570* 5572* 5574* 5576* 5578* 5580* 5582* 5584* 5586* 5588* 5590* 5592* 5594* 5596* 5598* 5600* 5602* 5604* 5606* 5608* 5610* 5612* 5614* 5616* 5618* 5620* 5622* 5625* 5626* 5628* 5630* 5632* 5634* 5636* 5638* 5640* 5642* 5644* 5646* 5648* 5650* 5652* 5654* 5656* 5658* 5660* 5662* 5664* 5666* 5668* 5670* 5672* 5674* 5676* 5678* 5680* 5682* 5684* 5686* 5688* 5690* 5692* 5694* 5696* 5698* 5700* 5702* 5704* 5705* 5706* 5707* 5709* 5710* 5712* 5713* 5714* 5715* 5716* 5718* 5720* 5722* 5724* 5726* 5728* 5730* 5732* 5734* 5736* 5738* 5740* 5742* 5744* 5746* 5748* 5750* 5752* 5754* 5756* 5758* 5760* 5762* 5764* 5766* 5768* 5770* 5772* 5774* 5776* 5778* 5780* 5782* 5784* 5786* 5788* 5790* 5792* 5794* 5796* 5798* 5800* 5802* 5804* 5806* 5808* 5810* 5812* 5814* 5816* 5818* 5820* 5822* 5824* 5826* 5828* 5830* 5832* 5834* 5836* 5838* 5840* 5842* 5844* 5846* 5848* 5850* 5852* 5854* 5856* 5858* 5860* 5862* 5864* 5866* 5868* 5870* 5872* 5874* 5876* 5878* 5880* 5882* 5884* 5886* 5888* 5890* 5892* 5894* 5896* 5898* 5900* 5902* 5904* 5906* 5908* 5910* 5912* 5914* 5916* 5918* 5920* 5922* 5924* 5926* 5928* 5930* 5932* 5934* 5936* 5938* 5940* 5942* 5944* 5946* 5948* 5950* 5952* 5954* 5956* 5958* 5960* 5962* 5964* 5966* 5968* 5970* 5972* 5974* 5976* 5978* 5980* 5982* 5984* 5986* 5988* 5990* 5992* 5994* 5996* 5998* 6000* 6002* 6004* 6006* 6008* 6010* 6012* 6014* 6016* 6018* 6020* 6022* 6024* 6026* 6028* 6030* 6032* 6034* 6036* 6038* 6040* 6042* 6044* 6046* 6048* 6050* 6052* 6054* 6056* 6058* 6060* 6062* 6064* 6066* 6068* 6070* 6072* 6074* 6076* 6078* 6080* 6082* 6084* 6086* 6088* 6090* 6092* 6094* 6096* 6098* 6100* 6102* 6104* 6106* 6108* 6110* 6112* 6114* 6116* 6117* 6118* 6119* 6120* 6122* 6125* 6126* 6128* 6129* 6130* 6132* 6133* 6134* 6135* 6136* 6137* 6138* 6139* 6140* 6141* 6142* 6143* 6144* 6145* 6146* 6148* 6150* 6152* 6154* 6156* 6158* 6160* 6162* 6164* 6166* 6168* 6170* 6172* 6174* 6176* 6178* 6180* 6182* 6184* 6186* 6188* 6190* 6192* 6193* 6197* 6199* 6201* 6202* 6203* 6204* 6205* 6206* 6207* 6208* 6210* 6212* 6214* 6216* 6218* 6220* 6222* 6224* 6226* 6228* 6230* 6232* 6234* 6236* 6238* 6240* 6242* 6244* 6246* 6248* 6250* 6252* 6254* 6256* 6258* 6260* 6262* 6264* 6266* 6268* 6270* 6272* 6274* 6276* 6278* 6280* 6282* 6284* 6286* 6288* 6290* 6292* 6294* 6296* 6298* 6300* 6302* 6304* 6306* 6308* 6310* 6312* 6314* 6316* 6318* 6320* 6322* 6324* 6326* 6328* 6330* 6332* 6334* 6336* 6338* 6340* 6342* 6344* 6346* 6348* 6350* 6352* 6354* 6356* 6358* 6360* 6362* 6364* 6366* 6368* 6370* 6372* 6374* 6376* 6378* 6380* 6382* 6384* 6386* 6388* 6389* 6390* 6391* 6392* 6393* 6394* 6396* 6397* 6398* 6399* 6400* 6401* 6402* 6403* 6404* 6405* 6406* 6407* 6408* 6409* 6410* 6411* 6412* 6413* 6414* 6415* 6417* 6418* 6419* 6420* 6421* 6422* 6424* 6425* 6426* 6427* 6428* 6429* 6430* 6431* 6433* 6434* 6435* 6436* 6438* 6440* 6443* 6444* 6446* 6448* 6450* 6452* 6454* 6456* 6458* 6460* 6462* 6464* 6466* 6468* 6470* 6472* 6474* 6476* 6478* 6480* 6482* 6484* 6486* 6488* 6490* 6492* 6494* 6496* 6498* 6500* 6502* 6504* 6506* 6508* 6510* 6512* 6514* 6516* 6518* 6520* 6522* 6524* 6526* 6528* 6530* 6532* 6534* 6536* 6538* 6540* 6542* 6544* 6546* 6548* 6550* 6552* 6554* 6556* 6558* 6559* 6561* 6562* 6565* 6566* 6567* 6569* 6570* 6571* 6572* 6573* 6574* 6575* 6576* 6578* 6580* 6582* 6583* 6584* 6585* 6586* 6587* 6588* 6589* 6590* 6591* 6592* 6594* 6596* 6598* 6600* 6602* 6604* 6606* 6608* 6610* 6612* 6614* 6616* 6618* 6620* 6622* 6624* 6626* 6628* 6630* 6632* 6634* 6636* 6638* 6640* 6642* 6644* 6646* 6648* 6650* 6652* 6654* 6656* 6658* 6660* 6662* 6664* 6666* 6668* 6670* 6672* 6674* 6676* 6678* 6680* 6682* 6684* 6686* 6688* 6690* 6692* 6694* 6696* 6698* 6700* 6702* 6704* 6706* 6708* 6710* 6712* 6714* 6716* 6718* 6720* 6722* 6724* 6726* 6728* 6730* 6732* 6734* 6736* 6738* 6740* 6742* 6744* 6746* 6748* 6750* 6752* 6753* 6754* 6756* 6757* 6758* 6760* 6762* 6764* 6766* 6768* 6770* 6772* 6774* 6776* 6778* 6780* 6782* 6784* 6786* 6787* 6788* 6789* 6790* 6791* 6792* 6794* 6795* 6796* 6797* 6798* 6799* 6800* 6802* 6804* 6806* 6808* 6810* 6812* 6814* 6816* 6818* 6820* 6822* 6824* 6826* 6828* 6830* 6832* 6834* 6836* 6838* 6840* 6841* 6842* 6843* 6844* 6845* 6847* 6848* 6849* 6850* 6851* 6852* 6853* 6855* 6856* 6857* 6858* 6859* 6860* 6862* 6864* 6866* 6868* 6870* 6872* 6874* 6876* 6878* 6880* 6882* 6884* 6886* 6888* 6890* 6892* 6894* 6896* 6898* 6900* 6902* 6904* 6906* 6908* 6910* 6912* 6914* 6916* 6918* 6920* 6922* 6923* 6925* 6926* 6928* 6930* 6932* 6934* 6936* 6938* 6940* 6942* 6944* 6946* 6948* 6950* 6952* 6954* 6956* 6958* 6960* 6962* 6964* 6966* 6968* 6970* 6972* 6974* 6976* 6978* 6980* 6982* 6984* 6986* 6988* 6990* 6992* 6994* 6996* 6998* 7000* 7002* 7004* 7006* 7008* 7010* 7012* 7014* 7016* 7018* 7020* 7022* 7024* 7026* 7028* 7030* 7032* 7034* 7036* 7038* 7040* 7042* 7044* 7046* 7048* 7050* 7052* 7054* 7056* 7058* 7060* 7062* 7064* 7066* 7068* 7070* 7072* 7074* 7076* 7078* 7080* 7082* 7084* 7086* 7088* 7090* 7092* 7094* 7096* 7098* 7100* 7102* 7104* 7106* 7108* 7110* 7112* 7114* 7116* 7118* 7120* 7122* 7124* 7126* 7128* 7130* 7132* 7134* 7136* 7138* 7140* 7142* 7144* 7146* 7148* 7150* 7152* 7154* 7156* 7158* 7160* 7162* 7164* 7166* 7168* 7170* 7172* 7174* 7176* 7178* 7180* 7182* 7184* 7186* 7188* 7190* 7192* 7194* 7196* 7198* 7200* 7202* 7204* 7206* 7208* 7210* 7212* 7214* 7216* 7218* 7220* 7222* 7224* 7226* 7228* 7230* 7232* 7234* 7236* 7238* 7240* 7242* 7244* 7246* 7248* 7250* 7252* 7254* 7256* 7258* 7260* 7262* 7264* 7266* 7268* 7270* 7272* 7274* 7276* 7278* 7280* 7282* 7284* 7286* 7288* 7290* 7292* 7294* 7296* 7298* 7300* 7302* 7304* 7306* 7308* 7310* 7312* 7314* 7316* 7318* 7320* 7322* 7324* 7326* 7328* 7330* 7332* 7334* 7336* 7338* 7340* 7342* 7344* 7346* 7348* 7350* 7352* 7354* 7356* 7358* 7360* 7362* 7364* 7366* 7367* 7369* 7370* 7372* 7374* 7375* 7376* 7377* 7378* 7379* 7380* 7382* 7384* 7386* 7388* 7390* 7392* 7394* 7396* 7398* 7400* 7402* 7404* 7406* 7408* 7410* 7412* 7414* 7415* 7417* 7418* 7420* 7422* 7424* 7426* 7428* 7430* 7432* 7434* 7435* 7436* 7437* 7438* 7439* 7441* 7442* 7443* 7444* 7445* 7446* 7447* 7448* 7450* 7451* 7452* 7453* 7454* 7456* 7458* 7460* 7462* 7464* 7466* 7468* 7470* 7471* 7473* 7474* 7476* 7478* 7480* 7482* 7484* 7487* 7488* 7489* 7490* 7491* 7492* 7493* 7494* 7495* 7496* 7497* 7499* 7503* 7504* 7507* 7508* 7509* 7510* 7511* 7512* 7514* 7515* 7516* 7517* 7518* 7519* 7520* 7521* 7522* 7523* 7524* 7525* 7526* 7527* 7528* 7529* 7530* 7531* 7532* 7533* 7534* 7535* 7536* 7537* 7538* 7539* 7540* 7542* 7544* 7546* 7548* 7550* 7552* 7554* 7556* 7558* 7560* 7562* 7564* 7566* 7568* 7570* 7572* 7574* 7576* 7578* 7580* 7582* 7584* 7586* 7588* 7590* 7592* 7594* 7596* 7598* 7600* 7602* 7603* 7604* 7605* 7606* 7607* 7609* 7610* 7611* 7612* 7614* 7615* 7616* 7617* 7618* 7619* 7620* 7621* 7622* 7623* 7624* 7625* 7626* 7627* 7628* 7630* 7632* 7634* 7636* 7638* 7640* 7642* 7644* 7646* 7648* 7650* 7652* 7654* 7656* 7658* 7660* 7662* 7664* 7666* 7668* 7670* 7672* 7674* 7676* 7678* 7680* 7682* 7684* 7686* 7688* 7690* 7692* 7694* 7696* 7698* 7700* 7702* 7704* 7706* 7708* 7710* 7712* 7714* 7716* 7718* 7720* 7722* 7724* 7726* 7728* 7730* 7732* 7734* 7736* 7738* 7740* 7742* 7744* 7746* 7748* 7750* 7752* 7754* 7756* 7758* 7760* 7762* 7764* 7766* 7768* 7770* 7772* 7774* 7776* 7778* 7780* 7782* 7784* 7786* 7788* 7790* 7792* 7794* 7796* 7798* 7800* 7802* 7804* 7806* 7808* 7810* 7812* 7814* 7816* 7818* 7820* 7822* 7824* 7826* 7828* 7830* 7832* 7834* 7836* 7838* 7840* 7842* 7844* 7846* 7848* 7850* 7852* 7854* 7856* 7858* 7860* 7862* 7864* 7866* 7868* 7870* 7872* 7874* 7876* 7878* 7880* 7882* 7884* 7886* 7888* 7890* 7892* 7894* 7896* 7898* 7900* 7902* 7904* 7906* 7908* 7910* 7912* 7914* 7916* 7918* 7920* 7922* 7924* 7926* 7928* 7930* 7932* 7934* 7936* 7938* 7940* 7942* 7944* 7946* 7948* 7950* 7952* 7954* 7956* 7958* 7960* 7962* 7964* 7966* 7968* 7970* 7972* 7974* 7976* 7978* 7980* 7982* 7984* 7986* 7988* 7990* 7992* 7994* 7996* 7998* 8000* 8002* 8004* 8006* 8008* 8010* 8012* 8014* 8016* 8018* 8020* 8022* 8024* 8026* 8028* 8030* 8032* 8034* 8036* 8038* 8040* 8042* 8044* 8046* 8048* 8050* 8052* 8054* 8056* 8058* 8060* 8062* 8064* 8066* 8068* 8070* 8072* 8074* 8076* 8078* 8080* 8082* 8084* 8086* 8088* 8090* 8092* 8094* 8096* 8098* 8100* 8102* 8104* 8106* 8108* 8110* 8112* 8114* 8116* 8118* 8120* 8122* 8124* 8126* 8128* 8130* 8132* 8134* 8136* 8138* 8140* 8142* 8144* 8146* 8148* 8150* 8152* 8154* 8156* 8158* 8160* 8162* 8164* 8166* 8168* 8170* 8172* 8174* 8176* 8178* 8180* 8182* 8184* 8186* 8188* 8190* 8192* 8194* 8196* 8198* 8200* 8202* 8204* 8206* 8208* 8210* 8212* 8214* 8216* 8218* 8220* 8222* 8224* 8226* 8228* 8230* 8232* 8234* 8236* 8238* 8240* 8242* 8244* 8246* 8248* 8250* 8252* 8254* 8256* 8258* 8260* 8262* 8264* 8266* 8268* 8270* 8272* 8274* 8276* 8278* 8280* 8282* 8284* 8286* 8288* 8290* 8292* 8294* 8296* 8298* 8300* 8302* 8304* 8306* 8308* 8310* 8312* 8314* 8316* 8318* 8320* 8322* 8324* 8326* 8328* 8330* 8332* 8334* 8336* 8338* 8340* 8342* 8344* 8346* 8348* 8350* 8352* 8354* 8356* 8358* 8360* 8362* 8364* 8366* 8368* 8370* 8372* 8374* 8376* 8378* 8380* 8382* 8384* 8386* 8388* 8390* 8392* 8394* 8396* 8398* 8400* 8402* 8404* 8406* 8408* 8410* 8412* 8414* 8416* 8418* 8420* 8422* 8424* 8426* 8428* 8430* 8432* 8434* 8436* 8438* 8440* 8442* 8444* 8446* 8448* 8450* 8452* 8454* 8456* 8458* 8460* 8462* 8464* 8466* 8468* 8470* 8472* 8474* 8476* 8478* 8480* 8482* 8484* 8486* 8488* 8490* 8492* 8494* 8496* 8498* 8500* 8503* 8504* 8506* 8508* 8510* 8512* 8514* 8516* 8518* 8520* 8522* 8524* 8526* 8528* 8530* 8532* 8534* 8536* 8538* 8540* 8542* 8544* 8546* 8548* 8550* 8552* 8554* 8556* 8558* 8560* 8562* 8564* 8566* 8568* 8570* 8572* 8574* 8576* 8578* 8580* 8582* 8584* 8586* 8588* 8590* 8592* 8594* 8596* 8598* 8600* 8602* 8604* 8606* 8608* 8610* 8612* 8614* 8616* 8618* 8620* 8622* 8624* 8626* 8628* 8630* 8632* 8634* 8636* 8638* 8640* 8642* 8644* 8646* 8648* 8650* 8652* 8654* 8656* 8658* 8660* 8662* 8664* 8666* 8668* 8670* 8672* 8674* 8676* 8678* 8680* 8682* 8684* 8686* 8688* 8690* 8692* 8694* 8696* 8698* 8700* 8702* 8704* 8706* 8708* 8710* 8712* 8714* 8716* 8718* 8720* 8722* 8724* 8726* 8728* 8730* 8732* 8734* 8736* 8738* 8740* 8742* 8744* 8746* 8748* 8750* 8752* 8754* 8756* 8758* 8760* 8762* 8764* 8766* 8768* 8770* 8772* 8774* 8776* 8778* 8780* 8782* 8784* 8786* 8788* 8790* 8792* 8794* 8796* 8798* 8800* 8802* 8804* 8806* 8808* 8810* 8812* 8814* 8816* 8818* 8820* 8822* 8824* 8826* 8828* 8830* 8832* 8834* 8836* 8838* 8840* 8842* 8844* 8846* 8848* 8850* 8852* 8854* 8856* 8858* 8860* 8862* 8864* 8866* 8868* 8870* 8872* 8874* 8876* 8878* 8880* 8882* 8884* 8886* 8888* 8890* 8892* 8894* 8896* 8898* 8900* 8902* 8904* 8906* 8908* 8910* 8912* 8914* 8916* 8918* 8920* 8922* 8924* 8926* 8928* 8930* 8932* 8934* 8936* 8938* 8940* 8942* 8944* 8946* 8948* 8950* 8952* 8954* 8956* 8958* 8960* 8962* 8964* 8966* 8968* 8970* 8972* 8974* 8976* 8978* 8980* 8982* 8984* 8986* 8988* 8990* 8992* 8994* 8996* 8998* 9000* 9002* 9004* 9006* 9008* 9010* 9012* 9014* 9016* 9018* 9020* 9022* 9024* 9026* 9028* 9030* 9032* 9034* 9036* 9038* 9040* 9042* 9044* 9046* 9048* 9050* 9052* 9054* 9056* 9058* 9060* 9062* 9064* 9066* 9068* 9070* 9072* 9074* 9076* 9078* 9080* 9082* 9084* 9086* 9088* 9090* 9092* 9094* 9096* 9098* 9100* 9102* 9104* 9106* 9108* 9110* 9112* 9114* 9116* 9118* 9120* 9122* 9124* 9126* 9128* 9130* 9131* 9133* 9134* 9136* 9138* 9140* 9142* 9144* 9146* 9148* 9150* 9152* 9154* 9156* 9158* 9160* 9162* 9164* 9166* 9168* 9170* 9172* 9174* 9176* 9178* 9180* 9182* 9184* 9186* 9188* 9190* 9192* 9194* 9196* 9198* 9200* 9202* 9204* 9206* 9208* 9210* 9212* 9214* 9216* 9218* 9220* 9222* 9224* 9226* 9228* 9230* 9232* 9234* 9236* 9238* 9240* 9242* 9244* 9246* 9248* 9250* 9252* 9254* 9256* 9258* 9260* 9262* 9264* 9266* 9268* 9270* 9272* 9274* 9276* 9278* 9280* 9282* 9284* 9286* 9288* 9290* 9292* 9294* 9296* 9298* 9300* 9302* 9304* 9306* 9308* 9310* 9312* 9314* 9316* 9318* 9320* 9322* 9324* 9326* 9328* 9330* 9332* 9334* 9336* 9338* 9340* 9342* 9344* 9346* 9348* 9350* 9352* 9354* 9356* 9358* 9360* 9362* 9364* 9366* 9368* 9370* 9372* 9374* 9375* 9376* 9378* 9380* 9382* 9384* 9386* 9388* 9390* 9392* 9394* 9396* 9398* 9400* 9402* 9404* 9406* 9408* 9410* 9412* 9414* 9416* 9418* 9419* 9420* 9421* 9422* 9423* 9424* 9425* 9426* 9427* 9428* 9429* 9430* 9431* 9432* 9448* 9450* 9452* 9454* 9456* 9458* 9460* 9462* 9464* 9466* 9468* 9470* 9472* 9474* 9476* 9478* 9480* 9482* 9484* 9486* 9488* 9490* 9492* 9494* 9496* 9498* 9500* 9502* 9504* 9506* 9508* 9510* 9512* 9514* 9516* 9518* 9520* 9522* 9524* 9526* 9528* 9530* 9532* 9534* 9536* 9538* 9540* 9542* 9544* 9546* 9548* 9550* 9552* 9554* 9556* 9558* 9560* 9562* 9564* 9566* 9568* 9570* 9572* 9574* 9576* 9578* 9580* 9582* 9584* 9586* 9588* 9590* 9592* 9594* 9596* 9598* 9600* 9602* 9604* 9606* 9608* 9610* 9612* 9614* 9616* 9618* 9620* 9622* 9624* 9626* 9628* 9630* 9632* 9634* 9636* 9638* 9640* 9642* 9644* 9646* 9648* 9650* 9652* 9654* 9656* 9658* 9660* 9662* 9664* 9666* 9668* 9670* 9672* 9674* 9676* 9678* 9680* 9682* 9684* 9686* 9688* 9690* 9692* 9694* 9696* 9698* 9700* 9701* 9702* 9703* 9704* 9705* 9706* 9707* 9708* 9709* 9710* 9711* 9724* 9726* 9728* 9730* 9732* 9734* 9736* 9738* 9740* 9742* 9744* 9746* 9748* 9750* 9752* 9754* 9756* 9758* 9760* 9762* 9764* 9766* 9768* 9770* 9772* 9774* 9776* 9778* 9780* 9782* 9784* 9786* 9788* 9790* 9792* 9794* 9796* 9798* 9800* 9802* 9804* 9806* 9808* 9810* 9812* 9814* 9816* 9818* 9820* 9822* 9824* 9826* 9828* 9830* 9832* 9834* 9836* 9838* 9840* 9842* 9844* 9846* 9848* 9850* 9852* 9854* 9856* 9858* 9860* 9862* 9864* 9866* 9868* 9870* 9872* 9874* 9876* 9878* 9880* 9882* 9884* 9886* 9888* 9890* 9892* 9894* 9896* 9898* 9900* 9902* 9904* 9906* 9908* 9910* 9912* 9914* 9916* 9918* 9920* 9922* 9924* 9926* 9928* 9930* 9932* 9934* 9936* 9938* 9940* 9942* 9944* 9946* 9948* 9950* 9952* 9954* 9956* 9958* 9960* 9962* 9964* 9966* 9968* 9970* 9972* 9974* 9976* 9978* 9980* 9982* 9984* 9986* 9988* 9990* 9992* 9994* 9996* 9998* 10000* 10002* 10004* 10006* 10008* 10010* 10012* 10014* 10016* 10018* 10020* 10022* 10024* 10026* 10028* 10030* 10032* 10034* 10036* 10038* 10040* 10042* 10044* 10046* 10048* 10050* 10052* 10054* 10056* 10058* 10060* 10062* 10064* 10066* 10068* 10070* 10072* 10074* 10076* 10078* 10080* 10082* 10084* 10086* 10088* 10090* 10092* 10094* 10096* 10098* 10100* 10102* 10104* 10106* 10108* 10110* 10112* 10114* 10116* 10118* 10120* 10122* 10124* 10126* 10128* 10130* 10132* 10134* 10136* 10138* 10140* 10142* 10144* 10146* 10148* 10150* 10151* 10152* 10153* 10154* 10155* 10156* 10157* 10158* 10159* 10160* 10161* 10162* 10163* 10164* 10165* 10166* 10167* 10168* 10169* 10170* 10171* 10172* 10173* 10174* 10175* 10176* 10177* 10178* 10179* 10180* 10181* 10182* 10183* 10184* 10185* 10186* 10187* 10188* 10189* 10190* 10191* 10192* 10193* 10194* 10195* 10196* 10197* 10198* 10199* 10200* 10201* 10202* 10203* 10204* 10205* 10206* 10207* 10208* 10209* 10210* 10211* 10212* 10213* 10214* 10215* 10216* 10217* 10218* 10219* 10220* 10221* 10222* 10223* 10224* 10225* 10226* 10227* 10228* 10229* 10230* 10231* 10232* 10233* 10234* 10235* 10236* 10237* 10238* 10239* 10240* 10241* 10242* 10243* 10244* 10245* 10246* 10247* 10248* 10249* 10250* 10251* 10252* 10253* 10350* 10352* 10354* 10356* 10358* 10360* 10362* 10364* 10366* 10368* 10370* 10372* 10374* 10376* 10378* 10380* 10382* 10384* 10386* 10388* 10390* 10392* 10394* 10396* 10398* 10400* 10402* 10404* 10406* 10408* 10410* 10412* 10414* 10416* 10418* 10420* 10422* 10424* 10426* 10428* 10430* 10432* 10434* 10436* 10438* 10440* 10442* 10444* 10446* 10448* 10450* 10452* 10454* 10456* 10458* 10460* 10462* 10464* 10466* 10468* 10470* 10472* 10474* 10476* 10478* 10480* 10482* 10484* 10486* 10488* 10490* 10492* 10494* 10496* 10498* 10500* 10502* 10504* 10506* 10508* 10510* 10512* 10514* 10516* 10518* 10520* 10522* 10524* 10526* 10528* 10530* 10532* 10534* 10536* 10538* 10540* 10542* 10544* 10546* 10548* 10550* 10552* 10554* 10556* 10558* 10560* 10562* 10564* 10566* 10568* 10570* 10572* 10574* 10576* 10578* 10580* 10582* 10584* 10586* 10588* 10590* 10592* 10594* 10596* 10598* 10600* 10602* 10604* 10606* 10608* 10610* 10612* 10614* 10616* 10618* 10620* 10622* 10624* 10626* 10628* 10630* 10632* 10634* 10636* 10638* 10640* 10642* 10644* 10646* 10648* 10650* 10652* 10654* 10656* 10658* 10660* 10662* 10664* 10666* 10668* 10670* 10672* 10674* 10676* 10678* 10680* 10682* 10684* 10686* 10688* 10690* 10692* 10694* 10696* 10698* 10700* 10702* 10704* 10706* 10708* 10710* 10712* 10714* 10716* 10718* 10720* 10722* 10724* 10726* 10728* 10730* 10732* 10734* 10736* 10738* 10740* 10742* 10744* 10746* 10748* 10750* 10752* 10754* 10756* 10758* 10760* 10762* 10764* 10766* 10768* 10770* 10772* 10774* 10776* 10778* 10780* 10782* 10784* 10786* 10788* 10790* 10792* 10794* 10796* 10798* 10800* 10802* 10804* 10806* 10808* 10810* 10812* 10814* 10816* 10818* 10820* 10822* 10824* 10826* 10828* 10830* 10832* 10834* 10836* 10838* 10840* 10842* 10844* 10846* 10848* 10850* 10852* 10854* 10856* 10858* 10860* 10862* 10864* 10866* 10868* 10870* 10872* 10874* 10876* 10878* 10880* 10882* 10884* 10886* 10888* 10890* 10892* 10894* 10896* 10898* 10900* 10902* 10904* 10906* 10908* 10910* 10912* 10914* 10916* 10918* 10920* 10922* 10924* 10926* 10928* 10930* 10932* 10934* 10936* 10938* 10940* 10942* 10944* 10946* 10948* 10950* 10952* 10954* 10956* 10958* 10960* 10962* 10964* 10966* 10968* 10970* 10972* 10974* 10976* 10978* 10980* 10982* 10984* 10986* 10988* 10990* 10992* 10994* 10996* 10998* 11000* 11002* 11004* 11006* 11008* 11010* 11012* 11014* 11016* 11018* 11020* 11022* 11024* 11026* 11028* 11030* 11032* 11034* 11036* 11038* 11040* 11042* 11044* 11046* 11048* 11050* 11052* 11054* 11056* 11058* 11060* 11062* 11064* 11066* 11068* 11070* 11072* 11074* 11076* 11078* 11080* 11082* 11084* 11086* 11088* 11090* 11092* 11094* 11096* 11098* 11100* 11102* 11104* 11106* 11108* 11110* 11112* 11114* 11116* 11118* 11120* 11122* 11124* 11126* 11128* 11130* 11132* 11134* 11136* 11138* 11140* 11142* 11144* 11146* 11148* 11150* 11152* 11154* 11156* 11158* 11160* 11162* 11164* 11166* 11168* 11170* 11172* 11174* 11176* 11178* 11180* 11182* 11184* 11186* 11188* 11190* 11192* 11194* 11196* 11198* 11200* 11202* 11204* 11206* 11208* 11210* 11212* 11214* 11216* 11218* 11220* 11222* 11224* 11226* 11228* 11230* 11232* 11234* 11236* 11238* 11240* 11242* 11244* 11246* 11248* 11250* 11252* 11254* 11256* 11258* 11260* 11262* 11264* 11266* 11268* 11270* 11272* 11274* 11276* 11278* 11280* 11282* 11284* 11286* 11288* 11290* 11292* 11294* 11296* 11298* 11300* 11302* 11304* 11306* 11308* 11310* 11312* 11314* 11316* 11318* 11320* 11322* 11324* 11326* 11328* 11330* 11332* 11334* 11336* 11338* 11340* 11342* 11344* 11346* 11348* 11350* 11352* 11354* 11356* 11358* 11360* 11362* 11364* 11366* 11368* 11370* 11372* 11374* 11376* 11378* 11380* 11382* 11384* 11386* 11388* 11390* 11392* 11394* 11396* 11398* 11400* 11402* 11404* 11406* 11408* 11410* 11412* 11414* 11416* 11418* 11420* 11422* 11424* 11426* 11428* 11430* 11432* 11434* 11436* 11438* 11440* 11442* 11444* 11446* 11448* 11450* 11452* 11454* 11456* 11458* 11460* 11462* 11464* 11466* 11468* 11470* 11472* 11474* 11476* 11478* 11480* 11482* 11484* 11486* 11488* 11490* 11492* 11494* 11496* 11498* 11500* 11502* 11504* 11506* 11508* 11510* 11512* 11514* 11516* 11518* 11520* 11522* 11524* 11526* 11528* 11530* 11532* 11534* 11536* 11538* 11540* 11542* 11544* 11546* 11548* 11550* 11552* 11554* 11556* 11558* 11560* 11562* 11564* 11566* 11568* 11570* 11572* 11574* 11576* 11578* 11580* 11582* 11584* 11586* 11588* 11590* 11591* 11592* 11593* 11595* 11596* 11597* 11598* 11599* 11600* 11601* 11602* 11603* 11604* 11605* 11606* 11607* 11610* 11611* 11612* 11614* 11615* 11616* 11617* 11618* 11619* 11620* 11621* 11625* 11654* 11655* 11656* 11657* 11658* 11660* 11662* 11673* 11677* 11678* 11679* 11680* 11681* 11688* 11692* 11695* 11696* 11697* 11699* 11700* 11701* 11702* 11703* 11705* 11706* 11707* 11708* 11709* 11710* 11711* 11712* 11713* 11714* 11715* 11716* 11717* 11718* 11719* 11720* 11721* 11722* 11723* 11724* 11725* 11726* 11727* 11728* 11729* 11730* 11748* 11749* 11750* 11751* 11752* 11753* 11754* 11755* 11756* 11757* 11758* 11759* 11760* 11761* 11762* 11763* 11764* 11765* 11766* 11767* 11768* 11769* 11770* 11771* 11772* 11773* 11774* 11775* 11776* 11777* 11778* 11779* 11780* 11781* 11782* 11783* 11784* 11785* 11786* 11787* 11788* 11789* 11790* 11792* 11793* 11794* 11795* 11796* 11797* 11798* 11799* 11800* 11801* 11802* 11803* 11804* 11805* 11806* 11807* 11808* 11809* 11810* 11811* 11812* 11813* 11814* 11815* 11816* 11817* 11818* 11819* 11820* 11821* 11822* 11823* 11824* 11825* 11826* 11827* 11828* 11829* 11830* 11831* 11832* 11833* 11834* 11835* 11836* 11837* 11838* 11839* 11840* 11841* 11842* 11844* 11845* 11846* 11847* 11848* 11849* 11850* 11851* 11852* 11853* 11854* 11855* 11856* 11857* 11858* 11859* 11860* 11861* 11862* 11863* 11864* 11865* 11866* 11867* 11868* 11869* 11870* 11871* 11872* 11873* 11874* 11875* 11876* 11877* 11878* 11879* 11880* 11881* 11882* 11883* 11884* 11885* 11886* 11887* 11888* 11889* 11890* 11891* 11892* 11893* 11894* 11895* 11896* 11897* 11898* 11899* 11900* 11901* 11902* 11903* 11904* 11905* 11906* 11907* 11908* 11909* 11910* 11911* 11912* 11913* 11914* 11915* 11916* 11917* 11918* 11919* 11920* 11921* 11922* 11923* 11924* 11925* 11926* 11927* 11928* 11929* 11930* 11931* 11932* 11933* 11934* 11935* 11936* 11937* 11938* 11939* 11940* 11941* 11942* 11943* 11944* 11945* 11946* 11947* 11948* 11949* 11950* 11951* 11952* 11953* 11954* 11955* 11956* 11957* 11958* 11959* 11960* 11961* 11962* 11963* 11964* 11965* 11966* 11967* 11968* 11969* 11970* 11971* 11972* 11973* 11974* 11975* 11976* 11977* 11978* 11979* 11980* 11981* 11982* 11983* 11984* 11985* 11986* 11987* 11988* 11989* 11990* 11991* 11992* 11993* 11994* 11995* 11996* 11997* 11998* 11999* 12000* 12001* 12002* 12003* 12004* 12005* 12006* 12007* 12008* 12009* 12010* 12011* 12012* 12013* 12014* 12015* 12016* 12017* 12018* 12019* 12020* 12021* 12022* 12023* 12024* 12025* 12026* 12027* 12028* 12029* 12030* 12031* 12032* 12033* 12034* 12035* 12036* 12037* 12038* 12039* 12040* 12041* 12042* 12043* 12044* 12045* 12046* 12047* 12048* 12049* 12050* 12051* 12052* 12053* 12054* 12055* 12056* 12057* 12058* 12059* 12060* 12061* 12062* 12063* 12064* 12065* 12066* 12067* 12068* 12069* 12070* 12071* 12072* 12073* 12074* 12075* 12076* 12077* 12078* 12079* 12080* 12081* 12082* 12083* 12084* 12085* 12086* 12087* 12088* 12089* 12090* 12091* 12092* 12093* 12094* 12095* 12096* 12097* 12098* 12099* 12100* 12101* 12102* 12103* 12104* 12105* 12106* 12107* 12108* 12109* 12110* 12111* 12112* 12113* 12114* 12115* 12116* 12117* 12118* 12119* 12120* 12121* 12122* 12123* 12124* 12125* 12126* 12127* 12128* 12129* 12130* 12131* 12132* 12133* 12134* 12135* 12136* 12137* 12138* 12139* 12140* 12141* 12142* 12143* 12144* 12145* 12146* 12147* 12148* 12149* 12150* 12151* 12152* 12153* 12154* 12155* 12156* 12157* 12158* 12159* 12160* 12161* 12162* 12163* 12164* 12165* 12166* 12167* 12168* 12169* 12170* 12171* 12172* 12173* 12174* 12175* 12176* 12177* 12178* 12179* 12180* 12181* 12182* 12183* 12184* 12185* 12186* 12187* 12188* 12189* 12190* 12191* 12192* 12193* 12194* 12195* 12196* 12197* 12198* 12199* 12200* 12201* 12202* 12203* 12204* 12205* 12206* 12207* 12208* 12209* 12210* 12211* 12212* 12213* 12214* 12215* 12216* 12217* 12218* 12219* 12220* 12221* 12222* 12223* 12224* 12225* 12226* 12227* 12228* 12229* 12230* 12231* 12232* 12233* 12234* 12235* 12236* 12237* 12238* 12239* 12240* 12241* 12242* 12243* 12244* 12245* 12246* 12247* 12248* 12249* 12250* 12251* 12252* 12253* 12254* 12255* 12256* 12257* 12258* 12259* 12260* 12261* 12262* 12263* 12264* 12265* 12266* 12267* 12268* 12269* 12270* 12271* 12272* 12273* 12274* 12275* 12276* 12277* 12278* 12279* 12280* 12281* 12282* 12283* 12284* 12285* 12286* 12287* 12288* 12289* 12290* 12291* 12292* 12293* 12294* 12295* 12296* 12297* 12298* 12299* 12300* 12301* 12302* 12303* 12304* 12305* 12306* 12307* 12308* 12309* 12310* 12311* 12312* 12313* 12314* 12315* 12316* 12317* 12318* 12320* 12322* 12324* 12326* 12328* 12330* 12332* 12334* 12336* 12338* 12340* 12342* 12344* 12346* 12348* 12350* 12352* 12354* 12356* 12358* 12360* 12362* 12364* 12366* 12368* 12370* 12372* 12374* 12376* 12378* 12380* 12382* 12384* 12386* 12388* 12390* 12392* 12394* 12396* 12398* 12400* 12402* 12404* 12406* 12408* 12410* 12412* 12414* 12416* 12418* 12420* 12422* 12424* 12426* 12428* 12430* 12432* 12434* 12436* 12438* 12440* 12442* 12444* 12446* 12448* 12450* 12452* 12454* 12456* 12458* 12460* 12462* 12464* 12466* 12468* 12470* 12472* 12474* 12476* 12478* 12480* 12482* 12484* 12486* 12488* 12490* 12492* 12494* 12496* 12498* 12500* 12502* 12504* 12506* 12508* 12510* 12512* 12514* 12516* 12518* 12520* 12522* 12524* 12526* 12528* 12530* 12532* 12534* 12536* 12538* 12540* 12542* 12544* 12546* 12548* 12550* 12552* 12554* 12556* 12558* 12560* 12562* 12564* 12566* 12568* 12570* 12572* 12574* 12576* 12578* 12580* 12582* 12584* 12586* 12588* 12590* 12592* 12594* 12596* 12598* 12600* 12602* 12604* 12606* 12608* 12610* 12612* 12614* 12616* 12618* 12620* 12622* 12624* 12626* 12628* 12630* 12632* 12634* 12636* 12638* 12640* 12642* 12644* 12646* 12648* 12650* 12652* 12654* 12656* 12658* 12660* 12662* 12664* 12666* 12668* 12670* 12672* 12674* 12676* 12678* 12680* 12682* 12684* 12686* 12688* 12690* 12692* 12694* 12696* 12698* 12700* 12702* 12704* 12706* 12708* 12710* 12712* 12714* 12716* 12718* 12720* 12722* 12724* 12726* 12728* 12730* 12732* 12734* 12736* 12738* 12740* 12742* 12744* 12746* 12748* 12750* 12752* 12754* 12756* 12758* 12760* 12762* 12764* 12766* 12768* 12770* 12772* 12774* 12776* 12778* 12780* 12782* 12784* 12786* 12788* 12790* 12792* 12794* 12796* 12798* 12800* 12802* 12804* 12806* 12808* 12810* 12812* 12814* 12816* 12818* 12820* 12822* 12824* 12826* 12828* 12830* 12832* 12834* 12836* 12838* 12840* 12842* 12844* 12846* 12848* 12850* 12852* 12854* 12856* 12858* 12860* 12862* 12864* 12866* 12868* 12870* 12872* 12874* 12876* 12878* 12880* 12882* 12884* 12886* 12888* 12890* 12892* 12894* 12896* 12898* 12900* 12902* 12904* 12906* 12908* 12910* 12912* 12914* 12916* 12918* 12920* 12922* 12924* 12926* 12928* 12930* 12932* 12934* 12936* 12938* 12940* 12942* 12944* 12946* 12948* 12950* 12952* 12954* 12956* 12958* 12960* 12962* 12964* 12966* 12968* 12970* 12972* 12974* 12976* 12978* 12980* 12982* 12983* 12985* 12986* 12988* 12990* 12992* 12994* 12996* 12998* 13000* 13002* 13004* 13006* 13008* 13010* 13012* 13014* 13016* 13017* 13019* 13020* 13022* 13024* 13026* 13028* 13030* 13032* 13034* 13036* 13038* 13040* 13042* 13044* 13046* 13048* 13050* 13052* 13054* 13056* 13058* 13060* 13062* 13064* 13066* 13068* 13070* 13072* 13074* 13076* 13078* 13080* 13082* 13084* 13086* 13088* 13090* 13092* 13094* 13096* 13098* 13100* 13102* 13104* 13106* 13108* 13110* 13112* 13114* 13116* 13118* 13120* 13122* 13124* 13126* 13128* 13130* 13132* 13134* 13136* 13138* 13140* 13142* 13144* 13146* 13148* 13150* 13152* 13154* 13156* 13158* 13160* 13162* 13164* 13166* 13168* 13170* 13172* 13174* 13176* 13178* 13180* 13182* 13184* 13186* 13188* 13190* 13192* 13194* 13196* 13198* 13200* 13202* 13204* 13206* 13208* 13210* 13212* 13214* 13216* 13218* 13220* 13222* 13224* 13226* 13228* 13230* 13232* 13234* 13236* 13238* 13240* 13242* 13244* 13246* 13248* 13250* 13252* 13254* 13256* 13258* 13260* 13262* 13264* 13266* 13268* 13270* 13272* 13274* 13276* 13278* 13280* 13282* 13284* 13286* 13288* 13290* 13292* 13294* 13296* 13298* 13300* 13302* 13304* 13306* 13308* 13310* 13312* 13314* 13316* 13318* 13320* 13322* 13324* 13326* 13328* 13330* 13332* 13334* 13336* 13338* 13340* 13342* 13344* 13346* 13348* 13350* 13352* 13354* 13356* 13358* 13360* 13362* 13364* 13366* 13368* 13370* 13372* 13374* 13376* 13378* 13380* 13382* 13384* 13386* 13388* 13390* 13392* 13394* 13396* 13398* 13400* 13402* 13404* 13406* 13408* 13410* 13412* 13414* 13416* 13418* 13420* 13422* 13424* 13426* 13428* 13430* 13432* 13434* 13436* 13438* 13440* 13442* 13444* 13446* 13448* 13450* 13452* 13454* 13456* 13458* 13460* 13462* 13464* 13466* 13468* 13470* 13472* 13474* 13476* 13478* 13480* 13482* 13484* 13486* 13488* 13490* 13492* 13494* 13496* 13498* 13500* 13502* 13504* 13506* 13508* 13510* 13512* 13514* 13516* 13518* 13520* 13522* 13524* 13526* 13528* 13530* 13532* 13534* 13536* 13538* 13540* 13542* 13544* 13546* 13548* 13550* 13552* 13554* 13556* 13558* 13560* 13562* 13564* 13566* 13568* 13570* 13572* 13574* 13576* 13578* 13580* 13582* 13584* 13586* 13588* 13590* 13592* 13594* 13596* 13598* 13600* 13602* 13604* 13606* 13608* 13610* 13612* 13614* 13616* 13618* 13620* 13622* 13624* 13626* 13628* 13630* 13632* 13634* 13636* 13638* 13640* 13642* 13644* 13646* 13648* 13650* 13652* 13654* 13656* 13658* 13660* 13662* 13664* 13666* 13668* 13670* 13672* 13674* 13676* 13678* 13680* 13682* 13684* 13686* 13688* 13690* 13692* 13694* 13696* 13698* 13700* 13702* 13704* 13706* 13708* 13710* 13712* 13714* 13716* 13718* 13720* 13722* 13724* 13726* 13728* 13730* 13732* 13734* 13736* 13738* 13740* 13742* 13744* 13746* 13748* 13750* 13752* 13754* 13756* 13758* 13760* 13762* 13764* 13766* 13768* 13770* 13772* 13774* 13776* 13778* 13780* 13782* 13784* 13786* 13788* 13790* 13792* 13794* 13796* 13798* 13800* 13802* 13804* 13806* 13808* 13810* 13812* 13814* 13816* 13818* 13820* 13822* 13824* 13826* 13828* 13830* 13832* 13834* 13836* 13838* 13840* 13842* 13844* 13846* 13848* 13850* 13852* 13854* 13856* 13858* 13860* 13862* 13864* 13866* 13868* 13870* 13872* 13874* 13876* 13878* 13880* 13882* 13884* 13886* 13888* 13890* 13892* 13894* 13896* 13898* 13900* 13902* 13904* 13906* 13908* 13910* 13912* 13914* 13916* 13918* 13920* 13922* 13924* 13926* 13928* 13930* 13932* 13934* 13936* 13938* 13940* 13942* 13944* 13946* 13948* 13950* 13952* 13954* 13956* 13958* 13960* 13962* 13964* 13966* 13968* 13970* 13972* 13974* 13976* 13978* 13980* 13982* 13984* 13986* 13988* 13990* 13992* 13994* 13996* 13998* 14000* 14002* 14004* 14006* 14008* 14010* 14012* 14014* 14016* 14018* 14020* 14022* 14024* 14026* 14028* 14030* 14032* 14034* 14036* 14038* 14040* 14042* 14044* 14046* 14048* 14050* 14052* 14054* 14056* 14058* 14060* 14062* 14064* 14066* 14068* 14070* 14072* 14074* 14076* 14078* 14080* 14082* 14084* 14086* 14088* 14090* 14092* 14094* 14096* 14098* 14100* 14102* 14104* 14106* 14108* 14110* 14112* 14114* 14116* 14118* 14120* 14122* 14124* 14126* 14128* 14130* 14132* 14134* 14136* 14138* 14140* 14142* 14144* 14146* 14148* 14150* 14152* 14154* 14156* 14158* 14160* 14162* 14164* 14166* 14168* 14170* 14172* 14174* 14176* 14178* 14180* 14182* 14184* 14186* 14188* 14190* 14192* 14194* 14196* 14198* 14200* 14202* 14204* 14206* 14208* 14210* 14212* 14214* 14216* 14218* 14220* 14222* 14224* 14226* 14228* 14230* 14232* 14234* 14236* 14238* 14240* 14242* 14244* 14246* 14248* 14250* 14252* 14254* 14256* 14258* 14260* 14262* 14264* 14266* 14268* 14270* 14272* 14274* 14276* 14278* 14280* 14282* 14284* 14286* 14288* 14290* 14292* 14294* 14296* 14298* 14300* 14302* 14304* 14306* 14308* 14310* 14312* 14314* 14316* 14318* 14319* 14321* 14322* 14324* 14326* 14328* 14330* 14332* 14334* 14336* 14338* 14340* 14342* 14344* 14346* 14348* 14350* 14352* 14354* 14356* 14358* 14360* 14362* 14364* 14366* 14368* 14370* 14372* 14374* 14376* 14378* 14380* 14382* 14384* 14386* 14388* 14390* 14392* 14394* 14396* 14398* 14400* 14402* 14404* 14406* 14408* 14410* 14412* 14414* 14416* 14418* 14420* 14422* 14424* 14426* 14428* 14430* 14432* 14434* 14436* 14438* 14440* 14442* 14444* 14446* 14448* 14450* 14452* 14454* 14456* 14458* 14460* 14462* 14464* 14466* 14468* 14470* 14472* 14474* 14476* 14478* 14480* 14482* 14484* 14486* 14488* 14490* 14492* 14494* 14496* 14498* 14500* 14502* 14504* 14506* 14508* 14510* 14512* 14514* 14516* 14518* 14520* 14522* 14524* 14526* 14528* 14530* 14532* 14534* 14536* 14538* 14540* 14542* 14544* 14546* 14548* 14550* 14552* 14554* 14556* 14558* 14560* 14562* 14564* 14566* 14568* 14570* 14572* 14574* 14576* 14578* 14580* 14582* 14584* 14586* 14588* 14590* 14592* 14594* 14596* 14598* 14600* 14602* 14604* 14606* 14608* 14610* 14612* 14614* 14616* 14618* 14620* 14622* 14624* 14626* 14628* 14630* 14632* 14634* 14636* 14638* 14640* 14642* 14644* 14646* 14648* 14650* 14652* 14654* 14656* 14658* 14660* 14662* 14664* 14666* 14668* 14670* 14672* 14674* 14676* 14678* 14680* 14682* 14684* 14686* 14688* 14690* 14692* 14694* 14696* 14698* 14700* 14702* 14704* 14706* 14708* 14710* 14712* 14714* 14716* 14718* 14720* 14722* 14724* 14726* 14728* 14730* 14732* 14734* 14736* 14738* 14740* 14742* 14744* 14746* 14748* 14750* 14752* 14754* 14756* 14758* 14760* 14762* 14764* 14766* 14768* 14770* 14772* 14774* 14776* 14778* 14780* 14782* 14784* 14786* 14788* 14790* 14792* 14794* 14796* 14798* 14800* 14802* 14804* 14806* 14808* 14810* 14812* 14814* 14816* 14818* 14820* 14822* 14824* 14826* 14828* 14830* 14832* 14834* 14836* 14838* 14840* 14842* 14844* 14846* 14848* 14850* 14852* 14854* 14856* 14858* 14860* 14862* 14864* 14866* 14868* 14870* 14872* 14874* 14876* 14878* 14880* 14882* 14884* 14886* 14888* 14890* 14892* 14894* 14896* 14898* 14900* 14902* 14904* 14906* 14908* 14910* 14912* 14914* 14916* 14918* 14920* 14922* 14924* 14926* 14928* 14930* 14932* 14934* 14936* 14938* 14940* 14942* 14944* 14946* 14948* 14950* 14952* 14954* 14956* 14958* 14960* 14962* 14964* 14966* 14968* 14970* 14972* 14974* 14976* 14978* 14980* 14982* 14984* 14986* 14988* 14990* 14992* 14994* 14996* 14998* 15000* 15002* 15004* 15006* 15008* 15010* 15012* 15014* 15016* 15018* 15020* 15022* 15024* 15026* 15028* 15030* 15032* 15034* 15036* 15038* 15040* 15042* 15044* 15046* 15048* 15050* 15052* 15054* 15056* 15058* 15060* 15062* 15064* 15066* 15068* 15070* 15072* 15074* 15076* 15078* 15080* 15082* 15084* 15086* 15088* 15090* 15092* 15094* 15096* 15098* 15100* 15102* 15104* 15106* 15108* 15110* 15112* 15114* 15116* 15118* 15120* 15122* 15124* 15126* 15128* 15130* 15132* 15134* 15136* 15138* 15140* 15142* 15144* 15146* 15148* 15150* 15152* 15154* 15156* 15158* 15160* 15162* 15164* 15166* 15168* 15170* 15172* 15174* 15176* 15178* 15180* 15182* 15184* 15186* 15188* 15190* 15192* 15194* 15196* 15198* 15200* 15202* 15204* 15206* 15208* 15210* 15212* 15214* 15216* 15218* 15220* 15222* 15224* 15226* 15228* 15230* 15232* 15234* 15236* 15238* 15240* 15242* 15244* 15246* 15248* 15250* 15252* 15254* 15256* 15258* 15260* 15262* 15264* 15266* 15268* 15270* 15272* 15274* 15276* 15278* 15280* 15282* 15284* 15286* 15288* 15290* 15292* 15294* 15296* 15298* 15300* 15302* 15304* 15306* 15308* 15310* 15312* 15314* 15316* 15318* 15320* 15322* 15324* 15326* 15328* 15330* 15332* 15334* 15336* 15338* 15340* 15342* 15344* 15346* 15348* 15350* 15352* 15354* 15356* 15358* 15360* 15362* 15364* 15366* 15368* 15370* 15372* 15374* 15376* 15378* 15380* 15382* 15384* 15386* 15388* 15390* 15392* 15394* 15396* 15398* 15400* 15402* 15404* 15406* 15408* 15410* 15412* 15414* 15416* 15418* 15420* 15422* 15424* 15426* 15428* 15430* 15432* 15434* 15436* 15438* 15440* 15442* 15444* 15446* 15448* 15450* 15452* 15454* 15456* 15458* 15460* 15462* 15464* 15466* 15468* 15470* 15472* 15474* 15476* 15478* 15480* 15482* 15484* 15486* 15488* 15490* 15492* 15494* 15496* 15498* 15500* 15502* 15504* 15506* 15508* 15510* 15512* 15514* 15516* 15518* 15520* 15522* 15524* 15526* 15528* 15530* 15532* 15534* 15536* 15538* 15540* 15542* 15544* 15546* 15548* 15550* 15552* 15554* 15556* 15558* 15560* 15562* 15564* 15566* 15568* 15570* 15572* 15574* 15576* 15578* 15580* 15582* 15584* 15586* 15588* 15590* 15592* 15594* 15596* 15598* 15600* 15602* 15604* 15606* 15608* 15610* 15612* 15614* 15616* 15618* 15620* 15622* 15624* 15626* 15628* 15630* 15632* 15634* 15636* 15638* 15640* 15642* 15644* 15646* 15648* 15650* 15652* 15654* 15656* 15658* 15660* 15662* 15664* 15666* 15668* 15670* 15672* 15674* 15676* 15678* 15680* 15682* 15684* 15686* 15688* 15690* 15692* 15694* 15696* 15698* 15700* 15702* 15704* 15706* 15708* 15710* 15712* 15714* 15717* 15718* 15720* 15722* 15724* 15726* 15728* 15730* 15732* 15734* 15736* 15738* 15740* 15742* 15744* 15746* 15748* 15750* 15752* 15754* 15756* 15758* 15760* 15762* 15764* 15766* 15768* 15770* 15772* 15774* 15776* 15778* 15780* 15782* 15784* 15786* 15788* 15790* 15792* 15794* 15796* 15798* 15800* 15802* 15804* 15806* 15808* 15810* 15812* 15814* 15816* 15818* 15820* 15822* 15824* 15826* 15828* 15830* 15832* 15838* 15840* 15841* 15842* 15843* 15845* 15846* 15848* 15849* 15850* 15851* 15852* 15854* 15856* 15858* 15860* 15862* 15864* 15866* 15867* 15868* 15869* 15872* 15873* 15874* 15875* 15876* 15878* 15880* 15882* 15884* 15886* 15888* 15890* 15892* 15894* 15896* 15898* 15900* 15901* 15902* 15904* 15906* 15908* 15910* 15912* 15914* 15916* 15918* 15920* 15922* 15924* 15926* 15928* 15930* 15932* 15934* 15936* 15938* 15940* 15942* 15944* 15946* 15948* 15950* 15952* 15954* 15956* 15958* 15960* 15962* 15964* 15966* 15968* 15970* 15972* 15974* 15976* 15978* 15980* 15982* 15984* 15986* 15988* 15990* 15992* 15994* 15996* 15998* 16000* 16002* 16004* 16006* 16008* 16010* 16012* 16014* 16016* 16018* 16020* 16022* 16024* 16026* 16028* 16030* 16032* 16034* 16036* 16038* 16040* 16042* 16044* 16046* 16048* 16050* 16052* 16054* 16056* 16058* 16060* 16062* 16064* 16066* 16068* 16070* 16072* 16074* 16076* 16078* 16080* 16082* 16084* 16086* 16088* 16090* 16092* 16094* 16096* 16098* 16100* 16102* 16104* 16106* 16108* 16110* 16112* 16114* 16116* 16118* 16120* 16122* 16124* 16126* 16128* 16130* 16132* 16134* 16136* 16138* 16140* 16141* 16142* 16144* 16146* 16148* 16149* 16151* 16152* 16153* 16155* 16156* 16158* 16160* 16162* 16164* 16166* 16168* 16170* 16172* 16174* 16176* 16178* 16180* 16182* 16184* 16186* 16188* 16190* 16192* 16194* 16196* 16198* 16200* 16206* 16207* 16208* 16209* 16210* 16212* 16213* 16214* 16216* 16218* 16220* 16222* 16224* 16226* 16228* 16230* 16232* 16234* 16236* 16239* 16242* 16243* 16244* 16245* 16246* 16247* 16248* 16249* 16250* 16251* 16252* 16253* 16254* 16255* 16256* 16257* 16258* 16259* 16260* 16261* 16262* 16263* 16264* 16266* 16267* 16268* 16269* 16270* 16271* 16272* 16273* 16274* 16275* 16276* 16277* 16278* 16279* 16280* 16281* 16282* 16283* 16284* 16285* 16286* 16287* 16288* 16289* 16290* 16291* 16292* 16293* 16294* 16295* 16296* 16297* 16298* 16299* 16300* 16301* 16302* 16303* 16304* 16305* 16306* 16307* 16308* 16309* 16310* 16312* 16314* 16316* 16318* 16320* 16322* 16324* 16326* 16328* 16330* 16332* 16334* 16336* 16338* 16340* 16342* 16344* 16346* 16348* 16350* 16352* 16354* 16356* 16357* 16358* 16360* 16361* 16362* 16364* 16366* 16368* 16370* 16372* 16374* 16376* 16378* 16380* 16382* 16384* 16386* 16388* 16390* 16392* 16394* 16396* 16398* 16400* 16402* 16404* 16406* 16408* 16410* 16412* 16414* 16416* 16418* 16420* 16422* 16424* 16426* 16428* 16430* 16432* 16434* 16436* 16438* 16440* 16442* 16444* 16446* 16448* 16450* 16452* 16454* 16456* 16458* 16460* 16462* 16464* 16466* 16468* 16470* 16472* 16474* 16476* 16478* 16480* 16482* 16484* 16486* 16488* 16490* 16492* 16494* 16496* 16498* 16500* 16502* 16504* 16506* 16508* 16510* 16512* 16514* 16515* 16516* 16518* 16520* 16522* 16524* 16526* 16528* 16530* 16532* 16534* 16536* 16538* 16540* 16542* 16544* 16546* 16548* 16550* 16552* 16554* 16556* 16558* 16560* 16562* 16564* 16566* 16568* 16570* 16572* 16574* 16576* 16578* 16580* 16582* 16584* 16586* 16588* 16590* 16592* 16594* 16596* 16598* 16600* 16602* 16604* 16606* 16608* 16610* 16612* 16614* 16616* 16618* 16620* 16622* 16624* 16626* 16628* 16630* 16632* 16634* 16636* 16638* 16640* 16642* 16644* 16646* 16648* 16650* 16652* 16654* 16656* 16658* 16660* 16662* 16664* 16666* 16668* 16670* 16672* 16674* 16676* 16678* 16680* 16682* 16684* 16686* 16688* 16690* 16692* 16694* 16696* 16698* 16700* 16702* 16704* 16706* 16708* 16710* 16712* 16714* 16716* 16718* 16720* 16722* 16724* 16726* 16728* 16730* 16732* 16734* 16736* 16738* 16740* 16742* 16744* 16746* 16748* 16750* 16752* 16754* 16756* 16758* 16760* 16762* 16764* 16766* 16768* 16770* 16772* 16774* 16776* 16778* 16780* 16782* 16784* 16786* 16788* 16790* 16792* 16794* 16796* 16798* 16800* 16802* 16804* 16806* 16808* 16810* 16812* 16814* 16816* 16818* 16820* 16822* 16824* 16826* 16828* 16830* 16832* 16834* 16836* 16838* 16840* 16842* 16844* 16846* 16848* 16850* 16852* 16854* 16856* 16858* 16860* 16862* 16864* 16866* 16868* 16870* 16872* 16874* 16876* 16878* 16880* 16882* 16884* 16886* 16888* 16890* 16892* 16894* 16896* 16898* 16900* 16902* 16904* 16906* 16908* 16910* 16912* 16914* 16916* 16918* 16920* 16922* 16924* 16926* 16928* 16930* 16932* 16934* 16936* 16938* 16940* 16942* 16944* 16946* 16948* 16950* 16952* 16954* 16956* 16958* 16960* 16962* 16964* 16966* 16968* 16970* 16972* 16974* 16976* 16978* 16980* 16982* 16984* 16986* 16988* 16990* 16992* 16994* 16996* 16998* 17000* 17001* 17002* 17003* 17004* 17005* 17006* 17007* 17008* 17009* 17010* 17011* 17012* 17013* 17014* 17015* 17018* 17020* 17022* 17024* 17026* 17028* 17030* 17032* 17034* 17036* 17038* 17040* 17042* 17044* 17046* 17048* 17050* 17052* 17054* 17056* 17058* 17060* 17062* 17064* 17066* 17068* 17070* 17072* 17074* 17076* 17078* 17080* 17082* 17084* 17086* 17088* 17090* 17092* 17094* 17096* 17098* 17100* 17102* 17104* 17106* 17108* 17110* 17112* 17114* 17116* 17118* 17120* 17122* 17124* 17126* 17128* 17130* 17132* 17134* 17136* 17138* 17140* 17142* 17144* 17146* 17148* 17150* 17152* 17154* 17156* 17158* 17160* 17162* 17164* 17166* 17168* 17170* 17172* 17174* 17176* 17178* 17180* 17182* 17184* 17186* 17188* 17190* 17192* 17194* 17196* 17198* 17200* 17202* 17204* 17206* 17208* 17210* 17212* 17214* 17216* 17218* 17220* 17222* 17224* 17226* 17228* 17230* 17232* 17234* 17236* 17238* 17240* 17242* 17244* 17246* 17248* 17250* 17252* 17254* 17256* 17258* 17260* 17262* 17264* 17266* 17268* 17270* 17272* 17274* 17276* 17278* 17280* 17282* 17284* 17286* 17288* 17290* 17292* 17294* 17296* 17298* 17300* 17302* 17304* 17306* 17308* 17310* 17550* 17552* 17554* 17556* 17558* 17560* 17562* 17564* 17566* 17568* 17570* 17572* 17574* 17576* 17578* 17580* 17582* 17584* 17586* 17588* 17590* 17592* 17594* 17596* 17598* 17600* 17602* 17604* 17606* 17608* 17610* 17612* 17614* 17616* 17618* 17620* 17622* 17624* 17626* 17628* 17630* 17632* 17634* 17636* 17638* 17640* 17642* 17644* 17646* 17648* 17650* 17652* 17654* 17656* 17658* 17660* 17662* 17664* 17666* 17668* 17670* 17672* 17674* 17676* 17678* 17680* 17682* 17684* 17686* 17688* 17690* 17692* 17694* 17696* 17698* 17700* 17702* 17704* 17706* 17708* 17710* 17712* 17714* 17716* 17718* 17720* 17722* 17724* 17726* 17728* 17730* 17732* 17734* 17736* 17738* 17740* 17742* 17744* 17746* 17748* 17750* 17752* 17754* 17756* 17758* 17760* 17762* 17764* 17766* 17768* 17770* 17772* 17774* 17776* 17778* 17780* 17782* 17784* 17786* 17788* 17790* 17792* 17794* 17796* 17798* 17800* 17802* 17804* 17806* 17808* 17810* 17812* 17814* 17816* 17818* 17820* 17822* 17824* 17826* 17828* 17830* 17832* 17834* 17836* 17838* 17840* 17842* 17844* 17846* 17848* 17850* 17852* 17854* 17856* 17858* 17860* 17862* 17864* 17866* 17868* 17870* 17872* 17874* 17876* 17878* 17880* 17882* 17884* 17886* 17888* 17890* 17892* 17894* 17896* 17898* 17900* 17902* 17904* 17906* 17908* 17910* 17912* 17914* 17916* 17918* 17920* 17922* 17924* 17926* 17928* 17930* 17932* 17934* 17936* 17938* 17940* 17942* 17944* 17946* 17948* 17950* 17952* 17954* 17956* 17958* 17960* 17962* 17964* 17966* 17968* 17970* 17972* 17974* 17976* 17978* 17980* 17982* 17984* 17986* 17988* 17990* 17992* 17994* 17996* 17998* 18000* 18002* 18004* 18006* 18008* 18010* 18012* 18014* 18016* 18018* 18020* 18022* 18024* 18026* 18028* 18030* 18032* 18034* 18036* 18038* 18040* 18042* 18044* 18046* 18048* 18050* 18052* 18054* 18056* 18058* 18060* 18062* 18064* 18066* 18068* 18070* 18072* 18074* 18076* 18078* 18080* 18082* 18084* 18086* 18088* 18090* 18092* 18094* 18096* 18098* 18100* 18102* 18104* 18106* 18108* 18110* 18112* 18114* 18116* 18118* 18120* 18122* 18124* 18126* 18128* 18130* 18132* 18134* 18136* 18138* 18140* 18142* 18144* 18146* 18148* 18150* 18152* 18154* 18156* 18158* 18160* 18162* 18164* 18166* 18168* 18170* 18172* 18174* 18176* 18178* 18180* 18182* 18184* 18186* 18188* 18190* 18192* 18194* 18196* 18198* 18200* 18202* 18204* 18206* 18208* 18210* 18212* 18214* 18216* 18218* 18220* 18222* 18224* 18226* 18400* 18402* 18404* 18406* 18408* 18410* 18412* 18413* 18415* 18416* 18417* 18419* 18420* 18422* 18424* 18426* 18428* 18430* 18432* 18434* 18436* 18438* 18440* 18442* 18444* 18446* 18448* 18450* 18452* 18454* 18456* 18458* 18460* 18462* 18464* 18466* 18468* 18470* 18472* 18474* 18476* 18478* 18480* 18482* 18484* 18486* 18488* 18490* 18492* 18494* 18496* 18498* 18500* 18502* 18504* 18506* 18508* 18510* 18512* 18514* 18516* 18518* 18520* 18522* 18524* 18526* 18528* 18530* 18532* 18534* 18536* 18538* 18540* 18542* 18544* 18546* 18548* 18550* 18552* 18554* 18556* 18558* 18578* 18580* 18581* 18583* 18584* 18586* 18588* 18590* 18592* 18594* 18596* 18597* 18598* 18599* 18605* 18607* 18608* 18609* 18610* 18611* 18612* 18613* 18614* 18615* 18616* 18617* 18618* 18619* 18620* 18621* 18622* 18623* 18624* 18625* 18626* 18627* 18628* 18629* 18630* 18631* 18632* 18633* 18634* 18635* 18636* 18637* 18638* 18639* 18640* 18641* 18642* 18643* 18644* 18645* 18646* 18647* 18648* 18649* 18650* 18651* 18652* 18653* 18654* 18655* 18700* </script> </code></pre> <script src="prism.js" data-default-language="markup"></script> </body> </html>
aricsanders/html-examples
HPBASIC_HTML/DMULTI1_04d.html
HTML
gpl-3.0
65,095
#include <stdio.h> #include <stdlib.h> #include <conio.h> int contar1 (int x, int a) { for (a<x; x>a; a++){ if ((a%10)==4) printf ("\n%d", a); } return 0; } int contar2 (int x, int a) { for (a<x; x>a; a++){ if ((a%10)==6) printf ("\n%d", a); } return 0; } int opciones (void) { printf (" M E N U P R I N C I P A L \n\n\n" ); printf ("5. Leer dos números y mostrar todos los números terminados en 4 comprendidos entre ellos. \n"); printf ("9. Mostrar en pantalla todos los números terminados en 6 comprendidos entre 25 y 205. \n"); printf ("0. Salir \n"); } int main (void) { int opc=-1, x=0, a=0; do { system ("cls"); opciones (); // se utiliza la librería stdlib.h, sirve para limpiar la pantalla printf ("Ingrese la opción seleccionada: "); // usa la libreria stdio.h scanf ("%d",&opc); // usa la libreria stdio.h switch (opc) { case 5: printf ("\n Ingrese el primer número : "); // usa la libreria stdio.h scanf ("%d",&x); // usa la libreria stdio.h printf ("\n Ingrese el primer número : "); // usa la libreria stdio.h scanf ("%d",&a); printf ("Los numeros terminados en 4 entre %d y %d son : \n", x, a); // usa la libreria stdio.h if (a>x) contar1 (a, x); else contar1 (x, a); getch (); // usa la librería conio.h break; case 9: x=205; a=25; // usa la libreria stdio.h printf ("Los numeros terminados en 6 entre %d y %d son : \n", a, x); contar2 (x, a); getch (); // usa la librería conio.h break; case 0: // getch(); break; } } while (opc != 0); printf ("Gracias por utilizar nuestro sistemas, Adios "); // usa la libreria stdio.h getch(); // usa la librería conio.h }
andbet050197/IS284UTP
taller1condyciclos/puntos 5 y 9 ciclos-for.cpp
C++
gpl-3.0
2,532
#!/usr/bin/env bash # # Safe way of propagating the exit code of all commands through the script. # Without this line, commands could fail/exit 1 and the script itself would # complete and exit with code 0. # set -e yarn install node_modules/.bin/lerna run build --concurrency 1 echo "Please remember to set frontendDevelopmentMode to true in your Settings.yaml." echo "" echo "Neos:" echo " Neos:" echo " Ui:" echo " frontendDevelopmentMode: true" NEOS_BUILD_ROOT=$(pwd) node_modules/.bin/webpack --progress --colors --watch-poll --watch
mstruebing/PackageFactory.Guevara
Build/Docker/run.sh
Shell
gpl-3.0
552
#include <QObject> #include <QtTest/QtTest> #include <QDateTime> #include <QVariant> #include <QVariantMap> #include <QVariantList> #include "samuraiitemizedentriesgetresponse.h" namespace tests { class SamuraiItemizedEntriesGetResponseTest : public QObject { Q_OBJECT private slots: void testGet(); }; void SamuraiItemizedEntriesGetResponseTest::testGet() { double totalExcludingVat1 = 0.26; double totalIncludingVat1 = 3.545; double vatAmount1 = 0.5665; double vatPercent1 = 1.546; double totalExcludingVat2 = 0.465; double totalIncludingVat2 = 3.5; double vatAmount2 = 0.999; double vatPercent2 = 5.546; double totalExcludingVat3 = 60.26; double totalIncludingVat3 = 43.545; double vatAmount3 = 40.5665; double vatPercent3 = 41.546; QVariantMap price; price.insert("TotalExcludingVat", QVariant(totalExcludingVat1)); price.insert("TotalIncludingVat", QVariant(totalIncludingVat1)); price.insert("VatAmount", QVariant(vatAmount1)); price.insert("VatPercent", QVariant(vatPercent1)); price.insert("Currency", QString("EUR")); QVariantMap setupFee; setupFee.insert("TotalExcludingVat", QVariant(totalExcludingVat2)); setupFee.insert("TotalIncludingVat", QVariant(totalIncludingVat2)); setupFee.insert("VatAmount", QVariant(vatAmount2)); setupFee.insert("VatPercent", QVariant(vatPercent2)); setupFee.insert("Currency", QString("AUD")); QVariantMap pricePerUnit; pricePerUnit.insert("TotalExcludingVat", QVariant(totalExcludingVat3)); pricePerUnit.insert("TotalIncludingVat", QVariant(totalIncludingVat3)); pricePerUnit.insert("VatAmount", QVariant(vatAmount3)); pricePerUnit.insert("VatPercent", QVariant(vatPercent3)); pricePerUnit.insert("Currency", QString("USD")); QDateTime timestamp(QDate::currentDate()); QVariantMap map; map.insert("Timestamp", QVariant(timestamp)); map.insert("SourceUri", QVariant("uriFoo")); map.insert("TargetUri", QVariant("targetFoo")); map.insert("Price", QVariant(price)); map.insert("SetupFee", QVariant(setupFee)); map.insert("PricePerUnit", QVariant(pricePerUnit)); map.insert("TicksA", QVariant(23)); map.insert("TicksB", QVariant(42)); map.insert("UnitsCharged", QVariant(65)); map.insert("TariffName", QVariant("Tariff")); map.insert("Duration", QVariant(222)); map.insert("TOS", QVariant("aTOS")); QVariantList list; list.append(QVariant(map)); QDateTime periodStart(QDate(2013,1,1)); QDateTime periodEnd(QDate(2013,1,5)); QVariant entries(list); QVariant start(periodStart); QVariant end(periodEnd); qsipgaterpclib::SamuraiItemizedEntriesGetResponse response(start, end, entries); QCOMPARE(response.getPeriodStart(), periodStart); QCOMPARE(response.getPeriodEnd(), periodEnd); QList<QList<QVariant> > entrieList = response.getItemizedEntries(); QCOMPARE(entrieList.count(), 1); QList<QVariant> line = entrieList.at(0); QCOMPARE(line.at(0), QVariant(timestamp)); QCOMPARE(line.at(1), QVariant("uriFoo")); QCOMPARE(line.at(2), QVariant("targetFoo")); QCOMPARE(line.at(3), QVariant(totalExcludingVat1)); QCOMPARE(line.at(4), QVariant(totalIncludingVat1)); QCOMPARE(line.at(5), QVariant(vatAmount1)); QCOMPARE(line.at(6), QVariant(vatPercent1)); QCOMPARE(line.at(7), QVariant("EUR")); QCOMPARE(line.at(8), QVariant(totalExcludingVat2)); QCOMPARE(line.at(9), QVariant(totalIncludingVat2)); QCOMPARE(line.at(10), QVariant(vatAmount2)); QCOMPARE(line.at(11), QVariant(vatPercent2)); QCOMPARE(line.at(12), QVariant("AUD")); QCOMPARE(line.at(13), QVariant(totalExcludingVat3)); QCOMPARE(line.at(14), QVariant(totalIncludingVat3)); QCOMPARE(line.at(15), QVariant(vatAmount3)); QCOMPARE(line.at(16), QVariant(vatPercent3)); QCOMPARE(line.at(17), QVariant("USD")); QCOMPARE(line.at(18), QVariant(23)); QCOMPARE(line.at(19), QVariant(42)); QCOMPARE(line.at(20), QVariant(65)); QCOMPARE(line.at(21), QVariant("Tariff")); QCOMPARE(line.at(22), QVariant(222)); QCOMPARE(line.at(23), QVariant("aTOS")); } } QTEST_MAIN(tests::SamuraiItemizedEntriesGetResponseTest) #include "moc_samuraiitemizedentriesgetresponsetest.cxx"
Bjoe/qsipgaterpclib
tests/samuraiitemizedentriesgetresponsetest.cpp
C++
gpl-3.0
4,309
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>isCached()</title> <meta name="generator" content="DocBook XSL Stylesheets V1.75.2"> <link rel="home" href="index.html" title="Smarty 3 Manual"> <link rel="up" href="api.functions.html" title="Chapter 14. Smarty Class Methods"> <link rel="prev" href="api.get.template.vars.html" title="getTemplateVars()"> <link rel="next" href="api.load.filter.html" title="loadFilter()"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr><th colspan="3" align="center">isCached()</th></tr> <tr> <td width="20%" align="left"> <a accesskey="p" href="api.get.template.vars.html">Prev</a> </td> <th width="60%" align="center">Chapter 14. Smarty Class Methods</th> <td width="20%" align="right"> <a accesskey="n" href="api.load.filter.html">Next</a> </td> </tr> </table> <hr> </div> <div class="refentry" title="isCached()"> <a name="api.is.cached"></a><div class="titlepage"></div> <div class="refnamediv"> <h2>Name</h2> <p>isCached() — returns true if there is a valid cache for this template</p> </div> <div class="refsect1" title="Description"> <a name="id435350"></a><h2>Description</h2> <code class="methodsynopsis"><span class="type">bool </span><span class="methodname">isCached</span>(<span class="methodparam"><span class="type">string </span><span class="parameter">template</span></span>,<br>              <span class="methodparam"><span class="type">string </span><span class="parameter">cache_id</span></span>,<br>              <span class="methodparam"><span class="type">string </span><span class="parameter">compile_id</span></span>);</code><div class="itemizedlist"><ul class="itemizedlist" type="disc"> <li class="listitem"><p> This only works if <a class="link" href="variable.caching.html" title="$caching"> <em class="parameter"><code>$caching</code></em></a> is set to one of <code class="literal">Smarty::CACHING_LIFETIME_CURRENT</code> or <code class="literal">Smarty::CACHING_LIFETIME_SAVED</code> to enable caching. See the <a class="link" href="caching.html" title="Chapter 15. Caching">caching section</a> for more info. </p></li> <li class="listitem"><p> You can also pass a <em class="parameter"><code>$cache_id</code></em> as an optional second parameter in case you want <a class="link" href="caching.multiple.caches.html" title="Multiple Caches Per Page">multiple caches</a> for the given template. </p></li> <li class="listitem"><p> You can supply a <a class="link" href="variable.compile.id.html" title="$compile_id"><em class="parameter"><code>$compile id</code></em></a> as an optional third parameter. If you omit that parameter the persistent <a class="link" href="variable.compile.id.html" title="$compile_id"> <em class="parameter"><code>$compile_id</code></em></a> is used if its set. </p></li> <li class="listitem"><p> If you do not want to pass a <em class="parameter"><code>$cache_id</code></em> but want to pass a <a class="link" href="variable.compile.id.html" title="$compile_id"> <em class="parameter"><code>$compile_id</code></em></a> you have to pass <code class="constant">NULL</code> as a <em class="parameter"><code>$cache_id</code></em>. </p></li> </ul></div> <div class="note" title="Technical Note" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">Technical Note</h3> <p> If <code class="varname">isCached()</code> returns <code class="constant">TRUE</code> it actually loads the cached output and stores it internally. Any subsequent call to <a class="link" href="api.display.html" title="display()"><code class="varname">display()</code></a> or <a class="link" href="api.fetch.html" title="fetch()"><code class="varname">fetch()</code></a> will return this internally stored output and does not try to reload the cache file. This prevents a race condition that may occur when a second process clears the cache between the calls to <code class="varname">isCached()</code> and to <a class="link" href="api.display.html" title="display()"><code class="varname">display()</code></a> in the example above. This also means calls to <a class="link" href="api.clear.cache.html" title="clearCache()"><code class="varname">clearCache()</code></a> and other changes of the cache-settings may have no effect after <code class="varname">isCached()</code> returned <code class="constant">TRUE</code>. </p> </div> <div class="example"> <a name="id435849"></a><p class="title"><b>Example 14.32. isCached()</b></p> <div class="example-contents"><pre class="programlisting"> &lt;?php $smarty-&gt;setCaching(Smarty::CACHING_LIFETIME_CURRENT); if(!$smarty-&gt;isCached('index.tpl')) { // do database calls, assign vars here } $smarty-&gt;display('index.tpl'); ?&gt; </pre></div> </div> <br class="example-break"><div class="example"> <a name="id435867"></a><p class="title"><b>Example 14.33. isCached() with multiple-cache template</b></p> <div class="example-contents"><pre class="programlisting"> &lt;?php $smarty-&gt;setCaching(Smarty::CACHING_LIFETIME_CURRENT); if(!$smarty-&gt;isCached('index.tpl', 'FrontPage')) { // do database calls, assign vars here } $smarty-&gt;display('index.tpl', 'FrontPage'); ?&gt; </pre></div> </div> <br class="example-break"><p> See also <a class="link" href="api.clear.cache.html" title="clearCache()"><code class="varname">clearCache()</code></a>, <a class="link" href="api.clear.all.cache.html" title="clearAllCache()"><code class="varname">clearAllCache()</code></a>, and <a class="link" href="caching.html" title="Chapter 15. Caching">caching section</a>. </p> </div> </div> <div class="navfooter"> <hr> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"> <a accesskey="p" href="api.get.template.vars.html">Prev</a> </td> <td width="20%" align="center"><a accesskey="u" href="api.functions.html">Up</a></td> <td width="40%" align="right"> <a accesskey="n" href="api.load.filter.html">Next</a> </td> </tr> <tr> <td width="40%" align="left" valign="top">getTemplateVars() </td> <td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td> <td width="40%" align="right" valign="top"> loadFilter()</td> </tr> </table> </div> </body> </html>
HansBartelmess/WochenberichteOnline
contrib/Smarty/docs/api.is.cached.html
HTML
gpl-3.0
6,598
<?php /** * Copyright 2008, Jefferson González (JegoYalu.com) * This file is part of Jaris CMS and licensed under the GPL, * check the LICENSE.txt file for version and details or visit * https://opensource.org/licenses/GPL-3.0. */ //For security the file content is skipped from the world eyes :) exit; ?> row: 0 field: title Javascript code to facilitate parts addition to engines. field; field: content //<script> question_id = 1; question_label = "<?php print t("Question") ?>"; answer_label = "<?php print t("Answer") ?>"; function add_question(question, answer) { var question_value=""; var answer_value=""; if(question) question_value = 'value="'+question+'"'; if(answer) answer_value = answer; row = '<tr style="width: 100%; border-bottom: solid 1px #d3d3d3; margin-bottom: 15px;" id="question-' + question_id + '">'; row += '<td><a class="sort-handle"></a></td>'; row += '<td style="width: auto">'; row += '<div style="padding-top: 7px; margin-bottom: 3px;"><input style="width: 90%;" placeholder="'+question_label+'" type="text" name="question_title[' + question_id + ']" '+question_value+' /></div>'; row += '<div style="padding-bottom: 7px;"><textarea id="answer-'+question_id+'" style="width: 90%;" placeholder="'+answer_label+'" name="question_answer[' + question_id + ']">'+answer_value+'</textarea></div>'; row += '</td>'; row += "<td style=\"width: auto; text-align: center; vertical-align: center;\">"; row += "<a href=\"javascript:remove_question(" + question_id + ")\">X</a>"; row += "</td>"; row += "</tr>"; $("#questions-table > tbody").append($(row)); if(typeof whizzywig == "object") { whizzywig.makeWhizzyWig("answer-"+question_id, "all"); } <?php if (Jaris\Modules::isInstalled("ckeditor")) { ?> else if(typeof CKEDITOR == "object") { <?php $uicolor = unserialize(Jaris\Settings::get("uicolor", "ckeditor")); $plugins = unserialize(Jaris\Settings::get("plugins", "ckeditor")); if (!is_array($uicolor)) { $uicolor = []; } if (empty($uicolor[Jaris\Authentication::currentUserGroup()])) { $uicolor[Jaris\Authentication::currentUserGroup()] = "FFFFFF"; } if ( empty($plugins[Jaris\Authentication::currentUserGroup()]) && !is_array($plugins[Jaris\Authentication::currentUserGroup()]) ) { $plugins[Jaris\Authentication::currentUserGroup()] = [ "quicktable", "youtube", "codemirror" ]; } $lang = ""; if (Jaris\Language::getCurrent() == "es") { $lang .= "language: 'es',"; } $editor_image_browser = Jaris\Uri::url( Jaris\Modules::getPageUri("ckeditorpic", "ckeditor"), ["uri" => $_REQUEST["uri"]] ); $editor_image_uploader = Jaris\Uri::url( Jaris\Modules::getPageUri("ckeditorpicup", "ckeditor"), ["uri" => $_REQUEST["uri"]] ); $editor_link_browser = Jaris\Uri::url( Jaris\Modules::getPageUri("ckeditorlink", "ckeditor"), ["uri" => $_REQUEST["uri"]] ); $editor_link_uploader = Jaris\Uri::url( Jaris\Modules::getPageUri("ckeditorlinkup", "ckeditor"), ["uri" => $_REQUEST["uri"]] ); $editor_config = Jaris\Uri::url( Jaris\Modules::getPageUri("ckeditorconfig", "ckeditor"), ["group" => Jaris\Authentication::currentUserGroup()] ); $interface_color = $uicolor[Jaris\Authentication::currentUserGroup()]; $plugins_list = implode(",", $plugins[Jaris\Authentication::currentUserGroup()]); $codemirror = in_array("codemirror", $plugins[Jaris\Authentication::currentUserGroup()]) ? "codemirror: {mode: 'application/x-httpd-php', theme: 'monokai'}," : "" ; echo "CKEDITOR.replace('answer-'+question_id, {" . "customConfig: '$editor_config'," . "uiColor: '#$interface_color'," . "filebrowserBrowseUrl: '$editor_link_browser'," . "filebrowserImageBrowseUrl: '$editor_image_browser'," . "filebrowserUploadUrl: '$editor_link_uploader'," . "filebrowserImageUploadUrl: '$editor_image_uploader'," . "extraPlugins: '$plugins_list'," . "codemirror: {mode: 'application/x-httpd-php', theme: 'monokai'}," . "$codemirror" . "$lang" . "});" ; ?> } <?php } ?> question_id++; } function remove_question(id) { $("#question-" + id).fadeOut("slow", function(){ $(this).remove(); }); } //</script> field; field: rendering_mode javascript field; field: is_system 1 field; row;
jegoyalu/jariscms
modules/faq/data/js-faq-add_question.php
PHP
gpl-3.0
5,571
<?php session_start(); $root = substr($_SERVER["DOCUMENT_ROOT"], 0, -1); require_once("$root/Class/XlsExport.php"); require_once("$root/Class/Net.php"); $FileName = "tmp/RollOut_WIN7_RITIRI_FIL_" . $_SESSION['rollout']['cod_fil'] . ".xls"; $x = new XlsExport($FileName, "mail"); $x->xlsWriteLabel(0, 0, "Branch Code:"); $x->xlsWriteLabel(0, 1, $_SESSION['rollout']['cod_fil']); $x->xlsWriteLabel(1, 0, "N:"); $x->xlsWriteLabel(1, 1, "Tipologia Apparato:"); $x->xlsWriteLabel(1, 2, "Marca:"); $x->xlsWriteLabel(1, 3, "Modello:"); $x->xlsWriteLabel(1, 4, "Serial Number:"); $x->xlsWriteLabel(1, 5, "Asset:"); $xlsRow = 2; foreach ($_SESSION['rollout']['dettaglio'] as $key => $field) { if (($field['provenienza'] == "DA FILIALE") && ($field['tipo_mch'] != "Server")) { $x->xlsWriteLabel ($xlsRow, 0, $xlsRow-1 . ")"); $x->xlsWriteLabel ($xlsRow, 1, $field['tipo_mch']); $x->xlsWriteLabel ($xlsRow, 2, $field['marca']); $x->xlsWriteLabel ($xlsRow, 3, $field['modello']); $x->xlsWriteLabel ($xlsRow, 4, $field['serial']); $x->xlsWriteLabel ($xlsRow, 5, $field['asset']); $xlsRow++; } } $x->WriteFile(); //'to' => 'UGIS - IT - ROLLOUT EUROPC - UniCredit Group - UniCredit Group <USIROLEURUNIGROUP.ugis@unicreditgroup.eu>', //'cc' => 'Leonardi Giorgio (UGIS) <Giorgio.Leonardi@unicreditgroup.eu>, Vesentini Doriana (UGIS) <Doriana.Vesentini@unicreditgroup.eu>', $MailData = array('from' => $_SESSION['rollout']['rol_mail'], 'to' => 'Claudio Giordano <claudio.giordano@autistici.org>', // test //'to' => 'ugis.rollout@ts.fujitsu.com', //'ccn' => 'Claudio Giordano <claudio.giordano@autistici.org>, Sun Informatica <commerciale@suninformatica.it>', 'subject' => 'RollOut Win7 - Elenco Apparecchiature da Ritirare - Fil. ' . $_SESSION['rollout']['cod_fil'], 'body' => "In allegato l'elenco delle apparecchiature ritirate per la filiale in oggetto.", 'att' => $FileName); //DirectSendMail2($MailData, "smtp.tiscali.it"); $Status = $d->UpdateRow (array('id_stato' => 7), "", "tab_filiali", "cod_fil = '" . $_SESSION['rollout']['cod_fil'] . "'"); ?> <script type="text/javascript"> alert("Elenco macchine ritirate inviato correttamente."); window.close(); </script>
clagiordano/weblibs
forms/frm_mail_ritiri_rollout.php
PHP
gpl-3.0
2,292
/** * Graphical user interface of GeoLing. * * @author Institute of Stochastics, Ulm University */ package geoling.gui;
stochastics-ulm-university/GeoLing
src/geoling/gui/package-info.java
Java
gpl-3.0
124
package main // #include <stdlib.h> // #include <locale.h> import "C" import ( "os" "path/filepath" "runtime" "unsafe" ) const LC_NUMERIC = int(C.LC_NUMERIC) // setLocale sets locale func setLocale(lc int, locale string) { l := C.CString(locale) defer C.free(unsafe.Pointer(l)) C.setlocale(C.int(lc), l) } // inSlice checks if string is in slice func inSlice(a string, b []string) bool { for _, i := range b { if a == i { return true } } return false } // homeDir returns user home directory func homeDir() string { if runtime.GOOS == "windows" { home := os.Getenv("HOMEDRIVE") + os.Getenv("HOMEPATH") if home == "" { home = os.Getenv("USERPROFILE") } return home } return os.Getenv("HOME") } // cacheDir returns cache directory func cacheDir() string { dir := os.Getenv("XDG_CACHE_HOME") if dir == "" { dir = filepath.Join(homeDir(), ".cache", "bukanir") } else { dir = filepath.Join(dir, "bukanir") } return dir }
gen2brain/bukanir
desktop/func.go
GO
gpl-3.0
963
/* * Copyright 2010 Pablo Arrighi, Alex Concha, Miguel Lezama for version 1. * Copyright 2013 Pablo Arrighi, Miguel Lezama, Kevin Mazet for version 2. * * This file is part of GOOL. * * GOOL 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. * * GOOL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License version 3 for more details. * * You should have received a copy of the GNU General Public License along with GOOL, * in the file COPYING.txt. If not, see <http://www.gnu.org/licenses/>. */ package gool.generator.csharp; import gool.Settings; import gool.executor.common.SpecificCompiler; import gool.executor.csharp.CSharpCompiler; import gool.generator.common.CodePrinter; import gool.generator.common.Platform; import java.io.File; import java.util.ArrayList; import java.util.Collection; public final class CSharpPlatform extends Platform { private final String outputDir = Settings.get("csharp_out_dir"); private CSharpPlatform(Collection<File> myFile) { super("CSHARP", myFile); } @Override protected CodePrinter initializeCodeWriter() { // TODO a voir pour passer la liste des fichiers return new CSharpCodePrinter(new File(outputDir), myFileToCopy); } @Override protected SpecificCompiler initializeCompiler() { return new CSharpCompiler(new File(outputDir), new ArrayList<File>()); } private static CSharpPlatform instance = new CSharpPlatform(myFileToCopy); public static CSharpPlatform getInstance(Collection<File> myF) { myFileToCopy = myF; return instance; } public static CSharpPlatform getInstance() { if (myFileToCopy == null) { myFileToCopy = new ArrayList<File>(); } return instance; } public static void newInstance() { instance = new CSharpPlatform(myFileToCopy); } }
librecoop/GOOL
src/gool/generator/csharp/CSharpPlatform.java
Java
gpl-3.0
2,031
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-04-15 14:28 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('catalogue', '0014_auto_20170414_0845'), ] operations = [ migrations.AlterField( model_name='jeux', name='image', field=models.ImageField(null=True, upload_to='photos_jeux/', verbose_name='Image'), ), ]
Gatomlo/shareandplay
catalogue/migrations/0015_auto_20170415_1628.py
Python
gpl-3.0
495
#!/usr/bin/env python import os import random __author__ = 'duceppemo' class SnpTableMaker(object): """ Everything is ran inside the class because data structures have to be shared across parent and child process during multi threading """ def __init__(self, args): import os import sys import glob import multiprocessing # Define variables based on supplied arguments self.args = args self.ref = args.ref if not os.path.isfile(self.ref): sys.exit('Supplied reference genome file does not exists.') self.vcf = args.vcf if not os.path.isdir(self.vcf): sys.exit('Supplied VCF folder does not exists.') self.minQUAL = args.minQUAL if not isinstance(self.minQUAL, (int, long)): sys.exit('minQual value must be an integer') self.ac1_report = args.ac1 self.section4 = args.section4 self.output = args.output if not os.path.isdir(self.output): os.makedirs(self.output) self.table = args.table # number of threads to use = number of cpu self.cpus = int(multiprocessing.cpu_count()) # create dictionaries to hold data self.refgenome = dict() self.vcfs = dict() self.ac1s = dict() self.ac2s = dict() self.allac2 = dict() self.finalac1 = dict() self.fastas = dict() self.counts = dict() self.informative_pos = dict() # create a list of vcf files in vcfFolder self.vcfList = list() for filename in glob.glob(os.path.join(self.vcf, '*.vcf')): self.vcfList.append(filename) # run the script self.snp_table_maker() def snp_table_maker(self): self.parse_ref() self.parse_vcf() self.find_ac1_in_ac2() self.write_ac1_report() self.get_allele_values() self.get_informative_snps() self.count_snps() self.write_fasta() self.write_root() self.write_snp_table() def parse_ref(self): from Bio import SeqIO print ' Parsing reference genome' fh = open(self.ref, "rU") self.refgenome = SeqIO.to_dict(SeqIO.parse(fh, "fasta")) fh.close() def parse_vcf(self): import sys print ' Parsing VCF files' for samplefile in self.vcfList: sample = os.path.basename(samplefile).split('.')[0] # get what's before the first dot self.vcfs[sample] = dict() with open(samplefile, 'r') as f: # open file for line in f: # read file line by line line = line.rstrip() # chomp -> remove trailing whitespace characters if line: # skip blank lines or lines with only whitespaces if line.startswith('##'): # skip comment lines continue elif line.startswith('#CHROM'): sample_name = line.split("\t")[9] if sample_name != sample: sys.exit('File name and sample name inside VCF file are different: %s' % samplefile) else: # chrom, pos, alt, qual = [line.split()[i] for i in (0, 1, 4, 5)] chrom = line.split()[0] pos = int(line.split()[1]) alt = line.split()[4] qual = line.split()[5] # string -> needs to be converted to integer if qual != '.': try: qual = float(qual) except ValueError: qual = int(qual) else: continue # skip line ac = line.split()[7].split(';')[0] # http://www.saltycrane.com/blog/2010/02/python-setdefault-example/ self.vcfs.setdefault(sample, {}).setdefault(chrom, {}).setdefault(pos, [])\ .append(alt) if ac == 'AC=1' and qual > self.args.minQUAL: self.ac1s.setdefault(sample, {}).setdefault(chrom, []).append(pos) elif ac == 'AC=2' and qual > self.args.minQUAL: self.ac2s.setdefault(sample, {}).setdefault(chrom, []).append(pos) # This is equivalent, but faster? try: if pos not in self.allac2[chrom]: # only add is not already present self.allac2.setdefault(chrom, []).append(pos) except KeyError: # chromosome does not exist in dictionary self.allac2.setdefault(chrom, []).append(pos) # This works # if chrom in self.allac2: # if pos in self.allac2[chrom]: # pass # else: # self.allac2.setdefault(chrom, []).append(pos) # else: # self.allac2.setdefault(chrom, []) def find_ac1_in_ac2(self): print ' Finding AC=1/AC=2 positions' if isinstance(self.ac1s, dict): # check if it's a dict before using .iteritems() for sample, chromosomes in self.ac1s.iteritems(): if isinstance(chromosomes, dict): # check for dict for chrom, positions in chromosomes.iteritems(): if isinstance(positions, list): # check for list for pos in positions: if pos in self.allac2[chrom]: # check ac1 in ac2 self.finalac1.setdefault(sample, {}).setdefault(chrom, []).append(pos) def write_ac1_report(self): print " Writing AC=1/AC=2 report to file" # free up resources not needed anymore self.ac1s.clear() fh = open(self.ac1_report, 'w') if isinstance(self.finalac1, dict): for sample, chromosomes in sorted(self.finalac1.iteritems()): if isinstance(chromosomes, dict): for chrom, positions in sorted(chromosomes.iteritems()): if isinstance(positions, list): fh.write("{}\nAC=1 is also found in AC=2 in chromosome {}".format(sample, chrom) + " at position(s): " + ', '.join(map(str, positions)) + "\n\n") fh.close() def get_allele_values(self): print ' Getting allele values' for sample in self.ac2s: for chrom in self.ac2s[sample]: for pos in self.allac2[chrom]: # if in AC=2 for that sample if pos in self.ac2s[sample][chrom]: allele = ''.join(self.vcfs[sample][chrom][pos]) # convert list to string else: try: # use a try here because some samples are not in finalac1 # if in AC=1 for that sample, but also in AC=2 in other sample if pos in self.finalac1[sample][chrom]: allele = ''.join(self.vcfs[sample][chrom][pos]) # convert list to string else: allele = self.refgenome[chrom].seq[pos - 1] except KeyError: allele = self.refgenome[chrom].seq[pos - 1] self.fastas.setdefault(sample, {}).setdefault(chrom, {}).setdefault(pos, []).append(allele) # Track all alleles for each position try: if allele not in self.counts[chrom][pos]: self.counts.setdefault(chrom, {}).setdefault(pos, []).append(allele) except KeyError: self.counts.setdefault(chrom, {}).setdefault(pos, []).append(allele) def get_informative_snps(self): """SNPs position that have at least one different ALT allele within all the samples""" print ' Getting informative SNPs' # free up resources not needed anymore self.ac2s.clear() self.allac2.clear() self.finalac1.clear() # need to get the positions in the same order for all the sample (sort chrom and pos) for sample in self.fastas: for chrom in sorted(self.fastas[sample]): for pos in sorted(self.fastas[sample][chrom]): if len(self.counts[chrom][pos]) > 1: # if more that one ALT allele, keep it allele = ''.join(self.fastas[sample][chrom][pos]) # convert list to string # check if allele is empty if allele: self.informative_pos.setdefault(sample, {}).setdefault(chrom, {})\ .setdefault(pos, []).append(''.join(allele)) else: print "No allele infor for {}, {}:{}".format(sample, chrom, pos) def count_snps(self): print ' Counting SNPs' # free up resources not needed anymore self.counts.clear() # All samples should have the same number of informative SNPs # so any can be used to get the stats randomsample = random.choice(self.informative_pos.keys()) filteredcount = 0 informativecount = 0 # Account for multiple chromosome for chrom in self.fastas[randomsample]: filteredcount += len(self.fastas[randomsample][chrom]) # number of positions informativecount += len(self.informative_pos[randomsample][chrom]) # print to screen print "\nTotal filtered SNPs: {}".format(filteredcount) print "Total informative SNPs: {}\n".format(informativecount) # write to file fh = open(self.section4, "a") # append mode fh.write("Total filtered SNPs: {}\n".format(filteredcount)) fh.write("Total informative SNPs: {}\n\n".format(informativecount)) fh.close() def write_fasta(self): print ' Writing sample fasta files' # free up resources not needed anymore self.fastas.clear() # Create output folder for fasta files if not os.path.exists(self.output): os.makedirs(self.output) if isinstance(self.informative_pos, dict): for sample, chromosomes in sorted(self.informative_pos.iteritems()): samplepath = os.path.join(self.output, sample + '.fas') fh = open(samplepath, 'w') fh.write(">{}\n".format(sample)) if isinstance(chromosomes, dict): for chrom, positions in sorted(chromosomes.iteritems()): if isinstance(positions, dict): for pos, allele in sorted(positions.iteritems()): if isinstance(allele, list): fh.write(''.join(allele)) # convert list to text fh.write("\n") def write_root(self): print ' Writing root fasta file' rootpath = os.path.join(self.output, 'root.fas') randomsample = random.choice(self.informative_pos.keys()) rootseq = list() fh = open(rootpath, 'w') if isinstance(self.informative_pos, dict): for chrom in self.informative_pos[randomsample]: for pos in sorted(self.informative_pos[randomsample][chrom]): rootseq.append(self.refgenome[chrom].seq[pos - 1]) fh.write(">root\n" + "{}\n".format(''.join(rootseq))) def write_snp_table(self): print ' Writing SNP table' fh = open(self.table, 'w') randomsample = random.choice(self.informative_pos.keys()) ref_pos = list() ref_call = list() # reference if isinstance(self.informative_pos, dict): for chrom in self.informative_pos[randomsample]: for pos in sorted(self.informative_pos[randomsample][chrom]): ref_pos.append(''.join(chrom) + '-' + str(pos)) ref_call.append(self.refgenome[chrom].seq[pos - 1]) fh.write("reference_pos\t{}\n".format("\t".join(ref_pos))) fh.write("reference_call\t{}\n".format("\t".join(ref_call))) # sample if isinstance(self.informative_pos, dict): for sample, chromosomes in self.informative_pos.iteritems(): fh.write("{}".format(sample)) if isinstance(chromosomes, dict): for chrom, positions in sorted(chromosomes.iteritems()): if isinstance(positions, dict): for pos, allele in sorted(positions.iteritems()): if isinstance(allele, list): allele = ''.join(allele) # convert list to text fh.write("\t{}".format(allele)) fh.write("\n") fh.close() if __name__ == '__main__': from argparse import ArgumentParser parser = ArgumentParser(description='Generate SNP table and aligned fasta files from VCF files') parser.add_argument('-r', '--ref', metavar='ref.fasta', required=True, help='reference genome used in the VCF files') parser.add_argument('-v', '--vcf', metavar='vcfFolder', required=True, help='location of the VCF files') parser.add_argument('-q', '--minQUAL', metavar='minQUAL', type=int, required=True, help='minimum QUAL value in VCF file') parser.add_argument('-ac1', '--ac1', metavar='AC1Report.txt', required=True, help='output file where positions having both AC=1 and AC=2 are reported') parser.add_argument('-s4', '--section4', metavar='section4.txt', required=True, help='output file where total filtered SNP positions and total informative SNPs are reported') parser.add_argument('-o', '--output', metavar='fastaOutFolder', required=True, help='folder where the output fasta files will be output') parser.add_argument('-t', '--table', metavar='fastaTable.tsv', required=True, help='the SNP table') # Get the arguments into an object arguments = parser.parse_args() SnpTableMaker(arguments)
OLF-Bioinformatics/snp_analysis
binaries/snpTableMaker.py
Python
gpl-3.0
15,587
#region License /* Copyright 2014 - 2015 Nikita Bernthaler MappingKey.cs is part of SFXLibrary. SFXLibrary 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. SFXLibrary 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 SFXLibrary. If not, see <http://www.gnu.org/licenses/>. */ #endregion License namespace SFXLibrary.IoCContainer { #region using System; #endregion public class MappingKey { /// <exception cref="ArgumentNullException">The value of 'type' cannot be null. </exception> public MappingKey(Type type, bool singleton, string instanceName) { if (type == null) throw new ArgumentNullException("type"); Type = type; Singleton = singleton; InstanceName = instanceName; } public object Instance { get; set; } public string InstanceName { get; protected set; } public bool Singleton { get; protected set; } public Type Type { get; protected set; } public override bool Equals(object obj) { if (obj == null) return false; var compareTo = obj as MappingKey; if (ReferenceEquals(this, compareTo)) return true; if (compareTo == null) return false; return Type == compareTo.Type && string.Equals(InstanceName, compareTo.InstanceName, StringComparison.InvariantCultureIgnoreCase); } public override int GetHashCode() { unchecked { const int multiplier = 31; var hash = GetType().GetHashCode(); hash = hash*multiplier + Type.GetHashCode(); hash = hash*multiplier + (InstanceName == null ? 0 : InstanceName.GetHashCode()); return hash; } } public override string ToString() { const string format = "{0} ({1}) - hash code: {2}"; return string.Format(format, InstanceName ?? "[null]", Type.FullName, GetHashCode()); } public string ToTraceString() { const string format = "Instance Name: {0} ({1})"; return string.Format(format, InstanceName ?? "[null]", Type.FullName); } } }
Justyyy/LeagueSharp-Dev
SFXLibrary/IoCContainer/MappingKey.cs
C#
gpl-3.0
2,753
<!DOCTYPE html> <html> <head> <meta charset='utf-8'> <meta http-equiv="X-UA-Compatible" content="chrome=1"> <link href='https://fonts.googleapis.com/css?family=Chivo:900' rel='stylesheet' type='text/css'> <link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen"> <link rel="stylesheet" type="text/css" href="stylesheets/github-dark.css" media="screen"> <link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print"> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <title>name index - SIEMME 2016</title> </head> <body> <div id="container"> <div class="inner"> <header> <h1>SIEMME 2016</h1> <h2>The 22th China-Japan Bilateral Symposium on Intelligent Electrophotonic Materials and Molecular Electronics</h2> </header> img here <footer> This page was generated by <a href="https://pages.github.com">GitHub Pages</a>. Tactile theme by <a href="https://twitter.com/jasonlong">Jason Long</a>. </footer> </div> </div> </body> </html>
siemme/siemme.github.com
name_index.html
HTML
gpl-3.0
1,176
#!/bin/bash # This script will install DotStar echo Installing DotStar... echo Exiting all DotStar processes... pkill dotstar echo Copying files... cp ./dist/dotstar usr/bin/
joachimschmidt557/DotStar
DotStar/Package.Linux.Install.sh
Shell
gpl-3.0
175
package mosaic; import java.io.IOException; import java.sql.Types; import app.Request; import app.Site; import db.DBConnection; import db.JDBCColumn; import db.JDBCTable; import db.Options; import db.OrderBy; import db.SectionDef; import db.SectionDef.Type; import db.Select; import db.View; import db.ViewDef; import db.access.RecordOwnerAccessPolicy; import db.column.Column; import social.NewsProvider; public class Reviews extends NewsProvider { private Options m_categories; // -------------------------------------------------------------------------- public Reviews() { super("reviews", "posted a review"); } // -------------------------------------------------------------------------- @Override public String getDescription() { return "Share reviews of anything, including movies, books, plumbers, dentists, etc."; } //-------------------------------------------------------------------------- @Override public void init(DBConnection db) { JDBCTable table_def = new JDBCTable() .add(new JDBCColumn("title", Types.VARCHAR, 60)) .add(new JDBCColumn("categories_id", Types.INTEGER)) .add(new JDBCColumn("review", Types.VARCHAR)) .add(new JDBCColumn("_owner_", "people")); addColumns(table_def); db.getTable("reviews", true).matchColumns(table_def, db); db.createTable("reviews_categories", "text VARCHAR"); m_categories = new Options(new Select("*").from("reviews_categories").orderBy("text"), true, m_site).setAllowEditing(true); m_site.addObjects(m_categories); } //-------------------------------------------------------------------------- @Override public ViewDef _newViewDef(String name, Site site) { if (name.equals("reviews")) return addHooks(new ViewDef(name) .setAccessPolicy(new RecordOwnerAccessPolicy().add().delete().edit().view()) .setDefaultOrderBy("title") .setFormWidth("520px") .setSectionDef(new SectionDef("categories_id", Type.TABS, new OrderBy("categories_id"))) .setRecordName("Review") .setColumnNamesForm(new String[] { "title", "categories_id", "review" }) .setColumnNamesTable(new String[] { "title" }) .setColumn(((Options)site.getObjects("reviews_categories")).newColumn("categories_id").setDisplayName("category")) .setColumn(new Column("coho").setDefaultValue("true").setIsHidden(true)) .setColumn(new Column("family").setDefaultValue("false").setIsHidden(true))); if (name.equals("reviews_categories")) return m_categories.newViewDef(name, site) .setDefaultOrderBy("text") .setDialogModes(View.Mode.ADD_FORM, View.Mode.EDIT_FORM, View.Mode.READ_ONLY_FORM) .setRecordName("Category") .setColumn(new Column("text").setDisplayName("category").setIsRequired(true)); return null; } //-------------------------------------------------------------------------- @Override public void writeItem(int item_id, Request request) throws IOException { String[] row = request.db.readRow(new Select("title,review").from("reviews").whereIdEquals(item_id)); request.writer.h5(row[0]); request.writer.tag("p", row[1]); } }
zenlunatics/mosaic
mosaic/Reviews.java
Java
gpl-3.0
3,085
KERNEL_SOURCE := /lib/modules/$(shell uname -r)/build CPPFLAGS := -I$(KERNEL_SOURCE)/include -D_GNU_SOURCE CFLAGS := -g -Wall -W -Wextra -O2 LDFLAGS := $(CFLAGS) all: fanotify fanotify: fanotify.o fanotify.c: $(KERNEL_SOURCE)/include/linux/fanotify.h fanotify-syscalllib.h clean: rm -f fanotify fanotify.o *.orig *.rej
ashi100sh/Linux_Kernel_Code
Userspace_Fanotify_Other_TestCode/Makefile
Makefile
gpl-3.0
324
<?php # Включаем сессии ob_start(); session_start(); if(!is_file($_SERVER["DOCUMENT_ROOT"].'/system/base.php')) { header('Location: /install/'); } echo ' <head><!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru"> <meta http-equiv="Content-Type" content="application/vnd.wap.xhtml+xml; charset=UTF-8" /> <meta name="description" content="Создай свой сайт на UpCMS.Ru "> <meta name="Keywords" content="cms, upcms, движок, создать сайт, php, mysql, движок для сайта"> <meta name="viewport" content="width=device-width; initial-scale=1."> <link rel="shortcut icon" href="/style/favicon.ico"> <link rel="stylesheet" href="/style/style.css" type="text/css"/> </head> '; include_once $_SERVER["DOCUMENT_ROOT"].'/system/system.php'; // ВРЕМЯ ГЕНЕРАЦИИ СКРИПТА $start_time = microtime(); $start_array = explode(" ",$start_time); $start_time = $start_array[1] + $start_array[0]; if(!$title) $title = 'UpCMS'; echo '<title>UpCMS.Ru | '.$title.'</title>'; echo '<a href="/"><div class="head"><img src="/style/image/logo.png"></div>'; echo '<div class="title">UpCMS.Ru | '.$title.'</div></a>'; if($user){ echo '<table style="width:100%" cellspacing="0" cellpadding="0"><tr> <td style= width:50%;><center><div class="head_p"><a href="/kabinet"><center>Кабинет</div></center></a></td> <td style= width:50%;><div class="head_p2"><a href="/exit"><center>Выход</div></center></a></td> </tr></table>'; }else{ echo '<table style="width:100%" cellspacing="0" cellpadding="0"><tr> <td style= width:50%;><center><div class="head_p"><a href="/auth"><center>Авторизация</div></center></a></td> <td style= width:50%;><div class="head_p2"><a href="/reg"><center>Регистрация</div></center></a></td> </tr></table>'; } if($user){ $mes = $con->query("SELECT * FROM `message` WHERE `komy` = '".$user['id']."' and `readlen` = '0'")->num_rows; if($mes > '0'){ echo '<div class="link"><a href="/mail"><img src="/style/image/index/mes.png"> Новые сообщения : '.$mes.'</a></div>';} $coun_jorn = $con->query('SELECT * FROM `journal` WHERE `id_user` = "'.$user['id'].'" and `read` = "0"')->num_rows; if($coun_jorn > 0){ echo '<div class="link"><a href="/journal"><img src="/style/image/index/journal.png"> Журнал : '.$coun_jorn.'</a></div>'; } } if(!is_file($_SERVER["DOCUMENT_ROOT"].'/system/base.php')) { header('Location: /install/'); } if($user){ $coun_ban = $con->query('SELECT * FROM `ban_list` WHERE `id_user` = "'.$user['id'].'" and `time` > "'.time().'"')->num_rows; if($coun_ban > 0){ $ban = $con->query("SELECT * FROM `ban_list` WHERE `id_user` = '".$user['id']."'")->fetch_assoc(); echo '<div class="link"><center><b>Ошибка!</b></center><b>Вас забанил</b> : '.user($ban['id_adm']).'<br><b>Причина</b> : '.$ban['text'].'<br><b>Осталось</b> : '.data2($ban['time']-time()).'</div>'; exit(); } } ?>
byVER/UpCMS
style/head.php
PHP
gpl-3.0
3,097
div p { font-size: 12px; } div { font-size: 12px font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; } body { font-size: 12px; }
NikiSchlifke/codefactory.wien_week_01
day04/exercises/badcss.css
CSS
gpl-3.0
143
/* * Copyright (c) 2006 - 2010 LinogistiX GmbH * * www.linogistix.com * * Project myWMS-LOS */ package de.linogistix.los.inventory.test; import de.linogistix.los.location.businessservice.LOSRackLocationComparatorByName; import de.linogistix.los.location.model.LOSRackLocation; public class TestRackLocationComparator { /** * @param args */ public static void main(String[] args) { LOSRackLocation rl1 = new LOSRackLocation(); rl1.setName("R4-23-24"); LOSRackLocation rl2 = new LOSRackLocation(); rl2.setName("R1-43-44"); LOSRackLocationComparatorByName comp = new LOSRackLocationComparatorByName(); System.out.println("--- "+comp.compare(rl1, rl2)); } }
tedvals/mywms
server.app/los.inventory-ejb/test/de/linogistix/los/inventory/test/TestRackLocationComparator.java
Java
gpl-3.0
737
#include "stm32f10x_spi.h" #include "FLASH.h" #define FLASH_CHREAD 0x0B #define FLASH_CLREAD 0x03 #define FLASH_PREAD 0xD2 #define FLASH_BUFWRITE1 0x84 // дÈëµÚÒ»»º³åÇø #define FLASH_IDREAD 0x9F #define FLASH_STATUS 0xD7 // ¶Áȡ״̬¼Ä´æÆ÷ #define PAGE_ERASE 0x81 #define PAGE_READ 0xD2 #define MM_PAGE_TO_B1_XFER 0x53 // ½«Ö÷´æ´¢Æ÷µÄÖ¸¶¨Ò³Êý¾Ý¼ÓÔØµ½µÚÒ»»º³åÇø #define BUFFER_2_WRITE 0x87 // дÈëµÚ¶þ»º³åÇø #define B2_TO_MM_PAGE_PROG_WITH_ERASE 0x86 // ½«µÚ¶þ»º³åÇøµÄÊý¾ÝдÈëÖ÷´æ´¢Æ÷£¨²Á³ýģʽ£© #define BUFFER_1_WRITE 0x84 // дÈëµÚÒ»»º³åÇø #define BUFFER_2_WRITE 0x87 // дÈëµÚ¶þ»º³åÇø #define BUFFER_1_READ 0xD4 // ¶ÁÈ¡µÚÒ»»º³åÇø #define BUFFER_2_READ 0xD6 // ¶ÁÈ¡µÚ¶þ»º³åÇø #define B1_TO_MM_PAGE_PROG_WITH_ERASE 0x83 // ½«µÚÒ»»º³åÇøµÄÊý¾ÝдÈëÖ÷´æ´¢Æ÷£¨²Á³ýģʽ£© #define B2_TO_MM_PAGE_PROG_WITH_ERASE 0x86 // ½«µÚ¶þ»º³åÇøµÄÊý¾ÝдÈëÖ÷´æ´¢Æ÷£¨²Á³ýģʽ£© #define MM_PAGE_TO_B1_XFER 0x53 // ½«Ö÷´æ´¢Æ÷µÄÖ¸¶¨Ò³Êý¾Ý¼ÓÔØµ½µÚÒ»»º³åÇø #define MM_PAGE_TO_B2_XFER 0x55 // ½«Ö÷´æ´¢Æ÷µÄÖ¸¶¨Ò³Êý¾Ý¼ÓÔØµ½µÚ¶þ»º³åÇø #define PAGE_ERASE 0x81 // ҳɾ³ý£¨Ã¿Ò³512/528×Ö½Ú£© #define SECTOR_ERASE 0x7C // ÉÈÇø²Á³ý£¨Ã¿ÉÈÇø128K×Ö½Ú£© #define READ_STATE_REGISTER 0xD7 // ¶Áȡ״̬¼Ä´æÆ÷ /* Private typedef -----------------------------------------------------------*/ #define SPI_FLASH_PageSize 0x100 /* Private define ------------------------------------------------------------*/ #define WRITE 0x02 /* Write to Memory instruction */ #define WRSR 0x01 /* Write Status Register instruction */ #define WREN 0x06 /* Write enable instruction */ #define READ 0x03 /* Read from Memory instruction */ #define RDSR 0x05 /* Read Status Register instruction */ #define RDID 0x9F /* Read identification */ #define SE 0xD8 /* Sector Erase instruction */ #define BE 0xC7 /* Bulk Erase instruction */ #define WIP_Flag 0x01 /* Write In Progress (WIP) flag */ #define Dummy_Byte 0xA5 #define SPI_FLASH_CS_LOW() GPIO_ResetBits(GPIOA, GPIO_Pin_4) /* Deselect SPI FLASH: ChipSelect pin high */ #define SPI_FLASH_CS_HIGH() GPIO_SetBits(GPIOA, GPIO_Pin_4) void FlashReadID(u8 *Data) { u8 i; SPI_FLASH_CS_LOW(); SPI_FLASH_SendByte(0x9F); for(i = 0; i < 4; i++) { Data[i] = SPI_FLASH_ReadByte(); } SPI_FLASH_CS_HIGH(); } void W25QXX_Init(void)//SIP³õʼ»¯ { SPI_InitTypeDef SPI_InitStructure; GPIO_InitTypeDef GPIO_InitStructure; RCC_APB2PeriphClockCmd(RCC_APB2Periph_SPI1 ,ENABLE); RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE); RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE); GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; GPIO_Init(GPIOA, &GPIO_InitStructure); GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; GPIO_Init(GPIOA, &GPIO_InitStructure); SPI_FLASH_CS_HIGH(); SPI_InitStructure.SPI_Direction = SPI_Direction_2Lines_FullDuplex; SPI_InitStructure.SPI_Mode = SPI_Mode_Master; SPI_InitStructure.SPI_DataSize = SPI_DataSize_8b; SPI_InitStructure.SPI_CPOL = SPI_CPOL_High; SPI_InitStructure.SPI_CPHA = SPI_CPHA_2Edge; SPI_InitStructure.SPI_NSS = SPI_NSS_Soft; SPI_InitStructure.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_4; SPI_InitStructure.SPI_FirstBit = SPI_FirstBit_MSB; SPI_InitStructure.SPI_CRCPolynomial = 7; SPI_Init(SPI1, &SPI_InitStructure); SPI_Cmd(SPI1, ENABLE); SPI_FLASH_SendByte(0xff); } //¶ÁÒ»¸ö×Ö½Ú u8 SPI_FLASH_ReadByte(void) { return (SPI_FLASH_SendByte(Dummy_Byte)); } //·¢Ò»¸ö×Ö½Ú u8 SPI_FLASH_SendByte(u8 byte) { while (SPI_I2S_GetFlagStatus(SPI1, SPI_I2S_FLAG_TXE) == RESET); /* Send byte through the SPI1 peripheral */ SPI_I2S_SendData(SPI1, byte); /* Wait to receive a byte */ while (SPI_I2S_GetFlagStatus(SPI1, SPI_I2S_FLAG_RXNE) == RESET); /* Return the byte read from the SPI bus */ return SPI_I2S_ReceiveData(SPI1); } //·¢Ð´ÃüÁî void SPI_FLASH_WriteEnable(void) { /* Select the FLASH: Chip Select low */ SPI_FLASH_CS_LOW(); /* Send "Write Enable" instruction */ SPI_FLASH_SendByte(WREN); /* Deselect the FLASH: Chip Select high */ SPI_FLASH_CS_HIGH(); } //²¿·Ö²Á³ý void W25QXX_Erase_Sector(u32 SectorAddr) { /* Send write enable instruction */ SPI_FLASH_WriteEnable(); /* Sector Erase */ /* Select the FLASH: Chip Select low */ SPI_FLASH_CS_LOW(); /* Send Sector Erase instruction */ SPI_FLASH_SendByte(SE); /* Send SectorAddr high nibble address byte */ SPI_FLASH_SendByte((SectorAddr & 0xFF0000) >> 16); /* Send SectorAddr medium nibble address byte */ SPI_FLASH_SendByte((SectorAddr & 0xFF00) >> 8); /* Send SectorAddr low nibble address byte */ SPI_FLASH_SendByte(SectorAddr & 0xFF); /* Deselect the FLASH: Chip Select high */ SPI_FLASH_CS_HIGH(); /* Wait the end of Flash writing */ SPI_FLASH_WaitForWriteEnd(); } void SPI_FLASH_BulkErase(void) { /* Send write enable instruction */ SPI_FLASH_WriteEnable(); /* Bulk Erase */ /* Select the FLASH: Chip Select low */ SPI_FLASH_CS_LOW(); /* Send Bulk Erase instruction */ SPI_FLASH_SendByte(BE); /* Deselect the FLASH: Chip Select high */ SPI_FLASH_CS_HIGH(); /* Wait the end of Flash writing */ SPI_FLASH_WaitForWriteEnd(); } void SPI_FLASH_PageWrite(u8* pBuffer, u32 WriteAddr, u16 NumByteToWrite) { /* Enable the write access to the FLASH */ SPI_FLASH_WriteEnable(); /* Select the FLASH: Chip Select low */ SPI_FLASH_CS_LOW(); /* Send "Write to Memory " instruction */ SPI_FLASH_SendByte(WRITE); /* Send WriteAddr high nibble address byte to write to */ SPI_FLASH_SendByte((WriteAddr & 0xFF0000) >> 16); /* Send WriteAddr medium nibble address byte to write to */ SPI_FLASH_SendByte((WriteAddr & 0xFF00) >> 8); /* Send WriteAddr low nibble address byte to write to */ SPI_FLASH_SendByte(WriteAddr & 0xFF); /* while there is data to be written on the FLASH */ while (NumByteToWrite--) { /* Send the current byte */ SPI_FLASH_SendByte(*pBuffer); /* Point on the next byte to be written */ pBuffer++; } /* Deselect the FLASH: Chip Select high */ SPI_FLASH_CS_HIGH(); /* Wait the end of Flash writing */ SPI_FLASH_WaitForWriteEnd(); } void W25QXX_Write(u8* pBuffer, u32 WriteAddr, u16 NumByteToWrite) { u8 NumOfPage = 0, NumOfSingle = 0, Addr = 0, count = 0, temp = 0; Addr = WriteAddr % SPI_FLASH_PageSize; count = SPI_FLASH_PageSize - Addr; NumOfPage = NumByteToWrite / SPI_FLASH_PageSize; NumOfSingle = NumByteToWrite % SPI_FLASH_PageSize; if (Addr == 0) /* WriteAddr is SPI_FLASH_PageSize aligned */ { if (NumOfPage == 0) /* NumByteToWrite < SPI_FLASH_PageSize */ { SPI_FLASH_PageWrite(pBuffer, WriteAddr, NumByteToWrite); } else /* NumByteToWrite > SPI_FLASH_PageSize */ { while (NumOfPage--) { SPI_FLASH_PageWrite(pBuffer, WriteAddr, SPI_FLASH_PageSize); WriteAddr += SPI_FLASH_PageSize; pBuffer += SPI_FLASH_PageSize; } SPI_FLASH_PageWrite(pBuffer, WriteAddr, NumOfSingle); } } else /* WriteAddr is not SPI_FLASH_PageSize aligned */ { if (NumOfPage == 0) /* NumByteToWrite < SPI_FLASH_PageSize */ { if (NumOfSingle > count) /* (NumByteToWrite + WriteAddr) > SPI_FLASH_PageSize */ { temp = NumOfSingle - count; SPI_FLASH_PageWrite(pBuffer, WriteAddr, count); WriteAddr += count; pBuffer += count; SPI_FLASH_PageWrite(pBuffer, WriteAddr, temp); } else { SPI_FLASH_PageWrite(pBuffer, WriteAddr, NumByteToWrite); } } else /* NumByteToWrite > SPI_FLASH_PageSize */ { NumByteToWrite -= count; NumOfPage = NumByteToWrite / SPI_FLASH_PageSize; NumOfSingle = NumByteToWrite % SPI_FLASH_PageSize; SPI_FLASH_PageWrite(pBuffer, WriteAddr, count); WriteAddr += count; pBuffer += count; while (NumOfPage--) { SPI_FLASH_PageWrite(pBuffer, WriteAddr, SPI_FLASH_PageSize); WriteAddr += SPI_FLASH_PageSize; pBuffer += SPI_FLASH_PageSize; } if (NumOfSingle != 0) { SPI_FLASH_PageWrite(pBuffer, WriteAddr, NumOfSingle); } } } } void W25QXX_Read(u8* pBuffer, u32 ReadAddr, u16 NumByteToRead) { /* Select the FLASH: Chip Select low */ SPI_FLASH_CS_LOW(); /* Send "Read from Memory " instruction */ SPI_FLASH_SendByte(READ); /* Send ReadAddr high nibble address byte to read from */ SPI_FLASH_SendByte((ReadAddr & 0xFF0000) >> 16); /* Send ReadAddr medium nibble address byte to read from */ SPI_FLASH_SendByte((ReadAddr& 0xFF00) >> 8); /* Send ReadAddr low nibble address byte to read from */ SPI_FLASH_SendByte(ReadAddr & 0xFF); while (NumByteToRead--) /* while there is data to be read */ { /* Read a byte from the FLASH */ *pBuffer = SPI_FLASH_SendByte(Dummy_Byte); /* Point to the next location where the byte read will be saved */ pBuffer++; } /* Deselect the FLASH: Chip Select high */ SPI_FLASH_CS_HIGH(); } void SPI_FLASH_WaitForWriteEnd(void) { u8 FLASH_Status = 0; /* Select the FLASH: Chip Select low */ SPI_FLASH_CS_LOW(); /* Send "Read Status Register" instruction */ SPI_FLASH_SendByte(RDSR); /* Loop as long as the memory is busy with a write cycle */ do { /* Send a dummy byte to generate the clock needed by the FLASH and put the value of the status register in FLASH_Status variable */ FLASH_Status = SPI_FLASH_SendByte(Dummy_Byte); } while ((FLASH_Status & WIP_Flag) == SET); /* Write in progress */ /* Deselect the FLASH: Chip Select high */ SPI_FLASH_CS_HIGH(); } void SPI_FLASH_StartReadSequence(u32 ReadAddr) { /* Select the FLASH: Chip Select low */ SPI_FLASH_CS_LOW(); /* Send "Read from Memory " instruction */ SPI_FLASH_SendByte(READ); /* Send the 24-bit address of the address to read from -----------------------*/ /* Send ReadAddr high nibble address byte */ SPI_FLASH_SendByte((ReadAddr & 0xFF0000) >> 16); /* Send ReadAddr medium nibble address byte */ SPI_FLASH_SendByte((ReadAddr& 0xFF00) >> 8); /* Send ReadAddr low nibble address byte */ SPI_FLASH_SendByte(ReadAddr & 0xFF); }
CUITzhaoqi/Yeelink
HARDWARE/FLASH.c
C
gpl-3.0
10,376
<?php /** * * @ IonCube v8.3 Loader By DoraemonPT * @ PHP 5.3 * @ Decoder version : 1.0.0.7 * @ Author : DoraemonPT * @ Release on : 09.05.2014 * @ Website : http://EasyToYou.eu * **/ class WHMCS\Invoices extends WHMCS\TableModel { function _execute($criteria = null) { return $this->getInvoices( $criteria ); } function getInvoices($criteria = array( )) { global $aInt; global $currency; $query = ' FROM tblinvoices INNER JOIN tblclients ON tblclients.id=tblinvoices.userid'; $this->buildCriteria( $criteria ); $filters = ; = 6; if (( $filters )) { = 6; $query .= (true ? ' WHERE ' . ( ' AND ', $filters ) : ''); = 6; ( 'SELECT COUNT(*)' . $query ); $result = ; = 6; ( $result ); $data = ; $this->getPageObj( )->setNumResults( $data[0] ); new ddhjgidcb( ); $gateways = ; $this->getPageObj( )->getOrderBy( ); $orderby = ; if ($orderby == 'clientname') { $orderby = 'firstname ' . $this->getPageObj( )->getSortDirection( ) . ',lastname ' . $this->getPageObj( )->getSortDirection( ) . ',companyname'; if ($orderby == 'id') { $orderby = 'tblinvoices.invoicenum ' . $this->getPageObj( )->getSortDirection( ) . ',tblinvoices.id'; $invoices = array( ); 'SELECT tblinvoices.*,tblclients.firstname,tblclients.lastname,tblclients.companyname,tblclients.groupid,tblclients.currency' . $query . ' ORDER BY ' . $orderby; } $query = . ' ' . $this->getPageObj( )->getSortDirection( ) . ' LIMIT ' . $this->getQueryLimit( ); = 6; ( $query ); $result = ; = 6; ( $result ); if ($data = ) { $data['id']; $id = ; $data['invoicenum']; $invoicenum = ; $data['userid']; $userid = ; $data['date']; $date = ; $data['duedate']; $duedate = ; $data['subtotal']; $subtotal = ; $data['credit']; } } } $credit = ; $data['total']; $total = ; $data['paymentmethod']; $gateway = ; $data['status']; $status = ; $data['firstname']; $firstname = ; $data['lastname']; $lastname = ; $data['companyname']; $companyname = ; $data['groupid']; $groupid = ; $data['currency']; $currency = ; $aInt->outputClientLink( $userid, $firstname, $lastname, $companyname, $groupid ); $clientname = ; $gateways->getDisplayName( $gateway ); $paymentmethod = ; = 6; ( '', $currency ); while (true) { $currency = ; = 6; ( $credit + $total ); $totalformatted = ; $this->formatStatus( $status ); $statusformatted = ; = 6; ( $date ); $date = ; = 6; ( $duedate ); $duedate = ; if (!$invoicenum) { $invoicenum = $statusformatted; array( 'id' => $id, 'invoicenum' => $invoicenum, 'userid' => $userid, 'clientname' => $clientname, 'date' => $date, 'duedate' => $duedate, 'subtotal' => $subtotal, 'credit' => $credit, 'total' => $total, 'totalformatted' => $totalformatted, 'gateway' => $gateway, 'paymentmethod' => $paymentmethod ); } $invoices[] = array( 'status' => $status, 'statusformatted' => $statusformatted ); } return $invoices; } function buildCriteria($criteria) { $filters = array( ); if ($criteria['clientid']) { $filters[] = 'userid=' . (int)$criteria['clientid']; if ($criteria['clientname']) { = 6; $filters[] = 'concat(firstname,\' \',lastname) LIKE \'%' . ( $criteria['clientname'] ) . '%\''; if ($criteria['invoicenum']) { = 6; = 6; $filters[] = '(tblinvoices.id=\'' . ( $criteria['invoicenum'] ) . '\' OR tblinvoices.invoicenum=\'' . ( $criteria['invoicenum'] ) . '\')'; if ($criteria['lineitem']) { = 6; $filters[] = 'tblinvoices.id IN (SELECT invoiceid FROM tblinvoiceitems WHERE description LIKE \'%' . ( $criteria['lineitem'] ) . '%\')'; if ($criteria['paymentmethod']) { = 6; $criteria['paymentmethod']; } } } $filters[] = 'tblinvoices.paymentmethod=\'' . ( ) . '\''; if ($criteria['invoicedate']) { = 6; $filters[] = 'tblinvoices.date=\'' . ( $criteria['invoicedate'] ) . '\''; if ($criteria['duedate']) { = 6; $filters[] = 'tblinvoices.duedate=\'' . ( $criteria['duedate'] ) . '\''; if ($criteria['datepaid']) { = 6; = 6; $filters[] = 'tblinvoices.datepaid>=\'' . ( $criteria['datepaid'] ) . '\' AND tblinvoices.datepaid<=\'' . ( $criteria['datepaid'] ) . '235959\''; if ($criteria['totalfrom']) { = 6; } $criteria['totalfrom']; } } $filters[] = 'tblinvoices.total>=\'' . ( ) . '\''; if ($criteria['totalto']) { } } } } = 6; $filters[] = 'tblinvoices.total<=\'' . ( $criteria['totalto'] ) . '\''; if ($criteria['status']) { if ($criteria['status'] == 'Overdue') { = 6; $filters[] = 'tblinvoices.status=\'Unpaid\' AND tblinvoices.duedate<\'' . ( 'Ymd' ) . '\''; } } $filters[] = 'tblinvoices.status=\'' . ( $criteria['status'] ) . '\''; return $filters; } function formatStatus($status) { = 6; if (( 'ADMINAREA' )) { global $aInt; if ($status == 'Draft') { $status = '<span class="textgrey">' . $aInt->lang( 'status', 'draft' ) . '</span>'; if ($status == 'Unpaid') { $aInt->lang; 'status'; 'unpaid'; } } } $status = '<span class="textred">' . ( ) . '</span>'; jmp; if ($status == 'Paid') { $status = '<span class="textgreen">' . $aInt->lang( 'status', 'paid' ) . '</span>'; jmp; if ($status == 'Cancelled') { $status = '<span class="textgrey">' . $aInt->lang( 'status', 'cancelled' ) . '</span>'; } else { $status = 'Unrecognised'; jmp; global $_LANG; if ($status == 'Unpaid') { $status = '<span class="textred">' . $_LANG['invoicesunpaid'] . '</span>'; jmp; if ($status == 'Paid') { $status = '<span class="textgreen">' . $_LANG['invoicespaid'] . '</span>'; } } } } if () { $status = '<span class="textgrey">' . $_LANG['invoicescancelled'] . '</span>'; } if () { $status = '<span class="textgold">' . $_LANG['invoicescollections'] . '</span>'; $status = 'Unrecognised'; } return $status; } function getInvoiceTotals() { global $currency; $invoicesummary = array( ); = 6; ( 'SELECT currency,COUNT(tblinvoices.id),SUM(total) FROM tblinvoices INNER JOIN tblclients ON tblclients.id=tblinvoices.userid WHERE tblinvoices.status=\'Paid\' GROUP BY tblclients.currency' ); = 6; ( $result ); if ($data = ) { $invoicesummary[$data[0]]['paid'] = $data[2]; } jmp; ( ); $paid = $result = ; = 6; ( $vals['unpaid'] ); $unpaid = ; = 6; while (true) { ( $vals['overdue'] ); $overdue = ; $totals[] = array( 'currencycode' => $currency['code'], 'paid' => $paid, 'unpaid' => $unpaid, 'overdue' => $overdue ); } return $totals; } function duplicate($invoiceid) { App::self( ); = 6; $result = ; = 6; ( $result ); $data['userid']; $userid = $whmcs = ; = 6; ( 'tblinvoices', $data ); $newid = ( 'tblinvoices', 'userid,invoicenum,date,duedate,datepaid,subtotal,credit,tax,tax2,total,taxrate,taxrate2,status,paymentmethod,notes', array( 'id' => $invoiceid ) ); = 6; ( 'tblinvoiceitems', '', array( 'invoiceid' => $invoiceid ) ); $result = $data = ; = 6; ( $result ); if ($data = self::adjustIncrementForNextInvoice( $invoiceid )) { unset( $data[id] ); $data['invoiceid'] = $newid; } while (true) { = 6; ( 'tblinvoiceitems', $data ); } = 6; ( . 'Duplicated Invoice - Existing Invoice ID: ' . $invoiceid . ' - New Invoice ID: ' . $newid, $userid ); return cjhcifebeg; } /** * Get the status of sequential paid invoice numbering * * @return boolean */ function isSequentialPaidInvoiceNumberingEnabled() { iciahfajh::getInstance( ); $whmcs = ; if ($whmcs->get_config( 'SequentialInvoiceNumbering' )) { cjhcifebeg; } return dbebefagji; } /** * Get the next sequential paid invoice number to assign to an invoice * * Also increments the next number value * * @return string */ function getNextSequentialPaidInvoiceNumber() { iciahfajh::getInstance( ); $whmcs = ; $whmcs->get_config( 'SequentialInvoiceNumberFormat' ); $numberToAssign = ; $whmcs->get_config( 'SequentialInvoiceNumberValue' ); $nextNumber = ; $whmcs->set_config( 'SequentialInvoiceNumberValue', self::padAndIncrement( $nextNumber ) ); = 6; = 6; ( '{YEAR}', ( 'Y' ), $numberToAssign ); $numberToAssign = ; = 6; = 6; ( '{MONTH}', ( 'm' ), $numberToAssign ); $numberToAssign = ; = 6; = 6; ( '{DAY}', ( 'd' ), $numberToAssign ); = 6; ( '{NUMBER}', $nextNumber, $numberToAssign ); $numberToAssign = $numberToAssign = ; return $numberToAssign; } /** * Increment a number by a given amount preserving leading zeros * * @param string $number Starting number * @param int $incrementAmount Increment amount (defaults to 1) * * @return string */ function padAndIncrement($number, $incrementAmount = 1) { $newNumber = $number + $incrementAmount; = 6; if (( $number, 0, 1 ) == '0') { = 6; ( $number ); $numberLength = ; } = 6; ( $newNumber, $numberLength, '0', ebjjcgedhb ); $newNumber = ; return $newNumber; } /** * Use the provided invoice id to calculate and set the next invoice id * that would be used based on the InvoiceIncrement value. * * This is a replacement to the for loop that inserted x invoices depending * on the InvoiceIncrement value. Anything above 1 will insert a an item into * tblinvoices using the passed invoice id + the Invoice Increment value -1. * * @param int $lastInvoiceId - The ID of the last invoice to be inserted */ function adjustIncrementForNextInvoice($lastInvoiceId) { $incrementValue = (int)chhgjaeced::getValue( 'InvoiceIncrement' ); if (1 < $incrementValue) { $lastInvoiceId + ( $incrementValue - 1 ); } $incrementedId = ; = 6; ( 'tblinvoices', array( 'id' => $incrementedId ) ); = 6; ( 'tblinvoices', array( 'id' => $incrementedId ) ); } /** * Get the allowed invoice status list. * * @return array */ function getInvoiceStatusValues() { return $invoiceStatusValues; } } ?>
Orazio-svn/whmcs_v631_full_DECODED
includes/classes/WHMCS/Invoices.php
PHP
gpl-3.0
10,319
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM 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. OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>. \*---------------------------------------------------------------------------*/ #include "includeEntry.H" #include "IFstream.H" #include "addToMemberFunctionSelectionTable.H" #include "stringOps.H" #include "Time.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // const Foam::word Foam::functionEntries::includeEntry::typeName ( Foam::functionEntries::includeEntry::typeName_() ); // Don't lookup the debug switch here as the debug switch dictionary // might include includeEntry int Foam::functionEntries::includeEntry::debug(0); bool Foam::functionEntries::includeEntry::report(false); namespace Foam { namespace functionEntries { addToMemberFunctionSelectionTable ( functionEntry, includeEntry, execute, dictionaryIstream ); addToMemberFunctionSelectionTable ( functionEntry, includeEntry, execute, primitiveEntryIstream ); } } // * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * // Foam::fileName Foam::functionEntries::includeEntry::includeFileName ( Istream& is, const dictionary& dict ) { fileName fName(is); // Substitute dictionary and environment variables. Allow empty // substitutions. stringOps::inplaceExpand(fName, dict, true, true); if (fName.empty() || fName.isAbsolute()) { return fName; } else { // relative name return fileName(is.name()).path()/fName; } } Foam::fileName Foam::functionEntries::includeEntry::includeFileName ( const fileName& dir, const fileName& f, const dictionary& dict ) { fileName fName(f); // Substitute dictionary and environment variables. Allow empty // substitutions. stringOps::inplaceExpand(fName, dict, true, true); if (fName.empty() || fName.isAbsolute()) { return fName; } else { // relative name return dir/fName; } } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // bool Foam::functionEntries::includeEntry::execute ( dictionary& parentDict, Istream& is ) { const fileName rawFName(is); const fileName fName ( includeFileName(is.name().path(), rawFName, parentDict) ); // Read contents of file into parentDict IFstream ifs(fName); if (ifs) { if (Foam::functionEntries::includeEntry::report) { Info<< fName << endl; } // Add watch on included file const dictionary& top = parentDict.topDict(); if (isA<regIOobject>(top)) { regIOobject& rio = const_cast<regIOobject&> ( dynamic_cast<const regIOobject&>(top) ); //Info<< rio.name() << " : adding depenency on included file " // << fName << endl; rio.addWatch(fName); } parentDict.read(ifs); return true; } else { FatalIOErrorIn ( "functionEntries::includeEntry::includeEntry" "(dictionary& parentDict, Istream&)", is ) << "Cannot open include file " << (ifs.name().size() ? ifs.name() : rawFName) << " while reading dictionary " << parentDict.name() << exit(FatalIOError); return false; } } bool Foam::functionEntries::includeEntry::execute ( const dictionary& parentDict, primitiveEntry& entry, Istream& is ) { const fileName rawFName(is); const fileName fName ( includeFileName(is.name().path(), rawFName, parentDict) ); // Read contents of file into parentDict IFstream ifs(fName); if (ifs) { if (Foam::functionEntries::includeEntry::report) { Info<< fName << endl; } // Add watch on included file const dictionary& top = parentDict.topDict(); if (isA<regIOobject>(top)) { regIOobject& rio = const_cast<regIOobject&> ( dynamic_cast<const regIOobject&>(top) ); //Info<< rio.name() << " : adding depenency on included file " // << fName << endl; rio.addWatch(fName); } entry.read(parentDict, ifs); return true; } else { FatalIOErrorIn ( "functionEntries::includeEntry::includeEntry" "(dictionary& parentDict, primitiveEntry&, Istream&)", is ) << "Cannot open include file " << (ifs.name().size() ? ifs.name() : rawFName) << " while reading dictionary " << parentDict.name() << exit(FatalIOError); return false; } } // ************************************************************************* //
OpenCFD/OpenFOAM-history
src/OpenFOAM/db/dictionary/functionEntries/includeEntry/includeEntry.C
C++
gpl-3.0
5,946
module.exports = { root: true, env: { node: true, }, extends: ['plugin:vue/essential', '@vue/prettier', '@vue/typescript'], rules: { 'vue/max-attributes-per-line': 'off', 'vue/html-self-closing': 'off', }, parserOptions: { parser: '@typescript-eslint/parser', }, }
phegman/vue-mapbox-gl
.eslintrc.js
JavaScript
gpl-3.0
297
<?php /** * @package Interspire eCommerce * @copyright Copyright (C) 2015 Interspire Co.,Ltd. All rights reserved. (Interspire.vn) * @credits See CREDITS.txt for credits and other copyright notices. * @license GNU General Public License version 3; see LICENSE.txt */ class Modification { /** * @var bool */ public $is_vqmod = true; /** * @param $registry */ public function __construct($registry) { $this->filesystem = $registry->get('filesystem'); } /** * @param $errno * @param $errstr * @param $errfile * @param $errline * @return bool * @throws DOMException * @description Error handler for bad XML files */ public static function handleXMLError($errno, $errstr, $errfile, $errline) { if ($errno == E_WARNING && (substr_count($errstr, 'DOMDocument::loadXML()') > 0)) { throw new DOMException(str_replace('DOMDocument::loadXML()', '', $errstr)); } else { return false; } } /** * @return bool * @description Applies all modifications to the cache files. */ public function applyMod() { // To catch XML syntax errors set_error_handler(array('Modification', 'handleXMLError')); if (class_exists('VQMod')) { $files = glob(DIR_SYSTEM . 'xml/*.xml'); } else { // Merge vQmods and OCmods files $files = array_merge(glob(DIR_VQMOD . 'xml/*.xml'), glob(DIR_SYSTEM . 'xml/*.xml')); } if (!empty($files) && $files) { foreach ($files as $file) { $xmls[$file] = file_get_contents($file); } } $modification = $log = $original = array(); if (empty($xmls)) { $log[] = 'Modification::applyMod - NO XML FILES READABLE IN XML FOLDERS'; $this->writeLog($log); return false; } $dom = new DOMDocument('1.0', 'UTF-8'); $dom->preserveWhiteSpace = false; foreach ($xmls as $file => $xml) { try { $dom->loadXML($xml); $modification_node = $dom->getElementsByTagName('modification')->item(0); $version = '2.5.1'; $vqmver = $modification_node->getElementsByTagName('vqmver')->item(0); if ($vqmver) { $version_check = $vqmver->getAttribute('required'); if (strtolower($version_check) == 'true' && version_compare($version, $vqmver->nodeValue, '<')) { $log[] = "Modification::applyMod - VQMOD VERSION '" . $vqmver->nodeValue . "' OR ABOVE REQUIRED, XML FILE HAS BEEN SKIPPED"; $log[] = " vqmver = '$vqmver'"; $log[] = '----------------------------------------------------------------'; return false; } } } catch (Exception $e) { $log[] = 'Modification::applyMod - INVALID XML FILE(' . $file . '): ' . $e->getMessage(); $this->writeLog($log); continue; } $this->isVqmod($dom); $file_nodes = $modification_node->getElementsByTagName('file'); $modification_id = @$modification_node->getElementsByTagName('id')->item(0)->nodeValue; if (!$modification_id) { $modification_id = $modification_node->getElementsByTagName('code')->item(0)->nodeValue; } $log[] = "Modification::applyMod - Processing '" . $modification_id . "'"; $log[] = ""; foreach ($file_nodes as $file_node) { $files = $this->getFiles($file_node, $log); if ($files === false) { return false; } $operation_nodes = $file_node->getElementsByTagName('operation'); foreach ($files as $file) { $key = $this->getFileKey($file); if ($key == '') { $log[] = "Modification::applyMod - UNABLE TO GENERATE FILE KEY:"; $log[] = " modification id = '$modification_id'"; $log[] = " file name = '$file'"; $log[] = ""; continue; } if (!isset($modification[$key])) { $modification[$key] = preg_replace('~\r?\n~', "\n", file_get_contents($file)); $original[$key] = $modification[$key]; // Log $log[] = 'FILE: ' . $key; } if (!$log = $this->operationNode($operation_nodes, $modification, $modification_id, $file, $key, $log)) { return false; } } // $files } // $file_nodes $log[] = "Modification::applyMod - Done '" . $modification_id . "'"; $log[] = '----------------------------------------------------------------'; $log[] = ""; } restore_error_handler(); $this->writeLog($log); $this->writeMods($modification, $original); } /** * @param $log */ public function writeLog($log) { if ((defined('DIR_LOG'))) { $modification = new Log('modification.log'); $modification->write(implode("\n", $log)); } } /** * @param DOMDocument $dom */ public function isVqmod(DOMDocument $dom) { $modification_node = $dom->getElementsByTagName('modification')->item(0); if ($modification_node) { $vqmver_node = $modification_node->getElementsByTagName('vqmver')->item(0); if ($vqmver_node) { $this->is_vqmod = true; return; } } $this->is_vqmod = false; } /** * @param $file_node * @param $log * @return array * @description Find all files to be modified */ public function getFiles($file_node, &$log) { $file_node_path = $file_node->getAttribute('path'); $file_node_name = $file_node->getAttribute('name'); $file_node_error = $file_node->getAttribute('error'); $files = array(); $file_names = explode(',', $file_node_name); if (isset($file_names[0]) && $file_names[0] == '') { $file_names = explode(',', $file_node_path); $file_node_path = ''; if ($file_names === false) { $file_names = array(); } } foreach ($file_names as $file_name) { $path = ''; // Get the full path of the files that are going to be used for modification if (substr($file_node_path . $file_name, 0, 7) == 'catalog') { $path = DIR_CATALOG . substr($file_node_path . $file_name, 8); } elseif (substr($file_node_path . $file_name, 0, 5) == 'admin') { $path = DIR_ADMIN . substr($file_node_path . $file_name, 6); } elseif (substr($file_node_path . $file_name, 0, 6) == 'system') { $path = DIR_SYSTEM . substr($file_node_path . $file_name, 7); } $paths = glob($path); if (($paths === false) || is_array($paths) && (count($paths) == 0)) { switch ($file_node_error) { case 'skip': break; case 'abort': $log[] = "Modification::getFiles - UNABLE TO FIND FILE(S), XML PARSING ABORTED:"; $log[] = " file = '$path'"; $log[] = '----------------------------------------------------------------'; return false; case 'log': default: $log[] = "Modification::getFiles - UNABLE TO FIND FILE(S), IGNORED:"; $log[] = " file = '$path'"; break; } } else { foreach ($paths as $file) { if (is_file($file)) { $files[] = $file; } else { switch ($file_node_error) { case 'skip': break; case 'abort': $log[] = "Modification::getFiles - NOT A FILE, XML PARSING ABORTED:"; $log[] = " file = '$file'"; $log[] = '----------------------------------------------------------------'; return false; case 'log': default: $log[] = "Modification::getFiles - NOT A FILE, IGNORED:"; $log[] = " file = '$file'"; break; } } } } } return $files; } /** * @param $file * @return string * @description Getting the key to be used for the modification cache filename. */ public function getFileKey($file) { $key = ''; if (substr($file, 0, strlen(DIR_CATALOG)) == DIR_CATALOG) { $key = 'catalog/' . substr($file, strlen(DIR_CATALOG)); } elseif (substr($file, 0, strlen(DIR_ADMIN)) == DIR_ADMIN) { $key = 'admin/' . substr($file, strlen(DIR_ADMIN)); } elseif (substr($file, 0, strlen(DIR_SYSTEM)) == DIR_SYSTEM) { $key = 'system/' . substr($file, strlen(DIR_SYSTEM)); } return $key; } /** * @param $nodes * @param $modification * @param $modification_id * @param $file * @param $key * @param $log * @return bool * @description Operations for operation node */ public function operationNode($nodes, &$modification, $modification_id, $file, $key, $log) { foreach ($nodes as $operation_node) { $operation_node_error = $operation_node->getAttribute('error'); if (($operation_node_error != 'skip') && ($operation_node_error != 'log') && $this->is_vqmod) { $operation_node_error = 'abort'; } $ignoreif_node = $operation_node->getElementsByTagName('ignoreif')->item(0); if ($ignoreif_node) { $ignoreif_node_regex = $ignoreif_node->getAttribute('regex'); $ignoreif_node_value = trim($ignoreif_node->nodeValue); if ($ignoreif_node_regex == 'true' && preg_match($ignoreif_node_value, $modification[$key])) { continue; } elseif (strpos($modification[$key], $ignoreif_node_value) !== false) { continue; } } $status = false; $search_node = $operation_node->getElementsByTagName('search')->item(0); $add_node = $operation_node->getElementsByTagName('add')->item(0); if ($search_node->getAttribute('position')) { $position = $search_node->getAttribute('position'); } elseif ($add_node->getAttribute('position')) { $position = $add_node->getAttribute('position'); } else { $position = 'replace'; } $search_node_indexes = $this->getIndexes($search_node->getAttribute('index')); if ($search_node->getAttribute('offset')) { $_offset = $search_node->getAttribute('offset'); } elseif ($add_node->getAttribute('offset')) { $_offset = $add_node->getAttribute('offset'); } else { $_offset = '0'; } $search_node_regex = ($search_node->getAttribute('regex')) ? $search_node->getAttribute('regex') : 'false'; $limit = $search_node->getAttribute('limit'); if (!$limit) { $limit = -1; } $search_node_trim = ($search_node->getAttribute('trim') == 'false') ? 'false' : 'true'; $search_node_value = ($search_node_trim == 'true') ? trim($search_node->nodeValue) : $search_node->nodeValue; $add_node_trim = ($add_node->getAttribute('trim') == 'true') ? 'true' : 'false'; $add_node_value = ($add_node_trim == 'true') ? trim($add_node->nodeValue) : $add_node->nodeValue; $index_count = 0; $tmp = explode("\n", $modification[$key]); $line_max = count($tmp) - 1; // apply the next search and add operation to the file content switch ($position) { case 'top': $tmp[(int) $_offset] = $add_node_value . $tmp[(int) $_offset]; break; case 'bottom': $offset = $line_max - (int) $_offset; if ($offset < 0) { $tmp[-1] = $add_node_value; } else { $tmp[$offset] .= $add_node_value;; } break; default: $changed = false; foreach ($tmp as $line_num => $line) { if (strlen($search_node_value) == 0 && ($operation_node_error == 'log' || $operation_node_error == 'abort')) { $log[] = "Modification::operationNode - EMPTY SEARCH CONTENT ERROR:"; $log[] = " modification id = '$modification_id'"; $log[] = " file name = '$file'"; $log[] = ""; break; } if ($search_node_regex == 'true') { $pos = @preg_match($search_node_value, $line); if ($pos === false) { if ($operation_node_error == 'log' || $operation_node_error == 'abort') { $log[] = "Modification::operationNode - INVALID REGEX ERROR:"; $log[] = " modification id = '$modification_id'"; $log[] = " file name = '$file'"; $log[] = " search = '$search_node_value'"; $log[] = ""; } continue 2; // continue with next operation_node } elseif ($pos == 0) { $pos = false; } } else { $pos = strpos($line, $search_node_value); } if ($pos !== false) { $index_count++; $changed = true; if (!$search_node_indexes || ($search_node_indexes && in_array($index_count, $search_node_indexes))) { switch ($position) { case 'before': $offset = ($line_num - $_offset < 0) ? -1 : $line_num - $_offset; $tmp[$offset] = empty($tmp[$offset]) ? $add_node_value : $add_node_value . "\n" . $tmp[$offset]; break; case 'after': $offset = ($line_num + $_offset > $line_max) ? $line_max : $line_num + $_offset; $tmp[$offset] = $tmp[$offset] . "\n" . $add_node_value; break; case 'ibefore': $tmp[$line_num] = str_replace($search_node_value, $add_node_value . $search_node_value, $line); break; case 'iafter': $tmp[$line_num] = str_replace($search_node_value, $search_node_value . $add_node_value, $line); break; default: if (!empty($_offset)) { if ($_offset > 0) { for ($i = 1; $i <= $_offset; $i++) { if (isset($tmp[$line_num + $i])) { $tmp[$line_num + $i] = ''; } } } elseif ($_offset < 0) { for ($i = -1; $i >= $_offset; $i--) { if (isset($tmp[$line_num + $i])) { $tmp[$line_num + $i] = ''; } } } } if ($search_node_regex == 'true') { $tmp[$line_num] = preg_replace($search_node_value, $add_node_value, $line, $limit); } else { $tmp[$line_num] = str_replace($search_node_value, $add_node_value, $line); } break; } $status = true; } } } if (!$changed) { $skip_text = ($operation_node_error == 'skip' || $operation_node_error == 'log') ? '(SKIPPED)' : '(ABORTING MOD)'; if ($operation_node_error == 'log' || $operation_node_error) { $log[] = "Modification::operationNode - SEARCH NOT FOUND $skip_text:"; $log[] = " modification id = '$modification_id'"; $log[] = " file name = '$file'"; $log[] = " search = '$search_node_value'"; $log[] = ""; } if ($operation_node_error == 'abort') { $log[] = 'ABORTING!'; $log[] = '----------------------------------------------------------------'; $this->writeLog($log); return false; } } break; } ksort($tmp); $modification[$key] = implode("\n", $tmp); if (!$status && $search_node_regex == 'true') { $match = array(); preg_match_all($search_node_value, $modification[$key], $match, PREG_OFFSET_CAPTURE); // Remove part of the the result if a limit is set. if ($limit > 0) { $match[0] = array_slice($match[0], 0, $limit); } if ($match[0]) { $log[] = 'REGEX: ' . $search_node_value; $status = $changed = true; } // Make the modification $modification[$key] = preg_replace($search_node_value, $add_node_value, $modification[$key], $limit); } if (!$status && !$this->is_vqmod) { // Log $log[] = 'NOT FOUND!'; } } return $log; } /** * @param $search_node_index * @return array|bool * @description Getting index attribute values */ public function getIndexes($search_node_index) { if ($search_node_index !== '') { $tmp = explode(',', $search_node_index); foreach ($tmp as $k => $v) { if (!$this->is_vqmod) { $tmp[$k] += 1; } } $tmp = array_unique($tmp); return empty($tmp) ? false : $tmp; } else { return false; } } /** * @param $modification * @param $original * @description Write all modification files */ public function writeMods($modification, $original) { foreach ($modification as $key => $value) { // Only create a file if there are changes if ($original[$key] != $value) { $this->filesystem->dumpFile(DIR_MODIFICATION . $key, $value, 0755); } } } }
interspiresource/interspire
system/library/modification.php
PHP
gpl-3.0
15,693
<?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/>. /** * Automatically generated strings for Moodle 2.2dev installer * * Do not edit this file manually! It contains just a subset of strings * needed during the very first steps of installation. This file was * generated automatically by export-installer.php (which is part of AMOS * {@link http://docs.moodle.org/dev/Languages/AMOS}) using the * list of strings defined in /install/stringnames.txt. * * @package installer * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $string['language'] = 'Kieli'; $string['next'] = 'Seuraava'; $string['previous'] = 'Edellinen'; $string['reload'] = 'Lataa uudelleen';
uhoreg/moodle
install/lang/fi/moodle.php
PHP
gpl-3.0
1,334
<div class="container"> <div class="row"> <div class="col-lg-8 mx-auto"> <div class="modal-body"> <h2>SKU Sold in UK Euro </h2> <hr class="star-primary"> <p> <div class="form-group"> <button onclick="Exportskuuk()" class="btn btn-success">Export to CSV File</button> </div> <br> <table class="table table-condensed table-bordered table-striped table-hover dt-responsove wrap" cellspacing="0" > <thead> <tr style="font-size: 11px; font-weight: bold; text-transform: uppercase; text-align: center;"> Total of SKU sold in Amazon.co.uk (euro) </tr> </thead> </table> <div class="row"> <div class="col-8"> <table class="table table-condensed table-bordered table-striped table-hover dt-responsove wrap" cellspacing="0" > <thead> <tr style="font-size: 11px; font-weight: bold; text-transform: uppercase; text-align: center;"> <th>Sku</th> <th>currency</th> <th>Sku Sold total</th> </tr> </thead> <tbody> <?php // total all together while ($row = mysqli_fetch_array($allSkuModelSold)) { ?> <tr class="table-smaller-text"> <td><?php echo $row["sku"]; ?></td> <td>Euro</td> <td><?php echo $row["sku_total"]; ?></td> <?php }; ?> </tr> </tbody> </table> </div> <div class="col-4"> <table class="table table-condensed table-bordered table-striped table-hover dt-responsove wrap" cellspacing="0" > <thead> <tr style="font-size: 11px; font-weight: bold; text-transform: uppercase; text-align: center;"> <th>Sku UNITS Sold</th> </tr> </thead> <tbody> <?php while ($row = mysqli_fetch_array($allskuUnitssold)) { ?> <tr class="table-smaller-text"> <td><?php echo $row["sku_unit_sold"]; ?></td> </tr> <?php }; ?> </tbody> </table> </div> </div> </p> </div> </div> </div> </div>
jedistev/AmazonStatement_Project
views/sku/uk-euro/sku_sold_uk_euro.php
PHP
gpl-3.0
3,468
#!/usr/bin/env perl use v5.020; use strict; use warnings FATAL => 'all'; use utf8; binmode STDOUT, ":utf8"; binmode STDERR, ":utf8"; binmode STDIN, ":encoding(UTF-8)"; use Data::Printer; use FindBin; use Getopt::Long; use List::Util ( 'sum0', 'min' ); use POSIX qw(ceil); use Term::ProgressBar; use Time::ParseDate; use Sheepsense::Extra::Util qw 'db'; use Sheepsense::Data::Dog; use experimental 'signatures'; no warnings "experimental::signatures"; my $options = { id => 0, identifier => '', }; GetOptions( "id=i" => \$options->{id}, "identifier=s" => \$options->{identifier}, ); die unless $options->{id} || $options->{identifier}; my $dog = Sheepsense::Data::Dog->new( guessid => ( $options->{id} || $options->{identifier} ) ); p $dog; my $mergeddogs = $dog->get_merged_into_this; for (@$mergeddogs) { $_->unmerge; }
basbloemsaat/sheepsense
bin/unmerge_dog.pl
Perl
gpl-3.0
874
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use Auth; use Mail; //Models use App\User; use App\Models\Module; use App\Models\Aspirant; use App\Models\AspirantsFile; use App\Models\FileEvaluation; use App\Models\FellowProgress; use App\Models\FellowAverage; use App\Models\FellowAnswer; use App\Models\City; use App\Models\AspirantEvaluation; use App\Models\Institution; use App\Models\FellowScore; use App\Models\QuizInfo; use App\Models\FilesEvaluation; use App\Models\Activity; use App\Models\Program; class FellowProgresses extends Controller { // /** * Muestra hoja de calificaciones * * @return \Illuminate\Http\Response */ public function index() { $user = Auth::user(); $program = $user->actual_program(); $modules = $program->get_active_modules()->paginate(10); return view('fellow.progress.progress-sheet')->with( [ 'user'=>$user, 'modules' =>$modules, "program" => $program ] ); } /** * Muestra hoja de calificaciones por módulo * * @return \Illuminate\Http\Response */ public function module($program_slug,$module_slug) { $user = Auth::user(); $today = date('Y-m-d'); $program = $user->actual_program(); $module = Module::where('start','<=',$today)->where('slug',$module_slug)->firstOrFail(); return view('fellow.progress.progress-module-sheet')->with( [ 'user'=>$user, 'module' =>$module, "program" => $program ] ); } }
GobiernoFacil/agentes-v2
app/Http/Controllers/FellowProgresses.php
PHP
gpl-3.0
1,600
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head prefix="og: http://ogp.me/ns# dc: http://purl.org/dc/terms/"> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <script src="//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="//oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> <title>Fan page: Michael L. Kuhne</title> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> <!-- Optional theme --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous"> <style type="text/css"> #top{ width: 100%; float: left; } #place{ width: 100%; float: left; } #address{ width: 15%; float: left; } #sgvzl{ width: 80%; float: left; } #credits{ width: 100%; float: left; clear: both; } #location-marker{ width: 1em; } #male-glyph{ width: 1em; } </style> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript" id="sgvzlr_script" src="http://mgskjaeveland.github.io/sgvizler/v/0.6/sgvizler.min.js"></script> <script type="text/javascript"> sgvizler .defaultEndpointURL("http://bibfram.es/fuseki/cobra/query"); //// Leave this as is. Ready, steady, go! $(document).ready(sgvizler.containerDrawAll); </script> <!-- Latest compiled and minified JavaScript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script> <meta name="title" content="Michael L. Kuhne"> <meta property="dc:title" content="Michael L. Kuhne"> <meta property="og:title" content="Michael L. Kuhne"> <meta name="author" content="Michael L. Kuhne"> <meta name="dc:creator" content="Michael L. Kuhne"> </head> <body prefix="cbo: http://comicmeta.org/cbo/ dc: http://purl.org/dc/elements/1.1/ dcterms: http://purl.org/dc/terms/ foaf: http://xmlns.com/foaf/0.1/ oa: http://www.w3.org/ns/oa# rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# schema: http://schema.org/ skos: http://www.w3.org/2004/02/skos/core# xsd: http://www.w3.org/2001/XMLSchema#"> <div id="wrapper" class="container" about="http://ivmooc-cobra2.github.io/resources/fan/2561" typeof="http://comicmeta.org/cbo/Fan"> <div id="top"> <h1> <span property="http://schema.org/name">Michael L. Kuhne</span> <img id="male-glyph" src="/static/resources/img/man.svg" alt="male glyph"> </h1> <dl> <dt> <label for="http://comicmeta.org/cbo/Fan"> <span>type</span> </label> </dt> <dd> <span>http://comicmeta.org/cbo/Fan</span> </dd> </dl> <dl> <dt> <label for="http://schema.org/name"> <span> <a href="http://schema.org/name">name</a> </span> </label> </dt> <dd> <span property="http://schema.org/name">Michael L. Kuhne</span> </dd> </dl> </div> <div id="place" rel="http://schema.org/address" resource="http://ivmooc-cobra2.github.io/resources/place/2400" typeof="http://schema.org/Place"> <h2>Location <a href="http://ivmooc-cobra2.github.io/resources/place/2400"> <img id="location-marker" src="/static/resources/img/location.svg" alt="location marker glyph"> </a> </h2> <div id="address" rel="http://schema.org/address" typeof="http://schema.org/PostalAddress" resource="http://ivmooc-cobra2.github.io/resources/place/2400/address"> <dl> <dt> <label for="http://schema.org/streetAddress"> <span> <a href="http://schema.org/streetAddress">Street address</a> </span> </label> </dt> <dd> <span property="http://schema.org/streetAddress">P.O.B. 12000</span> </dd> </dl> <dl> <dt> <label for="http://schema.org/addressLocality"> <span> <a href="http://schema.org/addressLocality">Address locality</a> </span> </label> </dt> <dd> <span property="http://schema.org/addressLocality">Keesler AFB</span> </dd> </dl> <dl> <dt> <label for="http://schema.org/addressRegion"> <span> <a href="http://schema.org/addressRegion">Address region</a> </span> </label> </dt> <dd> <span property="http://schema.org/addressRegion">MS</span> </dd> </dl> <dl> <dt> <label for="http://schema.org/postalCode"> <span> <a href="http://schema.org/postalCode">Postal code</a> </span> </label> </dt> <dd> <span property="http://schema.org/postalCode">39534</span> </dd> </dl> <dl> <dt> <label for="http://schema.org/addressCountry"> <span> <a href="http://schema.org/addressCountry">Address country</a> </span> </label> </dt> <dd> <span property="http://schema.org/addressCountry">US</span> </dd> </dl> </div> <div id="sgvzl" data-sgvizler-endpoint="http://bibfram.es/fuseki/cobra/query" data-sgvizler-query="PREFIX dc: <http://purl.org/dc/elements/1.1/&gt; &#xA;PREFIX cbo: <http://comicmeta.org/cbo/&gt; &#xA;PREFIX foaf: <http://xmlns.com/foaf/0.1/&gt;&#xA;PREFIX schema: <http://schema.org/&gt;&#xA;SELECT ?lat ?long &#xA;WHERE {&#xA; ?fan schema:address ?Place .&#xA; ?Place schema:geo ?Geo .&#xA; ?Geo schema:latitude ?lat .&#xA; ?Geo schema:longitude ?long .&#xA; FILTER(?fan = <http://ivmooc-cobra2.github.io/resources/fan/2561&gt;)&#xA;}" data-sgvizler-chart="google.visualization.GeoChart" data-sgvizler-loglevel="2" style="width:800px; height:400px;"></div> </div> <div id="letter" rel="http://purl.org/dc/elements/1.1/creator" resource="http://ivmooc-cobra2.github.io/resources/letter/2859"> <dl> <dt> <label for="http://schema.org/streetAddress"> <span> <a href="http://schema.org/streetAddress">Street address</a> </span> </label> </dt> <dd> <span property="http://schema.org/streetAddress">P.O.B. 12000</span> </dd> </dl> </div> <div id="credits">Icons made by <a href="http://www.flaticon.com/authors/simpleicon" title="SimpleIcon">SimpleIcon</a> from <a href="http://www.flaticon.com" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a> </div> </div> </body> </html>
Timathom/timathom.github.io
discovery/resources/fan/2561/index.html
HTML
gpl-3.0
8,334
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <TITLE>IT新技术 第一讲</TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb_2312-80"> </HEAD> <BODY bgcolor="#FFFFFF"> <p><b>&lt;<a href="RISC-024.html">上一页</a>&gt;  &lt;<a href="RISC-026.html">下一页</a>&gt;</b></p> <p><img src="RISC-025.gif" width="959" height="719"> </p> </BODY> </HTML>
AKAMobi/aka.org.cn
docs/Lectures/003/Lecture-3.2.1/Lecture-3.2.1/RISC-025.html
HTML
gpl-3.0
398
<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html> <head> <title>RuntimeByte - jgo.tools.compiler.transl.RuntimeByte</title> <meta name="description" content="RuntimeByte - jgo.tools.compiler.transl.RuntimeByte" /> <meta name="keywords" content="RuntimeByte jgo.tools.compiler.transl.RuntimeByte" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <link href="../../../../lib/template.css" media="screen" type="text/css" rel="stylesheet" /> <link href="../../../../lib/diagrams.css" media="screen" type="text/css" rel="stylesheet" id="diagrams-css" /> <script type="text/javascript"> if(top === self) { var url = '../../../../index.html'; var hash = 'jgo.tools.compiler.transl.RuntimeByte$'; var anchor = window.location.hash; var anchor_opt = ''; if (anchor.length >= 1) anchor_opt = '@' + anchor.substring(1); window.location.href = url + '#' + hash + anchor_opt; } </script> </head> <body class="value"> <div id="definition"> <img src="../../../../lib/object_big.png" /> <p id="owner"><a href="../../../package.html" class="extype" name="jgo">jgo</a>.<a href="../../package.html" class="extype" name="jgo.tools">tools</a>.<a href="../package.html" class="extype" name="jgo.tools.compiler">compiler</a>.<a href="package.html" class="extype" name="jgo.tools.compiler.transl">transl</a></p> <h1>RuntimeByte</h1> </div> <h4 id="signature" class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">object</span> </span> <span class="symbol"> <span class="name">RuntimeByte</span><span class="result"> extends <a href="RuntimeType.html" class="extype" name="jgo.tools.compiler.transl.RuntimeType">RuntimeType</a> with <span class="extype" name="scala.Product">Product</span> with <span class="extype" name="scala.Serializable">Serializable</span></span> </span> </h4> <div id="comment" class="fullcommenttop"><div class="toggleContainer block"> <span class="toggle">Linear Supertypes</span> <div class="superTypes hiddenContent"><span class="extype" name="scala.Serializable">Serializable</span>, <span class="extype" name="java.io.Serializable">Serializable</span>, <span class="extype" name="scala.Product">Product</span>, <span class="extype" name="scala.Equals">Equals</span>, <a href="RuntimeType.html" class="extype" name="jgo.tools.compiler.transl.RuntimeType">RuntimeType</a>, <span class="extype" name="scala.AnyRef">AnyRef</span>, <span class="extype" name="scala.Any">Any</span></div> </div></div> <div id="mbrsel"> <div id="textfilter"><span class="pre"></span><span class="input"><input id="mbrsel-input" type="text" accesskey="/" /></span><span class="post"></span></div> <div id="order"> <span class="filtertype">Ordering</span> <ol> <li class="alpha in"><span>Alphabetic</span></li> <li class="inherit out"><span>By inheritance</span></li> </ol> </div> <div id="ancestors"> <span class="filtertype">Inherited<br /> </span> <ol id="linearization"> <li class="in" name="jgo.tools.compiler.transl.RuntimeByte"><span>RuntimeByte</span></li><li class="in" name="scala.Serializable"><span>Serializable</span></li><li class="in" name="java.io.Serializable"><span>Serializable</span></li><li class="in" name="scala.Product"><span>Product</span></li><li class="in" name="scala.Equals"><span>Equals</span></li><li class="in" name="jgo.tools.compiler.transl.RuntimeType"><span>RuntimeType</span></li><li class="in" name="scala.AnyRef"><span>AnyRef</span></li><li class="in" name="scala.Any"><span>Any</span></li> </ol> </div><div id="ancestors"> <span class="filtertype"></span> <ol> <li class="hideall out"><span>Hide All</span></li> <li class="showall in"><span>Show all</span></li> </ol> <a href="http://docs.scala-lang.org/overviews/scaladoc/usage.html#members" target="_blank">Learn more about member selection</a> </div> <div id="visbl"> <span class="filtertype">Visibility</span> <ol><li class="public in"><span>Public</span></li><li class="all out"><span>All</span></li></ol> </div> </div> <div id="template"> <div id="allMembers"> <div id="values" class="values members"> <h3>Value Members</h3> <ol><li name="scala.AnyRef#!=" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="!=(x$1:AnyRef):Boolean"></a> <a id="!=(AnyRef):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span title="gt4s: $bang$eq" class="name">!=</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.Any#!=" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="!=(x$1:Any):Boolean"></a> <a id="!=(Any):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span title="gt4s: $bang$eq" class="name">!=</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>Any</dd></dl></div> </li><li name="scala.AnyRef###" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="##():Int"></a> <a id="##():Int"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span title="gt4s: $hash$hash" class="name">##</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div> </li><li name="scala.AnyRef#==" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="==(x$1:AnyRef):Boolean"></a> <a id="==(AnyRef):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span title="gt4s: $eq$eq" class="name">==</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.Any#==" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="==(x$1:Any):Boolean"></a> <a id="==(Any):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span title="gt4s: $eq$eq" class="name">==</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>Any</dd></dl></div> </li><li name="scala.Any#asInstanceOf" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="asInstanceOf[T0]:T0"></a> <a id="asInstanceOf[T0]:T0"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">asInstanceOf</span><span class="tparams">[<span name="T0">T0</span>]</span><span class="result">: <span class="extype" name="scala.Any.asInstanceOf.T0">T0</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>Any</dd></dl></div> </li><li name="scala.AnyRef#clone" visbl="prt" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="clone():Object"></a> <a id="clone():AnyRef"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">clone</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.AnyRef">AnyRef</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a href="../../../../java$lang.html" class="extype" name="java.lang">java.lang</a>] </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd> <span class="name">@throws</span><span class="args">(<span> <span class="defval" name="classOf[java.lang.CloneNotSupportedException]">...</span> </span>)</span> </dd></dl></div> </li><li name="jgo.tools.compiler.transl.RuntimeType#desc" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="desc:String"></a> <a id="desc:String"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">val</span> </span> <span class="symbol"> <span class="name">desc</span><span class="result">: <span class="extype" name="scala.Predef.String">String</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd><a href="RuntimeType.html" class="extype" name="jgo.tools.compiler.transl.RuntimeType">RuntimeType</a></dd></dl></div> </li><li name="scala.AnyRef#eq" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="eq(x$1:AnyRef):Boolean"></a> <a id="eq(AnyRef):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">eq</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.AnyRef#equals" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="equals(x$1:Any):Boolean"></a> <a id="equals(Any):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">equals</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div> </li><li name="scala.AnyRef#finalize" visbl="prt" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="finalize():Unit"></a> <a id="finalize():Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">finalize</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a href="../../../../java$lang.html" class="extype" name="java.lang">java.lang</a>] </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd> <span class="name">@throws</span><span class="args">(<span> <span class="symbol">classOf[java.lang.Throwable]</span> </span>)</span> </dd></dl></div> </li><li name="scala.AnyRef#getClass" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="getClass():Class[_]"></a> <a id="getClass():Class[_]"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">getClass</span><span class="params">()</span><span class="result">: <span class="extype" name="java.lang.Class">Class</span>[_]</span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div> </li><li name="scala.Any#isInstanceOf" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="isInstanceOf[T0]:Boolean"></a> <a id="isInstanceOf[T0]:Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">isInstanceOf</span><span class="tparams">[<span name="T0">T0</span>]</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>Any</dd></dl></div> </li><li name="scala.AnyRef#ne" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="ne(x$1:AnyRef):Boolean"></a> <a id="ne(AnyRef):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">ne</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.AnyRef#notify" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="notify():Unit"></a> <a id="notify():Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">notify</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.AnyRef#notifyAll" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="notifyAll():Unit"></a> <a id="notifyAll():Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">notifyAll</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.AnyRef#synchronized" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="synchronized[T0](x$1:=&gt;T0):T0"></a> <a id="synchronized[T0](⇒T0):T0"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">synchronized</span><span class="tparams">[<span name="T0">T0</span>]</span><span class="params">(<span name="arg0">arg0: ⇒ <span class="extype" name="java.lang.AnyRef.synchronized.T0">T0</span></span>)</span><span class="result">: <span class="extype" name="java.lang.AnyRef.synchronized.T0">T0</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.AnyRef#wait" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="wait():Unit"></a> <a id="wait():Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">wait</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd> <span class="name">@throws</span><span class="args">(<span> <span class="defval" name="classOf[java.lang.InterruptedException]">...</span> </span>)</span> </dd></dl></div> </li><li name="scala.AnyRef#wait" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="wait(x$1:Long,x$2:Int):Unit"></a> <a id="wait(Long,Int):Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">wait</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Long">Long</span></span>, <span name="arg1">arg1: <span class="extype" name="scala.Int">Int</span></span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd> <span class="name">@throws</span><span class="args">(<span> <span class="defval" name="classOf[java.lang.InterruptedException]">...</span> </span>)</span> </dd></dl></div> </li><li name="scala.AnyRef#wait" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="wait(x$1:Long):Unit"></a> <a id="wait(Long):Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">wait</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Long">Long</span></span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd> <span class="name">@throws</span><span class="args">(<span> <span class="defval" name="classOf[java.lang.InterruptedException]">...</span> </span>)</span> </dd></dl></div> </li></ol> </div> </div> <div id="inheritedMembers"> <div class="parent" name="scala.Serializable"> <h3>Inherited from <span class="extype" name="scala.Serializable">Serializable</span></h3> </div><div class="parent" name="java.io.Serializable"> <h3>Inherited from <span class="extype" name="java.io.Serializable">Serializable</span></h3> </div><div class="parent" name="scala.Product"> <h3>Inherited from <span class="extype" name="scala.Product">Product</span></h3> </div><div class="parent" name="scala.Equals"> <h3>Inherited from <span class="extype" name="scala.Equals">Equals</span></h3> </div><div class="parent" name="jgo.tools.compiler.transl.RuntimeType"> <h3>Inherited from <a href="RuntimeType.html" class="extype" name="jgo.tools.compiler.transl.RuntimeType">RuntimeType</a></h3> </div><div class="parent" name="scala.AnyRef"> <h3>Inherited from <span class="extype" name="scala.AnyRef">AnyRef</span></h3> </div><div class="parent" name="scala.Any"> <h3>Inherited from <span class="extype" name="scala.Any">Any</span></h3> </div> </div> <div id="groupedMembers"> <div class="group" name="Ungrouped"> <h3>Ungrouped</h3> </div> </div> </div> <div id="tooltip"></div> <div id="footer"> </div> <script defer="defer" type="text/javascript" id="jquery-js" src="../../../../lib/jquery.js"></script><script defer="defer" type="text/javascript" id="jquery-ui-js" src="../../../../lib/jquery-ui.js"></script><script defer="defer" type="text/javascript" id="tools-tooltip-js" src="../../../../lib/tools.tooltip.js"></script><script defer="defer" type="text/javascript" id="template-js" src="../../../../lib/template.js"></script> </body> </html>
thomasmodeneis/jgo-web
static/api/jgo/tools/compiler/transl/RuntimeByte$.html
HTML
gpl-3.0
22,984
"use strict"; /*global templates, ajaxify, utils, bootbox, overrides, socket, config, Visibility*/ var app = app || {}; app.isFocused = true; app.currentRoom = null; app.widgets = {}; app.cacheBuster = null; (function () { var showWelcomeMessage = !!utils.params().loggedin; templates.setGlobal('config', config); app.cacheBuster = config['cache-buster']; bootbox.setDefaults({ locale: config.userLang }); app.load = function() { app.loadProgressiveStylesheet(); var url = ajaxify.start(window.location.pathname.slice(1) + window.location.search + window.location.hash); ajaxify.updateHistory(url, true); ajaxify.end(url, app.template); handleStatusChange(); if (config.searchEnabled) { app.handleSearch(); } $('#content').on('click', '#new_topic', function(){ app.newTopic(); }); require(['components'], function(components) { components.get('user/logout').on('click', app.logout); }); Visibility.change(function(e, state){ if (state === 'visible') { app.isFocused = true; app.alternatingTitle(''); } else if (state === 'hidden') { app.isFocused = false; } }); overrides.overrideBootbox(); overrides.overrideTimeago(); createHeaderTooltips(); app.showEmailConfirmWarning(); socket.removeAllListeners('event:nodebb.ready'); socket.on('event:nodebb.ready', function(data) { if (!app.cacheBuster || app.cacheBuster !== data['cache-buster']) { app.cacheBuster = data['cache-buster']; app.alert({ alert_id: 'forum_updated', title: '[[global:updated.title]]', message: '[[global:updated.message]]', clickfn: function() { window.location.reload(); }, type: 'warning' }); } }); require(['taskbar', 'helpers', 'forum/pagination'], function(taskbar, helpers, pagination) { taskbar.init(); // templates.js helpers helpers.register(); pagination.init(); $(window).trigger('action:app.load'); }); }; app.logout = function() { $.ajax(config.relative_path + '/logout', { type: 'POST', headers: { 'x-csrf-token': config.csrf_token }, success: function() { window.location.href = config.relative_path + '/'; } }); }; app.alert = function (params) { require(['alerts'], function(alerts) { alerts.alert(params); }); }; app.removeAlert = function(id) { require(['alerts'], function(alerts) { alerts.remove(id); }); }; app.alertSuccess = function (message, timeout) { app.alert({ title: '[[global:alert.success]]', message: message, type: 'success', timeout: timeout ? timeout : 5000 }); }; app.alertError = function (message, timeout) { app.alert({ title: '[[global:alert.error]]', message: message, type: 'danger', timeout: timeout ? timeout : 10000 }); }; app.enterRoom = function (room, callback) { callback = callback || function() {}; if (socket && app.user.uid && app.currentRoom !== room) { var previousRoom = app.currentRoom; app.currentRoom = room; socket.emit('meta.rooms.enter', { enter: room }, function(err) { if (err) { app.currentRoom = previousRoom; return app.alertError(err.message); } callback(); }); } }; app.leaveCurrentRoom = function() { if (!socket) { return; } socket.emit('meta.rooms.leaveCurrent', function(err) { if (err) { return app.alertError(err.message); } app.currentRoom = ''; }); }; function highlightNavigationLink() { var path = window.location.pathname; $('#main-nav li').removeClass('active'); if (path) { $('#main-nav li').removeClass('active').find('a[href="' + path + '"]').parent().addClass('active'); } } app.createUserTooltips = function(els) { els = els || $('body'); els.find('.avatar,img[title].teaser-pic,img[title].user-img,div.user-icon,span.user-icon').each(function() { if (!utils.isTouchDevice()) { $(this).tooltip({ placement: 'top', title: $(this).attr('title') }); } }); }; app.createStatusTooltips = function() { if (!utils.isTouchDevice()) { $('body').tooltip({ selector:'.fa-circle.status', placement: 'top' }); } }; app.replaceSelfLinks = function(selector) { selector = selector || $('a'); selector.each(function() { var href = $(this).attr('href'); if (href && app.user.userslug && href.indexOf('user/_self_') !== -1) { $(this).attr('href', href.replace(/user\/_self_/g, 'user/' + app.user.userslug)); } }); }; app.processPage = function () { highlightNavigationLink(); $('.timeago').timeago(); utils.makeNumbersHumanReadable($('.human-readable-number')); utils.addCommasToNumbers($('.formatted-number')); app.createUserTooltips(); app.createStatusTooltips(); app.replaceSelfLinks(); // Scroll back to top of page window.scrollTo(0, 0); }; app.showLoginMessage = function () { function showAlert() { app.alert({ type: 'success', title: '[[global:welcome_back]] ' + app.user.username + '!', message: '[[global:you_have_successfully_logged_in]]', timeout: 5000 }); } if (showWelcomeMessage) { showWelcomeMessage = false; if (document.readyState !== 'complete') { $(document).ready(showAlert); } else { showAlert(); } } }; app.openChat = function (roomId) { if (!app.user.uid) { return app.alertError('[[error:not-logged-in]]'); } require(['chat'], function (chat) { function loadAndCenter(chatModal) { chat.load(chatModal.attr('UUID')); chat.center(chatModal); chat.focusInput(chatModal); } if (chat.modalExists(roomId)) { loadAndCenter(chat.getModal(roomId)); } else { socket.emit('modules.chats.loadRoom', {roomId: roomId}, function(err, roomData) { if (err) { return app.alertError(err.message); } roomData.users = roomData.users.filter(function(user) { return user && parseInt(user.uid, 10) !== parseInt(app.user.uid, 10); }); chat.createModal(roomData, loadAndCenter); }); } }); }; app.newChat = function (touid) { if (!app.user.uid) { return app.alertError('[[error:not-logged-in]]'); } socket.emit('modules.chats.newRoom', {touid: touid}, function(err, roomId) { if (err) { return app.alertError(err.message); } if (!ajaxify.currentPage.startsWith('chats')) { app.openChat(roomId); } else { ajaxify.go('chats/' + roomId); } }); }; var titleObj = { active: false, interval: undefined, titles: [] }; app.alternatingTitle = function (title) { if (typeof title !== 'string') { return; } if (title.length > 0 && !app.isFocused) { if (!titleObj.titles[0]) { titleObj.titles[0] = window.document.title; } require(['translator'], function(translator) { translator.translate(title, function(translated) { titleObj.titles[1] = translated; if (titleObj.interval) { clearInterval(titleObj.interval); } titleObj.interval = setInterval(function() { var title = titleObj.titles[titleObj.titles.indexOf(window.document.title) ^ 1]; if (title) { window.document.title = $('<div/>').html(title).text(); } }, 2000); }); }); } else { if (titleObj.interval) { clearInterval(titleObj.interval); } if (titleObj.titles[0]) { window.document.title = $('<div/>').html(titleObj.titles[0]).text(); } } }; app.refreshTitle = function(title) { if (!title) { return; } require(['translator'], function(translator) { title = config.titleLayout.replace(/&#123;/g, '{').replace(/&#125;/g, '}') .replace('{pageTitle}', function() { return title; }) .replace('{browserTitle}', function() { return config.browserTitle; }); translator.translate(title, function(translated) { titleObj.titles[0] = translated; app.alternatingTitle(''); }); }); }; app.toggleNavbar = function(state) { var navbarEl = $('.navbar'); if (navbarEl) { navbarEl.toggleClass('hidden', !!!state); } }; function createHeaderTooltips() { var env = utils.findBootstrapEnvironment(); if (env === 'xs' || env === 'sm') { return; } $('#header-menu li a[title]').each(function() { if (!utils.isTouchDevice()) { $(this).tooltip({ placement: 'bottom', trigger: 'hover', title: $(this).attr('title') }); } }); if (!utils.isTouchDevice()) { $('#search-form').parent().tooltip({ placement: 'bottom', trigger: 'hover', title: $('#search-button i').attr('title') }); } if (!utils.isTouchDevice()) { $('#user_dropdown').tooltip({ placement: 'bottom', trigger: 'hover', title: $('#user_dropdown').attr('title') }); } } app.handleSearch = function () { var searchButton = $("#search-button"), searchFields = $("#search-fields"), searchInput = $('#search-fields input'); $('#search-form .advanced-search-link').on('mousedown', function() { ajaxify.go('/search'); }); $('#search-form').on('submit', dismissSearch); searchInput.on('blur', dismissSearch); function dismissSearch(){ searchFields.addClass('hidden'); searchButton.removeClass('hidden'); } searchButton.on('click', function(e) { if (!config.loggedIn && !config.allowGuestSearching) { app.alert({ message:'[[error:search-requires-login]]', timeout: 3000 }); ajaxify.go('login'); return false; } e.stopPropagation(); app.prepareSearch(); return false; }); $('#search-form').on('submit', function () { var input = $(this).find('input'); require(['search'], function(search) { search.query({term: input.val()}, function() { input.val(''); }); }); return false; }); }; app.prepareSearch = function() { $("#search-fields").removeClass('hidden'); $("#search-button").addClass('hidden'); $('#search-fields input').focus(); }; function handleStatusChange() { $('[component="header/usercontrol"] [data-status]').off('click').on('click', function(e) { var status = $(this).attr('data-status'); socket.emit('user.setStatus', status, function(err) { if(err) { return app.alertError(err.message); } $('[data-uid="' + app.user.uid + '"] [component="user/status"], [component="header/profilelink"] [component="user/status"]') .removeClass('away online dnd offline') .addClass(status); app.user.status = status; }); e.preventDefault(); }); } app.updateUserStatus = function(el, status) { if (!el.length) { return; } require(['translator'], function(translator) { translator.translate('[[global:' + status + ']]', function(translated) { el.removeClass('online offline dnd away') .addClass(status) .attr('title', translated) .attr('data-original-title', translated); }); }); }; app.newTopic = function (cid) { $(window).trigger('action:composer.topic.new', { cid: cid || ajaxify.data.cid || 0 }); }; app.loadJQueryUI = function(callback) { if (typeof $().autocomplete === 'function') { return callback(); } var scriptEl = document.createElement('script'); scriptEl.type = 'text/javascript'; scriptEl.src = config.relative_path + '/vendor/jquery/js/jquery-ui-1.10.4.custom.js' + (app.cacheBuster ? '?v=' + app.cacheBuster : ''); scriptEl.onload = callback; document.head.appendChild(scriptEl); }; app.showEmailConfirmWarning = function(err) { if (!config.requireEmailConfirmation || !app.user.uid) { return; } var msg = { alert_id: 'email_confirm', type: 'warning', timeout: 0 }; if (!app.user.email) { msg.message = '[[error:no-email-to-confirm]]'; msg.clickfn = function() { app.removeAlert('email_confirm'); ajaxify.go('user/' + app.user.userslug + '/edit'); }; app.alert(msg); } else if (!app.user['email:confirmed'] && !app.user.isEmailConfirmSent) { msg.message = err ? err.message : '[[error:email-not-confirmed]]'; msg.clickfn = function() { app.removeAlert('email_confirm'); socket.emit('user.emailConfirm', {}, function(err) { if (err) { return app.alertError(err.message); } app.alertSuccess('[[notifications:email-confirm-sent]]'); }); }; app.alert(msg); } else if (!app.user['email:confirmed'] && app.user.isEmailConfirmSent) { msg.message = '[[error:email-not-confirmed-email-sent]]'; app.alert(msg); } }; app.parseAndTranslate = function(template, blockName, data, callback) { require(['translator'], function(translator) { if (typeof blockName === 'string') { templates.parse(template, blockName, data, function(html) { translator.translate(html, function(translatedHTML) { translatedHTML = translator.unescape(translatedHTML); callback($(translatedHTML)); }); }); } else { callback = data, data = blockName; templates.parse(template, data, function(html) { translator.translate(html, function(translatedHTML) { translatedHTML = translator.unescape(translatedHTML); callback($(translatedHTML)); }); }); } }); }; app.loadProgressiveStylesheet = function() { var linkEl = document.createElement('link'); linkEl.rel = 'stylesheet'; linkEl.href = config.relative_path + '/js-enabled.css'; document.head.appendChild(linkEl); }; }());
coolme200/NodeBB
public/src/app.js
JavaScript
gpl-3.0
13,309
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package pe.jobalsoft.dao; /** * * @author Aeunius */ public class NewClass { }
Aeunius/Jobalsoft
JobalSoft/src/pe/jobalsoft/dao/NewClass.java
Java
gpl-3.0
287
// ====================================================================== // // Copyright (C) 2016-2020 湖南心莱信息科技有限公司 // All rights reserved // // filename : MpNewsMessage.cs // description : // // created by 李文强 at 2016/09/23 17:10 // Blog:http://www.cnblogs.com/codelove/ // GitHub : https://github.com/xin-lai // Home:http://xin-lai.com // // ====================================================================== namespace Magicodes.WeChat.SDK.Apis.CustomMessage { using Newtonsoft.Json; /// <summary> /// 多图文消息 /// </summary> public class MpNewsMessage : CustomMessageSendApiResultBase { /// <summary> /// 多图文 <see cref="MpNewsMessage"/> class. /// </summary> public MpNewsMessage() { Type = MessageTypes.mpnews; } /// <summary> /// 内容 /// </summary> [JsonProperty("mpnews")] public MpNews MpNewsContent { get; set; } /// <summary> /// Defines the <see cref="MpNews" /> /// </summary> public class MpNews { /// <summary> /// Gets or sets the MediaId /// </summary> [JsonProperty("media_id")] public string MediaId { get; set; } } } }
xin-lai/Magicodes.WeChat.SDK
Magicodes.WeChat.SDK/Magicodes.WeChat.SDK.Core/Apis/CustomMessage/MpNewsMessage.cs
C#
gpl-3.0
1,422
// Metashell - Interactive C++ template metaprogramming shell // Copyright (C) 2016, Abel Sinkovics (abel@sinkovics.hu) // // 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 <metashell/data/process_output.hpp> #include <boost/algorithm/string/replace.hpp> namespace { std::string dos2unix(std::string s_) { boost::algorithm::replace_all(s_, "\r\n", "\n"); return s_; } } namespace metashell { namespace data { process_output dos2unix(process_output o_) { return {o_.status, ::dos2unix(move(o_.standard_output)), ::dos2unix(move(o_.standard_error))}; } bool exit_success(const process_output& o_) { return exit_success(o_.status); } } }
r0mai/metashell
lib/data/src/process_output.cpp
C++
gpl-3.0
1,315
/* * Copyright (C) 2014 Jan Pokorsky * * 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 cz.cas.lib.proarc.webapp.client.widget.nsesss; import cz.cas.lib.proarc.webapp.shared.form.Field; import static cz.cas.lib.proarc.webapp.shared.form.Field.*; import cz.cas.lib.proarc.webapp.shared.form.FieldBuilder; import cz.cas.lib.proarc.webapp.shared.form.Form; import java.util.HashMap; /** * NSESSS forms for DES DESA model. * * @author Jan Pokorsky */ public class DesForms { public static Form spisForm() { Form f = new Form(); f.getFields().add(new FieldBuilder("Spis").setMaxOccurrences(1) .addField(new FieldBuilder("EvidencniUdaje").setMaxOccurrences(1) .addField(new FieldBuilder("Identifikace").setMaxOccurrences(1) .addField(createIdentifikatorField("Identifikator", "Identifikace spisu v evidenci")) .createField()) // Identifikace .addField(new FieldBuilder("Popis").setMaxOccurrences(1).setWidth("400") .addField(new FieldBuilder("Nazev").setTitle("Název spisu").setMaxOccurrences(1).setType(TEXT).setLength(100).setRequired(true).createField()) .addField(new FieldBuilder("Komentar").setTitle("Komentář").setMaxOccurrences(1).setType(TEXTAREA).setLength(255).createField()) .addField(new FieldBuilder("KlicovaSlova").setMaxOccurrences(1) .addField(new FieldBuilder("KlicoveSlovo").setTitle("Klíčová slova").setMaxOccurrences(10).setType(TEXT).setLength(100).createField()) .createField()) // KlicovaSlova .createField()) // Popis .addField(new FieldBuilder("Evidence").setMaxOccurrences(1) .addField(new FieldBuilder("EvidencniCislo").setTitle("Spisová značka").setMaxOccurrences(1).setType(TEXT).setLength(50).setRequired(true).createField()) .addField(new FieldBuilder("UrceneCasoveObdobi").setMaxOccurrences(1) .addField(new FieldBuilder("Rok").setTitle("Časové období evidence").setMaxOccurrences(1).setType(G_YEAR).setRequired(true).createField()) .createField()) // UrceneCasoveObdobi .addField(new FieldBuilder("NazevEvidenceDokumentu").setTitle("Název evidence").setMaxOccurrences(1).setType(TEXT).setLength(100).setRequired(true).createField()) .createField()) // Evidence .addField(new FieldBuilder("Puvod").setMaxOccurrences(1) .addField(new FieldBuilder("DatumVytvoreni").setMaxOccurrences(1) .addField(new FieldBuilder("value").setTitle("Datum vytvoření").setMaxOccurrences(1).setType(DATE).setRequired(true).createField()) .createField()) // DatumVytvoreni .createField()) // Puvod .addField(new FieldBuilder("Trideni").setMaxOccurrences(1).setTitle("Věcná skupina").setRequired(true) .addField(new FieldBuilder("JednoduchySpisovyZnak").setTitle("Kód").setMaxOccurrences(1).setType(SELECT).setLength(50).setRequired(true) .setOptionDataSource(new FieldBuilder("desa-des.rec-cl").setWidth("400") .addField(new FieldBuilder("fullyQcc").setTitle("Kód").createField()) .addField(new FieldBuilder("title").setTitle("Název").createField()) .createField(), // desa-des.rec-cl "classCode", new HashMap<String, String>() {{put("classCode", "JednoduchySpisovyZnak"); put("fullyQcc", "PlneUrcenySpisovyZnak");}}) .createField()) // JednoduchySpisovyZnak .addField(new FieldBuilder("PlneUrcenySpisovyZnak").setTitle("Plný kód").setMaxOccurrences(1).setType(TEXT).setLength(255).setRequired(true).createField()) .createField()) // Trideni .addField(new FieldBuilder("VyrizeniUzavreni").setTitle("Uzavření").setMaxOccurrences(1).setRequired(true) .addField(new FieldBuilder("Datum").setMaxOccurrences(1) .addField(new FieldBuilder("value").setTitle("Datum vyřízení").setMaxOccurrences(1).setType(DATE).setRequired(true).createField()) .createField()) // Datum .addField(new FieldBuilder("Zpusob").setTitle("Způsob vyřízení").setMaxOccurrences(1).setType(COMBO) .addMapValue("vyřízení dokumentem", "vyřízení dokumentem").addMapValue("postoupení", "postoupení").addMapValue("vzetí na vědomí", "vzetí na vědomí").addMapValue("jiný způsob", "jiný způsob") .setRequired(true) .createField()) // Zpusob .addField(new FieldBuilder("Oduvodneni").setTitle("Odůvodnění vyřízení").setMaxOccurrences(1).setType(TEXT).setLength(100).createField()) .addField(new FieldBuilder("Zpracovatel").setMaxOccurrences(1) .addField(createSubjectOsobyInterniField("Zpracovatelé")) // Subjekt .createField()) // Zpracovatel .createField()) // VyrizeniUzavreni .addField(new FieldBuilder("Vyrazovani").setTitle("Skartační režim").setMaxOccurrences(1).setRequired(true) .addField(new FieldBuilder("SkartacniRezim").setMaxOccurrences(1).setRequired(true) .addField(new FieldBuilder("Nazev").setTitle("Název").setMaxOccurrences(1).setType(SELECT).setWidth("400").setLength(100).setRequired(true) .setOptionDataSource(new FieldBuilder("desa-des.rd-cntrl") .addField(new FieldBuilder("acr").setTitle("Kód").createField()) .addField(new FieldBuilder("title").setTitle("Název").createField()) .createField(), "title", new HashMap<String, String>() {{ put("acr", "Identifikator/value"); put("title", "Nazev"); put("reas", "Oduvodneni"); put("action", "SkartacniZnak"); put("period", "SkartacniLhuta"); }}) .createField()) // Nazev .addField(new FieldBuilder("Identifikator").setMaxOccurrences(1) .addField(new FieldBuilder("value").setTitle("Identifikátor skartačního režimu").setMaxOccurrences(1).setType(TEXT).setReadOnly(true).setWidth("400").createField()) .createField()) // Identifikator .addField(new FieldBuilder("Oduvodneni").setTitle("Odůvodnění skartačního režimu").setMaxOccurrences(1).setType(TEXT).setReadOnly(true).setRequired(true).createField()) .addField(new FieldBuilder("SkartacniZnak").setTitle("Skartační znak").setMaxOccurrences(1).setType(SELECT).setReadOnly(true).setRequired(true) .addMapValue("A", "A - Archiv").addMapValue("S", "S - Stoupa").addMapValue("V", "V - Výběr") .createField()) // SkartacniZnak .addField(new FieldBuilder("SkartacniLhuta").setTitle("Skartační lhůta").setMaxOccurrences(1).setType(TEXT).setReadOnly(true).setRequired(true).setWidth("100").createField()) .addField(new FieldBuilder("SpousteciUdalost").setTitle("Spouštěcí událost").setMaxOccurrences(1).setType(TEXT).setLength(2000).setRequired(true).createField()) .createField()) // SkartacniRezim .createField()) // Vyrazovani .addField(new FieldBuilder("Manipulace").setMaxOccurrences(1).setRequired(true) .addField(new FieldBuilder("NezbytnyDokument").setTitle("Nezbytný dokument").setMaxOccurrences(1).setType(RADIOGROUP).setRequired(true) .addMapValue("ano", "Ano").addMapValue("ne", "Ne") .createField()) // NezbytnyDokument .addField(new FieldBuilder("AnalogovyDokument").setTitle("Analogová forma spisu").setMaxOccurrences(1).setType(RADIOGROUP).setRequired(true) .addMapValue("ano", "Ano").addMapValue("ne", "Ne") .createField()) // AnalogovyDokument .addField(new FieldBuilder("DatumOtevreni").setMaxOccurrences(1).setRequired(true) .addField(new FieldBuilder("value").setTitle("Datum otevření spisu").setMaxOccurrences(1).setType(DATE).setRequired(true).createField()) .createField()) // DatumOtevreni .addField(new FieldBuilder("DatumUzavreni").setMaxOccurrences(1) .addField(new FieldBuilder("value").setTitle("Datum uzavření spisu").setMaxOccurrences(1).setType(DATE).setRequired(true).createField()) .createField()) // DatumUzavreni .createField()) // Manipulace .createField()) // EvidencniUdaje // .addField(new FieldBuilder("Dokumenty").createField()) .createField()); // Spis return f; } public static Form intenalDocumentForm() { Form f = new Form(); f.getFields().add(new FieldBuilder("Dokument").setMaxOccurrences(1) .addField(new FieldBuilder("EvidencniUdaje").setMaxOccurrences(1) .addField(new FieldBuilder("Identifikace").setMaxOccurrences(1) .addField(createIdentifikatorField("Identifikator", "Identifikace dokumentu v evidenci")) .createField()) // Identifikace .addField(new FieldBuilder("Popis").setMaxOccurrences(1).setWidth("400") .addField(new FieldBuilder("Nazev").setTitle("Věc").setMaxOccurrences(1).setType(TEXT).setLength(100).setRequired(true).createField()) .addField(new FieldBuilder("Komentar").setTitle("Komentář").setMaxOccurrences(1).setType(TEXTAREA).setLength(255).createField()) .addField(new FieldBuilder("KlicovaSlova").setMaxOccurrences(1) .addField(new FieldBuilder("KlicoveSlovo").setTitle("Klíčová slova").setMaxOccurrences(10).setType(TEXT).setLength(100).createField()) .createField()) // KlicovaSlova .createField()) // Popis .addField(new FieldBuilder("Evidence").setMaxOccurrences(1) .addField(new FieldBuilder("EvidencniCislo").setTitle("Číslo jednací").setMaxOccurrences(1).setType(TEXT).setLength(50).setRequired(true).createField()) .addField(new FieldBuilder("UrceneCasoveObdobi").setMaxOccurrences(1) .addField(new FieldBuilder("Rok").setTitle("Časové období evidence").setMaxOccurrences(1).setType(G_YEAR).setRequired(true).createField()) .createField()) // UrceneCasoveObdobi .addField(new FieldBuilder("NazevEvidenceDokumentu").setTitle("Název evidence").setMaxOccurrences(1).setType(TEXT).setLength(100).setRequired(true).createField()) .createField()) // Evidence .addField(new FieldBuilder("Jazyky").setMaxOccurrences(1) .addField(new FieldBuilder("Jazyk").setTitle("Jazyk").setMaxOccurrences(1).setType(TEXT).setLength(3).createField()) .createField()) // Jazyky .addField(new FieldBuilder("Puvod").setMaxOccurrences(1) .addField(new FieldBuilder("VlastniDokument").setMaxOccurrences(1) .addField(new FieldBuilder("DatumVytvoreni").setMaxOccurrences(1) .addField(new FieldBuilder("value").setTitle("Datum vytvoření").setMaxOccurrences(1).setType(DATE).setRequired(true).createField()) .createField()) // DatumVytvoreni .addField(new FieldBuilder("Autor").setMaxOccurrences(1) .addField(createSubjectOsobyInterniField("Autoři")) .createField()) // Autor .createField()) // VlastniDokument .createField()) // Puvod .addField(new FieldBuilder("Trideni").setTitle("Věcná skupina").setMaxOccurrences(1).setRequired(true) // .addField(new FieldBuilder("Titul_SpisovyZnak").setTitle("Věcná skupina").setMaxOccurrences(1).setType(SELECT).setLength(50).setWidth("400").setRequired(true) // .setOptionDataSource(new FieldBuilder("desa-des.rec-cl") // .addField(new FieldBuilder("fullyQcc").setTitle("Kód").createField()) // .addField(new FieldBuilder("title").setTitle("Název").createField()) // .createField(), // desa-des.rec-cl // "title", new HashMap<String, String>() {{put("classCode", "JednoduchySpisovyZnak"); put("fullyQcc", "PlneUrcenySpisovyZnak");}}) // .createField()) // JednoduchySpisovyZnak // .addField(new FieldBuilder("JednoduchySpisovyZnak").setTitle("Spisový znak").setMaxOccurrences(1).setHidden(true).setType(TEXT).setLength(255).setRequired(true).createField()) // .addField(new FieldBuilder("PlneUrcenySpisovyZnak").setTitle("Plně určený spisový znak").setMaxOccurrences(1).setHidden(true).setType(TEXT).setLength(255).setRequired(true).createField()) .addField(new FieldBuilder("JednoduchySpisovyZnak").setTitle("Kód").setMaxOccurrences(1).setType(SELECT).setLength(50).setRequired(true) .setOptionDataSource(new FieldBuilder("desa-des.rec-cl").setWidth("400") .addField(new FieldBuilder("fullyQcc").setTitle("Kód").createField()) .addField(new FieldBuilder("title").setTitle("Název").createField()) .createField(), // desa-des.rec-cl // "fullyQcc", new HashMap<String, String>() {{put("fullyQcc", "JednoduchySpisovyZnak"); put("title", "PlneUrcenySpisovyZnak");}}) "classCode", new HashMap<String, String>() {{put("classCode", "JednoduchySpisovyZnak"); put("fullyQcc", "PlneUrcenySpisovyZnak");}}) .createField()) // JednoduchySpisovyZnak .addField(new FieldBuilder("PlneUrcenySpisovyZnak").setTitle("Plný kód").setMaxOccurrences(1).setType(TEXT).setLength(255).setRequired(true).createField()) .addField(new FieldBuilder("TypDokumentu").setMaxOccurrences(1).setRequired(true) .addField(new FieldBuilder("Nazev").setTitle("Název").setMaxOccurrences(1).setType(SELECT).setRequired(true).setWidth("400") .setOptionDataSource(new FieldBuilder("desa-des.rec-type").setWidth("500") .addField(new FieldBuilder("title").setTitle("Identifikátor").createField()) .addField(new FieldBuilder("descr").setTitle("Název").createField()) .createField() // desa-des.rec-type , "descr", new HashMap<String, String>() {{put("descr", "Nazev"); put("title", "Identifikator/value");}}) .createField()) .addField(new FieldBuilder("Identifikator").setMaxOccurrences(1) .addField(new FieldBuilder("value").setTitle("Typ dokumentu").setMaxOccurrences(1).setType(TEXT).setRequired(true).setLength(50).setWidth("400").setReadOnly(true).createField()) .createField()) // Identifikator .createField()) // TypDokumentu .createField()) // Trideni .addField(new FieldBuilder("Vyrizeni").setTitle("Vyřizuje").setMaxOccurrences(1).setRequired(true) .addField(new FieldBuilder("Datum").setMaxOccurrences(1) .addField(new FieldBuilder("value").setTitle("Datum vyřízení").setMaxOccurrences(1).setType(DATE).setRequired(true).createField()) .createField()) // Datum .addField(new FieldBuilder("Zpusob").setTitle("Způsob vyřízení").setMaxOccurrences(1).setType(COMBO) .addMapValue("vyřízení dokumentem", "vyřízení dokumentem").addMapValue("postoupení", "postoupení").addMapValue("vzetí na vědomí", "vzetí na vědomí").addMapValue("jiný způsob", "jiný způsob") .setRequired(true) .createField()) // Zpusob .addField(new FieldBuilder("Oduvodneni").setTitle("Odůvodnění vyřízení").setMaxOccurrences(1).setType(TEXT).setLength(100).createField()) .addField(new FieldBuilder("Zpracovatel").setMaxOccurrences(1) .addField(createSubjectOsobyInterniField("Zpracovatelé")) // Subjekt .createField()) // Zpracovatel .addField(new FieldBuilder("Prijemce").setMaxOccurrences(1) .addField(new FieldBuilder("Subjekt").setTitle("Příjemci").setMaxOccurrences(10).setType(CUSTOM_FORM).setRequired(true) .addField(new FieldBuilder("subjectType").setTitle("Typ příjemce").setMaxOccurrences(1).setType(RADIOGROUP) .addMapValue("PravnickaOsoba", "Právnická osoba").addMapValue("FyzickaOsoba", "Fyzická osoba") .createField()) .addField(createIdentifikatorField("IdentifikatorOrganizace", "IČO organizace", false)) .addField(new FieldBuilder("NazevOrganizace").setTitle("Název organizace").setMaxOccurrences(1).setType(TEXT).setLength(100).setRequired(true).createField()) .addField(createIdentifikatorField("IdentifikatorFyzickeOsoby", "Identifikace osoby odesílatele", false)) .addField(new FieldBuilder("NazevFyzickeOsoby").setTitle("Jméno a příjmení osoby").setMaxOccurrences(1).setType(TEXT).setLength(100).setRequired(true).createField()) .addField(new FieldBuilder("OrganizacniUtvar").setTitle("Organizační útvar").setMaxOccurrences(1).setType(TEXT).setLength(100).setRequired(true).createField()) .addField(new FieldBuilder("PracovniPozice").setTitle("Pracovní pozice").setMaxOccurrences(1).setType(TEXT).setLength(100).setRequired(true).createField()) .addField(new FieldBuilder("SidloOrganizace").setTitle("Adresa organizace").setMaxOccurrences(1).setType(TEXT).setLength(2000).createField()) .addField(new FieldBuilder("ElektronickyKontakt").setTitle("E-mail").setMaxOccurrences(1).setType(TEXT).setLength(100).setRequired(true).createField()) // choice 2 .addField(new FieldBuilder("PostovniAdresa").setTitle("Adresa").setMaxOccurrences(1).setType(TEXT).setLength(2000).setRequired(true).createField()) .createField()) // Subjekt .createField()) // Prijemce .createField()) // Vyrizeni .addField(new FieldBuilder("Vyrazovani").setTitle("Skartační režim").setMaxOccurrences(1).setRequired(true) .addField(new FieldBuilder("SkartacniRezim").setMaxOccurrences(1).setRequired(true) .addField(new FieldBuilder("Nazev").setTitle("Název").setMaxOccurrences(1).setType(SELECT).setWidth("400").setLength(100).setRequired(true) .setOptionDataSource(new FieldBuilder("desa-des.rd-cntrl") .addField(new FieldBuilder("acr").setTitle("Kód").createField()) .addField(new FieldBuilder("title").setTitle("Název").createField()) .createField(), "title", new HashMap<String, String>() {{ put("acr", "Identifikator/value"); put("title", "Nazev"); put("reas", "Oduvodneni"); put("action", "SkartacniZnak"); put("period", "SkartacniLhuta"); }}) .createField()) // Nazev .addField(new FieldBuilder("Identifikator").setMaxOccurrences(1) .addField(new FieldBuilder("value").setTitle("Identifikátor skartačního režimu").setMaxOccurrences(1).setType(TEXT).setReadOnly(true).setWidth("400").createField()) .createField()) // Identifikator .addField(new FieldBuilder("Oduvodneni").setTitle("Odůvodnění skartačního režimu").setMaxOccurrences(1).setType(TEXT).setReadOnly(true).setRequired(true).createField()) .addField(new FieldBuilder("SkartacniZnak").setTitle("Skartační znak").setMaxOccurrences(1).setType(SELECT).setReadOnly(true).setRequired(true) .addMapValue("A", "A - Archiv").addMapValue("S", "S - Stoupa").addMapValue("V", "V - Výběr") .createField()) // SkartacniZnak .addField(new FieldBuilder("SkartacniLhuta").setTitle("Skartační lhůta").setMaxOccurrences(1).setType(TEXT).setReadOnly(true).setRequired(true).setWidth("100").createField()) .addField(new FieldBuilder("SpousteciUdalost").setTitle("Spouštěcí událost").setMaxOccurrences(1).setType(TEXT).setLength(2000).setRequired(true).createField()) .createField()) // SkartacniRezim .createField()) // Vyrazovani .addField(new FieldBuilder("Manipulace").setMaxOccurrences(1).setWidth("200").setRequired(true) .addField(new FieldBuilder("NezbytnyDokument").setTitle("Nezbytný dokument").setMaxOccurrences(1).setType(RADIOGROUP).setRequired(true) .addMapValue("ano", "Ano").addMapValue("ne", "Ne") .createField()) // NezbytnyDokument .addField(new FieldBuilder("AnalogovyDokument").setTitle("Analogová forma dokumentu").setMaxOccurrences(1).setType(RADIOGROUP).setRequired(true) .addMapValue("ano", "Ano").addMapValue("ne", "Ne") .createField()) // AnalogovyDokument .createField()) // Manipulace .createField()) // EvidencniUdaje .createField()); // Dokument return f; } public static Form externalDocumentForm() { Form f = new Form(); f.getFields().add(new FieldBuilder("Dokument").setMaxOccurrences(1) .addField(new FieldBuilder("EvidencniUdaje").setMaxOccurrences(1) .addField(new FieldBuilder("Identifikace").setMaxOccurrences(1) .addField(createIdentifikatorField("Identifikator", "Identifikace dokumentu v evidenci")) .createField()) // Identifikace .addField(new FieldBuilder("Popis").setMaxOccurrences(1).setWidth("400") .addField(new FieldBuilder("Nazev").setTitle("Věc").setMaxOccurrences(1).setType(TEXT).setLength(100).setRequired(true).createField()) .addField(new FieldBuilder("Komentar").setTitle("Komentář").setMaxOccurrences(1).setType(TEXTAREA).setLength(255).createField()) .addField(new FieldBuilder("KlicovaSlova").setMaxOccurrences(1) .addField(new FieldBuilder("KlicoveSlovo").setTitle("Klíčová slova").setMaxOccurrences(10).setType(TEXT).setLength(100).createField()) .createField()) // KlicovaSlova .createField()) // Popis .addField(new FieldBuilder("Evidence").setMaxOccurrences(1) .addField(new FieldBuilder("EvidencniCislo").setTitle("Číslo jednací").setMaxOccurrences(1).setType(TEXT).setLength(50).setRequired(true).createField()) .addField(new FieldBuilder("UrceneCasoveObdobi").setMaxOccurrences(1) .addField(new FieldBuilder("Rok").setTitle("Časové období evidence").setMaxOccurrences(1).setType(G_YEAR).setRequired(true).createField()) .createField()) // UrceneCasoveObdobi .addField(new FieldBuilder("NazevEvidenceDokumentu").setTitle("Název evidence").setMaxOccurrences(1).setType(TEXT).setLength(100).setRequired(true).createField()) .createField()) // Evidence .addField(new FieldBuilder("Jazyky").setMaxOccurrences(1) .addField(new FieldBuilder("Jazyk").setTitle("Jazyk").setMaxOccurrences(1).setType(TEXT).setLength(3).createField()) .createField()) // Jazyky .addField(new FieldBuilder("Puvod").setMaxOccurrences(1) .addField(new FieldBuilder("DorucenyDokument").setMaxOccurrences(1) .addField(new FieldBuilder("DatumDoruceni").setMaxOccurrences(1) .addField(new FieldBuilder("value").setTitle("Datum doručení").setMaxOccurrences(1).setType(DATE).setRequired(true).createField()) .createField()) // DatumVytvoreni // Odesilatel/tOsobaExterni/Subjekt:tSubjektExterni/ .addField(new FieldBuilder("Odesilatel").setMaxOccurrences(1) .addField(new FieldBuilder("Subjekt").setTitle("Odesílatel").setMaxOccurrences(1).setType(CUSTOM_FORM).setRequired(true) .addField(new FieldBuilder("subjectType").setTitle("Typ příjemce").setMaxOccurrences(1).setType(RADIOGROUP) .addMapValue("PravnickaOsoba", "Právnická osoba").addMapValue("FyzickaOsoba", "Fyzická osoba") .createField()) .addField(createIdentifikatorField("IdentifikatorOrganizace", "IČO organizace")) .addField(new FieldBuilder("NazevOrganizace").setTitle("Název organizace").setMaxOccurrences(1).setType(TEXT).setLength(100).createField()) .addField(new FieldBuilder("SidloOrganizace").setTitle("Adresa organizace").setMaxOccurrences(1).setType(TEXT).setLength(2000).setRequired(true).createField()) .addField(createIdentifikatorField("IdentifikatorFyzickeOsoby", "Ev. číslo osoby", false)) .addField(new FieldBuilder("NazevFyzickeOsoby").setTitle("Jméno a příjmení osoby").setMaxOccurrences(1).setType(TEXT).setLength(100).createField()) .addField(new FieldBuilder("OrganizacniUtvar").setTitle("Organizační útvar").setMaxOccurrences(1).setType(TEXT).setLength(100).createField()) .addField(new FieldBuilder("PracovniPozice").setTitle("Pracovní pozice").setMaxOccurrences(1).setType(TEXT).setLength(100).createField()) .addField(new FieldBuilder("ElektronickyKontakt").setTitle("Email").setMaxOccurrences(1).setType(TEXT).setLength(100).createField()) // choice 2 .addField(new FieldBuilder("PostovniAdresa").setTitle("Adresa").setMaxOccurrences(1).setType(TEXT).setLength(2000).setRequired(true).createField()) .createField()) .createField()) // Odesilatel .createField()) // VlastniDokument .createField()) // Puvod .addField(new FieldBuilder("Trideni").setTitle("Věcná skupina").setMaxOccurrences(1).setRequired(true) .addField(new FieldBuilder("JednoduchySpisovyZnak").setTitle("Kód").setMaxOccurrences(1).setType(SELECT).setLength(50).setRequired(true) .setOptionDataSource(new FieldBuilder("desa-des.rec-cl").setWidth("400") .addField(new FieldBuilder("fullyQcc").setTitle("Kód").createField()) .addField(new FieldBuilder("title").setTitle("Název").createField()) .createField(), // desa-des.rec-cl // "fullyQcc", new HashMap<String, String>() {{put("fullyQcc", "JednoduchySpisovyZnak"); put("title", "PlneUrcenySpisovyZnak");}}) "classCode", new HashMap<String, String>() {{put("classCode", "JednoduchySpisovyZnak"); put("fullyQcc", "PlneUrcenySpisovyZnak");}}) .createField()) // JednoduchySpisovyZnak .addField(new FieldBuilder("PlneUrcenySpisovyZnak").setTitle("Plný kód").setMaxOccurrences(1).setType(TEXT).setLength(255).setRequired(true).createField()) .addField(new FieldBuilder("TypDokumentu").setMaxOccurrences(1).setRequired(true) .addField(new FieldBuilder("Nazev").setTitle("Název").setMaxOccurrences(1).setType(SELECT).setRequired(true).setWidth("400") .setOptionDataSource(new FieldBuilder("desa-des.rec-type").setWidth("500") .addField(new FieldBuilder("title").setTitle("Identifikátor").createField()) .addField(new FieldBuilder("descr").setTitle("Název").createField()) .createField() // desa-des.rec-type , "descr", new HashMap<String, String>() {{put("descr", "Nazev"); put("title", "Identifikator/value");}}) .createField()) .addField(new FieldBuilder("Identifikator").setMaxOccurrences(1) .addField(new FieldBuilder("value").setTitle("Typ dokumentu").setMaxOccurrences(1).setType(TEXT).setRequired(true).setLength(50).setWidth("400").setReadOnly(true).createField()) .createField()) // Identifikator .createField()) // TypDokumentu .createField()) // Trideni .addField(new FieldBuilder("Vyrizeni").setTitle("Vyřizuje").setMaxOccurrences(1).setRequired(true) .addField(new FieldBuilder("Datum").setMaxOccurrences(1) .addField(new FieldBuilder("value").setTitle("Datum vyřízení").setMaxOccurrences(1).setType(DATE).setRequired(true).createField()) .createField()) // Datum .addField(new FieldBuilder("Zpusob").setTitle("Způsob vyřízení").setMaxOccurrences(1).setType(COMBO) .addMapValue("vyřízení dokumentem", "vyřízení dokumentem").addMapValue("postoupení", "postoupení").addMapValue("vzetí na vědomí", "vzetí na vědomí").addMapValue("jiný způsob", "jiný způsob") .setRequired(true) .createField()) // Zpusob .addField(new FieldBuilder("Oduvodneni").setTitle("Odůvodnění vyřízení").setMaxOccurrences(1).setType(TEXT).setLength(100).createField()) .addField(new FieldBuilder("Zpracovatel").setMaxOccurrences(1) .addField(createSubjectOsobyInterniField("Zpracovatelé")) // Subjekt .createField()) // Zpracovatel .createField()) // Vyrizeni .addField(new FieldBuilder("Vyrazovani").setTitle("Skartační režim").setMaxOccurrences(1).setRequired(true) .addField(new FieldBuilder("SkartacniRezim").setMaxOccurrences(1).setRequired(true) .addField(new FieldBuilder("Nazev").setTitle("Název").setMaxOccurrences(1).setType(SELECT).setWidth("400").setLength(100).setRequired(true) .setOptionDataSource(new FieldBuilder("desa-des.rd-cntrl") .addField(new FieldBuilder("acr").setTitle("Kód").createField()) .addField(new FieldBuilder("title").setTitle("Název").createField()) .createField(), "title", new HashMap<String, String>() {{ put("acr", "Identifikator/value"); put("title", "Nazev"); put("reas", "Oduvodneni"); put("action", "SkartacniZnak"); put("period", "SkartacniLhuta"); }}) .createField()) // Nazev .addField(new FieldBuilder("Identifikator").setMaxOccurrences(1) .addField(new FieldBuilder("value").setTitle("Identifikátor skartačního režimu").setMaxOccurrences(1).setType(TEXT).setReadOnly(true).setWidth("400").createField()) .createField()) // Identifikator .addField(new FieldBuilder("Oduvodneni").setTitle("Odůvodnění skartačního režimu").setMaxOccurrences(1).setType(TEXT).setReadOnly(true).setRequired(true).createField()) .addField(new FieldBuilder("SkartacniZnak").setTitle("Skartační znak").setMaxOccurrences(1).setType(SELECT).setReadOnly(true).setRequired(true) .addMapValue("A", "A - Archiv").addMapValue("S", "S - Stoupa").addMapValue("V", "V - Výběr") .createField()) // SkartacniZnak .addField(new FieldBuilder("SkartacniLhuta").setTitle("Skartační lhůta").setMaxOccurrences(1).setType(TEXT).setReadOnly(true).setRequired(true).setWidth("100").createField()) .addField(new FieldBuilder("SpousteciUdalost").setTitle("Spouštěcí událost").setMaxOccurrences(1).setType(TEXT).setLength(2000).setRequired(true).createField()) .createField()) // SkartacniRezim .createField()) // Vyrazovani .addField(new FieldBuilder("Manipulace").setMaxOccurrences(1).setWidth("200").setRequired(true) .addField(new FieldBuilder("NezbytnyDokument").setTitle("Nezbytný dokument").setMaxOccurrences(1).setType(RADIOGROUP).setRequired(true) .addMapValue("ano", "Ano").addMapValue("ne", "Ne") .createField()) // NezbytnyDokument .addField(new FieldBuilder("AnalogovyDokument").setTitle("Analogová forma dokumentu").setMaxOccurrences(1).setType(RADIOGROUP).setRequired(true) .addMapValue("ano", "Ano").addMapValue("ne", "Ne") .createField()) // AnalogovyDokument .createField()) // Manipulace .createField()) // EvidencniUdaje .createField()); // Dokument return f; } private static Field createIdentifikatorField(String elmName, String title) { return createIdentifikatorField(elmName, title, true); } private static Field createIdentifikatorField(String elmName, String title, Boolean required) { return new FieldBuilder(elmName).setMaxOccurrences(1) .addField(new FieldBuilder("value").setTitle(title).setMaxOccurrences(1).setType(TEXT).setRequired(required).setLength(50).setWidth("400").createField()) .createField(); } private static Field createSubjectOsobyInterniField(String title) { return new FieldBuilder("Subjekt").setTitle(title).setMaxOccurrences(10).setRequired(true) .addField(createIdentifikatorField("IdentifikatorOrganizace", "IČO organizace")) .addField(new FieldBuilder("NazevOrganizace").setTitle("Název organizace").setMaxOccurrences(1).setType(TEXT).setLength(100).setRequired(true).createField()) .addField(createIdentifikatorField("IdentifikatorFyzickeOsoby", "Ev. číslo osoby")) .addField(new FieldBuilder("NazevFyzickeOsoby").setTitle("Jméno a příjmení osoby").setMaxOccurrences(1).setType(TEXT).setLength(100).setRequired(true).createField()) .addField(new FieldBuilder("OrganizacniUtvar").setTitle("Organizační útvar").setMaxOccurrences(1).setType(TEXT).setLength(100).setRequired(true).createField()) .addField(new FieldBuilder("PracovniPozice").setTitle("Pracovní pozice").setMaxOccurrences(1).setType(TEXT).setLength(100).setRequired(true).createField()) .addField(new FieldBuilder("SidloOrganizace").setTitle("Adresa organizace").setMaxOccurrences(1).setType(TEXT).setLength(2000).setRequired(true).createField()) .createField(); } }
proarc/proarc
proarc-webapp/src/main/java/cz/cas/lib/proarc/webapp/client/widget/nsesss/DesForms.java
Java
gpl-3.0
39,211
<?php // Heading $_['heading_title'] = '幻灯片'; // Text $_['text_module'] = '模块管理'; $_['text_success'] = '成功:您已修改幻灯片模块!'; $_['text_content_top'] = '内容的上面'; $_['text_content_bottom'] = '内容的底部'; $_['text_column_left'] = '左列显示'; $_['text_column_right'] = '右列显示'; // Entry $_['entry_banner'] = '横幅:'; $_['entry_dimension'] = '尺寸 (W x H):'; $_['entry_layout'] = '布局:'; $_['entry_position'] = '显示位置:'; $_['entry_status'] = '状态:'; $_['entry_sort_order'] = '排序:'; // Error $_['error_permission'] = '警告:您没有权限修改幻灯片模块!'; $_['error_dimension'] = '宽度&amp; 高度必填!'; ?>
jiedan/opencart
upload/admin/language/chinese/module/slideshow.php
PHP
gpl-3.0
823
#include "Barycentric.h" #include <iostream> // std::cout #include <sstream> // std::stringstream using namespace std; Barycentric::Barycentric(double u, double v, double w) { this->u = u; this->v = v; this->w = w; } string Barycentric::ToString() { stringstream sstream; sstream << "(" << u << ", " << v << ", " << w << ")"; return sstream.str(); } bool Barycentric::IsValid() { if (u < 0.0 || v < 0.0 || w < 0.0) { return false; } if (abs( 1.0 - u - v - w) > 0.000001) { return false; } return true; }
jmanek/AlphaCut
src/Barycentric.cpp
C++
gpl-3.0
553
#ifndef WITH_CMAKE #include "ester-config.h" #endif #include "star.h" #include "matplotlib.h" extern "C" { #include <stdlib.h> } // take a model and modify the resolution (nth, ndomains, number of // points in each domain) // object == remapper defined here // used to move from one grid to another // be careful of discontinuities that might fall in the middle of a // domain. void star2d::remap(int ndom_in,int *npts_in,int nth_in,int nex_in) { remapper red(map); // declaration object of class remapper red.set_ndomains(ndom_in); red.set_npts(npts_in); red.set_nt(nth_in); red.set_nex(nex_in); if(ndom_in!=ndomains) remap_domains(ndom_in,red); // the new R_i are now known map=red.get_map(); // update the mapping interp(&red); // interpolate the variable on the new update } // Some domains have boundaries imposed by the physics and these // boundaries cannot be moved (ex. CC & RZ interface). // domain_type = integer for CC RZ CZ (see star.h) bool star2d::remap_domains(int ndom, remapper &red) { // Count zones int nzones=1; std::vector<int> index; // Here look for interface between zones of different type. for(int n=1,type=domain_type[0];n<ndomains;n++) { if(domain_type[n]!=type) { index.push_back(n-1); nzones++; type=domain_type[n]; } } // index == index of interface sepa. zone of diff type from center to // surface index.push_back(ndomains-1); // zif = zeta of interfaces of all zones before remapping matrix zif(nzones,nth); for(int n=0,j0=-1,izone=0;n<ndomains;n++) { j0+=map.gl.npts[n]; if(n==index[izone]) { zif.setrow(izone,z(j0)*ones(1,nth)); izone++; } } std::vector<int> index_new; // test if interpolation necessary index_new=distribute_domains(ndom,zif,true); // if nothing has changed return if(index_new==index&&ndom==ndomains) return false; // compute new indices of interfaces between zones and recompute the // zeta of the new domains (zif) index_new=distribute_domains(ndom,zif); red.set_R(zeros(1,nth).concatenate(map.zeta_to_r(zif))); for(int n=0;n<nzones;n++) // do not update the interface between zones: red.set_fixed(index_new[n]+1,index[n]+1); // Update domain_type (each domain is tagged with the zone type) std::vector<int> domain_type_new(ndom,0); for(int n=0,izone=0;n<ndom;n++) { domain_type_new[n]=domain_type[index[izone]]; if(n==index_new[izone]) izone++; } domain_type=domain_type_new; conv=0; int n=0; while(domain_type[n++]==CORE) conv++; // update of the conv variable return true; } // if check_only 'True', return the indices of the zones interfaces // usually used with check_only "false" std::vector<int> star2d::distribute_domains(int ndom,matrix &zif,bool check_only) const { matrix dlogT; int nzones=zif.nrows(); if(nzones>ndom) { ester_err("Error: At least %d domains are needed for this model\n",nzones); } // Calculate Delta(log(T)) in each zone at theta=0 dlogT.zero(nzones,1); for(int n=0;n<nzones;n++) { dlogT(n)=-log(map.gl.eval(PRES.col(-1),zif(n,-1))(0)); if(n) dlogT(n)+=log(map.gl.eval(PRES.col(-1),zif(n-1,-1))(0)); } // Distribute the domains (a limited number) into the different zones // so as to decreases optimally the LogT jump between two following // domains interfaces. int ndomi[nzones]; // Number of domains in each zone for(int n=0;n<nzones;n++) ndomi[n]=1; // Distribute domains based on dlogT for(int n=nzones;n<ndom;n++) { double dTi=0; int k=0; for(int i=0;i<nzones;i++) if(dlogT(i)/ndomi[i]>dTi) { k=i; dTi=dlogT(i)/ndomi[i]; } ndomi[k]++; } // Calculate the new indices of zone interfaces std::vector<int> index; index.resize(nzones); for(int n=0,k=1,izone=0;n<ndom-1;n++,k++) { if(k==ndomi[izone]) { index[izone]=n; k=0; izone++; } } index[nzones-1]=ndom-1; if(check_only) return index; // Find new boundaries (ie the new zetai= zif_new) on the old zeta-grid matrix zif_new(ndom,nth); matrix logTi(ndom-1,nth); matrix logT0,logT1(1,nth); logT0=zeros(1,nth); for(int j=0;j<nth;j++) logT1(j)=log(map.gl.eval(PRES.col(j),zif(0,j))(0)); for(int n=0,k=1,izone=0;n<ndom-1;n++,k++) { if(k==ndomi[izone]) { k=0; izone++; // evaluate PRES on the interfaces bounding the domain: for(int j=0;j<nth;j++) { logT0(j)=log(map.gl.eval(PRES.col(j),zif(izone-1,j))(0)); logT1(j)=log(map.gl.eval(PRES.col(j),zif(izone,j))(0)); } logTi.setrow(n,logT0); } else { // For the interfaces of domains inside the same zone attribute a value // of the log(temperature) as a linear function of the domain rank logTi.setrow(n,logT0+(logT1-logT0)*((double) k)/ndomi[izone]); } } // A priori the "temperature" (in fact the variable PRES) on the // interfaces of zones is not constant; hence the interfaces of domains // inside a zone have not a constant temperature. But we like to have // isothermal interfaces of domain inside a zone for (eg) numerical stability // so the option ifdef.... #ifdef T_CONSTANT_DOMAINS logTi=map.leg.eval_00(logTi,0)*ones(1,nth); #endif zif_new.setblock(0,ndom-2,0,-1,find_boundaries(logTi)); for(int izone=0;izone<nzones;izone++) zif_new.setrow(index[izone],zif.row(izone)); zif=zif_new; return index; } // give a function logTi(theta) and find the associated zeta_i(theta_k) // of the surface // PRES(zeta,theta_k)=logTi(theta_k) // the zeta_k(theta_k) are estimated with a Newton solver matrix star2d::find_boundaries(const matrix &logTi) const { matrix zi(logTi.nrows(),nth); for(int j=0;j<nth;j++) { matrix zj,dzj,yj,dyj,TT; zj=zeros(logTi.nrows(),1); int l=0; for(int k=0;k<nr;k++) { if(PRES(k,j)<logTi(l,j)) { zj(l)=z(k-1); l++; if(l==logTi.nrows()) break; } } if(l<logTi.nrows()) for(int k=l;k<logTi.nrows();k++) zj(k)=z(-1); int fin=0,nit=0; while(fin<3) { yj=log(map.gl.eval(PRES.col(j),zj,TT)); dyj=(TT,(D,log(PRES).col(j))); dzj=-(yj-logTi.col(j))/dyj; if(max(abs(dzj))<1e-10) fin++; dzj=max(dzj,-zj/2); dzj=min(dzj,(1-zj)/2); zj+=dzj; nit++; if(nit>100) { plt::clf(); plt::plot(r, log(T), "$T$"); for (int i=0; i<logTi.nrows(); i++) { plt::axvline(zj(i)); plt::axhline(logTi(i)); LOGE("ri%d zj=%e, dzj=%e\n", i, zj(i), dzj(i)); } LOGE("No convergence in find_boundaries"); plt::show(true); ester_err("No convergence in find_boundaries\n"); } } zi.setcol(j,zj); } return zi; } matrix star2d::distribute_domains(int ndom,int &conv_new,double p_cc) const { // conv_new ==> output // p_cc ==> input // ndom ==> input // called by check_map to redistribute domain when conv has changed (CC // has appeared or disappeared) int j; double p_s; conv_new=conv; p_s=map.leg.eval_00(PRES.row(-1),0)(0); // pcc=0 is default value at start the core may exist or not (depend on // conv) if(p_cc==0) { j=0; for(int n=0;n<conv;n++) j+=map.gl.npts[n]; p_cc=map.leg.eval_00(PRES.row(j),0)(0); } // Here star redistribute domains as in "distribute_domains(other arg...)" double drad=(log(p_cc)-log(p_s)); double dconv=(0.-log(p_cc)); if(!conv) dconv=0; conv_new=conv==0?0:1; for(int n=1+conv_new;n<ndom;n++) { if(dconv>drad) { conv_new++; dconv=(0.-log(p_cc))/conv_new; } else drad=(log(p_cc)-log(p_s))/(n+1-conv_new); } matrix pif(ndom,1); // pressure at domain interfaces for(int n=0;n<conv_new;n++) { pif(n)=exp(-(n+1)*dconv); } for(int n=0;n<ndom-conv_new;n++) { pif(n+conv_new)=exp(log(p_cc)-(n+1)*drad); } return pif; } // First version of find_boundaries but still used in check_map // to do: could be replaced by the new find_boundaries...??? // Find iso "PRES" from the value of pif(idom) // pif = input param matrix star2d::find_boundaries_old(matrix pif) const { matrix R(pif.nrows(),nth); for(int j=0;j<nth;j++) { matrix zj,dzj,pj,dpj,TT; zj=zeros(pif.nrows(),1); int l=0; for(int k=0;k<nr;k++) { if(PRES(k,j)<pif(l)) { zj(l)=z(k-1); l++; if(l==pif.nrows()) break; } } if(l<pif.nrows()) for(int k=l;k<pif.nrows();k++) zj(k)=z(-1); int fin=0,nit=0; while(fin<3) { pj=log(map.gl.eval(PRES.col(j),zj,TT)); dpj=(TT,(D,log(PRES).col(j))); dzj=-(pj-log(pif))/dpj; if(max(abs(dzj))<1e-10) fin++; dzj=max(dzj,-zj/2); dzj=min(dzj,(1-zj)/2); zj+=dzj; nit++; if(nit>100) { ester_err("No convergence in find_boundaries\n"); } } R.setcol(j,map.gl.eval(r.col(j),zj)); } return R; } void star2d::check_map() { double pcc; matrix Rcc,pif; int conv_new; remapper *red; if(check_convec(pcc,Rcc)!=conv) { // does the following if a CC appears or disappears matrix R(ndomains+1,nth); red=new remapper(map); if(conv) { // CC has disappeared ! conv=0; for(int n=0;n<ndomains;n++) { if(n<conv) domain_type[n]=CORE; //unnecessary else domain_type[n]=RADIATIVE; // always true } pif=distribute_domains(ndomains,conv_new); R.setblock(1,-2,0,-1,find_boundaries_old(pif.block(0,-2,0,0))); red->set_R(R); domain_type.resize(ndomains); } else { // There is a CC that has been discovered by check_conv conv=1; pif=distribute_domains(ndomains,conv_new,pcc); conv=conv_new; // conv_new may be higher than 1 if big core! for(int n=0;n<ndomains;n++) { if(n<conv) domain_type[n]=CORE; else domain_type[n]=RADIATIVE; } R.setblock(1,-2,0,-1,find_boundaries_old(pif.block(0,-2,0,0))); R.setrow(conv,Rcc); red->set_R(R); } } else { // Check if domain boundaries still verify the rule of not more than // factor "10" of PRES between two domain boundaries // called after one Newton iteration red=new remapper(map); if(!remap_domains(ndomains,*red)) {delete red;return;} } if(config.verbose) {printf("Remapping...");fflush(stdout);} // Install the new mapping and do interpolation for this mapping map=red->get_map(); interp(red); delete red; if(config.verbose) printf("Done\n"); } // check_convec detects the appearance of a convective core but is not // used to move the core boundary int star2d::check_convec(double &p_cc,matrix &Rcc) { if(!core_convec) return 0; // core_covec: input param to disable CC if(conv) { int j=0; for(int n=0;n<conv;n++) j+=map.gl.npts[n]; // number of grid in CC if(z(j)<min_core_size) { if(config.verbose) printf("Size(convective core) < min_core_size. Removing...\n"); return 0; } else return conv; } // else int i=0; while(z(i)<1.05*min_core_size) i++; // "i" is the first grid point where Schwarzschild is tested (to avoid // too small cores) matrix schw; // Schwarzschild criterion // schw = -(grad P).(grad s) // if schw > 0 then stable // if schw < 0 then unstable = convection zone schw=-(map.gzz*(D,p)+map.gzt*(p,Dt))*((D,log(T))-eos.del_ad*(D,log(p))) -(map.gzt*(D,p)+map.gtt*(p,Dt))*((log(T),Dt)-eos.del_ad*(log(p),Dt)); schw.setrow(0,zeros(1,nth)); schw=schw/r/r; schw.setrow(0,zeros(1,nth)); schw.setrow(0,-(D.row(0),schw)/D(0,0)); if(map.leg.eval_00(schw.row(i),0)(0)>=0) return 0; // if Sch > 0 no CC (or CC too small) and return if(config.verbose) printf("Found convective core\n"); if(ndomains==1) { fprintf(stderr,"Warning: At least 2 domains are needed to deal with core convection\n"); } while(schw(i,-1)<0) i++; // look for change of sign of schw double zi=z(i); matrix dschw; dschw=(D,schw); Rcc=zeros(1,nth); matrix pcore(Rcc); for(int j=nth-1;j>=0;j--) { int fin=0; double schwi,dschwi,dzi; matrix TT; while(fin<3) { schwi=map.gl.eval(schw.col(j),zi,TT)(0); dschwi=(TT,dschw.col(j))(0); dzi=-schwi/dschwi; if(fabs(dzi)<1e-9) fin++; zi+=dzi; } Rcc(j)=map.gl.eval(r.col(j),zi,TT)(0); // R(theta) of the CC pcore(j)=(TT,PRES.col(j))(0); // PRES on R_CC(theta) } p_cc=map.leg.eval_00(pcore,0)(0); // p_cc=PRES at theta=0 return 1; }
ester-project/ester
src/star/star_map.cpp
C++
gpl-3.0
13,687
use crate::components::ComponentInner; impl<M, E> printspool_config_form::Configurable<M> for ComponentInner<M, E> where M: printspool_config_form::Model, E: Default, { fn id(&self) -> async_graphql::ID { format!("component-{}", self.id).into() } fn model(&self) -> &M { &self.model } fn model_version(&self) -> i32 { self.model_version } }
tegh/tegh-daemon
crates/machine/src/components/configurable_component.rs
Rust
gpl-3.0
400
/* b-script Copyright (C) 2011 Thijs Jeffry de Haas 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/>. */ #pragma once #include "expression.h" namespace ast { class ClassDeclaration; class Declaration; class MemberAccessExpression; class BinaryExpression : public Expression { public: typedef enum { plus, minus, mul, div, mod, lt, leq, gt, geq, eq, neq, and_, or_, } Type; static const char *operationNames[]; typedef enum { bool_, int_, float_, other, } DataType; Type type; DataType dataType; Expression *leftExpr, *rightExpr; ClassDeclaration *typeDecl; MemberAccessExpression *customOpCall; BinaryExpression(Type type, Expression *leftExpr, Expression *rightExpr); ~BinaryExpression(); Declaration* getType() { return (Declaration*)typeDecl; } virtual void contextAnalysis(DeclarationCollection &declarationCollection); virtual void execute(Stack2 &stack); virtual void executeCleanUp(Stack2 &stack); virtual bool isLValue() { return false; } virtual bool isRValue() { return leftExpr->isRValue() && rightExpr->isRValue(); } virtual void generateCode(CodeGeneratorInterface &cg); }; }
jeff-dh/b-script
src/ast/expressions/binaryExpression.h
C
gpl-3.0
2,038
<?php /** * This abstract (static) class is for defining a standard way that field types * can be created. The system can them look at all instances that implement * this interface and present them to the user. The advantage to this is that * modules can define their own form fields as long as it implements this * interface * * @author Adam Buckley <adam@2pisoftware.com> */ abstract class FormFieldInterface { // The definition of what form types this class can manipulate // Format should be ["<NAME>" => "<DB VALUE>"] (note the types // defined here are persisted against the form object) protected static $_respondsTo = [ // ["Money" => "money"] ]; /** * The list of types that the interface responds to * This will be used to generate a listing of the available form * fields, therefore they can be anything * * @return array */ public static function respondsTo() { return static::$_respondsTo; } /** * Returns whether or not this class can interact with a given type * * @param String $type * @return boolean */ public static function doesRespondTo($type) { foreach (static::$_respondsTo as $respondsTo) { if (in_array($type, $respondsTo)) { return true; } } return false; } /** * Returns the form element * * @param String $type * @return boolean */ public static function formType($type) { return null; } /** * Returns a form for adding metadata to a field * * @param string $type * @return null|array */ public static function metadataForm($type, Web $w) { return null; } /** * This is where the 'magic' happens. Based on the given type, the class * will modify output, the producer of these classes are entirely responsible * for making sure the output here is capable of dealing with errors * * The recommendation is to return the $value in the event of an error (like * an unknown type) * * @param FormValue $form_value * @param \Web $w * @param mixed $metadata (optional) * @return mixed */ public static function modifyForDisplay(FormValue $form_value, $w, $metadata = null) { return $value; } /** * E.g. for error handling * public static function modifyForDisplay($type, $value) { * if (!$this->doesRespondTo($type)) { * return $value; * } * * // Do something to $value * return $value; * } */ /** * Much like the modifyForDisplay function, this function is for * manipulating the value, you can modify it ready for * persistence. * * An example of these two functions at work would be storing a datetime * value as a unix timestamp; in modifyForDisplay, you would convert $value * from a unix timestamp to a date time string (e.g 'H:i d-m-Y' format) and * in the modifyForPersistance function you would convert the string back to * a unix timestamp using strtotime() * * @see FormFieldInterface::modifyForDisplay() * @param FormValue $form_value * @return mixed */ public static function modifyForPersistance(FormValue $form_value) { return $value; } /** * Filter form metadata matching key * * @param FormMetaData[] $metadata metadata array to search for matching keys * @param String $key key to seek matching metadata * @return FormMetaData|null */ public static function getMetadataForKey($metadata, $key) { if (!empty($metadata)) { foreach ($metadata as $_meta) { if ($_meta->meta_key == $key) { return $_meta; } } } return null; } public static function getReadableType($type) { foreach (static::$_respondsTo as $respondsTo) { if ($type == $respondsTo[1]) { return $respondsTo[0]; } } return $type; } }
2pisoftware/cmfive-core
system/modules/form/models/FormFieldInterface.php
PHP
gpl-3.0
4,219
// Tests for instrumentation of templated code. Each instantiation of a template // should be instrumented separately. // RUN: %clang_cc1 -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-templates.cpp -std=c++11 -o - -emit-llvm -fprofile-instrument=clang > %tgen // RUN: FileCheck --input-file=%tgen -check-prefix=T0GEN -check-prefix=ALL %s // RUN: FileCheck --input-file=%tgen -check-prefix=T100GEN -check-prefix=ALL %s // RUN: llvm-profdata merge %S/Inputs/cxx-templates.proftext -o %t.profdata // RUN: %clang_cc1 -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-templates.cpp -std=c++11 -o - -emit-llvm -fprofile-instr-use=%t.profdata > %tuse // RUN: FileCheck --input-file=%tuse -check-prefix=T0USE -check-prefix=ALL %s // RUN: FileCheck --input-file=%tuse -check-prefix=T100USE -check-prefix=ALL %s // T0GEN: @[[T0C:__profc__Z4loopILj0EEvv]] = linkonce_odr hidden global [2 x i64] zeroinitializer // T100GEN: @[[T100C:__profc__Z4loopILj100EEvv]] = linkonce_odr hidden global [2 x i64] zeroinitializer // T0GEN-LABEL: define linkonce_odr {{.*}}void @_Z4loopILj0EEvv() // T0USE-LABEL: define linkonce_odr {{.*}}void @_Z4loopILj0EEvv() // T100GEN-LABEL: define linkonce_odr {{.*}}void @_Z4loopILj100EEvv() // T100USE-LABEL: define linkonce_odr {{.*}}void @_Z4loopILj100EEvv() template <unsigned N> void loop() { // ALL-NOT: ret // T0GEN: store {{.*}} @[[T0C]], i64 0, i64 0 // T100GEN: store {{.*}} @[[T100C]], i64 0, i64 0 // ALL-NOT: ret // T0GEN: store {{.*}} @[[T0C]], i64 0, i64 1 // T0USE: br {{.*}} !prof ![[T01:[0-9]+]] // T100GEN: store {{.*}} @[[T100C]], i64 0, i64 1 // T100USE: br {{.*}} !prof ![[T1001:[0-9]+]] for (unsigned I = 0; I < N; ++I) {} // ALL: ret } // T0USE-DAG: ![[T01]] = !{!"branch_weights", i32 1, i32 2} // T100USE-DAG: ![[T1001]] = !{!"branch_weights", i32 101, i32 2} int main(int argc, const char *argv[]) { loop<0>(); loop<100>(); return 0; }
HexHive/datashield
compiler/llvm/tools/clang/test/Profile/cxx-templates.cpp
C++
gpl-3.0
1,931
<?php Gatuf::loadFunction('Gatuf_Shortcuts_RenderToResponse'); Gatuf::loadFunction('Gatuf_HTTP_URL_urlForView'); class Admision_Views_Convocatoria { public $index_precond = array (array ('Gatuf_Precondition::hasPerm', 'Admision.admin_convocatoria')); public function index ($request, $match) { /* Listar todas las convocatorias */ $convocatorias = Gatuf::factory ('Admision_Convocatoria')->getList (); return Gatuf_Shortcuts_RenderToResponse ('admision/convocatoria/index.html', array('page_title' => 'Administrar convocatorias', 'convocatorias' => $convocatorias), $request); } public $agregar_precond = array (array ('Gatuf_Precondition::hasPerm', 'Admision.admin_convocatoria')); public function agregar ($request, $match) { if ($request->method == 'POST') { $form = new Admision_Form_Convocatoria_Agregar ($request->POST); if ($form->isValid ()) { $convocatoria = $form->save (); $url = Gatuf_HTTP_URL_urlForView ('Admision_Views_Convocatoria::ver', $convocatoria->id); return new Gatuf_HTTP_Response_Redirect ($url); } } else { $form = new Admision_Form_Convocatoria_Agregar (null); } return Gatuf_Shortcuts_RenderToResponse ('admision/convocatoria/agregar.html', array('page_title' => 'Nueva convocatoria', 'form' => $form), $request); } public $ver_precond = array (array ('Gatuf_Precondition::hasPerm', 'Admision.admin_convocatoria')); public function ver ($request, $match) { $convocatoria = new Admision_Convocatoria (); if (false === ($convocatoria->get ($match[1]))) { throw new Gatuf_HTTP_Error404 (); } $cupos = $convocatoria->get_admision_cupocarrera_list (); $carreras = Gatuf::factory ('Pato_Carrera')->getList (array ('count' => true)); return Gatuf_Shortcuts_RenderToResponse ('admision/convocatoria/ver.html', array('page_title' => 'Convocatoria '.$convocatoria->descripcion, 'convocatoria' => $convocatoria, 'cupos' => $cupos, 'carreras' => $carreras), $request); } public $agregarCupo_precond = array (array ('Gatuf_Precondition::hasPerm', 'Admision.admin_convocatoria')); public function agregarCupo ($request, $match) { $convocatoria = new Admision_Convocatoria (); if (false === ($convocatoria->get ($match[1]))) { throw new Gatuf_HTTP_Error404 (); } $cupos = $convocatoria->get_admision_cupocarrera_list (array ('count' => true)); $carreras = Gatuf::factory ('Pato_Carrera')->getList (array ('count' => true)); if ($cupos == $carreras) { $request->user->setMessage (2, 'No se pueden agregar más carreras a la convocatoria, ya fueron agregadas todas'); $url = Gatuf_HTTP_URL_urlForView ('Admision_Views_Convocatoria::ver', $convocatoria->id); return new Gatuf_HTTP_Response_Redirect ($url); } $extra = array ('convocatoria' => $convocatoria); if ($request->method == 'POST') { $form = new Admision_Form_Convocatoria_AgregarCupo ($request->POST, $extra); if ($form->isValid ()) { $cupo = $form->save (); $url = Gatuf_HTTP_URL_urlForView ('Admision_Views_Convocatoria::ver', $convocatoria->id); return new Gatuf_HTTP_Response_Redirect ($url); } } else { $form = new Admision_Form_Convocatoria_AgregarCupo (null, $extra); } return Gatuf_Shortcuts_RenderToResponse ('admision/convocatoria/agregar-carrera.html', array('page_title' => 'Agregar carrera a convocatoria', 'form' => $form, 'convocatoria' => $convocatoria), $request); } }
gatuno/Pato
src/Admision/Views/Convocatoria.php
PHP
gpl-3.0
4,154
<?php /* * OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione * Copyright (C) DevCode s.r.l. * * 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 <https://www.gnu.org/licenses/>. */ include_once __DIR__.'/../../core.php'; use Carbon\Carbon; use Carbon\CarbonInterval; use Modules\Articoli\Articolo as ArticoloOriginale; use Modules\Contratti\Contratto; use Modules\Interventi\Intervento; use Modules\Interventi\Stato; use Modules\TipiIntervento\Tipo as TipoSessione; use Plugins\PianificazioneInterventi\Components\Articolo; use Plugins\PianificazioneInterventi\Components\Riga; use Plugins\PianificazioneInterventi\Promemoria; $operazione = filter('op'); // Pianificazione intervento switch ($operazione) { case 'add-promemoria': $contratto = Contratto::find($id_parent); $tipo = TipoSessione::find(filter('idtipointervento')); $promemoria = Promemoria::build($contratto, $tipo, filter('data_richiesta')); echo $promemoria->id; break; case 'edit-promemoria': $dbo->update('co_promemoria', [ 'data_richiesta' => post('data_richiesta'), 'idtipointervento' => post('idtipointervento'), 'richiesta' => post('richiesta'), 'idimpianti' => implode(',', post('idimpianti') ?: []), 'idsede' => post('idsede_c') ?: 0, ], ['id' => $id_record]); flash()->info(tr('Promemoria inserito!')); break; // Eliminazione pianificazione case 'delete-promemoria': $id = post('id'); $dbo->query('DELETE FROM `co_promemoria` WHERE id='.prepare($id)); $dbo->query('DELETE FROM `co_righe_promemoria` WHERE id_promemoria='.prepare($id)); flash()->info(tr('Pianificazione eliminata!')); break; // Eliminazione tutti i promemoria di questo contratto con non hanno l'intervento associato case 'delete-non-associati': $dbo->query('DELETE FROM `co_righe_promemoria` WHERE id_promemoria IN (SELECT id FROM `co_promemoria` WHERE idcontratto = :id_contratto AND idintervento IS NULL)', [ ':id_contratto' => $id_record, ]); $dbo->query('DELETE FROM `co_promemoria` WHERE idcontratto = :id_contratto AND idintervento IS NULL', [ ':id_contratto' => $id_record, ]); flash()->info(tr('Tutti i promemoria non associati sono stati eliminati!')); break; // Pianificazione ciclica case 'pianificazione': $intervallo = post('intervallo'); $data_inizio = post('data_inizio'); $count = 0; $count_interventi = 0; $count_promemoria = 0; $date_con_promemoria = []; $date_con_intervento = []; if (post('pianifica_promemoria')) { $promemoria_originale = Promemoria::find($id_record); $contratto = $promemoria_originale->contratto; // Promemoria del contratto raggruppati per data $promemoria_contratto = $contratto->promemoria() ->where('idtipointervento', $promemoria_originale->tipo->id) ->get() ->groupBy(function ($item) { return $item->data_richiesta->toDateString(); }); $date_preimpostate = $promemoria_contratto->keys()->toArray(); $data_conclusione = $contratto->data_conclusione; $data_inizio = new Carbon($data_inizio); $data_richiesta = $data_inizio->copy(); $interval = CarbonInterval::make($intervallo.' days'); $stato = Stato::where('codice', 'WIP')->first(); // Stato "In programmazione" // Ciclo partendo dalla data_richiesta fino alla data conclusione del contratto while ($data_richiesta->lessThanOrEqualTo($data_conclusione)) { // Creazione ciclica del promemoria se non ne esiste uno per la data richiesta $data_promemoria = $data_richiesta->format('Y-m-d'); if (!in_array($data_promemoria, $date_preimpostate)) { $promemoria_corrente = $promemoria_originale->replicate(); $promemoria_corrente->data_richiesta = $data_richiesta; $promemoria_corrente->idintervento = null; $promemoria_corrente->save(); // Copia delle righe $righe = $promemoria_originale->getRighe(); foreach ($righe as $riga) { $copia = $riga->replicate(); $copia->setDocument($promemoria_corrente); $copia->save(); } // Copia degli allegati $allegati = $promemoria_originale->uploads(); foreach ($allegati as $allegato) { $allegato->copia([ 'id_module' => $allegato->id_module, 'id_plugin' => $allegato->id_plugin, 'id_record' => $promemoria_corrente->id, ]); } ++$count_promemoria; } else { $promemoria_corrente = $promemoria_contratto[$data_promemoria]->first(); $date_con_promemoria[] = dateFormat($data_promemoria); } // Creazione intervento collegato se non presente if (post('pianifica_intervento') && empty($promemoria->intervento)) { // Creazione intervento $intervento = Intervento::build($contratto->anagrafica, $promemoria_originale->tipo, $stato, $data_richiesta); $intervento->idsede_destinazione = $promemoria_corrente->idsede ?: 0; $intervento->richiesta = $promemoria_corrente->richiesta; $intervento->idclientefinale = post('idclientefinale') ?: 0; $intervento->id_contratto = $contratto->id; $intervento->save(); // Aggiungo i tecnici selezionati $idtecnici = post('idtecnico'); foreach ($idtecnici as $idtecnico) { add_tecnico($intervento->id, $idtecnico, $data_promemoria.' '.post('orario_inizio'), $data_promemoria.' '.post('orario_fine')); } // Copia delle informazioni del promemoria $promemoria_corrente->pianifica($intervento); ++$count_interventi; } elseif (post('pianifica_intervento')) { $date_con_intervento[] = dateFormat($data_promemoria); } // Calcolo nuova data richiesta, non considero l'intervallo al primo ciclo $data_richiesta = $data_richiesta->add($interval); ++$count; } } if ($count == 0) { flash()->warning(tr('Nessun promemoria pianificato')); } else { flash()->info(tr('Sono stati creati _NUM_ promemoria!', [ '_NUM_' => $count_promemoria, ])); if (!empty($date_con_promemoria)) { flash()->warning(tr('Le seguenti date presentano già un promemoria pianificato: _LIST_', [ '_LIST_' => implode(', ', $date_con_promemoria), ])); } if (post('pianifica_intervento')) { flash()->info(tr('Sono stati pianificati _NUM_ interventi!', [ '_NUM_' => $count_interventi, ])); if (!empty($date_con_intervento)) { flash()->warning(tr('I promemoria delle seguenti date presentano già un intervento collegato: _LIST_', [ '_LIST_' => implode(', ', $date_con_intervento), ])); } } } break; case 'manage_articolo': if (post('idriga') != null) { $articolo = Articolo::find(post('idriga')); } else { $originale = ArticoloOriginale::find(post('idarticolo')); $articolo = Articolo::build($promemoria, $originale); $articolo->id_dettaglio_fornitore = post('id_dettaglio_fornitore') ?: null; } $qta = post('qta'); $articolo->descrizione = post('descrizione'); $articolo->um = post('um') ?: null; $articolo->costo_unitario = post('costo_unitario') ?: 0; $articolo->setPrezzoUnitario(post('prezzo_unitario'), post('idiva')); $articolo->setSconto(post('sconto'), post('tipo_sconto')); try { $articolo->qta = $qta; } catch (UnexpectedValueException $e) { flash()->error(tr('Alcuni serial number sono già stati utilizzati!')); } $articolo->save(); if (post('idriga') != null) { flash()->info(tr('Articolo modificato!')); } else { flash()->info(tr('Articolo aggiunto!')); } break; case 'manage_riga': if (post('idriga') != null) { $riga = Riga::find(post('idriga')); } else { $riga = Riga::build($promemoria); } $qta = post('qta'); $riga->descrizione = post('descrizione'); $riga->um = post('um') ?: null; $riga->costo_unitario = post('costo_unitario') ?: 0; $riga->setPrezzoUnitario(post('prezzo_unitario'), post('idiva')); $riga->setSconto(post('sconto'), post('tipo_sconto')); $riga->qta = $qta; $riga->save(); if (post('idriga') != null) { flash()->info(tr('Riga modificata!')); } else { flash()->info(tr('Riga aggiunta!')); } break; case 'delete_riga': $id_riga = post('idriga'); $type = post('type'); $riga = $promemoria->getRiga($type, $id_riga); if (!empty($riga)) { try { $riga->delete(); flash()->info(tr('Riga rimossa!')); } catch (InvalidArgumentException $e) { flash()->error(tr('Alcuni serial number sono già stati utilizzati!')); } } break; }
devcode-it/openstamanager
plugins/pianificazione_interventi/actions.php
PHP
gpl-3.0
10,855
package com.fr.design.data.tabledata.tabledatapane; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.Date; import javax.swing.DefaultCellEditor; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.table.AbstractTableModel; import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.TableCellEditor; import javax.swing.table.TableColumn; import com.fr.base.FRContext; import com.fr.data.impl.EmbeddedTableData; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.dialog.BasicPane; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; public class EmbeddedTableDataDefinedPane extends BasicPane{ private EmbeddedTableData tableData; private JTable dataJTable; private UIButton add; private UIButton del; private static String[] TYPE = { Inter.getLocText("String"), Inter.getLocText("Integer"), Inter.getLocText("Double"), Inter.getLocText("Date") }; public EmbeddedTableDataDefinedPane() { initComponents(); } protected void initComponents() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); dataJTable = new JTable(new EmbeddedTableDataDefinedPane.EmbeddedTableDefinedModel(new EmbeddedTableData())); JScrollPane scrollPane = new JScrollPane(dataJTable); this.add(scrollPane, BorderLayout.CENTER); dataJTable.setRowSelectionAllowed(true); dataJTable.setColumnSelectionAllowed(true); // 类型选择 UIComboBox typeBox = new UIComboBox(TYPE); dataJTable.getColumnModel().getColumn(2).setCellEditor(new DefaultCellEditor(typeBox)); // 单击编辑 TableCellEditor tableCellEditor = dataJTable.getDefaultEditor(String.class); if (tableCellEditor != null) { (( DefaultCellEditor) tableCellEditor).setClickCountToStart(1); } // 行号显示 TableColumn tableColumn = dataJTable.getColumnModel().getColumn(0); tableColumn.setCellRenderer(new CellRenderer()); tableColumn.setMaxWidth(30); // 控制按钮 add = new UIButton(Inter.getLocText("Add")); del = new UIButton(Inter.getLocText("Delete")); JPanel buttonPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); // buttonPane.setLayout(FRGUIPaneFactory.createLabelFlowLayout()); buttonPane.add(add); buttonPane.add(del); this.add(buttonPane, BorderLayout.NORTH); add.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { insertRow(); checkEnabled(); } }); del.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { removeRow(); checkEnabled(); } }); checkEnabled(); } @Override protected String title4PopupWindow() { return Inter.getLocText(new String[]{"Column", "Set"}); } public void checkValid() throws Exception { try { dataJTable.getCellEditor().stopCellEditing(); } catch (Exception e) { } } public void insertRow(){ EmbeddedTableDataDefinedPane.EmbeddedTableDefinedModel localDefaultModel = (EmbeddedTableDataDefinedPane.EmbeddedTableDefinedModel) dataJTable.getModel(); try { dataJTable.getCellEditor().stopCellEditing(); } catch (Exception e) { } int indexedrow = dataJTable.getSelectedRow(); if (indexedrow == - 1) { indexedrow = dataJTable.getRowCount() - 1; } localDefaultModel.addNewRowData(indexedrow); localDefaultModel.fireTableDataChanged(); dataJTable.requestFocusInWindow(); dataJTable.setRowSelectionInterval(indexedrow + 1, indexedrow + 1); dataJTable.editCellAt(indexedrow + 1, 1); } protected void removeRow() { EmbeddedTableDataDefinedPane.EmbeddedTableDefinedModel localDefaultModel = (EmbeddedTableDataDefinedPane.EmbeddedTableDefinedModel) dataJTable.getModel(); int selectedRow = dataJTable.getSelectedRow(); if (selectedRow == -1) { selectedRow = dataJTable.getRowCount() - 1; } try { dataJTable.getCellEditor().stopCellEditing(); } catch (Exception e) { } for (int i = 0; i < dataJTable.getSelectedRowCount(); i++){ localDefaultModel.removeRow(selectedRow); } localDefaultModel.fireTableDataChanged(); int rowCount = localDefaultModel.getRowCount(); if (rowCount > 0) { if (selectedRow < rowCount) { dataJTable.setRowSelectionInterval(selectedRow, selectedRow); } else { dataJTable.setRowSelectionInterval(rowCount - 1, rowCount - 1); } } } private void checkEnabled() { this.dataJTable.setEnabled(true); this.del.setEnabled(true); this.add.setEnabled(true); if (dataJTable.getRowCount() <=0 ) { this.del.setEnabled(false); } } public void populate(Object obj) { if(obj == null || !(obj instanceof EmbeddedTableData)) { return; } try { this.tableData = (EmbeddedTableData)obj; EmbeddedTableDataDefinedPane.EmbeddedTableDefinedModel localDefaultModel = (EmbeddedTableDataDefinedPane.EmbeddedTableDefinedModel) dataJTable.getModel(); localDefaultModel.setEditableTableData((EmbeddedTableData)tableData.clone()); localDefaultModel.fireTableDataChanged(); checkEnabled(); } catch (CloneNotSupportedException e) { FRContext.getLogger().error(e.getMessage(), e); } } public EmbeddedTableData update() { if(dataJTable.getCellEditor() != null){ dataJTable.getCellEditor().stopCellEditing(); } EmbeddedTableDataDefinedPane.EmbeddedTableDefinedModel localDefaultModel = (EmbeddedTableDataDefinedPane.EmbeddedTableDefinedModel) dataJTable.getModel(); try { tableData = (EmbeddedTableData)(localDefaultModel.getEditableTableData().clone()); } catch (CloneNotSupportedException e) { FRContext.getLogger().error(e.getMessage(), e); } return tableData; } class CellRenderer extends DefaultTableCellRenderer { public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { if (column == 0) { setBackground(new Color(229, 229, 229)); setHorizontalAlignment(CENTER); } return super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); } } class EmbeddedTableDefinedModel extends AbstractTableModel { private EmbeddedTableData embeddedTableData; private String[] COLUMN_NAME = { "", Inter.getLocText("ColumnName"), Inter.getLocText("Type") }; private int sum = 0; public EmbeddedTableDefinedModel(EmbeddedTableData editableTableData) { this.embeddedTableData = editableTableData; } public EmbeddedTableData getEditableTableData() { return embeddedTableData; } public void setEditableTableData(EmbeddedTableData editableTableData) { this.embeddedTableData = editableTableData; } public String getColumnName(int column) { if (column < COLUMN_NAME.length) { return COLUMN_NAME[column]; } else { return ""; } } public Class getColumnClass(int column) { return String.class; } public int getRowCount() { return embeddedTableData.getColumnCount(); } public int getColumnCount() { return 3; } public Object getValueAt(int row, int column) { switch (column) { case 0: return Integer.toString(row + 1); case 1: return embeddedTableData.getColumnName(row); case 2: if (embeddedTableData.getColumnClass(row).equals(String.class)) { return TYPE[0]; } else if (embeddedTableData.getColumnClass(row).equals(Integer.class)) { return TYPE[1]; } else if (embeddedTableData.getColumnClass(row).equals(Double.class)) { return TYPE[2]; } else if (embeddedTableData.getColumnClass(row).equals(Date.class)) { return TYPE[3]; } } return null; } public boolean isCellEditable(int rowIndex, int columnIndex) { return columnIndex !=0; } public void setValueAt(Object aValue, int rowIndex, int columnIndex) { switch (columnIndex) { case 0: break; case 1: embeddedTableData.setColumn(rowIndex, (String)aValue, embeddedTableData.getColumnClass(rowIndex)); break; case 2: Class cls = null; if (((String)aValue).equals(TYPE[0])){ cls = String.class; } else if (((String)aValue).equals(TYPE[1])){ cls = Integer.class; } else if (((String)aValue).equals(TYPE[2])){ cls = Double.class; } else if (((String)aValue).equals(TYPE[3])){ cls = Date.class; } embeddedTableData.setColumn(rowIndex, embeddedTableData.getColumnName(rowIndex), cls); break; } } public void addNewRowData(int index) { int n= embeddedTableData.getColumnCount(); sum++; for(int i=0;i<n;i++){ String columnName = embeddedTableData.getColumnName(i); if(ComparatorUtils.equals("ColName" + sum, columnName)){ sum++; } } embeddedTableData.insertColumn("ColName" + sum, String.class, index); } public void removeRow(int rowIndex) { embeddedTableData.removeColumn(rowIndex); } public void clear() { embeddedTableData.clear(); } } }
fanruan/finereport-design
designer_base/src/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataDefinedPane.java
Java
gpl-3.0
10,721
Development with Docker === We use [Docker](https://www.docker.com/) to run, test, and debug our application. The following documents how to install and use Docker on a Mac. There are [instructions](https://docs.docker.com/installation) for installing and using docker on other operating systems. On the mac, we use [docker for mac](https://docs.docker.com/engine/installation/mac/#/docker-for-mac). We use [docker-compose](https://docs.docker.com/compose/) to automate most of our interactions with the application. Table of Contents === * [Installation and Upgrade](#installation-and-upgrade) * [Launching the Application](#launching-the-application) * [Docker Compose](#docker-compose) * [Creating an API_TEST_USER and token](#creating-an-api_test_user-and-token) * [Connecting to an Openstack Swift Object Store](#connecting-to-an-openstack-swift-object-store) * [Running a local swift service using Docker](#running-a-local-swift-service-using-docker) * [Running the Workflow](#running-the-workflow) * [Run Dredd](#run-dredd) * [The Api Explorer](#the-api-explorer) * [Connecting a Duke Authentication Service microservice](#connecting-a-duke-authentication-service-microservice) * [Dockerfile](#dockerfile) * [Deploying Secrets](#deploying-secrets) * [Useful Docker Commands](#useful-docker-commands) * [Bash Profile](#bash-profile) Installation and Upgrade === Docker makes it easy to install docker for mac, which includes docker, and docker-compose on your mac, and keep them upgraded in sync. Follow the instructions to install [Docker 4 Mac]((https://docs.docker.com/engine/installation/mac/#/docker-for-mac). Once you have docker running, you can run any of the following commands to test that docker is working: ``` docker ps ``` This should always return a table with the following headers, and 0 or more entries: `CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES` ``` docker images ``` Similar to above, it should always return a table with the following headers, and 0 or more entries: `REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE` Launching the Application === This project includes a shell script, launch_application.sh, which will: * bring up a running instance of the DDS server * bring up a postgres DB instance * optionally bring up a [local swift service](#running-a-local-swift-service-using-docker) if the swift.env file is not empty * use rake to: * migrate and seed the database * create an AuthService using auth_service.env * create a StorageProvider using swift.env (this may not do anything if swift.env is empty). **Use this script to launch the application**, and read on for how this script works, and how you can utilize docker and docker-compose to develop and test the system. Docker Compose === Once you have docker installed, you can use docker-compose to run all of the commands that you would normally run when developing and testing the application. Docker Compose uses one or more yml files to specify everything required to build and run the application and any other support application (databases, volume containers, etc.) it requires. There are multiple docker-compose yml files in the Application Root, explained below. docker-compose.yml --- This is the base docker-compose file used to manage the server, postgres db, and neo4j db required to test and run the service. Anyone with docker, docker-machine, and docker-compose can run the following command from within the Application Root (where this file you are reading resides), to build the server image and any other ancillary support images that it needs (You must be connected to the internet so that docker can pull down any base docker images, or package/gem installs, for this to work). ***This WILL take 20 minutes or more if you have never built the images*** ``` docker-compose build ``` Once you have built the images, you can launch containers of all services required by the app (docker calls a running instance of a docker image a docker container): ``` docker-compose up -d ``` **Note** there is a more preferred method to [launch the application](#launching-the-application). The docker-compose definition for the 'server' service mounts the Application Root as /var/www/app in the server docker container. Since the Dockerfile specifies /var/www/app as its default WORKDIR, this allows you to make changes to the files on your machine and see them reflected live in the running server (although see [below](#dockerfile) for **important information about modifying the Gemfile**). The Dockerfile hosts the application on port 3000 inside the container, and the docker-compose service definition attaches this to port 3001 on the host machine (this will fail if you have another service of any kind attached to port 3001 on the same host). To connect to this host you can use curl, or your browser to connect to http://localhost:3001/api/v1/app/status to check the status of the application. All other parts of the application are served at http://localhost:3001. docker-compose.dev.yml --- This file extends docker-compose.yml to add service definitions to make it possible to easily run things like bundle, rspec, rails, rake, etc (see below for more). You can use this by adding the -f docker-compose.yml -f docker-compose.dev.yml flag to all of your docker-compose commands, e.g. ``` docker-compose -f docker-compose.yml -f docker-compose.dev.yml run rails c ``` Alternatively, you can use the fact that docker-compose looks for both docker-compose.yml and docker-compose.override.yml by default, and create a symlink from docker-compose.dev.yml to docker-compose.override.yml that will make docker-compose use both by default, without any of the extra -f flags. ``` ln -s docker-compose.dev.yml docker-compose.override.yml ``` Note, docker-compose.override.yml is in the .gitignore, so it will never be committed to the repo. This ensures that the default behavior for those not wishing to use the extra functionality in docker-compose.dev.yml is preserved. You should always specify the exact service (e.g. top level key in the docker-compose.dev.yml file) when running docker-compose commands using this docker-compose.dev.yml file. Otherwise, docker-compose will try to run all services, which will cause things to run that do not need to run (such as bundle). docker-compose.swift.yml --- This file extends docker-compose.yml and docker-compose.dev.yml (it should be used with both) to launch and link the server and developer utils (rspec, rake, rails, etc.) with a running swift instance container. **Note** The system is not set up by default to run the swift service. We use the vcr gem to record calls to swift for future tests to use, which makes it possible for most of our development work to be done without a running swift instance. If you wish to make running the swift services part of the default behavior of docker-compose, without needing the -f flags, set your COMPOSE_FILE environment variable to a colon separated list of these three files: ``` export COMPOSE_FILE='docker-compose.yml:docker-compose.dev.yml:docker-compose.swift.yml' ``` Again, if you do this, be sure never to run docker-compose up -d without specifying individual services, or unexpected services will be run and errors will result. default docker-compose commands --- Using just the docker-compose.yml, e.g. no COMPOSE_FILE environment variable, and docker-compose.override.yml file/symlink is not present: Launch the server, postgresdb, and neo4j to interact with the application: ``` docker-compose up -d server ``` Docker-compose is smart enough to realize all of the linked services required, and spin them up in order. This will not launch a swift service. Bring down and delete running containers: ``` docker-compose down ``` docker-compose.dev.yml docker-compose commands --- Either use -f docker-compose.yml -f docker-compose.dev.yml, like so: Run rspec ``` docker-compose -f docker-compose.yml -f docker-compose.dev.yml run rspec docker-compose -f docker-compose.yml -f docker-compose.dev.yml run rspec spec/requests docker-compose -f docker-compose.yml -f docker-compose.dev.yml run rspec spec/models/user_spec.rb ``` Or create a symlink from docker-compose.dev.yml to docker-compose.override.yml. This is the recommended way to use docker-compose.dev.yml, as it will be more permenant between invocations of the shell terminal, unless you add the COMPOSE_FILE environment setting to your ~/.bash_profile. ``` ln -s docker-compose.dev.yml docker-compose.override.yml ``` Then you can run services like rspec without the extra -f flags: ``` docker-compose run rspec docker-compose run rspec spec/requests ``` Alternatively, you can create a COMPOSE_FILE environment variable and get the same default behavior. ``` export COMPOSE_FILE='docker-compose.yml:docker-compose.dev.yml' ``` This will last only as long as your current shell terminal session, unless you add the above command to your ~/.bash_profile. The following commands assume the symlink, or COMPOSE_FILE environment variable exists. Run bundle (see [below](#dockerfile) for **important information about modifying the Gemfile**)): ``` docker-compose run bundle ``` Run rake commands (default RAILS_ENV=development): ``` docker-compose run rake db:migrate docker-compose run rake db:seed docker-compose run rake db:migrate RAILS_ENV=test ``` Run rails commands (default RAILS_ENV=docker): ``` docker-compose run rails c docker-compose run rails c RAILS_ENV=test ``` Create an AuthenticationService object that links to the [Duke Authentication Service](https://github.com/Duke-Translational-Bioinformatics/duke-authentication-service) container that is run from its Application Root using docker-compose ([see below](#connecting-a-duke-authentication-service-microservice)) **Note this must be run against an existing, migrated database**: ``` docker-compose run authservice ``` Remove the authservice ``` docker-compose run rake authservice:destroy ``` Create an api test user ([see below](#creating-an-api_test_user-and-token)) **Note this must be run against an existing, migrated database** ``` docker-compose run rake api_test_user:create ``` Destroy the api_test_user (and all objects created by the user): ``` docker-compose run rake api_test_user:destroy ``` Clean up any objects created by the api_test_user, such as by [running the workflow](#running-the-workflow): ``` docker-compose run rake api_test_user:clean ``` docker-compose.swift.yml docker-compose commands --- Either use -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.swift.yml, like so: Run rspec ``` docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.swift.env run swift ``` Or create the COMPOSE_FILE environment variable. ``` export COMPOSE_FILE='docker-compose.yml:docker-compose.dev.yml:docker-compose.swift.yml' ``` Again, if you want this to last between shell terminal sessions, add the above to your ~/.bash_profile. This repo does not provide a yml file that combines the services in docker-compose.dev.yml and docker-compose.swift.yml together into a single file that could be used as a docker-compose.override.yml, but this is certainly possible. The following assume the COMPOSE_FILE environment is set. Start a locally running swift storage service ([see below](#running-a-local-swift-service-using-docker)): ``` docker-compose up -d swift ``` Create a StorageProvider linked to a swift service (defined in [swift.env](#running-a-local-swift-service-using-docker)]) **Note this must be run against an existing, migrated database, and the swift service should be running**: ``` docker-compose run rake storageprovider:create ``` Run the [dredd](#run-dredd) API specification tests (see below for how to run this). **Note** the dredd service is actually defined in docker-compose.dev.yml, but it should be run with the docker-compose.swift.yml against a running swift. **Note about docker-compose down** You should run docker-compose down using the same docker-compose yml file context, e.g. with COMPOSE_FILE set, or the docker-compose.override.yml file in existence, or using the -f flags for all docker-compose yml files. Otherwise, services defined in the missing docker-compose.yml file will not be shut down and removed, and a warning may come up in your output that says containers were 'orphaned'. docker-compose.circle.yml --- This docker-compose yml file is specifically configured for CircleCI. This is to ensure that it works with the version of docker-compose that is made available on the CircleCI host machine. **Developers should not use this file unless they are troubleshooting a failed CircleCI build on the CircleCI machine** Creating an API_TEST_USER and token === A rake task, api_test_user:create, has been written to create a test user account to use in any test applications. This creates a single specific User (if it does not already exist). Each time it is run, it will print a new api_token to STDOUT (even if the User already exists). This api_token has an expiry of 5 years from the time the rake task is run. Here is how you can create one and capture the token into a bash variable: ``` api_token=`docker-compose -f docker-compose.yml -f docker-compose.dev.yml run rake api-test_user:create` ``` You can use this in any code that needs to access the API (see the [workflow](#running-the-workflow) for an example). If you want to use this in the swagger apiexplorer, launch the /apiexplorer, open the javascript console, type ``` window.localStorage.api_token='yourtoken' ``` and reload the page. Connecting to an Openstack Swift Object Store === Currently, DDS is designed to support a single Openstack Swift object storage, using [version 1](http://developer.openstack.org/api-ref-objectstorage-v1.html) of the Swift API. A SwiftStorageProvider object must be created for the target Swift service. Configuration --- The following Environment Variables must be set on the host server to configure a SwiftStorageProvider object with information about the live Swift storage provider for the DDS service: * STORAGE_PROVIDER_TYPE: swift * SWIFT_URL_ROOT: The base URL to the swift service. The full URL for the swift account used by the DDS is `${SWIFT_URL_ROOT}/${SWIFT_AUTH_URI}/${SWIFT_ACCT}` * SWIFT_VERSION: this must be the version of the swift API that the DDS uses, which is specified in the SWIFT_AUTH_URI. * SWIFT_AUTH_URI: This is part of the url used to access containers and objects in the swift service. It is typically of the form /auth/vN where N is the version of the swift API that the DDS uses. The full URL for the swift account used by the DDS is `${SWIFT_URL_ROOT}/${SWIFT_AUTH_URI}/${SWIFT_ACCT}` * SWIFT_ACCT: The name of the swift service account, which is part of the url used to access containers and objects in the swift service. The full URL for the swift account used by the DDS is `${SWIFT_URL_ROOT}/${SWIFT_AUTH_URI}/${SWIFT_ACCT}` * SWIFT_DESCRIPTION: Used in the StorageProvider definition for the DDS service * SWIFT_DISPLAY_NAME: Used in the StorageProvider definition for the DDS service * SWIFT_USER: The user used with the SWIFT_PASS to authenticate the DDS client to the swift service. These must be set up by the swift service system administrator. * SWIFT_PASS: The password for the SWIFT_USER used to authenticate the DDS client to the swift service. These must be set up by the swift service system administrator. * SWIFT_PRIMARY_KEY: A long random string which can be generated using ``` docker-compose -f docker-compose.yml -f docker-compose.dev.yml run rake secret ``` This and the SWIFT_SECONDARY_KEY are registered with the account used by the DDS service, and used to sign the temporary_urls that are generated by the DDS to allow clients to upload chunks and download files. * SWIFT_SECONDARY_KEY: A different long random string, but generated and used in the same way as the SWIFT_PRIMARY_KEY. A rake task, storage_provider:create, has been created to facilitate the creation of a StorageProvider. It uses these Environment variables. This repo includes an empty_swift.env file which is symlinked to swift.env, and a swift.local.env which specifies these environment variables for the [local swift service](#running-a-local-swift-service-using-docker). **Note** The launch_application.sh script, and the storage_provider:create rake task will do extra things when these Environment variables are set, such as by copying or symlinking swift.local.env to swift.env. When the swift.env file is not empty, launch_application.sh launches the local dockerized swift services, attached to a volume container for the files. (**NOTE** When you remove the stopped swift-vol container, all files stored to this swift service are deleted). When the above SWIFT_ACCT environment variable is not empty, storage_provider:create will attempt to register the SWIFT_PRIMARY_KEY and SWIFT_SECONDARY_KEY with the specified swift service using its API. Running a local swift service using Docker === The docker-compose.swift.yml file specifies the service definition to build a locally running swift service, configured to allow very small static_large_object 'chunks' (see docker/builds/swift for the Docker build context). To use this, change the swift.env to point to swift.local.env, and then launch the application: ``` rm swift.env ln -s swift.local.env swift.env ./launch_application.sh ``` **Note** In order to run the server, or any rails, rake, rspec commands against the running swift service, you must run these with the docker-compose.swift.yml file included in the chain of docker-compose files, e.g with the -f flags, the COMPOSE_FILE set, or a specially crafted docker-compose.override.yml. Otherwise, the application containers are not linked to the swift service. This will cause any attempts to communicate with the swift service, such as when starting or completing an upload, to timeout. You will also need to use this chain to run docker-compose down, docker-compose stop, etc: ``` docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.swift.yml stop swift docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.swift.yml down ``` Running the Workflow === A bash script, workflow.sh, has been created to test the locally running API using a set of files. To run this: - make sure you set the swift.env to point to the swift.local.env file - create a freshly launched application (e.g. the postgres database and swift service are completely clean). You can run the following to ensure this: ``` rm swift.env ln -s swift.local.env swift.env docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.swift.yml down ./launch_application.sh ``` - create an api_test_user ``` api_token=`docker-compose -f docker-compose.yml -f docker-compose.dev.yml run rake api_test_user:create` ``` - run the workflow with the api_token ``` ˝./workflow/workflow.sh ${api_token} ``` You will need to clean up after each run to get rid of all of the DDS objects, and Swift containers/objects that are created, or the workflow will fail when it tries to create the project with an existing name. ``` docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.swift.yml down ``` Run Dredd === Dredd is a node application that runs against the official [Duke Data Services Apiary Documentation](http://docs.dukedataservices.apiary.io/) using the apiary.apib file that is located in the Application Root, which should be up to date (if not, it should be updated and committed to the master branch of the repo, and merged into all other branches where dredd should run). The dredd application has been wrapped into its own docker image, which can be built and run using the docker-compose.dev.yml docker-compose file. Dredd must be run against a running DDS service, and swift service, and the DDS service must be configured to work with a running swift storage service. It does not need a running Authentication Service to work, but it does need the [Api Test User Token](#creating-an-api_test_user-and-token). To run dredd against the default, locally running DDS server service, do the following: ``` rm swift.env ln -s swift.local.env swift.env rm webapp.env ln -s webapp.local.env webapp.env ./launch_application.sh MY_GENERATED_JWT=$(docker-compose -f docker-compose.yml -f docker-compose.dev.yml run rake api_test_user:create | tail -1) docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.swift.yml run -e "MY_GENERATED_JWT=${MY_GENERATED_JWT}" -e "HOST_NAME=http://dds.host:3000/api/v1" dredd ``` To clean up after a dredd run (you should do this between runs, and also before committing any code changes to git): ``` docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.swift.yml down git checkout -- dredd*env swift*env webapp*env ``` The API Explorer === The DDS service provides a [swagger](http://swagger.io/) client to users, which provides documentation of the REST services, and allows users to interact with the API. This service is hosted at /apiexplorer on the application. It requires that the server be configured to work with a live Duke Authentication Service microservice. See [Connecting a Duke Authentication Service microservice](#connecting-a-duke-authentication-service-microservice) for details on how to work with this client on the locally running server instance. In production, the API Explorer uses the APIEXPLORER_ID environment variable to store the UUID used to identify the client to the Duke Authentication Service microservice configured for the DDS server. This must be set on the host server for the application. It must also be registered along with the apiexplorer URL, and DDS SECRET_KEY_BASE as a Consumer in the Duke Authentication Service server. * See the configuration section of [Connecting a Duke Authentication Service microservice](#connecting-a-duke-authentication-service-microservice) for information about registering Consumers with a Duke Authentication Service. * See [Deploying Secrets](#deploying-secrets) for information on how to deploy secrets to the host system. Connecting a Duke Authentication Service microservice === Configuration --- In production, the DDS server must be configured with the information for a live Duke Authentication Service microservice. This requires three Environment variables: * AUTH_SERVICE_SERVICE_ID: The SERVICE_ID configured in the live Duke Authentication Service * AUTH_SERVICE_BASE_URI: The Base URI to the live Duke Authentication Service, e.g. URI/api/v1/app/status should return {'status': 'ok'} * AUTH_SERVICE_NAME: A Description of the Service used in the apiexplorer and portal frontends A rake task has been setup to create the AuthenticationService model object in the server using these environment variables. ``` docker-compose -f docker-compose.yml -f docker-compose.dev.yml run rake authservice:create ``` You can also destroy the currently configured AuthenticationService definition: ``` docker-compose -f docker-compose.yml -f docker-compose.dev.yml run rake authservice:destroy ``` Production Configuration --- For this rake task to work, the following environment variables must also be set on servers that are not run in the development or test RAILS_ENV: * SECRET_KEY_BASE: This is the standard secret_key_base set in all rails applications. It can be generated by running ``` docker-compose -f docker-compose.yml -f docker-compose.dev.yml rake secret ``` * SERVICE_ID: a UUID, such as using the ruby SecureRandom.uuid function * APIEXPLORER_ID: a UUID that is different from the SERVICE_ID. Registering Consumers --- Consumers must be registered with the live Duke Authentication Service (See Documentation in the [Duke Authentication Service](https://github.com/Duke-Translational-Bioinformatics/duke-authentication-service) for more information about registering consumers). The docker-compose files and launch_application.sh scripts for the Authentication is configured to register these correctly for the development environment. For other servers, you must register the following Consumers using the Duke Authentication Service rake consumer task + the following environment variables and values: * API Explorer Consumer: * UUID: DDS APIEXPLORER_ID * REDIRECT_URI: URL to /apiexplorer on the DDS server * SECRET: DDS SECRET_KEY_BASE * DDS Portal Consumer: * UUID: DDS SERVICE_ID * REDIRECT_URI: URL to /portal * SECRET: DDS SECRET_KEY_BASE **NOTE** both use the same DDS SECRET_KEY_BASE, which allows the Authentication Service to encode a JWT with this secret, which, for both clients, is eventually processed by the DDS /user/api_token endpoint. * See [Deploying Secrets](#deploying-secrets) for further information about deploying secrets to the DDS host server. Running locally --- **Important** Only Duke Employees can build the Duke Authentication Service image. It is possible to have a Duke Employee involved in the project provide access to a Duke Authentication Service image for use by outside developers. Duke Data Service frontend applications, such as the portal, or apiexplorer, require a Duke Authentication Service microservice to provide authentication. Duke employees can register their local machines to host shibboleth protected web applications, and then clone, build and run a local [Duke Authentication Service](https://github.com/Duke-Translational-Bioinformatics/duke-authentication-service) docker service. The Docker.README.md file in this project details how to configure, your service with the official Duke Shibboleth registration system. You can run the Duke Authentication Service docker image without being connected to the Duke Medical Center VPN, but you must be connected to build the Duke Authentication Service image (see the Docker.README.md file for the Duke Authentication service for more details). When you git clone the Duke Authentication Service repo, it comes with its own docker-compose.yml and docker-compose.dev.yml specifying standard ports to use to connect to it on the docker-machine. An AuthenticationService object must be created in the Duke Data Service container to register a Duke Authentication Service, and a Consumer object must be created in the Duke Authentication Service container to register the Duke Data Service. Both this repo and the Duke Authentication Service repo come with rake tasks to create these objects once their respective db services have been started. Assuming you are starting from scratch (e.g. you do not have any db containers running or stopped for this or the Authentication Service), you can get both up and running and wired together with the following set of commands (note PATHTO should be the full path to the directory on your machine): ``` cd PATHTO/duke-authentication-service ./launch_application.sh cd PATHTO/duke-data-service ./launch_application.sh ``` You should also stop and clean these containers when you are finished with them: ``` cd PATHTO/duke-authentication-service docker-compose stop cd PATHTO/duke-data-service docker-compose stop docker rm $(docker ps -aq) ``` Dockerfile === Docker uses a [Dockerfile](https://docs.docker.com/reference/builder/) to specify how to build an image to host an application. We have created a Dockerfile in the Application Root. This Dockerfile: * installs required libraries for ruby, rails, node, etc. * installs specific versions of ruby and node * creates SSL certs * installs the postgres client libraries * creates /var/www/app and sets this to the default working directory * checks out the latest version of the branch of the code from github into /var/www/app * adds Gemfile and Gemfile.lock (see below) * bundles to install required gems into the image * exposes 3000 * sets up to run the puma server to host the service by default **Important information about modifying the Gemfile** When you need to add a gem to your Gemfile, you will also need to rebuild the server. This will permenently install the new gem into the server image. ``` docker-compose build server ``` You then need to run bundle, which will update Gemfile.lock in the Application Root ``` docker-compose -f docker-compose.yml -f docker-compose.dev.yml run bundle ``` You should then commit and push the new Gemfile and Gemfile.lock to the repository. Deploying Secrets === There are a variety of secrets that the DDS service needs to run, especially when running in anything but the development environment. This is because the server is configured to use ENVIRONMENT variables for these secrets: * APIEXPLORER_ID: see [Configuration](#connecting-a-duke-authentication-service-microservice) * AUTH_SERVICE_ID: see [Configuration](#connecting-a-duke-authentication-service-microservice) * AUTH_SERVICE_BASE_URI: see [Configuration](#connecting-a-duke-authentication-service-microservice) * AUTH_SERVICE_NAME: see [Configuration](#connecting-a-duke-authentication-service-microservice) * SECRET_KEY_BASE: see [Configuration](#connecting-a-duke-authentication-service-microservice) * SERVICE_ID: see [Configuration](#connecting-a-duke-authentication-service-microservice) * SWIFT_URL_ROOT: see [Configuration](#connecting-to-an-openstack-swift-object-store) * SWIFT_VERSION: see [Configuration](#connecting-to-an-openstack-swift-object-store) * SWIFT_AUTH_URI: see [Configuration](#connecting-to-an-openstack-swift-object-store) * SWIFT_ACCT: see [Configuration](#connecting-to-an-openstack-swift-object-store) * SWIFT_DESCRIPTION: see [Configuration](#connecting-to-an-openstack-swift-object-store) * SWIFT_DISPLAY_NAME: see [Configuration](#connecting-to-an-openstack-swift-object-store) * SWIFT_USER: see [Configuration](#connecting-to-an-openstack-swift-object-store) * SWIFT_PASS: see [Configuration](#connecting-to-an-openstack-swift-object-store) * SWIFT_PRIMARY_KEY: see [Configuration](#connecting-to-an-openstack-swift-object-store) * SWIFT_SECONDARY_KEY: see [Configuration](#connecting-to-an-openstack-swift-object-store) Docker basics === To stop all running docker containers (you must stop a container before you can remove it or its image): ``` docker-compose stop ``` To stop and/or remove all containers, use the following: ``` docker-compose down ``` When a docker container stops for any reason, docker keeps it around in its system. There are ways you can start and attach to a stopped container, but in many cases this is not useful. You should remove containers on a regular basis. **Note**, because we do not persist the data in our postgres databases, or swift services, to the host file system, all of your databases and swift objects are removed when you remove their stopped containers. When you start up the machines from scratch, you will need to run rake db:migrate, etc. to get the database ready. This makes it easy to test the application against a clean slate system. You can list all running containers using the following command: ``` docker ps ``` You can list all containers (both running and stopped): ``` docker ps -a ``` Each docker container is given a long UUID by docker (called the CONTAINERID). You can use this UUID (or even the first 4 or more characters) to stop and remove a container using the docker commandline instead of using docker-compose (see Docker [commandline documentation](https://docs.docker.com/engine/reference/commandline) for other things you can find out about a running container using the docker command): ``` docker stop UUID docker rm -v UUID ``` Sometimes docker will leave files from a container on the host, which can build up over time and cause your VM to become sluggish or behave strangely. We recommend adding the -v (volumes) flag to docker rm commands to make sure these files are cleaned up appropriately. Also, docker ps allows you to pass the -q flag, and get only the UUID of the containers it lists. Using the following command, you can easily stop all running containers: ``` docker stop $(docker ps -q) ``` Similarly, to remove all stopped containers (this will skip running containers, but print a warning for each): ``` docker rm -v $(docker ps -aq) ``` You may also need to check for volumes that have been left behind when containers were removed without explicitly using docker rm -v, such as when docker-compose down is run. To list all volumes on the docker host: ``` docker volume ls ``` The output from this is very similar to all other docker outputs. Each volume is assigned a UUID. You can remove a specific volume with: ``` docker volume rm UUID ``` You can remove all volumes using the -q pattern used in other docker commands ``` docker volume rm $(docker volume ls -q) ``` We recommend running some of these frequently to clean up containers and volumes that build up over time. Sometimes, when running a combination docker rm $(docker ls -q) pattern command when there is nothing to remove, docker will print a warning that it requires 1 or more arguments, but this is ok. It can be useful to put some or all of these in your Bash Profile. Bash Profile === The following can be placed in the .bash_profile file located in your HOME directory (e.g. ~/.bash_profile) ```bash_profile # Docker configurations and helpers alias docker_stop_all='docker stop $(docker ps -q)' alias docker_cleanup='docker rm -v $(docker ps -aq)' alias docker_images_cleanup='docker rmi $(docker images -f dangling=true -q)' alias docker_volume_cleanup='docker volume rm $(docker volume ls -q)' # fake rake/rails/rspec using docker under the hood # this depends on either a docker-compose.override.yml, or COMPOSE_FILE # environment variable alias rails="docker-compose run rails" alias rake="docker-compose run rake" alias rspec="docker-compose run rspec" alias bundle="docker-compose run bundle" alias dcdown="docker-compose down" ```
dmann/duke-data-service
Docker.README.md
Markdown
gpl-3.0
34,067
/* * tag_database.cpp * This file is part of dbPager Server * * Copyright (C) 2008-2019 - Dennis Prochko <wolfsoft@mail.ru> * * dbPager Server 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. * * dbPager Server 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 dbPager Server; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA */ #include <dcl/strutils.h> #include "tag_database.h" namespace dbpager { using namespace std; using namespace dbp; void tag_database::execute(context &ctx, std::ostream &out, const tag *caller) const { const string &dsn = get_parameter(ctx, "dsn"); const string &database = get_parameter(ctx, "id"); if (dsn.empty()) { throw tag_database_exception( _("data source name (dsn) is not defined")); } string db_ptr = ctx.get_value(string("@PGSQL:DATABASE@") + database); if (!db_ptr.empty()) { tag_impl::execute(ctx, out, caller); return; } dbp::pool_ptr<database_pool::pool_item> pp = database_pool::instance().acquire(dsn); ctx.enter(); try { if (!(*pp)) pp->reset(new pqxx::connection(dsn)); pqxx::connection &c = **pp; // save the pointer to database for nested tags ctx.add_value(string("@PGSQL:DATABASE@") + get_parameter(ctx, "id"), dbp::to_string<pqxx::connection*>(&c)); tag_impl::execute(ctx, out, caller); ctx.leave(); } catch (const pqxx::broken_connection &e) { pp->reset(new pqxx::connection(dsn)); ctx.leave(); throw tag_database_exception(e.what()); } catch (...) { ctx.leave(); throw; } } } // namespace
wolfsoft/dbpager
src/modules/dbp_pgsql/tag_database.cpp
C++
gpl-3.0
1,970
//============================================================================= /* Copyright (C) 2012 Dave Billin 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 LinuxSerialPortEx.cpp * * @brief * Implementation of the LinuxSerialPortEx class * * @author Dave Billin */ #include "LinuxSerialPortEx.h" #include <fcntl.h> #include <sys/signal.h> #include <sys/types.h> #include <termios.h> #include <unistd.h> #include <stdio.h> #include <string.h> #include "MOOS/libMOOS/Utils/MOOSUtilityFunctions.h" namespace YellowSubUtils { //============================================================================= const char* s_DEFAULT_PORT = "/dev/ttyS0"; //============================================================================= const int s_DEFAULT_BAUDRATE = 19200; //============================================================================= LinuxSerialPortEx::LinuxSerialPortEx() : CMOOSLinuxSerialPort::CMOOSLinuxSerialPort() { // Just invoke base class implementation } //============================================================================= LinuxSerialPortEx::~LinuxSerialPortEx() { Close(); } //============================================================================= /** Create and set up the port */ bool LinuxSerialPortEx::Create(const char * sPort, int nBaudRate) { if (m_nPortFD >= 0) { MOOSTrace("Serial Port already open.\n"); return false; } #ifndef _WIN32 int nLinuxBaudRate = B9600; switch(nBaudRate) { case 1000000: nLinuxBaudRate = B1000000; break; case 921600: nLinuxBaudRate = B921600; break; case 576000: nLinuxBaudRate = B576000; break; case 500000: nLinuxBaudRate = B500000; break; case 460800: nLinuxBaudRate = B460800; break; case 230400: nLinuxBaudRate = B230400; break; case 115200: nLinuxBaudRate = B115200; break; case 38400: nLinuxBaudRate = B38400; break; case 19200: nLinuxBaudRate = B19200; break; case 9600: nLinuxBaudRate = B9600; break; case 4800: nLinuxBaudRate = B4800; break; case 2400: nLinuxBaudRate = B2400; break; case 1200: nLinuxBaudRate = B1200; break; case 600: nLinuxBaudRate = B600; break; case 300: nLinuxBaudRate = B300; break; default : printf("Unsupported baud rate\n"); return false; break; } // open and configure the serial port m_nPortFD = open(sPort, O_RDWR | O_NOCTTY | O_NDELAY); if (m_nPortFD <0) { perror(sPort); return false; } //save the current configuration tcgetattr(m_nPortFD,&m_OldPortOptions); //zero the buffers //bzero(&m_PortOptions, sizeof(m_PortOptions)); memset(&m_PortOptions,0,sizeof(m_PortOptions)); m_PortOptions.c_cflag = nLinuxBaudRate | CS8 | CLOCAL | CREAD; m_PortOptions.c_iflag = IGNPAR; m_PortOptions.c_oflag = 0; /* set input mode (non-canonical, no echo,...) */ m_PortOptions.c_lflag = 0; // inter-character timer unused m_PortOptions.c_cc[VTIME] = 0; // blocking read until 0 chars received, i.e. don't block m_PortOptions.c_cc[VMIN] = 0; //save the new settings tcflush(m_nPortFD, TCIFLUSH); tcsetattr(m_nPortFD,TCSANOW,&m_PortOptions); #endif if(m_nPortFD!=0) m_sPort = sPort; return m_nPortFD!=0; } } /* namespace YellowSubUtils */
dave-billin/moos-ivp-uidaho
projects/lib_YellowSubUtils/src/LinuxSerialPortEx.cpp
C++
gpl-3.0
4,048
/* 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 <errno.h> #include <getopt.h> #include <stdio.h> #include <stdlib.h> #include "fm_tuner.h" #include "hw/led.h" #include "net/handler.h" #include "net/server.h" #include "seek.h" /* seek_utils. */ #include "utils/error.h" #define DEFAULT_I2C_ID 1 #define DEFAULT_MAX_CLIENTS 10 #define DEFAULT_PIN_RST 45 #define DEFAULT_PIN_SDIO 12 #define DEFAULT_PORT 9502 #define MODE_SERVER 0 #define MODE_SEEK 1 static Fm_tuner *fm_tuner; /* --------------------------------------------------------------------- */ static void __disable_leds (void) { int i; for (i = 0; i < LEDS_N; i++) led_set_state(i, LED_INACTIVE); return; } static void __create_tuner (Fm_tuner_conf *conf) { fm_tuner = fm_tuner_new(conf); debug("Init FM tuner.\n"); #ifdef DEBUG debug("Registers data at init:\n"); fm_tuner_print_registers(fm_tuner); #endif return; } static void __delete_tuner (void) { fm_tuner_free(fm_tuner); return; } static void __usage (const char *progname) { printf("Usage: %s [OPTION]...\n", progname); printf(" -h, --help Print this helper.\n"); printf(" -i, --i2c-id=ID Set the i2c bus id. Default: %d.\n", DEFAULT_I2C_ID); printf(" -m, --max-clients=N Set the number max of server clients. Default: %d.\n", DEFAULT_MAX_CLIENTS); printf(" -p, --port=PORT Set the server port. Default: %d.\n", DEFAULT_PORT); printf(" -r, --reset-pin=PIN Set the reset pin number of the fm tuner. Default: %d.\n", DEFAULT_PIN_RST); printf(" -s, --sdio-pin=PIN Set the sdio pin number of the fm tuner. Default: %d.\n", DEFAULT_PIN_SDIO); printf(" --seek Seek to locate radio stations.\n"); exit(EXIT_SUCCESS); } /* --------------------------------------------------------------------- */ static int __parse_arguments (int argc, char *argv[], Server_conf *server_conf, Fm_tuner_conf *fm_tuner_conf) { static const char *opts = "hm:p:i:r:s:"; static struct option long_opts[] = { { "help", no_argument, NULL, 'h' }, { "i2c-id", required_argument, NULL, 'i' }, { "max-clients", required_argument, NULL, 'm' }, { "port", required_argument, NULL, 'p' }, { "reset-pin", required_argument, NULL, 'r' }, { "sdio-pin", required_argument, NULL, 's' }, { "seek", no_argument, NULL, 'l' }, { 0, 0, 0, 0} }; int opt; int opt_index; long value; char *endptr; int mode = MODE_SERVER; errno = 0; while ((opt = getopt_long(argc, argv, opts, long_opts, &opt_index)) != -1) { if (opt == 'h' || opt == '?') __usage(*argv); if (opt == 'l') { mode = MODE_SEEK; continue; } if ((value = strtol(optarg, &endptr, 10)) < 0 || errno != 0 || optarg == endptr) { fprintf(stderr, "error: %s must be an valid unsigned integer.\n", long_opts[opt_index].name); exit(EXIT_FAILURE); } switch (opt) { case 'm': server_conf->max_clients = value; break; case 'p': server_conf->port = value; break; case 'i': fm_tuner_conf->i2c_id = value; break; case 'r': fm_tuner_conf->pin_rst = value; break; case 's': fm_tuner_conf->pin_sdio = value; break; } } return mode; } int main (int argc, char *argv[]) { static Handler_value handler_value = { .to_set = 0 }; static Server_conf server_conf = { .port = DEFAULT_PORT, .max_clients = DEFAULT_MAX_CLIENTS, .user_value = &handler_value, .handlers = { .event = handler_event, .join = handler_join, .quit = handler_quit, .loop = handler_loop } }; static Fm_tuner_conf fm_tuner_conf = { .i2c_id = DEFAULT_I2C_ID, .pin_rst = DEFAULT_PIN_RST, .pin_sdio = DEFAULT_PIN_SDIO, .tuner_addr = 0x10 }; int mode = __parse_arguments(argc, argv, &server_conf, &fm_tuner_conf); __create_tuner(&fm_tuner_conf); atexit(__delete_tuner); __disable_leds(); if (mode == MODE_SEEK) seek_utils(fm_tuner); else { handler_value.fm_tuner = fm_tuner; handler_value.rds = rds_new(); server_run(&server_conf, 500); rds_free(handler_value.rds); } exit(EXIT_SUCCESS); }
PM2M2016-A-B/FM-tuner
service/src/main.c
C
gpl-3.0
4,818
#ifndef LANGUAGE_H #define LANGUAGE_H // NOTE: IF YOU CHANGE THIS FILE / MERGE THIS FILE WITH CHANGES // // ==&gt; ALWAYS TRY TO COMPILE MARLIN WITH/WITHOUT "ULTIPANEL" / "ULTRALCD" / "SDSUPPORT" #define IN "Configuration.h" // ==&gt; ALSO TRY ALL AVAILABLE "LANGUAGE_CHOICE" OPTIONS // Languages // 1 English // 2 Polish // 3 French (awaiting translation!) // 4 German // 5 Spanish // 6 Russian // 7 Italian // 8 Portuguese // 9 Finnish #ifndef LANGUAGE_CHOICE #define LANGUAGE_CHOICE 1 // Pick your language from the list above #endif #define PROTOCOL_VERSION "1.0" #if MOTHERBOARD == 7 || MOTHERBOARD == 71 #define MACHINE_NAME "Ultimaker" #define FIRMWARE_URL "http://firmware.ultimaker.com" #elif MOTHERBOARD == 80 #define MACHINE_NAME "Rumba" #define FIRMWARE_URL "https://github.com/ErikZalm/Marlin/" #elif MOTHERBOARD == RIGID_BOARD #define MACHINE_NAME "RigidBot" #define FIRMWARE_URL "http://InventAPart.com" #define USB_LCD #else #define MACHINE_NAME "Mendel" #define FIRMWARE_URL "http://www.mendel-parts.com" #endif #define STRINGIFY_(n) #n #define STRINGIFY(n) STRINGIFY_(n) #if LANGUAGE_CHOICE == 1 #ifdef USB_LCD // LCD Menu Messages #define WELCOME_MSG MACHINE_NAME " Ready." #define MSG_SD_INSERTED "USB Drive Inserted" #define MSG_SD_REMOVED "USB Drive Removed" #define MSG_MAIN "Main" #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Disable Steppers" #define MSG_AUTO_HOME "Auto Home" #define MSG_SET_ORIGIN "Set Origin" #define MSG_PREHEAT_PLA "Preheat PLA" #define MSG_PREHEAT_PLA_SETTINGS "Preheat PLA Conf" #define MSG_PREHEAT_ABS "Preheat ABS" #define MSG_PREHEAT_ABS_SETTINGS "Preheat ABS Conf" #define MSG_HEAT_COOL "Heat/Cool" #define MSG_COOLDOWN "Cooldown" #define MSG_EXTRUDE "Extrude" #define MSG_RETRACT "Retract" #define MSG_MOVE_AXIS "Move Axis" #define MSG_SPEED "Speed" #define MSG_NOZZLE "Nozzle1" #define MSG_NOZZLE1 "Nozzle2" #define MSG_NOZZLE2 "Nozzle3" #define MSG_BED "Heated Bed" #define MSG_FAN_SPEED "Fan speed" #define MSG_FLOW "Flow" #define MSG_CONTROL "Settings" #define MSG_MIN " \002 Min" #define MSG_MAX " \002 Max" #define MSG_FACTOR " \002 Fact" #define MSG_AUTOTEMP "Autotemp" #define MSG_ON "On " #define MSG_OFF "Off" #define MSG_PID_P "PID-P" #define MSG_PID_I "PID-I" #define MSG_PID_D "PID-D" #define MSG_PID_C "PID-C" #define MSG_ACC "Accel" #define MSG_VXY_JERK "Vxy-jerk" #define MSG_VZ_JERK "Vz-jerk" #define MSG_VE_JERK "Ve-jerk" #define MSG_VMAX "Vmax " #define MSG_X "x" #define MSG_Y "y" #define MSG_Z "z" #define MSG_E "e" #define MSG_VMIN "Vmin" #define MSG_VTRAV_MIN "VTrav min" #define MSG_AMAX "Amax " #define MSG_A_RETRACT "A-retract" #define MSG_XSTEPS "Xsteps/mm" #define MSG_YSTEPS "Ysteps/mm" #define MSG_ZSTEPS "Zsteps/mm" #define MSG_ESTEPS "Esteps/mm" #define MSG_RECTRACT "Rectract" #define MSG_TEMPERATURE "Temperature" #define MSG_MOTION "Motion" #define MSG_MISC_SETTINGS "Misc Settings" #define MSG_STORE_EPROM "Store Settings" #define MSG_LOAD_EPROM "Load Settings" #define MSG_RESTORE_FAILSAFE "Restore Defaults" #define MSG_REFRESH "Refresh" #define MSG_WATCH "Info screen" #define MSG_PREPARE "Prepare" #define MSG_TUNE "Tune" #define MSG_PAUSE_PRINT "Pause Print" #define MSG_RESUME_PRINT "Resume Print" #define MSG_STOP_PRINT "Stop Print" #define MSG_CARD_MENU "Print from USB" #define MSG_NO_CARD "No USB Drive" #define MSG_DWELL "Sleep..." #define MSG_USERWAIT "Wait for user... " #define MSG_RESUMING "Resuming print" #define MSG_NO_MOVE "No move." #define MSG_KILLED "KILLED. " #define MSG_STOPPED "STOPPED. " #define MSG_CONTROL_RETRACT "Retract mm" #define MSG_CONTROL_RETRACTF "Retract F" #define MSG_CONTROL_RETRACT_ZLIFT "Hop mm" #define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm" #define MSG_CONTROL_RETRACT_RECOVERF "UnRet F" #define MSG_AUTORETRACT "AutoRetr." #define MSG_FILAMENTCHANGE "Change filament" #define MSG_INIT_SDCARD "Init. USB-Drive" #define MSG_CNG_SDCARD "Change USB-Drive" #define MSG_UTILITIES "Utilities" #define MSG_DAC "Drive Strength" #define MSG_BED_LEVEL "Bed Leveling" // Serial Console Messages #define MSG_Enqueing "enqueing \"" #define MSG_POWERUP "PowerUp" #define MSG_EXTERNAL_RESET " External Reset" #define MSG_BROWNOUT_RESET " Brown out Reset" #define MSG_WATCHDOG_RESET " Watchdog Reset" #define MSG_SOFTWARE_RESET " Software Reset" #define MSG_MARLIN "Marlin " #define MSG_AUTHOR " | Author: " #define MSG_CONFIGURATION_VER " Last Updated: " #define MSG_FREE_MEMORY " Free Memory: " #define MSG_PLANNER_BUFFER_BYTES " PlannerBufferBytes: " #define MSG_OK "ok" #define MSG_FILE_SAVED "Done saving file." #define MSG_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line: " #define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line: " #define MSG_ERR_NO_CHECKSUM "No Checksum with line number, Last Line: " #define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line: " #define MSG_FILE_PRINTED "Done printing file" #define MSG_BEGIN_FILE_LIST "Begin file list" #define MSG_END_FILE_LIST "End file list" #define MSG_M104_INVALID_EXTRUDER "M104 Invalid extruder " #define MSG_M105_INVALID_EXTRUDER "M105 Invalid extruder " #define MSG_M218_INVALID_EXTRUDER "M218 Invalid extruder " #define MSG_ERR_NO_THERMISTORS "No thermistors - no temperature" #define MSG_M109_INVALID_EXTRUDER "M109 Invalid extruder " #define MSG_HEATING "Heating... " #define MSG_HEATING_COMPLETE "Heating done." #define MSG_BED_HEATING "Bed Heating." #define MSG_BED_DONE "Bed done." #define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) "\n" #define MSG_COUNT_X " Count X: " #define MSG_ERR_KILLED "Printer halted. kill() called!" #define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)" #define MSG_RESEND "Resend: " #define MSG_UNKNOWN_COMMAND "Unknown command: \"" #define MSG_ACTIVE_EXTRUDER "Active Extruder: " #define MSG_INVALID_EXTRUDER "Invalid extruder" #define MSG_X_MIN "x_min: " #define MSG_X_MAX "x_max: " #define MSG_Y_MIN "y_min: " #define MSG_Y_MAX "y_max: " #define MSG_Z_MIN "z_min: " #define MSG_Z_MAX "z_max: " #define MSG_M119_REPORT "Reporting endstop status" #define MSG_ENDSTOP_HIT "TRIGGERED" #define MSG_ENDSTOP_OPEN "open" #define MSG_HOTEND_OFFSET "Hotend offsets:" #define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir" #define MSG_SD_INIT_FAIL "USB Drive init fail" #define MSG_SD_VOL_INIT_FAIL "volume.init failed" #define MSG_SD_OPENROOT_FAIL "openRoot failed" #define MSG_SD_CARD_OK "USB Drive ok" #define MSG_SD_WORKDIR_FAIL "workDir open failed" #define MSG_SD_OPEN_FILE_FAIL "open failed, File: " #define MSG_SD_FILE_OPENED "File opened: " #define MSG_SD_SIZE " Size: " #define MSG_SD_FILE_SELECTED "File selected" #define MSG_SD_WRITE_TO_FILE "Writing to file: " #define MSG_SD_PRINTING_BYTE "USB drive printing byte " #define MSG_SD_NOT_PRINTING "Not USB Drive printing" #define MSG_SD_ERR_WRITE_TO_FILE "error writing to file" #define MSG_SD_CANT_ENTER_SUBDIR "Cannot enter subdir: " #define MSG_STEPPER_TO_HIGH "Steprate to high: " #define MSG_ENDSTOPS_HIT "endstops hit: " #define MSG_ERR_COLD_EXTRUDE_STOP " cold extrusion prevented" #define MSG_ERR_LONG_EXTRUDE_STOP " too long extrusion prevented" #else // Standard LCD Menu Messages #define WELCOME_MSG MACHINE_NAME " Ready." #define MSG_SD_INSERTED "Card inserted" #define MSG_SD_REMOVED "Card removed" #define MSG_MAIN "Main" #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Disable Steppers" #define MSG_AUTO_HOME "Auto Home" #define MSG_SET_ORIGIN "Set Origin" #define MSG_PREHEAT_PLA "Preheat PLA" #define MSG_PREHEAT_PLA_SETTINGS "Preheat PLA Conf" #define MSG_PREHEAT_ABS "Preheat ABS" #define MSG_PREHEAT_ABS_SETTINGS "Preheat ABS Conf" #define MSG_COOLDOWN "Cooldown" #define MSG_EXTRUDE "Extrude" #define MSG_RETRACT "Retract" #define MSG_MOVE_AXIS "Move Axis" #define MSG_SPEED "Speed" #define MSG_NOZZLE "Nozzle" #define MSG_NOZZLE1 "Nozzle2" #define MSG_NOZZLE2 "Nozzle3" #define MSG_BED "Bed" #define MSG_FAN_SPEED "Fan speed" #define MSG_FLOW "Flow" #define MSG_CONTROL "Control" #define MSG_MIN " \002 Min" #define MSG_MAX " \002 Max" #define MSG_FACTOR " \002 Fact" #define MSG_AUTOTEMP "Autotemp" #define MSG_ON "On " #define MSG_OFF "Off" #define MSG_PID_P "PID-P" #define MSG_PID_I "PID-I" #define MSG_PID_D "PID-D" #define MSG_PID_C "PID-C" #define MSG_ACC "Accel" #define MSG_VXY_JERK "Vxy-jerk" #define MSG_VZ_JERK "Vz-jerk" #define MSG_VE_JERK "Ve-jerk" #define MSG_VMAX "Vmax " #define MSG_X "x" #define MSG_Y "y" #define MSG_Z "z" #define MSG_E "e" #define MSG_VMIN "Vmin" #define MSG_VTRAV_MIN "VTrav min" #define MSG_AMAX "Amax " #define MSG_A_RETRACT "A-retract" #define MSG_XSTEPS "Xsteps/mm" #define MSG_YSTEPS "Ysteps/mm" #define MSG_ZSTEPS "Zsteps/mm" #define MSG_ESTEPS "Esteps/mm" #define MSG_RECTRACT "Rectract" #define MSG_TEMPERATURE "Temperature" #define MSG_MOTION "Motion" #define MSG_STORE_EPROM "Store memory" #define MSG_LOAD_EPROM "Load memory" #define MSG_RESTORE_FAILSAFE "Restore Failsafe" #define MSG_REFRESH "Refresh" #define MSG_WATCH "Info screen" #define MSG_PREPARE "Prepare" #define MSG_TUNE "Tune" #define MSG_PAUSE_PRINT "Pause Print" #define MSG_RESUME_PRINT "Resume Print" #define MSG_STOP_PRINT "Stop Print" #define MSG_CARD_MENU "Print from SD" #define MSG_NO_CARD "No Card" #define MSG_DWELL "Sleep..." #define MSG_USERWAIT "Wait for user..." #define MSG_RESUMING "Resuming print" #define MSG_NO_MOVE "No move." #define MSG_KILLED "KILLED. " #define MSG_STOPPED "STOPPED. " #define MSG_CONTROL_RETRACT "Retract mm" #define MSG_CONTROL_RETRACTF "Retract F" #define MSG_CONTROL_RETRACT_ZLIFT "Hop mm" #define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm" #define MSG_CONTROL_RETRACT_RECOVERF "UnRet F" #define MSG_AUTORETRACT "AutoRetr." #define MSG_FILAMENTCHANGE "Change filament" #define MSG_INIT_SDCARD "Init. SD-Card" #define MSG_CNG_SDCARD "Change SD-Card" // Serial Console Messages #define MSG_Enqueing "enqueing \"" #define MSG_POWERUP "PowerUp" #define MSG_EXTERNAL_RESET " External Reset" #define MSG_BROWNOUT_RESET " Brown out Reset" #define MSG_WATCHDOG_RESET " Watchdog Reset" #define MSG_SOFTWARE_RESET " Software Reset" #define MSG_MARLIN "Marlin " #define MSG_AUTHOR " | Author: " #define MSG_CONFIGURATION_VER " Last Updated: " #define MSG_FREE_MEMORY " Free Memory: " #define MSG_PLANNER_BUFFER_BYTES " PlannerBufferBytes: " #define MSG_OK "ok" #define MSG_FILE_SAVED "Done saving file." #define MSG_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line: " #define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line: " #define MSG_ERR_NO_CHECKSUM "No Checksum with line number, Last Line: " #define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line: " #define MSG_FILE_PRINTED "Done printing file" #define MSG_BEGIN_FILE_LIST "Begin file list" #define MSG_END_FILE_LIST "End file list" #define MSG_M104_INVALID_EXTRUDER "M104 Invalid extruder " #define MSG_M105_INVALID_EXTRUDER "M105 Invalid extruder " #define MSG_M218_INVALID_EXTRUDER "M218 Invalid extruder " #define MSG_ERR_NO_THERMISTORS "No thermistors - no temperature" #define MSG_M109_INVALID_EXTRUDER "M109 Invalid extruder " #define MSG_HEATING "Heating..." #define MSG_HEATING_COMPLETE "Heating done." #define MSG_BED_HEATING "Bed Heating." #define MSG_BED_DONE "Bed done." #define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) "\n" #define MSG_COUNT_X " Count X: " #define MSG_ERR_KILLED "Printer halted. kill() called!" #define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)" #define MSG_RESEND "Resend: " #define MSG_UNKNOWN_COMMAND "Unknown command: \"" #define MSG_ACTIVE_EXTRUDER "Active Extruder: " #define MSG_INVALID_EXTRUDER "Invalid extruder" #define MSG_X_MIN "x_min: " #define MSG_X_MAX "x_max: " #define MSG_Y_MIN "y_min: " #define MSG_Y_MAX "y_max: " #define MSG_Z_MIN "z_min: " #define MSG_Z_MAX "z_max: " #define MSG_M119_REPORT "Reporting endstop status" #define MSG_ENDSTOP_HIT "TRIGGERED" #define MSG_ENDSTOP_OPEN "open" #define MSG_HOTEND_OFFSET "Hotend offsets:" #define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir" #define MSG_SD_INIT_FAIL "SD init fail" #define MSG_SD_VOL_INIT_FAIL "volume.init failed" #define MSG_SD_OPENROOT_FAIL "openRoot failed" #define MSG_SD_CARD_OK "SD card ok" #define MSG_SD_WORKDIR_FAIL "workDir open failed" #define MSG_SD_OPEN_FILE_FAIL "open failed, File: " #define MSG_SD_FILE_OPENED "File opened: " #define MSG_SD_SIZE " Size: " #define MSG_SD_FILE_SELECTED "File selected" #define MSG_SD_WRITE_TO_FILE "Writing to file: " #define MSG_SD_PRINTING_BYTE "SD printing byte " #define MSG_SD_NOT_PRINTING "Not SD printing" #define MSG_SD_ERR_WRITE_TO_FILE "error writing to file" #define MSG_SD_CANT_ENTER_SUBDIR "Cannot enter subdir: " #define MSG_STEPPER_TO_HIGH "Steprate to high: " #define MSG_ENDSTOPS_HIT "endstops hit: " #define MSG_ERR_COLD_EXTRUDE_STOP " cold extrusion prevented" #define MSG_ERR_LONG_EXTRUDE_STOP " too long extrusion prevented" #endif #endif #if LANGUAGE_CHOICE == 2 // LCD Menu Messages #define WELCOME_MSG MACHINE_NAME " Gotowe." #define MSG_SD_INSERTED "Karta wlozona" #define MSG_SD_REMOVED "Karta usunieta" #define MSG_MAIN "Main" #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Wylacz silniki" #define MSG_AUTO_HOME "Auto. poz. zerowa" #define MSG_SET_ORIGIN "Ustaw punkt zerowy" #define MSG_PREHEAT_PLA "Rozgrzej PLA" #define MSG_PREHEAT_PLA_SETTINGS "Ustawienia roz. PLA" #define MSG_PREHEAT_ABS "Rozgrzej ABS" #define MSG_PREHEAT_ABS_SETTINGS "Ustawienia roz. ABS" #define MSG_COOLDOWN "Chlodzenie" #define MSG_EXTRUDE "Ekstruzja" #define MSG_RETRACT "Cofanie" #define MSG_MOVE_AXIS "Ruch osi" #define MSG_SPEED "Predkosc" #define MSG_NOZZLE "Dysza" #define MSG_NOZZLE1 "Dysza2" #define MSG_NOZZLE2 "Dysza3" #define MSG_BED "Loze" #define MSG_FAN_SPEED "Obroty wiatraka" #define MSG_FLOW "Przeplyw" #define MSG_CONTROL "Kontrola" #define MSG_MIN " \002 Min" #define MSG_MAX " \002 Max" #define MSG_FACTOR " \002 Mnoznik" #define MSG_AUTOTEMP "Auto. temp." #define MSG_ON "Wl. " #define MSG_OFF "Wyl." #define MSG_PID_P "PID-P" #define MSG_PID_I "PID-I" #define MSG_PID_D "PID-D" #define MSG_PID_C "PID-C" #define MSG_ACC "Acc" #define MSG_VXY_JERK "Zryw Vxy" #define MSG_VZ_JERK "Zryw Vz" #define MSG_VE_JERK "Zryw Ve" #define MSG_VMAX "Vmax" #define MSG_X "x" #define MSG_Y "y" #define MSG_Z "z" #define MSG_E "e" #define MSG_VMIN "Vmin" #define MSG_VTRAV_MIN "Vskok min" #define MSG_AMAX "Amax" #define MSG_A_RETRACT "A-wycofanie" #define MSG_XSTEPS "krokiX/mm" #define MSG_YSTEPS "krokiY/mm" #define MSG_ZSTEPS "krokiZ/mm" #define MSG_ESTEPS "krokiE/mm" #define MSG_RECTRACT "Wycofanie" #define MSG_TEMPERATURE "Temperatura" #define MSG_MOTION "Ruch" #define MSG_STORE_EPROM "Zapisz w pamieci" #define MSG_LOAD_EPROM "Wczytaj z pamieci" #define MSG_RESTORE_FAILSAFE " Ustawienia fabryczne" #define MSG_REFRESH "\004Odswiez" #define MSG_WATCH "Obserwuj" #define MSG_PREPARE "Przygotuj" #define MSG_CONTROL "Kontroluj" #define MSG_TUNE "Strojenie" #define MSG_PAUSE_PRINT "Pauza" #define MSG_RESUME_PRINT "Wznowienie" #define MSG_STOP_PRINT "Stop" #define MSG_CARD_MENU "Menu SDCard" #define MSG_NO_CARD "Brak karty" #define MSG_DWELL "Uspij..." #define MSG_USERWAIT "Czekaj na uzytkownika..." #define MSG_RESUMING "Wznawiam drukowanie" #define MSG_NO_MOVE "Brak ruchu." #define MSG_PART_RELEASE "Czesciowe zwolnienie" #define MSG_KILLED "Ubity. " #define MSG_STOPPED "Zatrzymany. " #define MSG_STEPPER_RELEASED "Zwolniony." #define MSG_CONTROL_RETRACT "Wycofaj mm" #define MSG_CONTROL_RETRACTF "Wycofaj F" #define MSG_CONTROL_RETRACT_ZLIFT "Skok Z mm:" #define MSG_CONTROL_RETRACT_RECOVER "Cof. wycof. +mm" #define MSG_CONTROL_RETRACT_RECOVERF "Cof. wycof. F" #define MSG_AUTORETRACT "Auto. wycofanie" #define MSG_FILAMENTCHANGE "Change filament" // Serial Console Messages #define MSG_Enqueing "Kolejkowanie \"" #define MSG_POWERUP "Zasilanie wlaczone" #define MSG_EXTERNAL_RESET " Reset (zewnetrzny)" #define MSG_BROWNOUT_RESET " Reset (spadek napiecia)" #define MSG_WATCHDOG_RESET " Reset (watchdog)" #define MSG_SOFTWARE_RESET " Reset (programowy)" #define MSG_MARLIN "Marlin " #define MSG_AUTHOR " | Autor: " #define MSG_CONFIGURATION_VER " Ostatnia aktualizacja: " #define MSG_FREE_MEMORY " Wolna pamiec: " #define MSG_PLANNER_BUFFER_BYTES " Bufor planisty krokow (w bajtach): " #define MSG_OK "ok" #define MSG_FILE_SAVED "Plik zapisany." #define MSG_ERR_LINE_NO "Numer linijki nie jest ostatnim numerem linijki+1; ostatnia linijka:" #define MSG_ERR_CHECKSUM_MISMATCH "Niezgodna suma kontrolna; ostatnia linijka: " #define MSG_ERR_NO_CHECKSUM "Brak sumy kontrolnej w linijce; ostatnia linijka:" #define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "Brak numery linijki przy sumie kontrolnej; ostatnia linijka:" #define MSG_FILE_PRINTED "Ukonczono wydruk z pliku" #define MSG_BEGIN_FILE_LIST "Start listy plikow" #define MSG_END_FILE_LIST "Koniec listy plikow" #define MSG_M104_INVALID_EXTRUDER "M104 Niepoprawny ekstruder " #define MSG_M105_INVALID_EXTRUDER "M105 Niepoprawny ekstruder " #define MSG_M218_INVALID_EXTRUDER "M218 Niepoprawny ekstruder " #define MSG_ERR_NO_THERMISTORS "Brak termistorow - brak temperatury :(" #define MSG_M109_INVALID_EXTRUDER "M109 Niepoprawny ekstruder " #define MSG_HEATING "Nagrzewanie ekstrudera..." #define MSG_HEATING_COMPLETE "Nagrzewanie ekstrudera zakonczone." #define MSG_BED_HEATING "Nagrzewanie loza..." #define MSG_BED_DONE "Nagrzewanie loza zakonczone." #define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) "\n" #define MSG_COUNT_X " Liczenie X: " #define MSG_ERR_KILLED "Drukarka zatrzymana. Wywolano kill()" #define MSG_ERR_STOPPED "Drukarka zatrzymana z powodu bledu. Usun problem i zrestartuj drukartke komenda M999. (temperatura zostala zresetowana; ustaw temperature po restarcie)" #define MSG_RESEND "Wyslij ponownie: " #define MSG_UNKNOWN_COMMAND "Nieznane polecenie: \"" #define MSG_ACTIVE_EXTRUDER "Aktywny ekstruder: " #define MSG_INVALID_EXTRUDER "Niepoprawny ekstruder" #define MSG_X_MIN "x_min: " #define MSG_X_MAX "x_max: " #define MSG_Y_MIN "y_min: " #define MSG_Y_MAX "y_max: " #define MSG_Z_MIN "z_min: " #define MSG_Z_MAX "z_max: " #define MSG_M119_REPORT "Zgloszenie statusu wylacznikow krancowych" #define MSG_ENDSTOP_HIT "WYZWOLONY" #define MSG_ENDSTOP_OPEN "otwarty" #define MSG_HOTEND_OFFSET "Hotend offsets:" #define MSG_SD_CANT_OPEN_SUBDIR "Nie mozna otworzyc podkatalogu" #define MSG_SD_INIT_FAIL "Blad inicjalizacji karty SD" #define MSG_SD_VOL_INIT_FAIL "Blad inizjalizacji wolumenu" #define MSG_SD_OPENROOT_FAIL "Blad odczytywania katalogu glownego" #define MSG_SD_CARD_OK "Karta SD zainicjalizowana" #define MSG_SD_WORKDIR_FAIL "Blad odczytywania katalogu roboczego" #define MSG_SD_OPEN_FILE_FAIL "Nie mozna otworzyc pliku: " #define MSG_SD_FILE_OPENED "Otwarto plik:" #define MSG_SD_SIZE " Rozmiar:" #define MSG_SD_FILE_SELECTED "Wybrano plik" #define MSG_SD_WRITE_TO_FILE "Zapisywanie do pliku: " #define MSG_SD_PRINTING_BYTE "Drukowanie z karty SD, bajt " #define MSG_SD_NOT_PRINTING "Nie trwa drukowanie z karty SD" #define MSG_SD_ERR_WRITE_TO_FILE "blad podczas zapisu do pliku" #define MSG_SD_CANT_ENTER_SUBDIR "Nie mozna odczytac podkatalogu: " #define MSG_STEPPER_TO_HIGH "Za duza czestotliwosc krokow: " #define MSG_ENDSTOPS_HIT "Wylacznik krancowy zostal wyzwolony na pozycji: " #define MSG_ERR_COLD_EXTRUDE_STOP " uniemozliwiono zimna ekstruzje" #define MSG_ERR_LONG_EXTRUDE_STOP " uniemozliwiono zbyt dluga ekstruzje" #endif #if LANGUAGE_CHOICE == 3 #define WELCOME_MSG MACHINE_NAME " Pret." #define MSG_SD_INSERTED "Carte inseree" #define MSG_SD_REMOVED "Carte retiree" #define MSG_MAIN " Principal \003" #define MSG_AUTOSTART " Demarrage auto." #define MSG_DISABLE_STEPPERS " Desactiver moteurs" #define MSG_AUTO_HOME " Home auto." #define MSG_SET_ORIGIN " Regler origine" #define MSG_PREHEAT_PLA " Prechauffage PLA" #define MSG_PREHEAT_PLA_SETTINGS " Regl. prechauffe PLA" #define MSG_PREHEAT_ABS " Prechauffage ABS" #define MSG_PREHEAT_ABS_SETTINGS " Regl. prechauffe ABS" #define MSG_COOLDOWN " Refroidissement" #define MSG_EXTRUDE " Extrusion" #define MSG_RETRACT " Retractation" #define MSG_PREHEAT_PLA " Prechauffage PLA" #define MSG_PREHEAT_ABS " Prechauffage ABS" #define MSG_MOVE_AXIS " Deplacer axe \x7E" #define MSG_SPEED " Vitesse:" #define MSG_NOZZLE " \002Buse:" #define MSG_NOZZLE1 " \002Buse2:" #define MSG_NOZZLE2 " \002Buse3:" #define MSG_BED " \002Lit:" #define MSG_FAN_SPEED " Vitesse ventilateur:" #define MSG_FLOW " Flux:" #define MSG_CONTROL " Controle \003" #define MSG_MIN " \002 Min:" #define MSG_MAX " \002 Max:" #define MSG_FACTOR " \002 Facteur:" #define MSG_AUTOTEMP " Temp. Auto.:" #define MSG_ON "Marche " #define MSG_OFF "Arret" #define MSG_PID_P " PID-P: " #define MSG_PID_I " PID-I: " #define MSG_PID_D " PID-D: " #define MSG_PID_C " PID-C: " #define MSG_ACC " Acc:" #define MSG_VXY_JERK "Vxy-jerk" #define MSG_VZ_JERK "Vz-jerk" #define MSG_VE_JERK "Ve-jerk" #define MSG_VMAX " Vmax " #define MSG_X "x:" #define MSG_Y "y:" #define MSG_Z "z:" #define MSG_E "e:" #define MSG_VMIN " Vmin:" #define MSG_VTRAV_MIN " Vdepl min:" #define MSG_AMAX " Amax " #define MSG_A_RETRACT " A-retract:" #define MSG_XSTEPS " Xpas/mm:" #define MSG_YSTEPS " Ypas/mm:" #define MSG_ZSTEPS " Zpas/mm:" #define MSG_ESTEPS " Epas/mm:" #define MSG_MAIN_WIDE " Principal \003" #define MSG_RECTRACT_WIDE " Rectractater \x7E" #define MSG_TEMPERATURE_WIDE " Temperature \x7E" #define MSG_TEMPERATURE_RTN " Temperature \003" #define MSG_MOTION_WIDE " Mouvement \x7E" #define MSG_STORE_EPROM " Sauvegarder memoire" #define MSG_LOAD_EPROM " Lire memoire" #define MSG_RESTORE_FAILSAFE " Restaurer memoire" #define MSG_REFRESH "\004Actualiser" #define MSG_WATCH " Surveiller \003" #define MSG_PREPARE " Preparer \x7E" #define MSG_PREPARE_ALT " Prepare \003" #define MSG_CONTROL_ARROW " Controle \x7E" #define MSG_RETRACT_ARROW " Retracter \x7E" #define MSG_TUNE " Regler \x7E" #define MSG_PAUSE_PRINT " Pause impression \x7E" #define MSG_RESUME_PRINT " Reprendre impression \x7E" #define MSG_STOP_PRINT " Arreter impression \x7E" #define MSG_CARD_MENU " Menu carte \x7E" #define MSG_NO_CARD " Pas de carte" #define MSG_DWELL "Repos..." #define MSG_USERWAIT "Attente de l'utilisateur..." #define MSG_NO_MOVE "Aucun mouvement." #define MSG_PART_RELEASE "Relache partielle" #define MSG_KILLED "TUE." #define MSG_STOPPED "STOPPE." #define MSG_STEPPER_RELEASED "RELACHE." #define MSG_CONTROL_RETRACT " Retractation mm:" #define MSG_CONTROL_RETRACTF " Retractation F:" #define MSG_CONTROL_RETRACT_ZLIFT " Hop mm:" #define MSG_CONTROL_RETRACT_RECOVER " UnRet +mm:" #define MSG_CONTROL_RETRACT_RECOVERF " UnRet F:" #define MSG_AUTORETRACT " Retract. Auto.:" #define MSG_FILAMENTCHANGE "Change filament" // Serial Console Messages #define MSG_Enqueing "Mise en tampon \"" #define MSG_POWERUP "Allumage" #define MSG_EXTERNAL_RESET " RAZ Externe" #define MSG_BROWNOUT_RESET " RAZ defaut alim." #define MSG_WATCHDOG_RESET " RAZ Watchdog" #define MSG_SOFTWARE_RESET " RAZ logicielle" #define MSG_MARLIN "Marlin " #define MSG_AUTHOR " | Auteur: " #define MSG_CONFIGURATION_VER " Derniere MaJ: " #define MSG_FREE_MEMORY " Memoire libre: " #define MSG_PLANNER_BUFFER_BYTES " PlannerBufferBytes: " #define MSG_OK "ok" #define MSG_FILE_SAVED "Fichier enregistre." #define MSG_ERR_LINE_NO "Le numero de ligne n'est pas la derniere ligne + 1, derniere ligne: " #define MSG_ERR_CHECKSUM_MISMATCH "Erreur somme de controle, derniere ligne: " #define MSG_ERR_NO_CHECKSUM "Pas de somme de controle avec le numero de ligne, derniere ligne: " #define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "Pas de numero de ligne avec somme de controle, derniere ligne: " #define MSG_FILE_PRINTED "Impression terminee" #define MSG_BEGIN_FILE_LIST "Debut de la liste de fichiers" #define MSG_END_FILE_LIST "Fin de la liste de fichiers" #define MSG_M104_INVALID_EXTRUDER "M104 Extruder invalide" #define MSG_M105_INVALID_EXTRUDER "M105 Extruder invalide" #define MSG_M218_INVALID_EXTRUDER "M218 Extruder invalide" #define MSG_ERR_NO_THERMISTORS "Pas de thermistor, pas de temperature" #define MSG_M109_INVALID_EXTRUDER "M109 Extruder invalide " #define MSG_HEATING "En chauffe..." #define MSG_HEATING_COMPLETE "Chauffe terminee." #define MSG_BED_HEATING "Chauffe du lit." #define MSG_BED_DONE "Chauffe du lit terminee." #define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) "\n" #define MSG_COUNT_X " Compteur X: " #define MSG_ERR_KILLED "Impression arretee. kill() appelee!" #define MSG_ERR_STOPPED "Impression arretee a cause d'erreurs. Corriger les erreurs et utiliser M999 pour la reprendre. (Temperature remise a zero. Reactivez la apres redemarrage)" #define MSG_RESEND "Renvoie: " #define MSG_UNKNOWN_COMMAND "Commande inconnue: \"" #define MSG_ACTIVE_EXTRUDER "Extrudeur actif: " #define MSG_INVALID_EXTRUDER "Extrudeur invalide" #define MSG_X_MIN "x_min: " #define MSG_X_MAX "x_max: " #define MSG_Y_MIN "y_min: " #define MSG_Y_MAX "y_max: " #define MSG_Z_MIN "z_min: " #define MSG_Z_MAX "z_max: " #define MSG_M119_REPORT "Affichage du status des fin de course" #define MSG_ENDSTOP_HIT "DECLENCHE" #define MSG_ENDSTOP_OPEN "OUVERT" #define MSG_HOTEND_OFFSET "Hotend offsets:" #define MSG_SD_CANT_OPEN_SUBDIR "Impossible d'ouvrir le sous-repertoire" #define MSG_SD_INIT_FAIL "Echec de l'initialisation de la SD" #define MSG_SD_VOL_INIT_FAIL "Echec de volume.init" #define MSG_SD_OPENROOT_FAIL "Echec openRoot" #define MSG_SD_CARD_OK "Carte SD Ok" #define MSG_SD_WORKDIR_FAIL "Echec d'ouverture workDir" #define MSG_SD_OPEN_FILE_FAIL "Echec d'ouverture, Fichier: " #define MSG_SD_FILE_OPENED "Fichier ouvert: " #define MSG_SD_SIZE " Taille: " #define MSG_SD_FILE_SELECTED "Fichier selectionne" #define MSG_SD_WRITE_TO_FILE "Ecriture dans le fichier: " #define MSG_SD_PRINTING_BYTE "Octet impression SD " #define MSG_SD_NOT_PRINTING "Pas d'impression SD" #define MSG_SD_ERR_WRITE_TO_FILE "Erreur d'ecriture dans le fichier" #define MSG_SD_CANT_ENTER_SUBDIR "Impossible d'entrer dans le sous-repertoire: " #define MSG_STEPPER_TO_HIGH "Steprate trop eleve: " #define MSG_ENDSTOPS_HIT "Fin de course atteint: " #define MSG_ERR_COLD_EXTRUDE_STOP " Extrusion a froid evitee" #define MSG_ERR_LONG_EXTRUDE_STOP " Extrusion longue evitee" #endif #if LANGUAGE_CHOICE == 4 // LCD Menu Messages #define WELCOME_MSG MACHINE_NAME " Bereit." #define MSG_SD_INSERTED "SDKarte erkannt" #define MSG_SD_REMOVED "SDKarte entfernt" #define MSG_MAIN "Hauptmneü" #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Stepper abschalten" #define MSG_AUTO_HOME "Auto Nullpunkt" #define MSG_SET_ORIGIN "Setze Nullpunkt" #define MSG_PREHEAT_PLA "Vorwärmen PLA" #define MSG_PREHEAT_PLA_SETTINGS "Vorwärmen PLA Einstellungen" #define MSG_PREHEAT_ABS "Vorwärmen ABS" #define MSG_PREHEAT_ABS_SETTINGS "Vorwärmen ABS Einstellungen" #define MSG_COOLDOWN "Abkühlen" #define MSG_EXTRUDE "Extrude" #define MSG_RETRACT "Retract" #define MSG_MOVE_AXIS "Achsen bewegen" #define MSG_SPEED "Geschw" #define MSG_NOZZLE "Düse" #define MSG_NOZZLE1 "Düse2" #define MSG_NOZZLE2 "Düse3" #define MSG_BED "Bett" #define MSG_FAN_SPEED "Lüftergeschw." #define MSG_FLOW "Fluß" #define MSG_CONTROL "Einstellungen" #define MSG_MIN "\002 Min" #define MSG_MAX "\002 Max" #define MSG_FACTOR "\002 Faktor" #define MSG_AUTOTEMP "AutoTemp" #define MSG_ON "Ein" #define MSG_OFF "Aus" #define MSG_PID_P "PID-P" #define MSG_PID_I "PID-I" #define MSG_PID_D "PID-D" #define MSG_PID_C "PID-C" #define MSG_ACC "Acc" #define MSG_VXY_JERK "Vxy-jerk" #define MSG_VZ_JERK "Vz-jerk" #define MSG_VE_JERK "Ve-jerk" #define MSG_VMAX "Vmax " #define MSG_X "x" #define MSG_Y "y" #define MSG_Z "z" #define MSG_E "e" #define MSG_VMIN "Vmin" #define MSG_VTRAV_MIN "VTrav min" #define MSG_AMAX "Amax " #define MSG_A_RETRACT "A-Retract" #define MSG_XSTEPS "Xsteps/mm" #define MSG_YSTEPS "Ysteps/mm" #define MSG_ZSTEPS "Zsteps/mm" #define MSG_ESTEPS "Esteps/mm" #define MSG_RECTRACT_WIDE "Rectract" #define MSG_WATCH "Beobachten" #define MSG_TEMPERATURE "Temperatur" #define MSG_MOTION "Bewegung" #define MSG_STORE_EPROM "EPROM speichern" #define MSG_LOAD_EPROM "EPROM laden" #define MSG_RESTORE_FAILSAFE "Standardkonfig." #define MSG_REFRESH "Aktualisieren" #define MSG_PREPARE "Vorbereitung" #define MSG_CONTROL "Einstellungen" #define MSG_TUNE "Justierung" #define MSG_PAUSE_PRINT "Druck anhalten" #define MSG_RESUME_PRINT "Druck fortsetz" #define MSG_STOP_PRINT "Druck stoppen" #define MSG_CARD_MENU "SDKarten Menü" #define MSG_NO_CARD "Keine SDKarte" #define MSG_DWELL "Warten..." #define MSG_USERWAIT "Warte auf Nutzer..." #define MSG_RESUMING "Druck fortsetzung" #define MSG_NO_MOVE "Kein Zug." #define MSG_PART_RELEASE "Stepper tlw frei" #define MSG_KILLED "KILLED" #define MSG_STOPPED "GESTOPPT" #define MSG_STEPPER_RELEASED "Stepper frei" #define MSG_CONTROL_RETRACT "Retract mm" #define MSG_CONTROL_RETRACTF "Retract F" #define MSG_CONTROL_RETRACT_ZLIFT "Hop mm" #define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm" #define MSG_CONTROL_RETRACT_RECOVERF "UnRet F" #define MSG_AUTORETRACT "AutoRetr." #define MSG_FILAMENTCHANGE "Filament wechseln" // Serial Console Messages #define MSG_Enqueing "enqueing \"" #define MSG_POWERUP "PowerUp" #define MSG_EXTERNAL_RESET " External Reset" #define MSG_BROWNOUT_RESET " Brown out Reset" #define MSG_WATCHDOG_RESET " Watchdog Reset" #define MSG_SOFTWARE_RESET " Software Reset" #define MSG_MARLIN "Marlin: " #define MSG_AUTHOR " | Author: " #define MSG_CONFIGURATION_VER " Last Updated: " #define MSG_FREE_MEMORY " Free Memory: " #define MSG_PLANNER_BUFFER_BYTES " PlannerBufferBytes: " #define MSG_OK "ok" #define MSG_FILE_SAVED "Done saving file." #define MSG_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line:" #define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line:" #define MSG_ERR_NO_CHECKSUM "No Checksum with line number, Last Line:" #define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line:" #define MSG_FILE_PRINTED "Done printing file" #define MSG_BEGIN_FILE_LIST "Begin file list" #define MSG_END_FILE_LIST "End file list" #define MSG_M104_INVALID_EXTRUDER "M104 Invalid extruder " #define MSG_M105_INVALID_EXTRUDER "M105 Invalid extruder " #define MSG_M218_INVALID_EXTRUDER "M218 Invalid extruder " #define MSG_ERR_NO_THERMISTORS "No thermistors - no temp" #define MSG_M109_INVALID_EXTRUDER "M109 Invalid extruder " #define MSG_HEATING "Heating..." #define MSG_HEATING_COMPLETE "Heating done." #define MSG_BED_HEATING "Bed Heating." #define MSG_BED_DONE "Bed done." #define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) "\n" #define MSG_COUNT_X " Count X:" #define MSG_ERR_KILLED "Printer halted. kill() called !!" #define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart!" #define MSG_RESEND "Resend:" #define MSG_UNKNOWN_COMMAND "Unknown command:\"" #define MSG_ACTIVE_EXTRUDER "Active Extruder: " #define MSG_INVALID_EXTRUDER "Invalid extruder" #define MSG_X_MIN "x_min: " #define MSG_X_MAX "x_max: " #define MSG_Y_MIN "y_min: " #define MSG_Y_MAX "y_max: " #define MSG_Z_MIN "z_min: " #define MSG_Z_MAX "z_max: " #define MSG_M119_REPORT "Reporting endstop status" #define MSG_ENDSTOP_HIT "TRIGGERED" #define MSG_ENDSTOP_OPEN "open" #define MSG_HOTEND_OFFSET "Hotend offsets:" #define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir" #define MSG_SD_INIT_FAIL "SD init fail" #define MSG_SD_VOL_INIT_FAIL "volume.init failed" #define MSG_SD_OPENROOT_FAIL "openRoot failed" #define MSG_SD_CARD_OK "SD card ok" #define MSG_SD_WORKDIR_FAIL "workDir open failed" #define MSG_SD_OPEN_FILE_FAIL "open failed, File: " #define MSG_SD_FILE_OPENED "File opened:" #define MSG_SD_SIZE " Size:" #define MSG_SD_FILE_SELECTED "File selected" #define MSG_SD_WRITE_TO_FILE "Writing to file: " #define MSG_SD_PRINTING_BYTE "SD printing byte " #define MSG_SD_NOT_PRINTING "Not SD printing" #define MSG_SD_ERR_WRITE_TO_FILE "error writing to file" #define MSG_SD_CANT_ENTER_SUBDIR "Cannot enter subdir:" #define MSG_STEPPER_TO_HIGH "Steprate to high : " #define MSG_ENDSTOPS_HIT "endstops hit: " #define MSG_ERR_COLD_EXTRUDE_STOP " cold extrusion prevented" #define MSG_ERR_LONG_EXTRUDE_STOP " too long extrusion prevented" #endif #if LANGUAGE_CHOICE == 5 // LCD Menu Messages #define WELCOME_MSG MACHINE_NAME " Lista." #define MSG_SD_INSERTED "Tarjeta SD Colocada" #define MSG_SD_REMOVED "Tarjeta SD Retirada" #define MSG_MAIN " Menu Principal \003" #define MSG_AUTOSTART " Autostart" #define MSG_DISABLE_STEPPERS " Apagar Motores" #define MSG_AUTO_HOME " Llevar Ejes al Cero" #define MSG_SET_ORIGIN " Establecer Cero" #define MSG_COOLDOWN " Enfriar" #define MSG_EXTRUDE " Extruir" #define MSG_RETRACT " Retraer" #define MSG_PREHEAT_PLA " Precalentar PLA" #define MSG_PREHEAT_PLA_SETTINGS " Ajustar temp. PLA" #define MSG_PREHEAT_ABS " Precalentar ABS" #define MSG_PREHEAT_ABS_SETTINGS " Ajustar temp. ABS" #define MSG_MOVE_AXIS " Mover Ejes \x7E" #define MSG_SPEED " Velocidad:" #define MSG_NOZZLE " \002Nozzle:" #define MSG_NOZZLE1 " \002Nozzle2:" #define MSG_NOZZLE2 " \002Nozzle3:" #define MSG_BED " \002Base:" #define MSG_FAN_SPEED " Ventilador:" #define MSG_FLOW " Flujo:" #define MSG_CONTROL " Control \003" #define MSG_MIN " \002 Min:" #define MSG_MAX " \002 Max:" #define MSG_FACTOR " \002 Fact:" #define MSG_AUTOTEMP " Autotemp:" #define MSG_ON "On " #define MSG_OFF "Off" #define MSG_PID_P " PID-P: " #define MSG_PID_I " PID-I: " #define MSG_PID_D " PID-D: " #define MSG_PID_C " PID-C: " #define MSG_ACC " Acc:" #define MSG_VXY_JERK " Vxy-jerk: " #define MSG_VZ_JERK "Vz-jerk" #define MSG_VE_JERK "Ve-jerk" #define MSG_VMAX " Vmax " #define MSG_X "x:" #define MSG_Y "y:" #define MSG_Z "z:" #define MSG_E "e:" #define MSG_VMIN " Vmin:" #define MSG_VTRAV_MIN " VTrav min:" #define MSG_AMAX " Amax " #define MSG_A_RETRACT " A-retrac.:" #define MSG_XSTEPS " Xpasos/mm:" #define MSG_YSTEPS " Ypasos/mm:" #define MSG_ZSTEPS " Zpasos/mm:" #define MSG_ESTEPS " Epasos/mm:" #define MSG_MAIN_WIDE " Menu Principal \003" #define MSG_RECTRACT_WIDE " Retraer \x7E" #define MSG_TEMPERATURE_WIDE " Temperatura \x7E" #define MSG_TEMPERATURE_RTN " Temperatura \003" #define MSG_MOTION_WIDE " Movimiento \x7E" #define MSG_STORE_EPROM " Guardar Memoria" #define MSG_LOAD_EPROM " Cargar Memoria" #define MSG_RESTORE_FAILSAFE " Rest. de emergencia" #define MSG_REFRESH "\004Volver a cargar" #define MSG_WATCH " Monitorizar \003" #define MSG_PREPARE " Preparar \x7E" #define MSG_PREPARE_ALT " Preparar \003" #define MSG_CONTROL_ARROW " Control \x7E" #define MSG_RETRACT_ARROW " Retraer \x7E" #define MSG_TUNE " Ajustar \x7E" #define MSG_PAUSE_PRINT " Pausar Impresion \x7E" #define MSG_RESUME_PRINT " Reanudar Impresion \x7E" #define MSG_STOP_PRINT " Detener Impresion \x7E" #define MSG_CARD_MENU " Menu de SD \x7E" #define MSG_NO_CARD " No hay Tarjeta SD" #define MSG_DWELL "Reposo..." #define MSG_USERWAIT "Esperando Ordenes..." #define MSG_NO_MOVE "Sin movimiento" #define MSG_PART_RELEASE "Desacople Parcial" #define MSG_KILLED "PARADA DE EMERGENCIA. " #define MSG_STOPPED "PARADA. " #define MSG_STEPPER_RELEASED "Desacoplada." #define MSG_CONTROL_RETRACT " Retraer mm:" #define MSG_CONTROL_RETRACTF " Retraer F:" #define MSG_CONTROL_RETRACT_ZLIFT " Levantar mm:" #define MSG_CONTROL_RETRACT_RECOVER " DesRet +mm:" #define MSG_CONTROL_RETRACT_RECOVERF " DesRet F:" #define MSG_AUTORETRACT " AutoRetr.:" #define MSG_FILAMENTCHANGE "Change filament" // Serial Console Messages #define MSG_Enqueing "En cola \"" #define MSG_POWERUP "PowerUp" #define MSG_EXTERNAL_RESET " Reset Externo" #define MSG_BROWNOUT_RESET " Reset por Voltaje Incorrecto" #define MSG_WATCHDOG_RESET " Reset por Bloqueo" #define MSG_SOFTWARE_RESET " Reset por Software" #define MSG_MARLIN "Marlin " #define MSG_AUTHOR " | Autor: " #define MSG_CONFIGURATION_VER " Ultima actualizacion: " #define MSG_FREE_MEMORY " Memoria libre: " #define MSG_PLANNER_BUFFER_BYTES " PlannerBufferBytes: " #define MSG_OK "ok" #define MSG_FILE_SAVED "Guardado." #define MSG_ERR_LINE_NO "El Numero de Linea no es igual al Ultimo Numero de Linea+1, Ultima Linea:" #define MSG_ERR_CHECKSUM_MISMATCH "el checksum no coincide, Ultima Linea:" #define MSG_ERR_NO_CHECKSUM "No se pudo hallar el Checksum con el numero de linea, Ultima Linea:" #define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No se hallo el Numero de Linea con el Checksum, Ultima Linea:" #define MSG_FILE_PRINTED "Impresion terminada" #define MSG_BEGIN_FILE_LIST "Comienzo de la lista de archivos" #define MSG_END_FILE_LIST "Fin de la lista de archivos" #define MSG_M104_INVALID_EXTRUDER "M104 Extrusor Invalido " #define MSG_M105_INVALID_EXTRUDER "M105 Extrusor Invalido " #define MSG_M218_INVALID_EXTRUDER "M218 Extrusor Invalido " #define MSG_ERR_NO_THERMISTORS "No hay termistores - no temp" #define MSG_M109_INVALID_EXTRUDER "M109 Extrusor Invalido " #define MSG_HEATING "Calentando..." #define MSG_HEATING_COMPLETE "Calentamiento Hecho." #define MSG_BED_HEATING "Calentando la base." #define MSG_BED_DONE "Base Caliente." #define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) "\n" #define MSG_COUNT_X " Cuenta X:" #define MSG_ERR_KILLED "¡¡Impresora Parada con kill()!!" #define MSG_ERR_STOPPED "¡Impresora parada por errores. Arregle el error y use M999 Para reiniciar!. (La temperatura se reestablece. Ajustela antes de continuar)" #define MSG_RESEND "Reenviar:" #define MSG_UNKNOWN_COMMAND "Comando Desconocido:\"" #define MSG_ACTIVE_EXTRUDER "Extrusor Activo: " #define MSG_INVALID_EXTRUDER "Extrusor Invalido" #define MSG_X_MIN "x_min: " #define MSG_X_MAX "x_max: " #define MSG_Y_MIN "y_min: " #define MSG_Y_MAX "y_max: " #define MSG_Z_MIN "z_min: " #define MSG_M119_REPORT "Comprobando fines de carrera." #define MSG_ENDSTOP_HIT "PULSADO" #define MSG_ENDSTOP_OPEN "abierto" #define MSG_HOTEND_OFFSET "Hotend offsets:" #define MSG_SD_CANT_OPEN_SUBDIR "No se pudo abrir la subcarpeta." #define MSG_SD_INIT_FAIL "Fallo al iniciar la SD" #define MSG_SD_VOL_INIT_FAIL "Fallo al montar el volumen" #define MSG_SD_OPENROOT_FAIL "Fallo al abrir la carpeta raiz" #define MSG_SD_CARD_OK "Tarjeta SD OK" #define MSG_SD_WORKDIR_FAIL "Fallo al abrir la carpeta de trabajo" #define MSG_SD_OPEN_FILE_FAIL "Error al abrir, Archivo: " #define MSG_SD_FILE_OPENED "Archivo abierto:" #define MSG_SD_SIZE " Tamaño:" #define MSG_SD_FILE_SELECTED "Archivo Seleccionado" #define MSG_SD_WRITE_TO_FILE "Escribiendo en el archivo: " #define MSG_SD_PRINTING_BYTE "SD imprimiendo el byte " #define MSG_SD_NOT_PRINTING "No se esta imprimiendo con SD" #define MSG_SD_ERR_WRITE_TO_FILE "Error al escribir en el archivo" #define MSG_SD_CANT_ENTER_SUBDIR "No se puede abrir la carpeta:" #define MSG_STEPPER_TO_HIGH "Steprate demasiado alto : " #define MSG_ENDSTOPS_HIT "Se ha tocado el fin de carril: " #define MSG_ERR_COLD_EXTRUDE_STOP " extrusion fria evitada" #define MSG_ERR_LONG_EXTRUDE_STOP " extrusion demasiado larga evitada" #endif #if LANGUAGE_CHOICE == 6 // LCD Menu Messages #define WELCOME_MSG MACHINE_NAME " Готов" #define MSG_SD_INSERTED "Карта вставлена" #define MSG_SD_REMOVED "Карта извлечена" #define MSG_MAIN " Меню \003" #define MSG_AUTOSTART " Автостарт " #define MSG_DISABLE_STEPPERS " Выключить двигатели" #define MSG_AUTO_HOME " Парковка " #define MSG_SET_ORIGIN " Запомнить ноль " #define MSG_PREHEAT_PLA " Преднагрев PLA " #define MSG_PREHEAT_PLA_SETTINGS " Настр. преднагр.PLA" #define MSG_PREHEAT_ABS " Преднагрев ABS " #define MSG_PREHEAT_ABS_SETTINGS " Настр. преднагр.ABS" #define MSG_COOLDOWN " Охлаждение " #define MSG_EXTRUDE " Экструзия " #define MSG_RETRACT " Откат" #define MSG_MOVE_AXIS " Движение по осям \x7E" #define MSG_SPEED " Скорость:" #define MSG_NOZZLE " \002 Фильера:" #define MSG_NOZZLE1 " \002 Фильера2:" #define MSG_NOZZLE2 " \002 Фильера3:" #define MSG_BED " \002 Кровать:" #define MSG_FAN_SPEED " Куллер:" #define MSG_FLOW " Поток:" #define MSG_CONTROL " Настройки \003" #define MSG_MIN " \002 Минимум:" #define MSG_MAX " \002 Максимум:" #define MSG_FACTOR " \002 Фактор:" #define MSG_AUTOTEMP " Autotemp:" #define MSG_ON "Вкл. " #define MSG_OFF "Выкл. " #define MSG_PID_P " PID-P: " #define MSG_PID_I " PID-I: " #define MSG_PID_D " PID-D: " #define MSG_PID_C " PID-C: " #define MSG_ACC " Acc:" #define MSG_VXY_JERK " Vxy-jerk: " #define MSG_VZ_JERK "Vz-jerk" #define MSG_VE_JERK "Ve-jerk" #define MSG_VMAX " Vmax " #define MSG_X "x:" #define MSG_Y "y:" #define MSG_Z "z:" #define MSG_E "e:" #define MSG_VMIN " Vmin:" #define MSG_VTRAV_MIN " VTrav min:" #define MSG_AMAX " Amax " #define MSG_A_RETRACT " A-retract:" #define MSG_XSTEPS " X шаг/mm:" #define MSG_YSTEPS " Y шаг/mm:" #define MSG_ZSTEPS " Z шаг/mm:" #define MSG_ESTEPS " E шаг/mm:" #define MSG_RECTRACT " Откат подачи \x7E" #define MSG_TEMPERATURE " Температура \x7E" #define MSG_MOTION " Скорости \x7E" #define MSG_STORE_EPROM " Сохранить настройки" #define MSG_LOAD_EPROM " Загрузить настройки" #define MSG_RESTORE_FAILSAFE " Сброс настроек " #define MSG_REFRESH "\004Обновить " #define MSG_WATCH " Обзор \003" #define MSG_PREPARE " Действия \x7E" #define MSG_TUNE " Настройки \x7E" #define MSG_PAUSE_PRINT " Пауза печати \x7E" #define MSG_RESUME_PRINT " Продолжить печать \x7E" #define MSG_STOP_PRINT " Остановить печать \x7E" #define MSG_CARD_MENU " Меню карты \x7E" #define MSG_NO_CARD " Нет карты" #define MSG_DWELL "Сон..." #define MSG_USERWAIT "Нажмите для продолж." #define MSG_NO_MOVE "Нет движения. " #define MSG_PART_RELEASE " Извлечение принта " #define MSG_KILLED "УБИТО. " #define MSG_STOPPED "ОСТАНОВЛЕНО. " #define MSG_CONTROL_RETRACT " Откат mm:" #define MSG_CONTROL_RETRACTF " Откат F:" #define MSG_CONTROL_RETRACT_ZLIFT " Прыжок mm:" #define MSG_CONTROL_RETRACT_RECOVER " Возврат +mm:" #define MSG_CONTROL_RETRACT_RECOVERF " Возврат F:" #define MSG_AUTORETRACT " АвтоОткат:" #define MSG_FILAMENTCHANGE "Change filament" // Serial Console Messages #define MSG_Enqueing "Запланировано \"" #define MSG_POWERUP "Включение питания" #define MSG_EXTERNAL_RESET " Внешний сброс" #define MSG_BROWNOUT_RESET " Brown out сброс" #define MSG_WATCHDOG_RESET " Watchdog сброс" #define MSG_SOFTWARE_RESET " программный сброс" #define MSG_MARLIN "Marlin " #define MSG_AUTHOR " | Автор: " #define MSG_CONFIGURATION_VER " Последнее обновление: " #define MSG_FREE_MEMORY " Памяти свободно: " #define MSG_PLANNER_BUFFER_BYTES " Буффер очереди команд Bytes: " #define MSG_OK "ok" #define MSG_FILE_SAVED "Файл записан." #define MSG_ERR_LINE_NO "Номен строки это не последняя строка+1, последняя строка:" #define MSG_ERR_CHECKSUM_MISMATCH "контрольная сумма не совпадает, последняя строка:" #define MSG_ERR_NO_CHECKSUM "нет контрольной суммы для строки, последняя строка:" #define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "нет строки для контрольной суммы, последняя строка:" #define MSG_FILE_PRINTED "Печать файла завершена" #define MSG_BEGIN_FILE_LIST "Список файлов" #define MSG_END_FILE_LIST "Конец списка файлов" #define MSG_M104_INVALID_EXTRUDER "M104 ошибка экструдера " #define MSG_M105_INVALID_EXTRUDER "M105 ошибка экструдера " #define MSG_M218_INVALID_EXTRUDER "M218 ошибка экструдера " #define MSG_ERR_NO_THERMISTORS "Нет термистра - нет температуры" #define MSG_M109_INVALID_EXTRUDER "M109 ошибка экструдера " #define MSG_HEATING "Нагрев... " #define MSG_HEATING_COMPLETE "Наргето. " #define MSG_BED_HEATING "Нагрев стола... " #define MSG_BED_DONE "Стол нагрет. " #define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) "\n" #define MSG_COUNT_X " Count X:" #define MSG_ERR_KILLED "Принтер остановлен. вызов kill() !!" #define MSG_ERR_STOPPED "Ошибка принтера, останов. Устраните неисправность и используйте M999 для перезагрузки!. (Температура недоступна. Проверьте датчики)" #define MSG_RESEND "Переотправка:" #define MSG_UNKNOWN_COMMAND "Неизвестная команда:\"" #define MSG_ACTIVE_EXTRUDER "Активный экструдер: " #define MSG_INVALID_EXTRUDER "Ошибка экструдера" #define MSG_X_MIN "x_min:" #define MSG_X_MAX "x_max:" #define MSG_Y_MIN "y_min:" #define MSG_Y_MAX "y_max:" #define MSG_Z_MIN "z_min:" #define MSG_Z_MAX "z_max:" #define MSG_M119_REPORT "Статус концевиков" #define MSG_ENDSTOP_HIT "Срабатывание концевика" #define MSG_ENDSTOP_OPEN "Концевик освобожден" #define MSG_HOTEND_OFFSET "Hotend offsets:" #define MSG_SD_CANT_OPEN_SUBDIR "Не открыть папку" #define MSG_SD_INIT_FAIL "Ошибка инициализации SD" #define MSG_SD_VOL_INIT_FAIL "Ошибка инициализации раздела" #define MSG_SD_OPENROOT_FAIL "Не прочесть содержимое корня" #define MSG_SD_CARD_OK "SD карта в порядке" #define MSG_SD_WORKDIR_FAIL "не открыть рабочую папку" #define MSG_SD_OPEN_FILE_FAIL "Ошибка чтения, файл: " #define MSG_SD_FILE_OPENED "Файл открыт:" #define MSG_SD_SIZE " Размер:" #define MSG_SD_FILE_SELECTED "Файл выбран" #define MSG_SD_WRITE_TO_FILE "Запись в файл: " #define MSG_SD_PRINTING_BYTE "SD печать byte " #define MSG_SD_NOT_PRINTING "нет SD печати" #define MSG_SD_ERR_WRITE_TO_FILE "ошибка записи в файл" #define MSG_SD_CANT_ENTER_SUBDIR "Не зайти в папку:" #define MSG_STEPPER_TO_HIGH "Частота шагов очень высока : " #define MSG_ENDSTOPS_HIT "концевик сработал: " #define MSG_ERR_COLD_EXTRUDE_STOP " защита холодной экструзии" #define MSG_ERR_LONG_EXTRUDE_STOP " защита превышения длинны экструзии" #endif #if LANGUAGE_CHOICE == 7 // LCD Menu Messages #define WELCOME_MSG MACHINE_NAME " Pronto." #define MSG_SD_INSERTED "SD Card inserita" #define MSG_SD_REMOVED "SD Card rimossa" #define MSG_MAIN "Menu principale" #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Disabilita Motori" #define MSG_AUTO_HOME "Auto Home" #define MSG_SET_ORIGIN "Imposta Origine" #define MSG_PREHEAT_PLA "Preriscalda PLA" #define MSG_PREHEAT_PLA_SETTINGS "Preris. PLA Conf" #define MSG_PREHEAT_ABS "Preriscalda ABS" #define MSG_PREHEAT_ABS_SETTINGS "Preris. ABS Conf" #define MSG_COOLDOWN "Rafredda" #define MSG_EXTRUDE "Estrudi" #define MSG_RETRACT "Ritrai" #define MSG_MOVE_AXIS "Muovi Asse" #define MSG_SPEED "Velcità" #define MSG_NOZZLE "Ugello" #define MSG_NOZZLE1 "Ugello2" #define MSG_NOZZLE2 "Ugello3" #define MSG_BED "Piatto" #define MSG_FAN_SPEED "Ventola" #define MSG_FLOW "Flusso" #define MSG_CONTROL "Controllo" #define MSG_MIN " \002 Min:" #define MSG_MAX " \002 Max:" #define MSG_FACTOR " \002 Fact:" #define MSG_AUTOTEMP "Autotemp" #define MSG_ON "On " #define MSG_OFF "Off" #define MSG_PID_P "PID-P" #define MSG_PID_I "PID-I" #define MSG_PID_D "PID-D" #define MSG_PID_C "PID-C" #define MSG_ACC "Accel" #define MSG_VXY_JERK "Vxy-jerk" #define MSG_VZ_JERK "Vz-jerk" #define MSG_VE_JERK "Ve-jerk" #define MSG_VMAX "Vmax" #define MSG_X "x" #define MSG_Y "y" #define MSG_Z "z" #define MSG_E "e" #define MSG_VMIN "Vmin" #define MSG_VTRAV_MIN "VTrav min" #define MSG_AMAX "Amax" #define MSG_A_RETRACT "A-retract" #define MSG_XSTEPS "Xpassi/mm" #define MSG_YSTEPS "Ypassi/mm" #define MSG_ZSTEPS "Zpassi/mm" #define MSG_ESTEPS "Epassi/mm" #define MSG_RECTRACT "Ritrai" #define MSG_TEMPERATURE "Temperatura" #define MSG_MOTION "Movimento" #define MSG_STORE_EPROM "Salva in EEPROM" #define MSG_LOAD_EPROM "Carica da EEPROM" #define MSG_RESTORE_FAILSAFE "Impostaz. default" #define MSG_REFRESH "Aggiorna" #define MSG_WATCH "Guarda" #define MSG_PREPARE "Prepara" #define MSG_TUNE "Adatta" #define MSG_PAUSE_PRINT "Pausa" #define MSG_RESUME_PRINT "Riprendi Stampa" #define MSG_STOP_PRINT "Arresta Stampa" #define MSG_CARD_MENU "SD Card Menu" #define MSG_NO_CARD "No SD Card" #define MSG_DWELL "Sospensione..." #define MSG_USERWAIT "Attendi Utente..." #define MSG_RESUMING "Riprendi Stampa" #define MSG_NO_MOVE "Nessun Movimento." #define MSG_KILLED "UCCISO. " #define MSG_STOPPED "ARRESTATO. " #define MSG_CONTROL_RETRACT "Ritrai mm" #define MSG_CONTROL_RETRACTF "Ritrai F" #define MSG_CONTROL_RETRACT_ZLIFT "Salta mm" #define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm" #define MSG_CONTROL_RETRACT_RECOVERF "UnRet F" #define MSG_AUTORETRACT "AutoArretramento" #define MSG_SERIAL_ERROR_MENU_STRUCTURE "Qualcosa non va in MenuStructure." #define MSG_FILAMENTCHANGE "Cambia filamento" #define MSG_INIT_SDCARD "Iniz. SD-Card" #define MSG_CNG_SDCARD "Cambia SD-Card" // Serial Console Messages #define MSG_Enqueing "accodamento \"" #define MSG_POWERUP "Accensione" #define MSG_EXTERNAL_RESET " Reset Esterno" #define MSG_BROWNOUT_RESET " Brown out Reset" #define MSG_WATCHDOG_RESET " Watchdog Reset" #define MSG_SOFTWARE_RESET " Software Reset" #define MSG_MARLIN "Marlin " #define MSG_AUTHOR " | Autore: " #define MSG_CONFIGURATION_VER " Ultimo Aggiornamento: " #define MSG_FREE_MEMORY " Memoria Libera: " #define MSG_PLANNER_BUFFER_BYTES " PlannerBufferBytes: " #define MSG_OK "ok" #define MSG_FILE_SAVED "File Salvato." #define MSG_ERR_LINE_NO "Il Numero della Linea non corrisponde al Numero dell'Ultima Linea+1, Ultima Linea: " #define MSG_ERR_CHECKSUM_MISMATCH "checksum non corrispondente, Ultima Linea: " #define MSG_ERR_NO_CHECKSUM "Nessun Checksum con Numero di Linea, Ultima Linea: " #define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "Nessun Numero di Linea con Checksum, Ultima Linea: " #define MSG_FILE_PRINTED "File stampato" #define MSG_BEGIN_FILE_LIST "Inizio Lista File" #define MSG_END_FILE_LIST "Fine Lista File" #define MSG_M104_INVALID_EXTRUDER "M104 Estrusore non valido " #define MSG_M105_INVALID_EXTRUDER "M105 Estrusore non valido " #define MSG_M218_INVALID_EXTRUDER "M218 Estrusore non valido " #define MSG_ERR_NO_THERMISTORS "Nessun Termistore - nessuna temperatura" #define MSG_M109_INVALID_EXTRUDER "M109 Estrusore non valido " #define MSG_HEATING "Riscaldamento..." #define MSG_HEATING_COMPLETE "Stampante Calda." #define MSG_BED_HEATING "Riscaldamento Piatto." #define MSG_BED_DONE "Piatto Pronto." #define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) "\n" #define MSG_COUNT_X " Calcola X: " #define MSG_ERR_KILLED "Stampante Calda. kill() chiamata !!" #define MSG_ERR_STOPPED "Stampante fermata a causa di errori. Risolvi l'errore e usa M999 per ripartire!. (Reset temperatura. Impostala prima di ripartire)" #define MSG_RESEND "Reinviato:" #define MSG_UNKNOWN_COMMAND "Comando sconosciuto: \"" #define MSG_ACTIVE_EXTRUDER "Attiva Estrusore: " #define MSG_INVALID_EXTRUDER "Estrusore non valido" #define MSG_X_MIN "x_min: " #define MSG_X_MAX "x_max: " #define MSG_Y_MIN "y_min: " #define MSG_Y_MAX "y_max: " #define MSG_Z_MIN "z_min: " #define MSG_Z_MAX "z_max: " #define MSG_M119_REPORT "Segnalazione stato degli endstop" #define MSG_ENDSTOP_HIT "INNESCATO" #define MSG_ENDSTOP_OPEN "aperto" #define MSG_HOTEND_OFFSET "Hotend offsets:" #define MSG_SD_CANT_OPEN_SUBDIR "Impossibile aprire sottocartella" #define MSG_SD_INIT_FAIL "Fallita Inizializzazione SD" #define MSG_SD_VOL_INIT_FAIL "Fallito il montaggio del Volume" #define MSG_SD_OPENROOT_FAIL "Fallita l'apertura Cartella Principale" #define MSG_SD_CARD_OK "SD card ok" #define MSG_SD_WORKDIR_FAIL "Fallita l'apertura Cartella di Lavoro" #define MSG_SD_OPEN_FILE_FAIL "Fallita l'apertura del File: " #define MSG_SD_FILE_OPENED "File aperto: " #define MSG_SD_SIZE " Dimensione: " #define MSG_SD_FILE_SELECTED "File selezionato" #define MSG_SD_WRITE_TO_FILE "Scrittura su file: " #define MSG_SD_PRINTING_BYTE "Si sta scrivendo il byte su SD " #define MSG_SD_NOT_PRINTING "Non si sta scrivendo su SD" #define MSG_SD_ERR_WRITE_TO_FILE "Errore nella scrittura su file" #define MSG_SD_CANT_ENTER_SUBDIR "Impossibile entrare nella sottocartella: " #define MSG_STEPPER_TO_HIGH "Steprate troppo alto: " #define MSG_ENDSTOPS_HIT "Raggiunto il fondo carrello: " #define MSG_ERR_COLD_EXTRUDE_STOP " prevenuta estrusione fredda" #define MSG_ERR_LONG_EXTRUDE_STOP " prevenuta estrusione troppo lunga" #endif #if LANGUAGE_CHOICE == 8 // LCD Menu Messages #define WELCOME_MSG MACHINE_NAME " Pronta." #define MSG_SD_INSERTED "Cartao SD inserido" #define MSG_SD_REMOVED "Cartao SD removido" #define MSG_MAIN " Menu Principal \003" #define MSG_AUTOSTART " Autostart" #define MSG_DISABLE_STEPPERS " Apagar Motores" #define MSG_AUTO_HOME " Ir para Origen" #define MSG_SET_ORIGIN " Estabelecer Origen" #define MSG_PREHEAT_PLA " pre-aquecer PLA" #define MSG_PREHEAT_PLA_SETTINGS " pre-aquecer PLA Setting" #define MSG_PREHEAT_ABS " pre-aquecer ABS" #define MSG_PREHEAT_ABS_SETTINGS " pre-aquecer ABS Setting" #define MSG_COOLDOWN " Esfriar" #define MSG_EXTRUDE " Extrudar" #define MSG_RETRACT " Retrair" #define MSG_PREHEAT_PLA " pre-aquecer PLA" #define MSG_PREHEAT_ABS " pre-aquecer ABS" #define MSG_MOVE_AXIS " Mover eixo \x7E" #define MSG_SPEED " Velocidade:" #define MSG_NOZZLE " \002Nozzle:" #define MSG_NOZZLE1 " \002Nozzle2:" #define MSG_NOZZLE2 " \002Nozzle3:" #define MSG_BED " \002Base:" #define MSG_FAN_SPEED " Velocidade Ventoinha:" #define MSG_FLOW " Fluxo:" #define MSG_CONTROL " Controle \003" #define MSG_MIN " \002 Min:" #define MSG_MAX " \002 Max:" #define MSG_FACTOR " \002 Fact:" #define MSG_AUTOTEMP " Autotemp:" #define MSG_ON "On " #define MSG_OFF "Off" #define MSG_PID_P " PID-P: " #define MSG_PID_I " PID-I: " #define MSG_PID_D " PID-D: " #define MSG_PID_C " PID-C: " #define MSG_ACC " Acc:" #define MSG_VXY_JERK " Vxy-jerk: " #define MSG_VZ_JERK "Vz-jerk" #define MSG_VE_JERK "Ve-jerk" #define MSG_VMAX " Vmax " #define MSG_X "x:" #define MSG_Y "y:" #define MSG_Z "z:" #define MSG_E "e:" #define MSG_VMIN " Vmin:" #define MSG_VTRAV_MIN " VTrav min:" #define MSG_AMAX " Amax " #define MSG_A_RETRACT " A-retract:" #define MSG_XSTEPS " Xpasso/mm:" #define MSG_YSTEPS " Ypasso/mm:" #define MSG_ZSTEPS " Zpasso/mm:" #define MSG_ESTEPS " Epasso/mm:" #define MSG_MAIN_WIDE " Menu Principal \003" #define MSG_RECTRACT_WIDE " Retrair \x7E" #define MSG_TEMPERATURE_WIDE " Temperatura \x7E" #define MSG_TEMPERATURE_RTN " Temperatura \003" #define MSG_MOTION_WIDE " Movimento \x7E" #define MSG_STORE_EPROM " Guardar memoria" #define MSG_LOAD_EPROM " Carregar memoria" #define MSG_RESTORE_FAILSAFE " Rest. de emergencia" #define MSG_REFRESH "\004Recarregar" #define MSG_WATCH " Monitorar \003" #define MSG_PREPARE " Preparar \x7E" #define MSG_PREPARE_ALT " Preparar \003" #define MSG_CONTROL_ARROW " Controle \x7E" #define MSG_RETRACT_ARROW " Retrair \x7E" #define MSG_TUNE " Tune \x7E" #define MSG_PAUSE_PRINT " Pausar Impressao \x7E" #define MSG_RESUME_PRINT " Resumir Impressao \x7E" #define MSG_STOP_PRINT " Parar Impressao \x7E" #define MSG_CARD_MENU " Menu cartao SD \x7E" #define MSG_NO_CARD " Sem cartao SD" #define MSG_DWELL "Repouso..." #define MSG_USERWAIT "Esperando Ordem..." #define MSG_NO_MOVE "Sem movimento." #define MSG_PART_RELEASE "Lancamento Parcial" #define MSG_KILLED "PARADA DE EMERGENCIA. " #define MSG_STOPPED "PARADA. " #define MSG_STEPPER_RELEASED "Lancado." #define MSG_CONTROL_RETRACT " Retrair mm:" #define MSG_CONTROL_RETRACTF " Retrair F:" #define MSG_CONTROL_RETRACT_ZLIFT " Levantar mm:" #define MSG_CONTROL_RETRACT_RECOVER " DesRet +mm:" #define MSG_CONTROL_RETRACT_RECOVERF " DesRet F:" #define MSG_AUTORETRACT " AutoRetr.:" #define MSG_SERIAL_ERROR_MENU_STRUCTURE "Algo esta errado na estrutura do Menu." #define MSG_FILAMENTCHANGE "Change filament" // Serial Console Messages #define MSG_Enqueing "enqueing \"" #define MSG_POWERUP "PowerUp" #define MSG_EXTERNAL_RESET " Reset Externo" #define MSG_BROWNOUT_RESET " Reset por voltagem incorreta" #define MSG_WATCHDOG_RESET " Reset por Bloqueio" #define MSG_SOFTWARE_RESET " Reset por Software" #define MSG_MARLIN "Marlin " #define MSG_AUTHOR " | Author: " #define MSG_CONFIGURATION_VER " Ultima atualizacao: " #define MSG_FREE_MEMORY " memoria Livre: " #define MSG_PLANNER_BUFFER_BYTES " PlannerBufferBytes: " #define MSG_OK "ok" #define MSG_FILE_SAVED "Guardado." #define MSG_ERR_LINE_NO "O Numero da linha Nao e igual ao ultimo Numero da linha+1, Ultima linha:" #define MSG_ERR_CHECKSUM_MISMATCH "O checksum Nao coincide, Ultima linha:" #define MSG_ERR_NO_CHECKSUM "Nao foi possivel encontrar o checksum com o numero da linha, Ultima linha :" #define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "Nao ha o numero da linha com o checksum, Ultima linha:" #define MSG_FILE_PRINTED "Impressao terminada" #define MSG_BEGIN_FILE_LIST "Começo da lista de arquivos" #define MSG_END_FILE_LIST "Fim da lista de arquivos" #define MSG_M104_INVALID_EXTRUDER "M104 Extrusor inválido " #define MSG_M105_INVALID_EXTRUDER "M105 Extrusor inválido " #define MSG_M218_INVALID_EXTRUDER "M218 Extrusor inválido " #define MSG_ERR_NO_THERMISTORS "Nao ha termistor - no temp" #define MSG_M109_INVALID_EXTRUDER "M109 Extrusor inválido " #define MSG_HEATING "Aquecendo..." #define MSG_HEATING_COMPLETE "Aquecido." #define MSG_BED_HEATING "Aquecendo a Base." #define MSG_BED_DONE "Base quente." #define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) "\n" #define MSG_COUNT_X " Conta X:" #define MSG_ERR_KILLED "Impressora parada com kill() !!" #define MSG_ERR_STOPPED "Impressora parada por erros. Coserte o erro e use M999 para recomeçar!. (Temperatura reiniciada. Ajuste antes de recomeçar)" #define MSG_RESEND "Reenviar:" #define MSG_UNKNOWN_COMMAND "Comando desconhecido:\"" #define MSG_ACTIVE_EXTRUDER "Extrusor ativo: " #define MSG_INVALID_EXTRUDER "Extrusor invalido" #define MSG_X_MIN "x_min: " #define MSG_X_MAX "x_max: " #define MSG_Y_MIN "y_min: " #define MSG_Y_MAX "y_max: " #define MSG_Z_MIN "z_min: " #define MSG_Z_MAX "z_max: " #define MSG_M119_REPORT "Relatando estado do ponto final" #define MSG_ENDSTOP_HIT "PULSADO" #define MSG_ENDSTOP_OPEN "Aberto" #define MSG_HOTEND_OFFSET "Hotend offsets:" #define MSG_SD_CANT_OPEN_SUBDIR "Nao pode abrir sub diretorio" #define MSG_SD_INIT_FAIL "Falha ao iniciar SD" #define MSG_SD_VOL_INIT_FAIL "Falha ao montar volume" #define MSG_SD_OPENROOT_FAIL "Falha ao abrir diretorio raiz" #define MSG_SD_CARD_OK "cartao SD ok" #define MSG_SD_WORKDIR_FAIL "Falha ao abrir diretorio de trabalho" #define MSG_SD_OPEN_FILE_FAIL "Erro ao abrir, Arquivo: " #define MSG_SD_FILE_OPENED "Arquivo aberto:" #define MSG_SD_SIZE " Size:" #define MSG_SD_FILE_SELECTED "Arquivo selecionado" #define MSG_SD_WRITE_TO_FILE "Escrevendo no arquivo: " #define MSG_SD_PRINTING_BYTE "SD imprimindo o byte " #define MSG_SD_NOT_PRINTING "Nao esta se imprimindo com o SD" #define MSG_SD_ERR_WRITE_TO_FILE "Erro ao escrever no arquivo" #define MSG_SD_CANT_ENTER_SUBDIR "Nao pode abrir o sub diretorio:" #define MSG_STEPPER_TO_HIGH "Steprate muito alto : " #define MSG_ENDSTOPS_HIT "O ponto final foi tocado: " #define MSG_ERR_COLD_EXTRUDE_STOP " Extrusao a frio evitada" #define MSG_ERR_LONG_EXTRUDE_STOP " Extrusao muito larga evitada" #endif #if LANGUAGE_CHOICE == 9 // Finnish // LCD Menu Messages #define WELCOME_MSG MACHINE_NAME " valmis" #define MSG_SD_INSERTED "Kortti asetettu" #define MSG_SD_REMOVED "Kortti poistettu" #define MSG_MAIN "Palaa" #define MSG_AUTOSTART "Automaatti" #define MSG_DISABLE_STEPPERS "Vapauta moottorit" #define MSG_AUTO_HOME "Aja referenssiin" #define MSG_SET_ORIGIN "Aseta origo" #define MSG_PREHEAT_PLA "Esilammita PLA" #define MSG_PREHEAT_PLA_SETTINGS "Esilammita PLA konf" #define MSG_PREHEAT_ABS "Esilammita ABS" #define MSG_PREHEAT_ABS_SETTINGS "Esilammita ABS konf" #define MSG_COOLDOWN "Jaahdyta" #define MSG_EXTRUDE "Pursota" #define MSG_RETRACT "Veda takaisin" #define MSG_MOVE_AXIS "Liikuta akseleita" #define MSG_SPEED "Nopeus" #define MSG_NOZZLE "Suutin" #define MSG_NOZZLE1 "Suutin2" #define MSG_NOZZLE2 "Suutin3" #define MSG_BED "Alusta" #define MSG_FAN_SPEED "Tuul. nopeus" #define MSG_FLOW "Virtaus" #define MSG_CONTROL "Kontrolli" #define MSG_MIN " \002 Min" #define MSG_MAX " \002 Max" #define MSG_FACTOR " \002 Kerr" #define MSG_AUTOTEMP "Autotemp" #define MSG_ON "On " #define MSG_OFF "Off" #define MSG_PID_P "PID-P" #define MSG_PID_I "PID-I" #define MSG_PID_D "PID-D" #define MSG_PID_C "PID-C" #define MSG_ACC "Kiihtyv" #define MSG_VXY_JERK "Vxy-jerk" #define MSG_VZ_JERK "Vz-jerk" #define MSG_VE_JERK "Ve-jerk" #define MSG_VMAX "Vmax " #define MSG_X "x" #define MSG_Y "y" #define MSG_Z "z" #define MSG_E "e" #define MSG_VMIN "Vmin" #define MSG_VTRAV_MIN "VLiike min" #define MSG_AMAX "Amax " #define MSG_A_RETRACT "A-peruuta" #define MSG_XSTEPS "Xsteps/mm" #define MSG_YSTEPS "Ysteps/mm" #define MSG_ZSTEPS "Zsteps/mm" #define MSG_ESTEPS "Esteps/mm" #define MSG_RECTRACT "Veda takaisin" #define MSG_TEMPERATURE "Lampotila" #define MSG_MOTION "Liike" #define MSG_STORE_EPROM "Tallenna muistiin" #define MSG_LOAD_EPROM "Lataa muistista" #define MSG_RESTORE_FAILSAFE "Palauta oletus" #define MSG_REFRESH "Paivita" #define MSG_WATCH "Seuraa" #define MSG_PREPARE "Valmistele" #define MSG_TUNE "Saada" #define MSG_PAUSE_PRINT "Keskeyta tulostus" #define MSG_RESUME_PRINT "Jatka tulostusta" #define MSG_STOP_PRINT "Pysayta tulostus" #define MSG_CARD_MENU "Korttivalikko" #define MSG_NO_CARD "Ei korttia" #define MSG_DWELL "Nukkumassa..." #define MSG_USERWAIT "Odotetaan valintaa..." #define MSG_RESUMING "Jatketaan tulostusta" #define MSG_NO_MOVE "Ei liiketta." #define MSG_KILLED "KILLED. " #define MSG_STOPPED "STOPPED. " #define MSG_CONTROL_RETRACT "Veda mm" #define MSG_CONTROL_RETRACTF "Veda F" #define MSG_CONTROL_RETRACT_ZLIFT "Z mm" #define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm" #define MSG_CONTROL_RETRACT_RECOVERF "UnRet F" #define MSG_AUTORETRACT "AutoVeto." #define MSG_FILAMENTCHANGE "Change filament" // Serial Console Messages #define MSG_Enqueing "jonoon \"" #define MSG_POWERUP "Kaynnistys" #define MSG_EXTERNAL_RESET " Ulkoinen Reset" #define MSG_BROWNOUT_RESET " Alajannite Reset" #define MSG_WATCHDOG_RESET " Vahtikoira Reset" #define MSG_SOFTWARE_RESET " Ohjelmisto Reset" #define MSG_MARLIN "Marlin " #define MSG_AUTHOR " | Author: " #define MSG_CONFIGURATION_VER " Paivitetty viimeksi: " #define MSG_FREE_MEMORY " Vapaata muistia: " #define MSG_PLANNER_BUFFER_BYTES " PlannerBufferBytes: " #define MSG_OK "ok" #define MSG_FILE_SAVED "Tiedosto tallennettu." #define MSG_ERR_LINE_NO "Rivinumero ei ole Viimeisin rivi+1, Viimeisin rivi: " #define MSG_ERR_CHECKSUM_MISMATCH "Tarkistesummassa virhe, Viimeisin rivi: " #define MSG_ERR_NO_CHECKSUM "Rivilla ei tarkistesummaa, Viimeisin rivi: " #define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "Ei rivinumeroa tarkistesumman kanssa, Viimeisin rivi: " #define MSG_FILE_PRINTED "Tiedoston tulostus valmis" #define MSG_BEGIN_FILE_LIST "Tiedostolistauksen alku" #define MSG_END_FILE_LIST "Tiedostolistauksen loppu" #define MSG_M104_INVALID_EXTRUDER "M104 Virheellinen suutin " #define MSG_M105_INVALID_EXTRUDER "M105 Virheellinen suutin " #define MSG_M218_INVALID_EXTRUDER "M218 Virheellinen suutin " #define MSG_ERR_NO_THERMISTORS "Ei termistoreja - ei lampotiloja" #define MSG_M109_INVALID_EXTRUDER "M109 Virheellinen suutin " #define MSG_HEATING "Lammitan..." #define MSG_HEATING_COMPLETE "Lammitys valmis." #define MSG_BED_HEATING "Alusta lampiaa." #define MSG_BED_DONE "Alusta valmis." #define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) "\n" #define MSG_COUNT_X " Laskuri X: " #define MSG_ERR_KILLED "Tulostin pysaytetty. kill():ia kutsuttu!" #define MSG_ERR_STOPPED "Tulostin pysaytetty virheiden vuoksi. Korjaa virheet ja kayta M999 kaynnistaaksesi uudelleen. (Lampotila nollattiin. Aseta lampotila sen jalkeen kun jatkat.)" #define MSG_RESEND "Uudelleenlahetys: " #define MSG_UNKNOWN_COMMAND "Tuntematon komento: \"" #define MSG_ACTIVE_EXTRUDER "Aktiivinen suutin: " #define MSG_INVALID_EXTRUDER "Virheellinen suutin" #define MSG_X_MIN "x_min: " #define MSG_X_MAX "x_max: " #define MSG_Y_MIN "y_min: " #define MSG_Y_MAX "y_max: " #define MSG_Z_MIN "z_min: " #define MSG_Z_MAX "z_max: " #define MSG_M119_REPORT "Rajakytkimien tilaraportti" #define MSG_ENDSTOP_HIT "AKTIIVISENA" #define MSG_ENDSTOP_OPEN "avoinna" #define MSG_HOTEND_OFFSET "Hotend offsets:" #define MSG_SD_CANT_OPEN_SUBDIR "Alihakemistoa ei voitu avata" #define MSG_SD_INIT_FAIL "SD alustus epaonnistui" #define MSG_SD_VOL_INIT_FAIL "volume.init epaonnistui" #define MSG_SD_OPENROOT_FAIL "openRoot epaonnistui" #define MSG_SD_CARD_OK "SD kortti ok" #define MSG_SD_WORKDIR_FAIL "workDir open epaonnistui" #define MSG_SD_OPEN_FILE_FAIL "avaus epaonnistui, Tiedosto: " #define MSG_SD_FILE_OPENED "Tiedosto avattu: " #define MSG_SD_SIZE " Koko: " #define MSG_SD_FILE_SELECTED "Tiedosto valittu" #define MSG_SD_WRITE_TO_FILE "Kirjoitetaan tiedostoon: " #define MSG_SD_PRINTING_BYTE "SD tulostus byte " #define MSG_SD_NOT_PRINTING "Ei SD tulostus" #define MSG_SD_ERR_WRITE_TO_FILE "virhe kirjoitettaessa tiedostoon" #define MSG_SD_CANT_ENTER_SUBDIR "Alihakemistoon ei voitu siirtya: " #define MSG_STEPPER_TO_HIGH "Askellustaajuus liian suuri: " #define MSG_ENDSTOPS_HIT "paatyrajat aktivoitu: " #define MSG_ERR_COLD_EXTRUDE_STOP " kylmana pursotus estetty" #define MSG_ERR_LONG_EXTRUDE_STOP " liian pitka pursotus estetty" #endif #endif // ifndef LANGUAGE_H
timmey9/RigidBot_2.0_Marlin
Marlin/language.h
C
gpl-3.0
72,052
package connection; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.lang.reflect.InvocationTargetException; import java.util.Scanner; /** * Factory class for classes that extend Listener and * implement the getInstance(String[]) method. * * @author Jon Ayerdi */ public abstract class ListenerFactory { /** * Creates and returns a Listener object. * If the package is not specified, connection will be assumed. * * @param args The configuration for the Listener. * @return The newly created SocketImplementation. * @throws Throwable The exception thrown when instantiating the Listener. */ public static Listener getListener(String[] args) throws Throwable { Listener listener = null; try { if(args[0].equals("file")) { return getListener(getConfigurationFromFile(args[1])); } else { if(!args[0].contains(".")) { args[0] = "connection." + args[0]; } listener = Listener.class.cast(Class.forName(args[0]) .getMethod("getInstance", String[].class).invoke(null, new Object[] {args})); } }catch(InvocationTargetException e) { throw e.getCause(); } catch(Exception e) { throw e; } return listener; } /** * Reads and returns the first line of the specified file. * @param filename * @return The configuration read from the file. * @throws FileNotFoundException */ public static String[] getConfigurationFromFile(String filename) throws FileNotFoundException { Scanner s = new Scanner(new FileInputStream(filename)); String config = s.nextLine(); s.close(); return config.split("[ ]"); } }
POPBL-6/broker
src/main/java/connection/ListenerFactory.java
Java
gpl-3.0
1,623
<?php /** * CSort class file. * * @author Qiang Xue <qiang.xue@gmail.com> * @link http://www.yiiframework.com/ * @copyright 2008-2013 Yii Software LLC * @license http://www.yiiframework.com/license/ */ /** * CSort represents information relevant to sorting. * * When data needs to be sorted according to one or several attributes, * we can use CSort to represent the sorting information and generate * appropriate hyperlinks that can lead to sort actions. * * CSort is designed to be used together with {@link CActiveRecord}. * When creating a CSort instance, you need to specify {@link modelClass}. * You can use CSort to generate hyperlinks by calling {@link link}. * You can also use CSort to modify a {@link CDbCriteria} instance by calling {@link applyOrder} so that * it can cause the query results to be sorted according to the specified * attributes. * * In order to prevent SQL injection attacks, CSort ensures that only valid model attributes * can be sorted. This is determined based on {@link modelClass} and {@link attributes}. * When {@link attributes} is not set, all attributes belonging to {@link modelClass} * can be sorted. When {@link attributes} is set, only those attributes declared in the property * can be sorted. * * By configuring {@link attributes}, one can perform more complex sorts that may * consist of things like compound attributes (e.g. sort based on the combination of * first name and last name of users). * * The property {@link attributes} should be an array of key-value pairs, where the keys * represent the attribute names, while the values represent the virtual attribute definitions. * For more details, please check the documentation about {@link attributes}. * * @property string $orderBy The order-by columns represented by this sort object. * This can be put in the ORDER BY clause of a SQL statement. * @property array $directions Sort directions indexed by attribute names. * The sort direction. Can be either CSort::SORT_ASC for ascending order or * CSort::SORT_DESC for descending order. * * @author Qiang Xue <qiang.xue@gmail.com> * @package system.web */ class CSort extends CComponent { /** * Sort ascending * @since 1.1.10 */ const SORT_ASC = false; /** * Sort descending * @since 1.1.10 */ const SORT_DESC = true; /** * @var boolean whether the sorting can be applied to multiple attributes simultaneously. * Defaults to false, which means each time the data can only be sorted by one attribute. */ public $multiSort=false; /** * @var string the name of the model class whose attributes can be sorted. * The model class must be a child class of {@link CActiveRecord}. */ public $modelClass; /** * @var array list of attributes that are allowed to be sorted. * For example, array('user_id','create_time') would specify that only 'user_id' * and 'create_time' of the model {@link modelClass} can be sorted. * By default, this property is an empty array, which means all attributes in * {@link modelClass} are allowed to be sorted. * * This property can also be used to specify complex sorting. To do so, * a virtual attribute can be declared in terms of a key-value pair in the array. * The key refers to the name of the virtual attribute that may appear in the sort request, * while the value specifies the definition of the virtual attribute. * * In the simple case, a key-value pair can be like <code>'user'=>'user_id'</code> * where 'user' is the name of the virtual attribute while 'user_id' means the virtual * attribute is the 'user_id' attribute in the {@link modelClass}. * * A more flexible way is to specify the key-value pair as * <pre> * 'user'=>array( * 'asc'=>'first_name, last_name', * 'desc'=>'first_name DESC, last_name DESC', * 'label'=>'Name' * ) * </pre> * where 'user' is the name of the virtual attribute that specifies the full name of user * (a compound attribute consisting of first name and last name of user). In this case, * we have to use an array to define the virtual attribute with three elements: 'asc', * 'desc' and 'label'. * * The above approach can also be used to declare virtual attributes that consist of relational * attributes. For example, * <pre> * 'price'=>array( * 'asc'=>'item.price', * 'desc'=>'item.price DESC', * 'label'=>'Item Price' * ) * </pre> * * Note, the attribute name should not contain '-' or '.' characters because * they are used as {@link separators}. * * Starting from version 1.1.3, an additional option named 'default' can be used in the virtual attribute * declaration. This option specifies whether an attribute should be sorted in ascending or descending * order upon user clicking the corresponding sort hyperlink if it is not currently sorted. The valid * option values include 'asc' (default) and 'desc'. For example, * <pre> * 'price'=>array( * 'asc'=>'item.price', * 'desc'=>'item.price DESC', * 'label'=>'Item Price', * 'default'=>'desc', * ) * </pre> * * Also starting from version 1.1.3, you can include a star ('*') element in this property so that * all model attributes are available for sorting, in addition to those virtual attributes. For example, * <pre> * 'attributes'=>array( * 'price'=>array( * 'asc'=>'item.price', * 'desc'=>'item.price DESC', * 'label'=>'Item Price', * 'default'=>'desc', * ), * '*', * ) * </pre> * Note that when a name appears as both a model attribute and a virtual attribute, the position of * the star element in the array determines which one takes precedence. In particular, if the star * element is the first element in the array, the model attribute takes precedence; and if the star * element is the last one, the virtual attribute takes precedence. */ public $attributes=array(); /** * @var string the name of the GET parameter that specifies which attributes to be sorted * in which direction. Defaults to 'sort'. */ public $sortVar='sort'; /** * @var string the tag appeared in the GET parameter that indicates the attribute should be sorted * in descending order. Defaults to 'desc'. */ public $descTag='desc'; /** * @var mixed the default order that should be applied to the query criteria when * the current request does not specify any sort. For example, 'name, create_time DESC' or * 'UPPER(name)'. * * Starting from version 1.1.3, you can also specify the default order using an array. * The array keys could be attribute names or virtual attribute names as declared in {@link attributes}, * and the array values indicate whether the sorting of the corresponding attributes should * be in descending order. For example, * <pre> * 'defaultOrder'=>array( * 'price'=>CSort::SORT_DESC, * ) * </pre> * `SORT_DESC` and `SORT_ASC` are available since 1.1.10. In earlier Yii versions you should use * `true` and `false` respectively. * * Please note when using array to specify the default order, the corresponding attributes * will be put into {@link directions} and thus affect how the sort links are rendered * (e.g. an arrow may be displayed next to the currently active sort link). */ public $defaultOrder; /** * @var string the route (controller ID and action ID) for generating the sorted contents. * Defaults to empty string, meaning using the currently requested route. */ public $route=''; /** * @var array separators used in the generated URL. This must be an array consisting of * two elements. The first element specifies the character separating different * attributes, while the second element specifies the character separating attribute name * and the corresponding sort direction. Defaults to array('-','.'). */ public $separators=array('-','.'); /** * @var array the additional GET parameters (name=>value) that should be used when generating sort URLs. * Defaults to null, meaning using the currently available GET parameters. */ public $params; private $_directions; /** * Constructor. * @param string $modelClass the class name of data models that need to be sorted. * This should be a child class of {@link CActiveRecord}. */ public function __construct($modelClass=null) { $this->modelClass=$modelClass; } /** * Modifies the query criteria by changing its {@link CDbCriteria::order} property. * This method will use {@link directions} to determine which columns need to be sorted. * They will be put in the ORDER BY clause. If the criteria already has non-empty {@link CDbCriteria::order} value, * the new value will be appended to it. * @param CDbCriteria $criteria the query criteria */ public function applyOrder($criteria) { $order=$this->getOrderBy($criteria); if(!empty($order)) { if(!empty($criteria->order)) $criteria->order.=', '; $criteria->order.=$order; } } /** * @param CDbCriteria $criteria the query criteria * @return string the order-by columns represented by this sort object. * This can be put in the ORDER BY clause of a SQL statement. * @since 1.1.0 */ public function getOrderBy($criteria=null) { $directions=$this->getDirections(); if(empty($directions)) return is_string($this->defaultOrder) ? $this->defaultOrder : ''; else { if($this->modelClass!==null) $schema=$this->getModel($this->modelClass)->getDbConnection()->getSchema(); $orders=array(); foreach($directions as $attribute=>$descending) { $definition=$this->resolveAttribute($attribute); if(is_array($definition)) { if($descending) $orders[]=isset($definition['desc']) ? $definition['desc'] : $attribute.' DESC'; else $orders[]=isset($definition['asc']) ? $definition['asc'] : $attribute; } elseif($definition!==false) { $attribute=$definition; if(isset($schema)) { if(($pos=strpos($attribute,'.'))!==false) $attribute=$schema->quoteTableName(substr($attribute,0,$pos)).'.'.$schema->quoteColumnName(substr($attribute,$pos+1)); else $attribute=($criteria===null || $criteria->alias===null ? $this->getModel($this->modelClass)->getTableAlias(true) : $schema->quoteTableName($criteria->alias)).'.'.$schema->quoteColumnName($attribute); } $orders[]=$descending?$attribute.' DESC':$attribute; } } return implode(', ',$orders); } } /** * Generates a hyperlink that can be clicked to cause sorting. * @param string $attribute the attribute name. This must be the actual attribute name, not alias. * If it is an attribute of a related AR object, the name should be prefixed with * the relation name (e.g. 'author.name', where 'author' is the relation name). * @param string $label the link label. If null, the label will be determined according * to the attribute (see {@link resolveLabel}). * @param array $htmlOptions additional HTML attributes for the hyperlink tag * @return string the generated hyperlink */ public function link($attribute,$label=null,$htmlOptions=array()) { if($label===null) $label=$this->resolveLabel($attribute); if(($definition=$this->resolveAttribute($attribute))===false) return $label; $directions=$this->getDirections(); if(isset($directions[$attribute])) { $class=$directions[$attribute] ? 'desc' : 'asc'; if(isset($htmlOptions['class'])) $htmlOptions['class'].=' '.$class; else $htmlOptions['class']=$class; $descending=!$directions[$attribute]; unset($directions[$attribute]); } elseif(is_array($definition) && isset($definition['default'])) $descending=$definition['default']==='desc'; else $descending=false; if($this->multiSort) $directions=array_merge(array($attribute=>$descending),$directions); else $directions=array($attribute=>$descending); $url=$this->createUrl(Yii::app()->getController(),$directions); return $this->createLink($attribute,$label,$url,$htmlOptions); } /** * Resolves the attribute label for the specified attribute. * This will invoke {@link CActiveRecord::getAttributeLabel} to determine what label to use. * If the attribute refers to a virtual attribute declared in {@link attributes}, * then the label given in the {@link attributes} will be returned instead. * @param string $attribute the attribute name. * @return string the attribute label */ public function resolveLabel($attribute) { $definition=$this->resolveAttribute($attribute); if(is_array($definition)) { if(isset($definition['label'])) return $definition['label']; } elseif(is_string($definition)) $attribute=$definition; if($this->modelClass!==null) return $this->getModel($this->modelClass)->getAttributeLabel($attribute); else return $attribute; } /** * Returns the currently requested sort information. * @return array sort directions indexed by attribute names. * Sort direction can be either CSort::SORT_ASC for ascending order or * CSort::SORT_DESC for descending order. */ public function getDirections() { if($this->_directions===null) { $this->_directions=array(); if(isset($_GET[$this->sortVar]) && is_string($_GET[$this->sortVar])) { $attributes=explode($this->separators[0],$_GET[$this->sortVar]); foreach($attributes as $attribute) { if(($pos=strrpos($attribute,$this->separators[1]))!==false) { $descending=substr($attribute,$pos+1)===$this->descTag; if($descending) $attribute=substr($attribute,0,$pos); } else $descending=false; if(($this->resolveAttribute($attribute))!==false) { $this->_directions[$attribute]=$descending; if(!$this->multiSort) return $this->_directions; } } } if($this->_directions===array() && is_array($this->defaultOrder)) $this->_directions=$this->defaultOrder; } return $this->_directions; } /** * Returns the sort direction of the specified attribute in the current request. * @param string $attribute the attribute name * @return mixed Sort direction of the attribute. Can be either CSort::SORT_ASC * for ascending order or CSort::SORT_DESC for descending order. Value is null * if the attribute doesn't need to be sorted. */ public function getDirection($attribute) { $this->getDirections(); return isset($this->_directions[$attribute]) ? $this->_directions[$attribute] : null; } /** * Creates a URL that can lead to generating sorted data. * @param CController $controller the controller that will be used to create the URL. * @param array $directions the sort directions indexed by attribute names. * The sort direction can be either CSort::SORT_ASC for ascending order or * CSort::SORT_DESC for descending order. * @return string the URL for sorting */ public function createUrl($controller,$directions) { $sorts=array(); foreach($directions as $attribute=>$descending) $sorts[]=$descending ? $attribute.$this->separators[1].$this->descTag : $attribute; $params=$this->params===null ? $_GET : $this->params; $params[$this->sortVar]=implode($this->separators[0],$sorts); return $controller->createUrl($this->route,$params); } /** * Returns the real definition of an attribute given its name. * * The resolution is based on {@link attributes} and {@link CActiveRecord::attributeNames}. * <ul> * <li>When {@link attributes} is an empty array, if the name refers to an attribute of {@link modelClass}, * then the name is returned back.</li> * <li>When {@link attributes} is not empty, if the name refers to an attribute declared in {@link attributes}, * then the corresponding virtual attribute definition is returned. Starting from version 1.1.3, if {@link attributes} * contains a star ('*') element, the name will also be used to match against all model attributes.</li> * <li>In all other cases, false is returned, meaning the name does not refer to a valid attribute.</li> * </ul> * @param string $attribute the attribute name that the user requests to sort on * @return mixed the attribute name or the virtual attribute definition. False if the attribute cannot be sorted. */ public function resolveAttribute($attribute) { if($this->attributes!==array()) $attributes=$this->attributes; elseif($this->modelClass!==null) $attributes=$this->getModel($this->modelClass)->attributeNames(); else return false; foreach($attributes as $name=>$definition) { if(is_string($name)) { if($name===$attribute) return $definition; } elseif($definition==='*') { if($this->modelClass!==null && $this->getModel($this->modelClass)->hasAttribute($attribute)) return $attribute; } elseif($definition===$attribute) return $attribute; } return false; } /** * Given active record class name returns new model instance. * * @param string $className active record class name. * @return CActiveRecord active record model instance. * * @since 1.1.14 */ protected function getModel($className) { return CActiveRecord::model($className); } /** * Creates a hyperlink based on the given label and URL. * You may override this method to customize the link generation. * @param string $attribute the name of the attribute that this link is for * @param string $label the label of the hyperlink * @param string $url the URL * @param array $htmlOptions additional HTML options * @return string the generated hyperlink */ protected function createLink($attribute,$label,$url,$htmlOptions) { return CHtml::link($label,$url,$htmlOptions); } }
mvoitov/maxbid.lv
common/lib/vendor/yiisoft/yii/framework/web/CSort.php
PHP
gpl-3.0
17,746
#include <iostream> #include <linux/joystick.h> #include <GameProgram.hpp> int main( int p_Argc, char **p_ppArgv ) { Hit::GameProgram TheGame; if( TheGame.Initialise( ) != Hit::GameProgram::OK ) { std::cout << "Failed to start the game" << std::endl; return 1; } return TheGame.Execute( ); }
RedRingRico/Hit
Source/Common/Source/Main.cpp
C++
gpl-3.0
306
# -*- coding: utf-8 -*- # File: enemy.py # Author: Casey Jones # # Created on July 20, 2009, 4:48 PM # # This file is part of Alpha Beta Gamma (abg). # # ABG 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. # # ABG 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 ABG. If not, see <http://www.gnu.org/licenses/>. #class to handle all enemies on screen import sys, pygame, frametime, properties, random from enemy import Enemy class Enemies: enemies = [] blackSurface = pygame.Surface([Enemy.enemy.get_width(), Enemy.enemy.get_height()]) blackSurface.fill([0,0,0]) screen = None def set_screen(self, screen): self.screen = screen def create(self): #range that the current player ship can shoot where_spawn = random.randint(1, properties.width - Enemy.enemy.get_width()) lenemy = Enemy(where_spawn) self.enemies.append(lenemy) def move(self, bullet): to_update = [] if frametime.can_create_enemy(): self.create() to_delete = [] to_update += [x.enemyrect for x in self.enemies] if len(self.enemies) > 0: for i in range(len(self.enemies)): self.enemies[i].update(bullet) self.screen.blit(self.blackSurface, self.enemies[i].enemyrect) self.screen.blit(Enemy.enemy, self.enemies[i].enemyrect) #If enemy goes off the bottom of the screen if self.enemies[i].enemyrect.top > 800: to_delete.append(i) for x in to_delete: self.remove(x) to_update += [x.enemyrect for x in self.enemies] return to_update def getEnemies(self): return self.enemies def remove(self, index): try: to_update = self.enemies[index].enemyrect self.screen.blit(self.blackSurface, self.enemies[index].enemyrect) del self.enemies[index] return to_update except IndexError: print("IndexError for enemy {0} of {1}".format(index, len(self.enemies))) def game_over(self): for i in range(len(self.enemies)): self.screen.blit(self.blackSurface, self.enemies[i].enemyrect) del self.enemies[:]
jcnix/abg
enemies.py
Python
gpl-3.0
2,843
<?php namespace krFrame\Src\Modules\RelatedPosts; use \WP_Widget; use \krFrame\Src\Modules\RelatedPosts; class RelatedPosts_Widget extends WP_Widget { public static function register() { register_widget(__CLASS__); } public function __construct() { parent::__construct('krWidget_RelatedPosts', __('krRelatedPosts', 'krframe'), array( 'description' => __('Widget to show RelatedPosts', 'krframe'), )); } public function widget($args, $instance) { $valueArray = array( 'postType' => $instance['postType'], 'categoryID' => $instance['categoryID'], 'nameCustomTaxonomy' => $instance['nameCustomTaxonomy'] != '' ? $instance['nameCustomTaxonomy'] : false, 'postLimit' => $instance['postLimit'], 'linkFollow' => $instance['linkFollow'], ); $relatedPosts = new RelatedPosts($valueArray); if ($relatedPosts->check()) { echo $args['before_widget']; if ($instance['title']) { echo $args['before_title'] . $instance['title'] . $args['after_title']; } echo $relatedPosts->render(); echo $args['after_widget']; } } public function update($new_instance, $old_instance) { $instance = $old_instance; $instance['title'] = sanitize_text_field($new_instance['title']); $instance['postType'] = sanitize_text_field($new_instance['postType']); $instance['categoryID'] = sanitize_text_field($new_instance['categoryID']); $instance['nameCustomTaxonomy'] = sanitize_text_field($new_instance['nameCustomTaxonomy']); $instance['postLimit'] = sanitize_text_field($new_instance['postLimit']); $instance['linkFollow'] = sanitize_text_field($new_instance['linkFollow']); return $instance; } public function form($instance) { $defaults = array( 'title' => '', 'postType' => '', 'categoryID' => '', 'nameCustomTaxonomy' => '', 'postLimit' => '1', 'linkFollow' => 'follow', ); $instance = wp_parse_args((array) $instance, $defaults); echo '<p><label for="'.$this->get_field_id('title').'">'.__('Title:').'</label> <input class="widefat" id="'.$this->get_field_id('title').'" name="'.$this->get_field_name('title').'" type="text" value="'.$instance['title'].'" /></p>'; echo '<p><label for="'.$this->get_field_id('postType').'">'.__('Post Type:', 'krframe').'</label>' .'<select class="widefat" id="'.$this->get_field_id('postType').'" name="'.$this->get_field_name('postType').'">'; foreach (get_post_types(array('public' => 'true')) as $key => $value) { if ($instance['postType'] == $value) { echo '<option value="'.$value.'" selected="selected">'.$value.'</option>'; } else { echo '<option value="'.$value.'">'.$value.'</option>'; } } echo '</select></p>'; echo '<p><label for="'.$this->get_field_id('nameCustomTaxonomy').'">'.__('Custom Taxonomy name if exists:', 'krframe').'</label> <input class="widefat" id="'.$this->get_field_id('nameCustomTaxonomy').'" name="'.$this->get_field_name('nameCustomTaxonomy').'" type="text" value="'.$instance['nameCustomTaxonomy'].'" /></p>'; echo '<p><label for="'.$this->get_field_id('categoryID').'">'.__('ID of category/term if exists separated ",":', 'krframe').'</label> <input class="widefat" id="'.$this->get_field_id('categoryID').'" name="'.$this->get_field_name('categoryID').'" type="text" value="'.$instance['categoryID'].'" /></p>'; echo '<p><label for="'.$this->get_field_id('postLimit').'">'.__('How many posts show:', 'krframe').'</label> <input class="widefat" id="'.$this->get_field_id('postLimit').'" name="'.$this->get_field_name('postLimit').'" type="text" value="'.$instance['postLimit'].'" /></p>'; echo '<p><label for="'.$this->get_field_id('linkFollow').'">'.__('Follow / Nofollow link to posts:', 'krframe').'</label>' .'<select class="widefat" id="'.$this->get_field_id('linkFollow').'" name="'.$this->get_field_name('linkFollow').'">'; if ($instance['linkfollow'] == 'follow') { echo '<option value="follow" selected="selected">follow</option>'; echo '<option value="nofollow">nofollow</option>'; } else { echo '<option value="follow">follow</option>'; echo '<option value="nofollow" selected="selected">nofollow</option>'; } echo '</select></p>'; } }
dawidryba/krframe_theme
krFrame/src/modules/RelatedPosts/RelatedPosts_widget.php
PHP
gpl-3.0
4,646
#ifndef AMEGIC_String_MyString_H #define AMEGIC_String_MyString_H //String header //#ifdef __GNUC__ #include <string> /* #else #include <iostream> #include <string> namespace AMEGIC { class MyString { public: MyString(const char* = 0); MyString(const MyString&); ~MyString(); MyString& operator=(const MyString&); void erase(const long int& pos,const long int& length); MyString& operator+=(const MyString& str); MyString& operator+=(const char*); char operator[](const long int) const; char* c_str() const; long int length() const; MyString substr(long int) const; MyString substr(long int,long int) const; long int find(const MyString&); void insert(long int,const MyString&); char* _string; double Convert(double); int Convert(int); private: long int len; }; inline MyString operator+(const MyString& str1,const MyString& str2) { MyString s(str1); s += str2; return s; } inline bool operator==(const MyString& str1,const MyString& str2) { if (str1.length()!=str2.length()) return false; return strcmp(str1.c_str(),str2.c_str()) ? false : true; } inline bool operator!=(const MyString& str1,const MyString& str2) { return !(str1==str2); } ostream& operator<<(ostream& s, const MyString&); typedef MyString string; } #endif */ #endif
cms-externals/sherpa
AMEGIC++/String/MyString.H
C++
gpl-3.0
1,389
/** * Authors : Nianhua Li, MT Morgan * License : caBIG */ /** * RArray.java * * This java class corresponds to R array */ package org.kchine.r; import java.util.ArrayList; import java.util.Vector; import java.util.Arrays; import java.lang.reflect.Array; public class RArray extends RObject{ protected RVector value=new RNumeric(); protected int[] dim=new int[]{0}; protected RList dimnames; public RArray() { } public RArray(RVector value) { this.value=value; int valueLength=value.length(); this.dim=new int[]{valueLength}; } public RArray(RVector value, int[]dim, RList dimnames) { this.value=value; this.dim=dim; this.dimnames=dimnames; } /** * Sets the value for this RArray. * * @param value */ public void setValue (RVector value) { this.value=value; } /** * Gets the value for this RArray. * * @return value */ public RVector getValue () { return value; } /** * Sets the dim value for this RArray. * * @param dim */ public void setDim (int[] dim) { this.dim=dim; } /** * Gets the dim value for this RArray. * * @return dim */ public int[] getDim () { return dim; } /** * Sets the dimnames value for this RArray. * * @param dimanmes */ public void setDimnames (RList dimnames) throws Exception { this.dimnames=dimnames; } /** * Gets the dimnames value for this RArray. * * @return dimnames */ public RList getDimnames () { return dimnames; } public boolean equals(Object inputObject) { boolean res = getClass().equals(inputObject.getClass()); if(res) { RArray obj=(RArray)inputObject; RVector objVal=obj.getValue(); if ((value==null)||(objVal==null)) res=res&&(value==objVal); else res=res&&(value.equals(objVal)); RList objDimnames=obj.getDimnames(); if ((dimnames==null)||(objDimnames==null)) res=res&&(dimnames==objDimnames); else res=res&&(dimnames.equals(objDimnames)); int[] objDim=(int[])obj.getDim(); res=res && Arrays.equals(dim, objDim); } return res; } public String toString() { StringBuffer res=new StringBuffer(this.getClass().getName()); res.append(" { value= "+String.valueOf(value)); res.append(", dim= "+Arrays.toString(dim)); res.append(", dimnames= "+String.valueOf(dimnames)); res.append(" }"); return res.toString(); } }
rforge/biocep
src_server_common/org/kchine/r/RArray.java
Java
gpl-3.0
2,867
// This file is part of PapyrusDotNet. // // PapyrusDotNet 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. // // PapyrusDotNet 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 PapyrusDotNet. If not, see <http://www.gnu.org/licenses/>. // // Copyright 2016, Karl Patrik Johansson, zerratar@gmail.com namespace PapyrusDotNet.Converters.Papyrus2Clr.Implementations { public class PascalCaseNameResolverSettings { public PascalCaseNameResolverSettings(string wordDictionaryFile) { WordDictionaryFile = wordDictionaryFile; } public string WordDictionaryFile { get; } } }
zerratar/PapyrusDotNet
Source/PapyrusDotNet/Converters/PapyrusDotNet.Converters.Papyrus2Clr/Implementations/PascalCaseNameResolverSettings.cs
C#
gpl-3.0
1,132
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM 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. OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Description \*---------------------------------------------------------------------------*/ #include <meshTools/octreeDataTriSurface.H> #include <OpenFOAM/labelList.H> #include <meshTools/treeBoundBox.H> #include <OpenFOAM/faceList.H> #include <OpenFOAM/triPointRef.H> #include <meshTools/octree.H> #include <meshTools/triSurfaceTools.H> #include <meshTools/triangleFuncs.H> // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(Foam::octreeDataTriSurface, 0); Foam::scalar Foam::octreeDataTriSurface::tol(1E-6); // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // Fast distance to triangle calculation. From // "Distance Between Point and Trangle in 3D" // David Eberly, Magic Software Inc. Aug. 2003. // Works on function Q giving distance to point and tries to minimize this. void Foam::octreeDataTriSurface::nearestCoords ( const point& base, const point& E0, const point& E1, const scalar a, const scalar b, const scalar c, const point& P, scalar& s, scalar& t ) { // distance vector const vector D(base - P); // Precalculate distance factors. const scalar d = E0 & D; const scalar e = E1 & D; // Do classification const scalar det = a*c - b*b; s = b*e - c*d; t = b*d - a*e; if (s+t < det) { if (s < 0) { if (t < 0) { //region 4 if (e > 0) { //min on edge t = 0 t = 0; s = (d >= 0 ? 0 : (-d >= a ? 1 : -d/a)); } else { //min on edge s=0 s = 0; t = (e >= 0 ? 0 : (-e >= c ? 1 : -e/c)); } } else { //region 3. Min on edge s = 0 s = 0; t = (e >= 0 ? 0 : (-e >= c ? 1 : -e/c)); } } else if (t < 0) { //region 5 t = 0; s = (d >= 0 ? 0 : (-d >= a ? 1 : -d/a)); } else { //region 0 const scalar invDet = 1/det; s *= invDet; t *= invDet; } } else { if (s < 0) { //region 2 const scalar tmp0 = b + d; const scalar tmp1 = c + e; if (tmp1 > tmp0) { //min on edge s+t=1 const scalar numer = tmp1 - tmp0; const scalar denom = a-2*b+c; s = (numer >= denom ? 1 : numer/denom); t = 1 - s; } else { //min on edge s=0 s = 0; t = (tmp1 <= 0 ? 1 : (e >= 0 ? 0 : - e/c)); } } else if (t < 0) { //region 6 const scalar tmp0 = b + d; const scalar tmp1 = c + e; if (tmp1 > tmp0) { //min on edge s+t=1 const scalar numer = tmp1 - tmp0; const scalar denom = a-2*b+c; s = (numer >= denom ? 1 : numer/denom); t = 1 - s; } else { //min on edge t=0 t = 0; s = (tmp1 <= 0 ? 1 : (d >= 0 ? 0 : - d/a)); } } else { //region 1 const scalar numer = c+e-(b+d); if (numer <= 0) { s = 0; } else { const scalar denom = a-2*b+c; s = (numer >= denom ? 1 : numer/denom); } } t = 1 - s; } // Calculate distance. // Note: abs should not be needed but truncation error causes problems // with points very close to one of the triangle vertices. // (seen up to -9e-15). Alternatively add some small value. // const scalar f = D & D; // return a*s*s + 2*b*s*t + c*t*t + 2*d*s + 2*e*t + f + SMALL; // return Foam::mag(a*s*s + 2*b*s*t + c*t*t + 2*d*s + 2*e*t + f); } Foam::point Foam::octreeDataTriSurface::nearestPoint ( const label index, const point& p ) const { scalar s; scalar t; nearestCoords ( base_[index], E0_[index], E1_[index], a_[index], b_[index], c_[index], p, s, t ); return base_[index] + s*E0_[index] + t*E1_[index]; } // Helper function to calculate tight fitting bounding boxes. Foam::treeBoundBoxList Foam::octreeDataTriSurface::calcBb ( const triSurface& surf ) { treeBoundBoxList allBb(surf.size(), treeBoundBox::invertedBox); const labelListList& pointFcs = surf.pointFaces(); const pointField& localPts = surf.localPoints(); forAll(pointFcs, pointI) { const labelList& myFaces = pointFcs[pointI]; const point& vertCoord = localPts[pointI]; forAll(myFaces, myFaceI) { // Update bb label faceI = myFaces[myFaceI]; treeBoundBox& bb = allBb[faceI]; bb.min() = min(bb.min(), vertCoord); bb.max() = max(bb.max(), vertCoord); } } return allBb; } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // Construct from components Foam::octreeDataTriSurface::octreeDataTriSurface(const triSurface& surface) : surface_(surface), allBb_(calcBb(surface_)), base_(surface_.size()), E0_(surface_.size()), E1_(surface_.size()), a_(surface_.size()), b_(surface_.size()), c_(surface_.size()) { // Precalculate factors for distance calculation const pointField& points = surface_.points(); forAll(surface_, faceI) { const labelledTri& f = surface_[faceI]; // Calculate base and spanning vectors of triangles base_[faceI] = points[f[1]]; E0_[faceI] = points[f[0]] - points[f[1]]; E1_[faceI] = points[f[2]] - points[f[1]]; a_[faceI] = E0_[faceI] & E0_[faceI]; b_[faceI] = E0_[faceI] & E1_[faceI]; c_[faceI] = E1_[faceI] & E1_[faceI]; } } // Construct from components Foam::octreeDataTriSurface::octreeDataTriSurface ( const triSurface& surface, const treeBoundBoxList& allBb ) : surface_(surface), allBb_(allBb), base_(surface_.size()), E0_(surface_.size()), E1_(surface_.size()), a_(surface_.size()), b_(surface_.size()), c_(surface_.size()) { const pointField& points = surface_.points(); forAll(surface_, faceI) { const labelledTri& f = surface_[faceI]; // Calculate base and spanning vectors of triangles base_[faceI] = points[f[1]]; E0_[faceI] = points[f[0]] - points[f[1]]; E1_[faceI] = points[f[2]] - points[f[1]]; a_[faceI] = E0_[faceI] & E0_[faceI]; b_[faceI] = E0_[faceI] & E1_[faceI]; c_[faceI] = E1_[faceI] & E1_[faceI]; } } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // Foam::label Foam::octreeDataTriSurface::getSampleType ( const octree<octreeDataTriSurface>& oc, const point& sample ) const { treeBoundBox tightest(treeBoundBox::greatBox); scalar tightestDist(treeBoundBox::great); // Find nearest face to sample label faceI = oc.findNearest(sample, tightest, tightestDist); if (debug & 2) { Pout<< "getSampleType : sample:" << sample << " nearest face:" << faceI; } if (faceI == -1) { FatalErrorIn ( "octreeDataTriSurface::getSampleType" "(octree<octreeDataTriSurface>&, const point&)" ) << "Could not find " << sample << " in octree." << abort(FatalError); } const pointField& pts = surface_.points(); const labelledTri& f = surface_[faceI]; pointHit curHit = triPointRef ( pts[f[0]], pts[f[1]], pts[f[2]] ).nearestPoint(sample); // Get normal according to position on face. On point -> pointNormal, // on edge-> edge normal, face normal on interior. vector n ( triSurfaceTools::surfaceNormal ( surface_, faceI, curHit.rawPoint() ) ); return octree<octreeDataTriSurface>::getVolType(n, sample - curHit.rawPoint()); } // Check if any point on triangle is inside cubeBb. bool Foam::octreeDataTriSurface::overlaps ( const label index, const treeBoundBox& cubeBb ) const { //return cubeBb.overlaps(allBb_[index]); //- Exact test of triangle intersecting bb // Quick rejection. if (!cubeBb.overlaps(allBb_[index])) { return false; } // Triangle points const pointField& points = surface_.points(); const labelledTri& f = surface_[index]; const point& p0 = points[f[0]]; const point& p1 = points[f[1]]; const point& p2 = points[f[2]]; // Check if one or more triangle point inside if (cubeBb.contains(p0) || cubeBb.contains(p1) || cubeBb.contains(p2)) { // One or more points inside return true; } // Now we have the difficult case: all points are outside but connecting // edges might go through cube. Use fast intersection of bounding box. return triangleFuncs::intersectBb(p0, p1, p2, cubeBb); } bool Foam::octreeDataTriSurface::contains ( const label, const point& ) const { notImplemented ( "octreeDataTriSurface::contains(const label, const point&)" ); return false; } bool Foam::octreeDataTriSurface::intersects ( const label index, const point& start, const point& end, point& intersectionPoint ) const { if (mag(surface_.faceNormals()[index]) < VSMALL) { return false; } const pointField& points = surface_.points(); const labelledTri& f = surface_[index]; triPointRef tri(points[f[0]], points[f[1]], points[f[2]]); const vector dir(end - start); // Disable picking up intersections behind us. scalar oldTol = intersection::setPlanarTol(0.0); pointHit inter = tri.ray(start, dir, intersection::HALF_RAY); intersection::setPlanarTol(oldTol); if (inter.hit() && inter.distance() <= mag(dir)) { // Note: no extra test on whether intersection is in front of us // since using half_ray AND zero tolerance. (note that tolerance // is used to look behind us) intersectionPoint = inter.hitPoint(); return true; } else { return false; } } bool Foam::octreeDataTriSurface::findTightest ( const label index, const point& sample, treeBoundBox& tightest ) const { // get nearest and furthest away vertex point myNear, myFar; allBb_[index].calcExtremities(sample, myNear, myFar); const point dist = myFar - sample; scalar myFarDist = mag(dist); point tightestNear, tightestFar; tightest.calcExtremities(sample, tightestNear, tightestFar); scalar tightestFarDist = mag(tightestFar - sample); if (tightestFarDist < myFarDist) { // Keep current tightest. return false; } else { // Construct bb around sample and myFar const point dist2(fabs(dist.x()), fabs(dist.y()), fabs(dist.z())); tightest.min() = sample - dist2; tightest.max() = sample + dist2; return true; } } // Determine numerical value of sign of sample compared to shape at index Foam::scalar Foam::octreeDataTriSurface::calcSign ( const label index, const point& sample, vector& n ) const { n = surface_.faceNormals()[index]; const labelledTri& tri = surface_[index]; // take vector from sample to any point on triangle (we use vertex 0) vector vec = sample - surface_.points()[tri[0]]; vec /= mag(vec) + VSMALL; return n & vec; } // Calculate nearest point to sample on/in shapei. !Does not set nearest Foam::scalar Foam::octreeDataTriSurface::calcNearest ( const label index, const point& sample, point& ) const { return mag(nearestPoint(index, sample) - sample); } // Calculate nearest point on/in shapei Foam::scalar Foam::octreeDataTriSurface::calcNearest ( const label index, const linePointRef& ln, point& linePt, point& shapePt ) const { notImplemented ( "octreeDataTriSurface::calcNearest" "(const label, const linePointRef&, point& linePt, point&)" ); return GREAT; } void Foam::octreeDataTriSurface::write ( Ostream& os, const label index ) const { os << surface_[index] << token::SPACE << allBb_[index]; } // ************************ vim: set sw=4 sts=4 et: ************************ //
themiwi/freefoam-debian
src/meshTools/triSurface/octreeData/octreeDataTriSurface.C
C++
gpl-3.0
14,011