repo_name
stringlengths
6
101
path
stringlengths
4
300
text
stringlengths
7
1.31M
MIT-LAE/pyNA
pyNA/src/trajectory_src/atmosphere.py
<filename>pyNA/src/trajectory_src/atmosphere.py import pdb import openmdao import openmdao.api as om from pyNA.src.settings import Settings import numpy as np class Atmosphere(om.ExplicitComponent): """ Compute ambient parameters along the trajectory. The *Atmosphere* component requires the following inputs: * ``inputs['z']``: aircraft z-position [m] The *Atmosphere* component computes the following outputs: * ``outputs['p_0']``: ambient pressure [Pa] * ``outputs['rho_0']``: ambient density [kg/m3] * ``outputs['T_0']``: ambient temperature [K] * ``outputs['c_0']``: ambient speed of sound [m/s] * ``outputs['c_bar']``: average ambient speed of sound between observer and source [m/s] * ``outputs['mu_0']``: ambient dynamic viscosity [kg/ms] * ``outputs['k_0']``: ambient thermal conductivity [W/mK] * ``outputs['I_0']``: ambient characteristic impedance [kg/m2/s] """ def initialize(self): # Declare data option self.options.declare('settings', types=Settings) self.options.declare('num_nodes', types=int, desc='Number of nodes to be evaluated in the RHS') # Constants self.varAtm = dict() self.varAtm['g'] = 9.80665 self.varAtm['R'] = 287.05 self.varAtm['T0'] = 288.15 self.varAtm['c0'] = 340.294 self.varAtm['p0'] = 101325. self.varAtm['rho0'] = 1.225 self.varAtm['mu0'] = 1.7894e-5 self.varAtm['k0'] = 25.5e-3 self.varAtm['lapse0'] = 0.0065 self.varAtm['gamma'] = 1.4 self.varAtm['rh0'] = 70. def setup(self): # Load options nn = self.options['num_nodes'] # Add inputs and outputs self.add_input('z', val=np.ones(nn), units='m', desc='aircraft z-position [m]') self.add_output('p_0', val=np.ones(nn), units='Pa', desc='ambient pressure [Pa]') self.add_output('rho_0', val=np.ones(nn), units='kg/m**3', desc='ambient density [kg/m3]') self.add_output('drho_0_dz', val=1.*np.ones(nn), units='kg/m**4', desc='change of density with altitude [kg/m4]') self.add_output('T_0', val=np.ones(nn), units='K', desc='ambient temperature [K]') self.add_output('c_0', val=np.ones(nn), units='m/s', desc='ambient speed of sound [m/s]') self.add_output('mu_0', val=np.ones(nn), units='kg/m/s', desc='ambient dynamic viscosity [kg/ms]') self.add_output('I_0', val=np.ones(nn), units='kg/m**2/s', desc='ambient characteristic impedance [kg/m2/s]') self.add_output('rh', val=np.ones(nn), units=None, desc='Relative humidity [%]') def setup_partials(self): """ Declare partials. """ # Load options nn = self.options['num_nodes'] ar = np.arange(nn) self.declare_partials('T_0', 'z', rows=ar, cols=ar) self.declare_partials('p_0', 'z', rows=ar, cols=ar) self.declare_partials('rho_0', 'z', rows=ar, cols=ar) self.declare_partials('drho_0_dz', 'z', rows=ar, cols=ar) self.declare_partials('c_0', 'z', rows=ar, cols=ar) self.declare_partials('mu_0', 'z', rows=ar, cols=ar) self.declare_partials('I_0', 'z', rows=ar, cols=ar) self.declare_partials('rh', 'z', rows=ar, cols=ar) def compute(self, inputs: openmdao.vectors.default_vector.DefaultVector, outputs: openmdao.vectors.default_vector.DefaultVector): # Load options settings = self.options['settings'] # Extract inputs z = inputs['z'] # Temperature, pressure, density and speed of sound T_isa = self.varAtm['T0'] - z * self.varAtm['lapse0'] # Temperature without dT_isa outputs['T_0'] = self.varAtm['T0'] + settings.dT - z * self.varAtm['lapse0'] # Temperature outputs['p_0'] = self.varAtm['p0'] * (T_isa / self.varAtm['T0']) ** ( self.varAtm['g'] / self.varAtm['lapse0'] / self.varAtm['R']) # Pressure outputs['rho_0'] = outputs['p_0'] / outputs['T_0'] / self.varAtm['R'] # Density dT_0_dz = -self.varAtm['lapse0'] dp_0_dz = self.varAtm['p0'] * ( self.varAtm['g'] / self.varAtm['lapse0'] / self.varAtm['R']) * (-self.varAtm['lapse0'] / self.varAtm['T0']) * (T_isa / self.varAtm['T0']) ** ( self.varAtm['g'] / self.varAtm['lapse0'] / self.varAtm['R'] - 1) outputs['drho_0_dz'] = 1/self.varAtm['R'] * (dp_0_dz*outputs['T_0'] - outputs['p_0']*dT_0_dz)/outputs['T_0']**2 outputs['c_0'] = np.sqrt(self.varAtm['gamma'] * self.varAtm['R'] * outputs['T_0']) # Speed of sound # Dynamic viscosity # Source: Zorumski report 1982 part 1. Chapter 2.1 Equation 11 outputs['mu_0'] = self.varAtm['mu0'] * (1.38313 * (outputs['T_0'] / self.varAtm['T0']) ** 1.5) / ( outputs['T_0'] / self.varAtm['T0'] + 0.38313) # Characteristic impedance # Source: Zorumski report 1982 part 1. Chapter 2.1 Equation 13 outputs['I_0'] = self.varAtm['rho0'] * self.varAtm['c0'] * outputs['p_0'] / self.varAtm['p0'] * (self.varAtm['T0'] / outputs['T_0']) ** 0.5 # Relative humidity # Source: Berton, NASA STCA Release Package 2018. Note: relative humidity at sea-level in standard day is 70%. outputs['rh'] = -0.012467191601049869 * z + self.varAtm['rh0'] def compute_partials(self, inputs:openmdao.vectors.default_vector.DefaultVector, partials: openmdao.vectors.default_vector.DefaultVector): # Load options nn = self.options['num_nodes'] settings = self.options['settings'] # Load inputs z = inputs['z'] # Temperature, pressure, density and speed of sound T_isa = self.varAtm['T0'] - z * self.varAtm['lapse0'] # Temperature without dT_isa T_0 = self.varAtm['T0'] + settings.dT - z * self.varAtm['lapse0'] # Temperature p_0 = self.varAtm['p0'] * (T_isa / self.varAtm['T0']) ** ( self.varAtm['g'] / self.varAtm['lapse0'] / self.varAtm['R']) # Pressure c_0 = np.sqrt(self.varAtm['gamma'] * self.varAtm['R'] * T_0) # Speed of sound # Calculate partials partials['T_0', 'z'] = -self.varAtm['lapse0'] partials['p_0', 'z'] = self.varAtm['p0'] * ( self.varAtm['g'] / self.varAtm['lapse0'] / self.varAtm['R']) * (T_isa / self.varAtm['T0']) ** ( self.varAtm['g'] / self.varAtm['lapse0'] / self.varAtm['R'] - 1) * (-self.varAtm['lapse0'] / self.varAtm['T0']) partials['rho_0', 'z'] = 1/self.varAtm['R'] * (partials['p_0', 'z']*T_0 - p_0*partials['T_0', 'z'])/T_0**2 partials['c_0', 'z'] = 1/2/np.sqrt(self.varAtm['gamma'] * self.varAtm['R'] * T_0) * self.varAtm['gamma'] * self.varAtm['R']*(-self.varAtm['lapse0']) dT_0_dz = -self.varAtm['lapse0'] dp_0_dz = self.varAtm['p0'] * ( self.varAtm['g'] / self.varAtm['lapse0'] / self.varAtm['R']) * \ (-self.varAtm['lapse0'] / self.varAtm['T0']) * \ (T_isa / self.varAtm['T0']) ** ( self.varAtm['g'] / self.varAtm['lapse0'] / self.varAtm['R'] - 1) dT_0_dz2 = 0 dp_0_dz2 = self.varAtm['p0'] * ( self.varAtm['g'] / self.varAtm['lapse0'] / self.varAtm['R']) * \ (-self.varAtm['lapse0'] / self.varAtm['T0']) * \ ( self.varAtm['g'] / self.varAtm['lapse0'] / self.varAtm['R'] - 1)*\ (T_isa / self.varAtm['T0']) ** ( self.varAtm['g'] / self.varAtm['lapse0'] / self.varAtm['R'] - 2) * \ (-self.varAtm['lapse0'] / self.varAtm['T0']) dnum_dz = dp_0_dz2*T_0 + dp_0_dz*dT_0_dz - dp_0_dz*dT_0_dz partials['drho_0_dz', 'z'] = 1/self.varAtm['R'] * (dnum_dz*T_0**2 - (dp_0_dz*T_0 - p_0*dT_0_dz)*2*T_0*dT_0_dz)/T_0**4 dmuN_dz = 1.38313 * (1.5*T_0**0.5*(-self.varAtm['lapse0'])/self.varAtm['T0']**1.5) dmuD_dz = ( -self.varAtm['lapse0'] / self.varAtm['T0'] ) partials['mu_0', 'z'] = self.varAtm['mu0'] * (dmuN_dz*( T_0 / self.varAtm['T0'] + 0.38313) - (1.38313 * (T_0 / self.varAtm['T0']) ** 1.5)*dmuD_dz)/( T_0 / self.varAtm['T0'] + 0.38313)**2 partials['I_0', 'z'] = (self.varAtm['rho0'] * self.varAtm['c0']/ self.varAtm['p0'] * self.varAtm['T0']**0.5) * (dp_0_dz*T_0**0.5 - p_0*0.5*T_0**(-0.5)*dT_0_dz)/T_0 partials['rh', 'z'] = -0.012467191601049869*np.ones(nn,)
JamesCao2048/BlizzardData
Corpus/birt/1725.java
<gh_stars>1-10 /******************************************************************************* * Copyright (c) 2008 Actuate Corporation. * All rights reserved. *******************************************************************************/ package org.eclipse.birt.report.designer.internal.ui.swt.custom; import java.util.ArrayList; import java.util.List; import org.eclipse.jface.viewers.ColumnLayoutData; import org.eclipse.jface.viewers.ColumnPixelData; import org.eclipse.jface.viewers.ColumnWeightData; import org.eclipse.jface.viewers.TableLayout; import org.eclipse.swt.events.ControlEvent; import org.eclipse.swt.events.ControlListener; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; /** * COMMENT - Add description of this class or interface here. * Description should go beyond the class/interface name. * Use the following template: * * <Short description of class (noun phrase) followed by a dot> * <More elaborate description of what kind of object this class or interface represents.> * <Give information on (special) characteristics if possible.> */ public class AutoResizeTableLayout extends TableLayout implements ControlListener{ private final Table table; private List<ColumnLayoutData> columns = new ArrayList<ColumnLayoutData>(); private boolean autosizing = false; private int oldWidth; /** * COMMENT - Add concise description of this constructor. * Description should go beyond the constructor's name. * * */ public AutoResizeTableLayout(final Table table) { this.table = table; table.addControlListener(this); } public void addColumnData(ColumnLayoutData data){ columns.add(data); super.addColumnData(data); } /* (non-Javadoc) * @see org.eclipse.swt.events.ControlListener#controlMoved(org.eclipse.swt.events.ControlEvent) */ public void controlMoved(ControlEvent e) { } /* (non-Javadoc) * @see org.eclipse.swt.events.ControlListener#controlResized(org.eclipse.swt.events.ControlEvent) */ public void controlResized(ControlEvent e) { // only react on changing width min. few pixels // (see workaround for SWT bug getting unnecessary scroll bar) if (Math.abs(oldWidth - table.getClientArea().width) > 5) { if (autosizing) { return; } autosizing = true; try { autoSizeColumns(); } finally { autosizing = false; oldWidth = table.getClientArea().width; } } } /** * <Short description (short verb phrase possible) followed by a dot> * <More elaborate description of "what" this method does. Omit the "how" unless necessary.> * * */ private void autoSizeColumns() { int width = table.getClientArea().width; width -= 10; // workaround for SWT bug getting unnecessary scroll bar if(width <= 1) return; TableColumn[] tableColumns = table.getColumns(); int size = Math.min(columns.size(), tableColumns.length); int[] widths = new int[size]; int fixedWidth = 0; int numberOfWeightColumns = 0; int totalWeight = 0; //First calc space occupied by fixed columns for (int i = 0; i < size; ++i) { ColumnLayoutData col = (ColumnLayoutData) columns.get(i); if(col instanceof ColumnPixelData){ int pixels = ((ColumnPixelData)col).width; widths[i] = pixels; fixedWidth += pixels; } else if(col instanceof ColumnWeightData){ ColumnWeightData cw = (ColumnWeightData)col; ++numberOfWeightColumns; int weight = cw.weight; totalWeight += weight; } else{ throw new IllegalStateException("Unknown column layout data"); //$NON-NLS-1$ } } //Do we have columns that have weight? if(numberOfWeightColumns > 0){ //Now, distribute the rest to the columns with weight int rest = width - fixedWidth; int totalDistributed = 0; for (int i = 0; i < size; ++i) { ColumnLayoutData col = (ColumnLayoutData) columns.get(i); if(col instanceof ColumnWeightData){ ColumnWeightData cw = (ColumnWeightData)col; int weight = cw.weight; int pixels = totalWeight == 0 ? 0 : weight * rest/totalWeight; if(pixels < cw.minimumWidth) pixels = cw.minimumWidth; totalDistributed += pixels; widths[i] = pixels; } } //Distribute any remaining pixels to columns with weight int diff = rest - totalDistributed; for (int i = 0; diff > 0; ++i) { if(i == size) i = 0; ColumnLayoutData col = (ColumnLayoutData) columns.get(i); if(col instanceof ColumnWeightData){ ++widths[i]; --diff; } } } for (int i = 0; i < size; i++) { if(tableColumns[i].getWidth() != widths[i]) tableColumns[i].setWidth(widths[i]); } } /** * remove this from the tables listeners. */ public void dispose() { table.removeControlListener(this); } }
DeFBeD/zap-android
app/src/main/java/DefBed/DefWallet/channelManagement/ChannelSelectListener.java
package DefBed.DefWallet.channelManagement; import com.google.protobuf.ByteString; public interface ChannelSelectListener { void onChannelSelect(ByteString channel, int type); }
skotep/webdev
sample/mongoTest.js
<reponame>skotep/webdev<filename>sample/mongoTest.js var request = require('request') var MongoClient = require('mongodb').MongoClient var url = 'mongodb://localhost:27017/webdev' if (process.env.MONGOLAB_URI) { url = process.env.MONGOLAB_URI; } function mc(execute) { var args = Array.prototype.slice.call(arguments, 1) MongoClient.connect(url, function(err, db) { if (err) { console.err('There was a problem', err) } else { args.unshift(db) execute.apply(null, args) } }) } exports.mc = mc function insertDocs(db) { request('https://webdev-dummy.herokuapp.com/sample', function(err, res, body) { var posts = JSON.parse(body).posts // put these into a collection var c = db.collection('posts', function() { }) c.insert(posts, {w:1}, function(err, result) { db.close() }) }) } function queryDocs(db) { var c = db.collection('posts') var counts = {} c.find({}).toArray(function(err, items) { console.log('There are ' + items.length + ' entries') items.forEach(function(post) { if (!counts[post.author]) { counts[post.author] = 0 } counts[post.author] = counts[post.author] + 1 }) db.close() console.log(counts) }) } function queryByAuthor(db, author) { var c = db.collection('posts') c.find({ author: author }).toArray(function(err, items) { console.log('There are ' + items.length + ' entries for ' + author) var totalLength = 0 items.forEach(function(post) { totalLength += post.body.length }) console.log('average length', totalLength / items.length) db.close() }) } //mc(insertDocs) //mc(queryDocs) mc(queryByAuthor, 'sep1') mc(queryByAuthor, 'jmg3')
bernard357/shellbot
shellbot/spaces/base.py
<reponame>bernard357/shellbot<filename>shellbot/spaces/base.py # -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import logging from multiprocessing import Process, Queue import os from six import string_types import time from shellbot.i18n import _ class Space(object): """ Handles a collaborative space A collaborative space supports multiple channels for interactions between persons and bots. The life cycle of a space can be described as follows:: 1. A space instance is created and configured:: >>>my_context = Context(...) >>>space = Space(context=my_context) 2. The space is connected to some back-end API:: space.connect() 3. Multiple channels can be handled by a single space:: channel = space.create(title) channel = space.get_by_title(title) channel = space.get_by_id(id) channel = space.get_by_person(label) channel.title = 'A new title' space.update(channel) space.delete(id) Channels feature common attributes, yet can be extended to convey specificities of some platforms. 4. Messages can be posted:: space.post_message(id, 'Hello, World!') # for group channels space.post_message(person, 'Hello, World!') # for direct messages 5. You can add and remove participants to channels:: persons = space.list_participant(id) space.add_participants(id, persons) space.add_participant(id, person) space.remove_participants(id, persons) space.remove_participant(id, person) Multiple modes can be considered for the handling of inbound events from the cloud. - Asynchronous reception - the back-end API sends updates over a web hook to this object, and messages are pushed to the listening queue. Example:: # link local web server to this space server.add_route('/hook', space.webhook) # link cloud service to this local server space.register('http://my.server/hook') - Background loop - this object pulls the API in a loop, and new messages are pushed to the listening queue. Example:: space.run() """ DEFAULT_SETTINGS = { 'space': { 'type': 'local', 'title': '$CHAT_ROOM_TITLE', }, 'server': { 'url': '$SERVER_URL', 'hook': '/hook', 'binding': None, 'port': 8080, }, } DEFAULT_SPACE_TITLE = _(u'Collaboration space') PULL_INTERVAL = 0.05 # time between pulls, when not hooked def __init__(self, context=None, ears=None, fan=None, **kwargs): """ Handles a collaborative space :param context: the overarching context :type context: Context :param ears: the listening queue :type ears: Queue :param fan: the auditing queue :type fan: Queue Two queues are provided, so that the space can distinguish events for regular handling (by the listener) from auditing (by the observer) No auditing is taking place when no fan is provided. Example:: space = Space(context=my_engine.context, ears=my_engine.ears, fan=my_engine.fan) """ self.context = context self.ears = ears self.fan = fan self.on_init(**kwargs) def on_init(self, **kwargs): """ Handles extended initialisation parameters This function should be expanded in sub-class, where necessary. Example:: def on_init(self, ex_parameter='extra', **kwargs): ... """ pass def on_start(self): """ Reacts when engine is started This function should be expanded in sub-class, where necessary. Example:: def on_start(self): self.load_cache_from_db() """ pass def on_stop(self): """ reacts when engine is stopped This function attempts to deregister webhooks, if any. This behaviour can be expanded in sub-class, where necessary. """ self.deregister() def configure(self, settings={}): """ Changes settings of the space :param settings: a dictionary with some statements for this instance :type settings: dict After a call to this function, ``bond()`` has to be invoked to return to normal mode of operation. """ self.context.apply(settings) self.check() def check(self): """ Checks settings This function should be expanded in sub-class, where necessary. Example:: def check(self): self.engine.context.check('space.title', is_mandatory=True) """ pass def configured_title(self): """ Returns the title of the space as set in configuration :return: the configured title, or ``Collaboration space`` :rtype: str This function should be rewritten in sub-classes if space title does not come from ``space.title`` parameter. """ return self.context.get('space.title', self.DEFAULT_SPACE_TITLE) def connect(self, **kwargs): """ Connects to the back-end API This function should be expanded in sub-class, where required. Example:: def connect(self, **kwargs): self.api = ApiFactory(self.token) """ pass def list_group_channels(self, **kwargs): """ Lists available channels :return: list of Channel This function should be implemented in sub-class. Example:: def list_group_channels(self, **kwargs): for handle in self.api.rooms.list(type='group'): yield Channel(handle.attributes) """ raise NotImplementedError() def create(self, title, **kwargs): """ Creates a channel :param title: title of a new channel :type title: str :return: Channel This function returns a representation of the new channel on success, else it should raise an exception. This function should be implemented in sub-class. Example:: def create(self, title=None, **kwargs): handle = self.api.rooms.create(title=title) return Channel(handle.attributes) """ assert title raise NotImplementedError() def get_by_title(self, title=None, **kwargs): """ Looks for an existing space by title :param title: title of the target channel :type title: str :return: Channel instance or None If a channel already exists with this id, a representation of it is returned. Else the value ``None``is returned. This function should be implemented in sub-class. Example:: def get_by_title(self, title, **kwargs): for handle in self.api.rooms.list() if handle.title == title: return Channel(handle.attributes) """ assert title return None def get_by_id(self, id, **kwargs): """ Looks for an existing channel by id :param id: id of the target channel :type id: str :return: Channel instance or None If a channel already exists with this id, a representation of it is returned. Else the value ``None``is returned. This function should be implemented in sub-class. Example:: def get_by_id(self, id, **kwargs): handle = self.api.rooms.lookup(id=id) if handle: return Channel(handle.attributes) """ assert id return None def get_by_person(self, label, **kwargs): """ Looks for an existing private channel with a person :param label: the display name of the person's account :type label: str :return: Channel instance or None If a channel already exists for this person, a representation of it is returned. Else the value ``None``is returned. This function should be implemented in sub-class. Example:: def get_by_id(self, id, **kwargs): handle = self.api.rooms.lookup(id=id) if handle: return Channel(handle.attributes) """ assert label return None def update(self, channel, **kwargs): """ Updates an existing channel :param channel: a representation of the updated channel :type channel: Channel This function should raise an exception when the update is not successful. This function should be implemented in sub-class. Example:: def update(self, channel): self.api.rooms.update(channel.attributes) """ raise NotImplementedError def delete(self, id, **kwargs): """ Deletes a channel :param id: the unique id of an existing channel :type id: str After a call to this function the related channel does not appear anymore in the list of available resources in the chat space. This can be implemented in the back-end either by actual deletion of resources, or by archiving the channel. In the second scenario, the channel could be restored at a later stage if needed. This function should be implemented in sub-class. Example:: def delete(self, id=id, **kwargs): self.api.rooms.delete(id) """ raise NotImplementedError() def list_participants(self, id): """ Lists participants to a channel :param id: the unique id of an existing channel :type id: str :return: a list of persons :rtype: list of str Note: this function returns all participants, except the bot itself. """ assert id # target channel is required raise NotImplementedError() def add_participants(self, id, persons=[]): """ Adds multiple participants :param id: the unique id of an existing channel :type id: str :param persons: e-mail addresses of persons to add :type persons: list of str """ logging.info(u"Adding participants") for person in persons: logging.info(u"- {}".format(person)) self.add_participant(id=id, person=person) def add_participant(self, id, person, is_moderator=False): """ Adds one participant :param id: the unique id of an existing channel :type id: str :param person: e-mail address of the person to add :type person: str :param is_moderator: if this person has special powers on this channel :type is_moderator: True or False The underlying platform may, or not, take the optional parameter ``is_moderator`` into account. The default bahaviour is to discard it, as if the parameter had the value ``False``. This function should be implemented in sub-class. It should not raise exceptions, since this would kill ``list_participants()``. Example:: @no_exception def add_participant(self, id, person): self.api.memberships.create(id=id, person=person) """ assert id # target channel is required assert person assert is_moderator in (True, False) raise NotImplementedError() def remove_participants(self, id, persons=[]): """ Removes multiple participants :param id: the unique id of an existing channel :type id: str :param persons: e-mail addresses of persons to delete :type persons: list of str """ logging.info(u"Removing participants") for person in persons: logging.info(u"- {}".format(person)) self.remove_participant(id=id, person=person) def remove_participant(self, id, person): """ Removes one participant :param id: the unique id of an existing channel :type id: str :param person: e-mail address of the person to delete :type person: str This function should be implemented in sub-class. It should not raise exceptions, since this would kill ``remove_participants()``. Example:: @no_exception def remove_participant(self, id, person): self.api.memberships.delete(id=id, person=person) """ assert id # target channel is required assert person raise NotImplementedError() def list_messages(self, id=None, quantity=10, stop_id=None, up_to=None, with_attachment=False, **kwargs): """ List messages :param id: the unique id of an existing channel :type id: str :param quantity: maximum number of returned messages :type quantity: positive integer :param stop_id: stop on this message id, and do not include it :type stop_id: str :param up_to: stop on this date and time :type up_to: str of ISO date and time :param with_attachment: to get only messages with some attachments :type with_attachment: True or False :return: a list of Message objects This function fetches messages from one channel, from newest to the oldest. Compared to the bare ``walk_messages`` function, it brings additional capabilities listed below: * quantity - limit the maximum number of messages provided * stop_id - get new messages since the latest we got * up_to - get messages up a given date and time * with_attachments - filter messages to retrieve attachments Example:: for message in space.list_messages(id=channel_id): do_something_with_message(message) if message.url: do_something_with_attachment(message.url) """ assert id assert quantity > 0 assert with_attachment in (True, False) logging.info(u'Listing messages') messages = [] scanned = 10 * quantity for message in self.walk_messages(id=id, **kwargs): if stop_id and message.id == stop_id: logging.debug(u"- hit stop id") break if up_to and message.stamp < up_to: logging.debug(u"- hit stamp limit") break if with_attachment and not message.url: logging.debug(u"- no attachment in this message") scanned -= 1 if scanned: continue break messages.append(message) if len(messages) >= quantity: break if len(messages): logging.info(u"- returning {} messages".format(len(messages))) return messages def walk_messages(self, id=None, **kwargs): """ Walk messages :param id: the unique id of an existing channel :type id: str :return: a iterator of Message objects This function returns messages from a channel, from the newest to the oldest. This function should be implemented in sub-class """ raise NotImplementedError def post_message(self, id=None, text=None, content=None, file=None, person=None, **kwargs): """ Posts a message :param id: the unique id of an existing channel :type id: str :param person: address for a direct message :type person: str :param text: message in plain text :type text: str :param content: rich format, such as Markdown or HTML :type content: str :param file: URL or local path for an attachment :type file: str Example message out of plain text:: space.post_message(id=id, text='hello world') Example message with Markdown:: space.post_message(id, content='this is a **bold** statement') Example file upload:: space.post_message(id, file='./my_file.pdf') Of course, you can combine text with the upload of a file:: text = 'This is the presentation that was used for our meeting' space.post_message(id=id, text=text, file='./my_file.pdf') For direct messages, provide who you want to reach instead of a channel id, like this:: space.post_message(person='<EMAIL>', text='hello guy') This function should be implemented in sub-class. Example:: def post_message(self, id, text=None, **kwargs): self.api.messages.create(id=id, text=text) """ assert id or person # need a recipient assert id is None or person is None # only one recipient raise NotImplementedError() def webhook(self): """ Handles updates sent over the internet This function should use the ``request`` object to retrieve details of the web transaction. This function should be implemented in sub-class. Example:: def webhook(self): message_id = request.json['data']['id'] item = self.api.messages.get(messageId=message_id) self.ears.put(item._json) return "OK" """ raise NotImplementedError() def register(self, hook_url): """ Registers to the cloud API for the reception of updates :param hook_url: web address to be used by cloud service :type hook_url: str This function should be implemented in sub-class. Example:: def register(self, hook_url): self.api.register(hook_url) """ raise NotImplementedError() def deregister(self): """ Stops updates from the cloud back-end This function should be implemented in sub-class. """ pass def start(self, hook_url=None): """ Starts the update process :param hook_url: web address to be used by cloud service (optional) :type hook_url: str :return: either the process that has been started, or None If an URL is provided, it is communicated to the back-end API for asynchronous updates. Else this function starts a separate daemonic process to pull updates in the background. """ self.on_start() if hook_url: self.register(hook_url=hook_url) else: p = Process(target=self.run) p.daemon = True p.start() return p def run(self): """ Continuously fetches updates This function senses new items at regular intervals, and pushes them to the listening queue. Processing is handled in a separate background process, like in the following example:: # gets updates in the background process = space.start() ... # wait for the end of the process process.join() The recommended way for stopping the process is to change the parameter ``general.switch`` in the context. For example:: engine.set('general.switch', 'off') Note: this function should not be invoked if a webhok has been configured. """ logging.info(u'Pulling updates') try: self.context.set('puller.counter', 0) while self.context.get('general.switch', 'on') == 'on': try: self.pull() self.context.increment('puller.counter') time.sleep(self.PULL_INTERVAL) except Exception as feedback: logging.warning(feedback) break except KeyboardInterrupt: pass logging.info(u"Puller has been stopped") def pull(self): """ Fetches updates This function senses most recent items, and pushes them to the listening queue. This function should be implemented in sub-class. Example:: def pull(self): for message in self.api.list_message(): self.ears.put(message) """ raise NotImplementedError()
jalenyang/Rougamo
Hack/src/main/java/pork/HotSwapClassLoader.java
<gh_stars>0 package com.pork; public class HotSwapClassLoader extends ClassLoader { public HotSwapClassLoader() { super(HotSwapClassLoader.class.getClassLoader()); } public Class loadByte(byte[] classByte) { return defineClass(null, classByte, 0, classByte.length); } }
nileshleve/CompCoding
string-erase.cpp
#include<bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { string s = "helllllloooo"; s.erase(2,3); cout<<s; return 0; }
oranoceallaigh/smppapi
src/main/java/com/adenki/smpp/gsm/UserData.java
package com.adenki.smpp.gsm; /** * Interface for objects that can represent TP-User-Data as defined * by 3GPP TS 23.040. * * <p> * <strong>Experimental API</strong>: <tt>UserData</tt> and its supporting * classes and implementations are an experimental API and can change or * be removed at any time. * </p> * @version $Id$ */ public interface UserData { /** * Add a {@link HeaderElement} to this user data implementation. * @param element The header element to add. */ void addHeaderElement(HeaderElement element); /** * Calculate if this user data requires multiple SMS segments. * @return <tt>true</tt> if the user data requires multiple SMS * segments, <tt>false</tt> if the data requires only a single SMS. */ boolean isMultiMessage(); /** * Get the user data as a single message. This method only returns * normally if {@link #isMultiMessage()} returns <tt>false</tt>. * @return A byte array containing the encoded user data. * @throws IllegalStateException If this user data requires more * than one SMS segment. */ byte[] toSingleSms(); /** * Get the user data SMS segments. * @return An array of byte arrays, each element contains a single * SMS segment. */ byte[][] toSegments(); /** * Get the payload of this user data. This is the data that is * included in the message after the user data header has been encoded. * @return The payload of this user data. */ byte[] getData(); /** * Set the payload of this user data. * @param data The payload of this user data. * @see #getData() */ void setData(byte[] data); }
IsaacYangSLA/NVFlare
nvflare/private/fed/client/comp_caller_cmd.py
<filename>nvflare/private/fed/client/comp_caller_cmd.py # Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from nvflare.private.admin_defs import Message from nvflare.private.defs import ComponentCallerTopic, RequestHeader from nvflare.private.fed.client.admin import RequestProcessor from nvflare.private.fed.client.client_engine_internal_spec import ClientEngineInternalSpec from nvflare.widgets.comp_caller import ComponentCaller from nvflare.widgets.widget import WidgetID class ComponentCallerProcessor(RequestProcessor): def get_topics(self) -> [str]: return [ComponentCallerTopic.CALL_COMPONENT] def process(self, req: Message, app_ctx) -> Message: engine = app_ctx if not isinstance(engine, ClientEngineInternalSpec): raise TypeError("engine must be ClientEngineInternalSpec, but got {}".format(type(engine))) caller = engine.get_widget(WidgetID.COMPONENT_CALLER) if not isinstance(caller, ComponentCaller): raise TypeError("caller must be ComponentCaller, but got {}".format(type(caller))) run_info = engine.get_current_run_info() if not run_info or run_info.job_id < 0: result = {"error": "app not running"} else: comp_target = req.get_header(RequestHeader.COMPONENT_TARGET) call_name = req.get_header(RequestHeader.CALL_NAME) call_params = req.body result = caller.call_components(target=comp_target, call_name=call_name, params=call_params) if not isinstance(result, dict): result = {} return Message(topic=req.topic, body=result)
angelamuliu/conpass
db/migrate/20160331161043_create_admin_user.rb
<gh_stars>1-10 class CreateAdminUser < ActiveRecord::Migration def up admin = User.new admin.username = KEYS[:admin]["username"] admin.password = KEYS[:admin]["password"] admin.password_confirmation = KEYS[:admin]["password"] admin.role = 0 admin.save end def down admin = User.find_by_username(KEYS[:admin]["username"]) admin.destroy end end
MapGIS/Mobile-React-Native
js/Dot.js
/** * @content 点对象功能组件 * @author fjl 2019-6-14 下午2:52:36 */ import { NativeModules } from 'react-native'; let X = NativeModules.JSDot; /** * @class Dot */ export default class Dot { /** * 构造一个新的 Dot 对象。 * @memberOf Dot * @returns {Promise.<Dot>} */ async createObj() { try { if ( typeof arguments[0] === 'number' && typeof arguments[1] === 'number' ) { var { point2DId } = await X.createObjByXY(arguments[0], arguments[1]); var dot = new Dot(); dot._MGDotId = point2DId; return dot; } else { var { point2DId } = await X.createObj(); var dot = new Dot(); dot._MGDotId = point2DId; return dot; } } catch (e) { console.error(e); } } /** * 获取X坐标 * @memberOf Dot * @returns {Promise<*>} */ async getX() { try { let x = await X.getX(this._MGDotId); return x; } catch (e) { console.error(e); } } /** * 获取Y坐标 * @memberOf Dot * @returns {Promise<*>} */ async getY() { try { let y = await X.getY(this._MGDotId); return y; } catch (e) { console.error(e); } } /** * 判断Dot对象是否有效或是否可用 * * @memberof Dot * @returns {boolean} true:有效;false:无效 */ isValid(){ try { if(this._MGDotId === undefined || this._MGDotId === null){ return false; } else { return true; } } catch (e) { console.error(e); } } }
Nekmo/then
then/components/base.py
<reponame>Nekmo/then<filename>then/components/base.py from then.params import Params from then.exceptions import ProgrammingError from then.templates.base import TemplateBase def split_host_port(address, default_port=None, splitter=':'): parts = list(address.split(splitter)) if len(parts) < 2: parts.append(default_port) parts[1] = int(parts[1]) return parts class Component: _message_class = None _use_as = None _type = '' def get_class(self): if not self._message_class: raise ProgrammingError('_message_class is undefined on {} component class.'.format(self.__class__.__name__)) return self._message_class def message(self, params=None, **kwargs): if params is None: params = Params() if isinstance(params, TemplateBase): params = params.args(**kwargs) else: params.update(**kwargs) cls = self.get_class() if cls._default_init: fields = cls.__dataclass_fields__ msg_ctx = {key: params[key] for key in fields if key != 'component' and key in params} message = cls(component=self, **msg_ctx) message.add_extra({key: params[key] for key in params if key not in fields}) return message else: return cls(component=self, **params) def send(self, context=None, **kwargs): return self.message(context, **kwargs).send() def copy(self): return self.__class__(**{key: value for key, value in vars(self).items() if key in self.get_fields()}) def use_as(self, name): component = self.copy() component._use_as = name return component def get_use_as(self): return self._use_as or self.get_default_use_as() def get_default_use_as(self): return self.__class__.__name__.lower() @property def name(self): return self.__class__.__name__ @classmethod def get_fields(cls): return cls.__dataclass_fields__ class Message: component: Component = None _default_init = True extra = None def set_config(self, component: Component): self.component = component def add_extra(self, extra): self.extra = self.extra or {} self.extra.update(extra) def send(self): raise NotImplementedError
hxcorp/DongTai-agent-go
hook/gorm.go
<filename>hook/gorm.go package hook type Gorm struct { } func (g *Gorm) GetHook() []string { return []string{ "gormDBOrder", "gormDBExec", "gormDBGroup", "gormDBHaving", "gormDBPluck", "gormDBRaw", "gormDBSelect", } } func (g *Gorm) HookAll() { Hook(g.GetHook()) } func (g *Gorm) UnHookAll() { UnHook(g.GetHook()) }
Freediees/tractogo
app/components/molecules/filterArea/index.android.js
import React, { useState, Fragment } from 'react' import PropTypes from 'prop-types' import { Text, View, TouchableOpacity, TextInput } from 'react-native' import { SvgXml } from 'react-native-svg' import Moment from 'moment' import LinearGradient from 'react-native-linear-gradient' import { Margin, Fonts, Padding, Colors, Row, Column, Border } from 'theme' import CalendarPicker from 'react-native-calendar-picker' import CustomBottomSheet from 'components/molecules/customBottomSheet' import CustomTopSheet from 'components/molecules/customTopSheet' import Separator from 'components/atom/separator' import locationIcon from 'icons/ic-filter1.svg' import startTimeIcon from 'icons/ic-filter2.svg' import dateIcon from 'icons/ic-filter3.svg' import durationIcon from 'icons/ic-filter4.svg' import packageIcon from 'icons/ic-filter5.svg' import CustomCalendarPicker from 'components/atom/customCalendarPicker' import PrimaryButton from 'components/atom/primaryButton' import CustomTimePicker from 'components/atom/customTimePicker' import CustomCityPicker from 'components/atom/customCityPicker' import CustomItemPicker from 'components/atom/customItemPicker' import IconButton from 'components/atom/iconButton' import iconClose from 'icons/ic-close.svg' import iconCTANext from 'icons/ic-right-arrow.svg' export default function FilterArea({ locationFilterLabel, placeHolderLocationFilter, startDateLabel, placeHolderStartDate, durationLabel, placeHolderDuration, startTimeLabel, placeHolderStartTime, packageLabel, placeHolderPackage, citiesData, rentPackageData, durationData, border, okLabel, cancelLabel, weekdaysLabel, monthsLabel, selectedHour, changeSelectedHour, selectedMinute, changeSelectedMinute, selectedDuration, changeSelectedDuration, selectedDurationIndex, changeSelectedDurationIndex, selectedPackage, changeSelectedPackage, selectedPackageIndex, changeSelectedPackageIndex, selectedCity, changeSelectedCity, selectedDate, changeSelectedDate, timeSufix, minDate, maxDate, endDate, footer, startRentLabel, endRentLabel, searchButtonEnabled, searchButtonLabel, onSearchButtonPress, isStartTime, isPackage, onSaveTime, onSaveDate, }) { let bsDate = null let bsDuration = null let bsTimePicker = null let bsPackage = null const [modalVisible, changeModalVisible] = useState(false) const [modalCalendar, changeModalCalendar] = useState(false) const onCityClick = (city) => { changeSelectedCity(city) changeModalVisible(false) } const onValueChange = (hour, minute) => { console.log(hour, minute) changeSelectedHour(hour) changeSelectedMinute(minute) } const onSelectDuration = (item, index) => { changeSelectedDuration(item) changeSelectedDurationIndex(index) } const onSelectPackage = (item, index) => { changeSelectedPackage(item) changeSelectedPackageIndex(index) } const renderRightText = (activeBs) => { if (activeBs === 1) { return ( <IconButton onPress={() => { bsDate.close() }} height={16} width={16} svg={iconClose} fill={'black'} /> ) } else if (activeBs === 2) { return null } else if (activeBs === 3) { return ( <View style={{ flex: 1, flexDirection: 'column', alignItems: 'flex-end', justifyContent: 'center', }} > <Text style={{ ...Fonts.f_8, ...Fonts.text_smoky_grey }}>{startDateLabel}</Text> {selectedDate && ( <Text style={{ ...Fonts.f_12, ...Fonts.text_smoky_grey }}> {Moment(selectedDate) .format('dddd, DD MMM')} </Text> )} </View> ) } else if (activeBs === 4) { return ( <View style={{ flex: 1, flexDirection: 'column', alignItems: 'flex-end', justifyContent: 'center', }} > <Text style={{ ...Fonts.f_8, ...Fonts.text_smoky_grey }}>{startTimeLabel}</Text> <Text style={{ ...Fonts.f_12, ...Fonts.text_smoky_grey }} >{`${selectedHour}.${selectedMinute} ${timeSufix}`}</Text> </View> ) } } const footerStyle = { ...Row.row_1_25, flexDirection: 'row', justifyContent: 'space-between', width: '100%', borderBottomLeftRadius: 8, borderBottomRightRadius: 8, paddingHorizontal: 24, paddingVertical: 12, shadowColor: '#000', shadowOffset: { width: 0, height: 5 }, shadowOpacity: 0.2, shadowRadius: 5, elevation: 5, } const borderStyleWithFooter = { width: '100%', flex: 2, ...Border.border_light_grey, ...Border.border_w_1, borderTopLeftRadius: 8, borderTopRightRadius: 8, flexDirection: 'column', paddingHorizontal: 24, ...Padding.pt_16, ...Padding.pb_20, backgroundColor: '#fff', shadowColor: '#000', shadowOffset: { width: 0, height: 5 }, shadowOpacity: 0.2, shadowRadius: 5, elevation: 5, } const borderStyle = { width: '100%', flex: 2, ...Border.border_light_grey, ...Border.border_w_1, ...Border.border_rad_8, flexDirection: 'column', paddingHorizontal: 24, ...Padding.pv_16, backgroundColor: '#fff', shadowColor: '#000', shadowOffset: { width: 0, height: 5 }, shadowOpacity: 0.2, shadowRadius: 5, elevation: 5, } const borderlessStyle = { flex: 4, width: '100%', flexDirection: 'column', paddingHorizontal: 24, ...Padding.pv_20, backgroundColor: '#fff', } const getBorderStyle = () => { if (border) { if (footer) { return borderStyleWithFooter } else { return borderStyle } } else { return borderlessStyle } } return ( <View style={{ flex:1, width: '100%' }}> <View style={getBorderStyle()}> <View style={{ width: '100%' }}> <Text style={{ ...Fonts.f_10, ...Fonts.text_smoky_grey }}>{locationFilterLabel}</Text> <TouchableOpacity onPress={() => changeModalVisible(true)} style={{}}> <View style={{ flexDirection: 'row', alignItems: 'center', width: '100%' }}> <SvgXml xml={locationIcon} width={20} height={20} /> <TextInput placeholder={placeHolderLocationFilter} editable={false} onPress={() => {}} value={selectedCity ? selectedCity.cityName : ''} placeholderTextColor={Colors.grey} style={{ ...Fonts.f_12, ...Margin.ml_8, width: '100%' }} /> </View> <Separator style={{ ...Margin.mt_8 }} /> </TouchableOpacity> </View> <View style={{ ...Margin.mt_8, flexDirection: 'row', justifyContent: 'space-between' }}> <View style={{ flex: 1, ...Margin.mr_20 }}> <Text style={{ ...Fonts.f_10, ...Fonts.text_smoky_grey, ...Fonts.semibold }}> {startDateLabel} </Text> <TouchableOpacity style={{ ...Margin.mt_4, }} onPress={() => { // bsDate.open() changeModalCalendar(true) }} > <View style={{ flexDirection: 'row', alignItems: 'center' }}> <SvgXml xml={dateIcon} width={20} height={20} /> <TextInput placeholder={placeHolderStartDate} editable={false} onPress={() => {}} placeholderTextColor={Colors.grey} value={selectedDate ? Moment(selectedDate).format('DD MMM YYYY') : ''} style={{ ...Fonts.f_12, ...Margin.ml_8 }} /> </View> <Separator style={{ ...Margin.mt_8 }} /> </TouchableOpacity> </View> <View style={{ flex: 1 }}> <Text style={{ ...Fonts.f_10, ...Fonts.text_smoky_grey, ...Fonts.semibold }}> {durationLabel} </Text> <TouchableOpacity style={{ ...Margin.mt_4 }} onPress={() => { bsDuration.open() }} > <View style={{ flexDirection: 'row', alignItems: 'center' }}> <SvgXml xml={durationIcon} width={20} height={20} /> <TextInput placeholder={placeHolderDuration} editable={false} onPress={() => {}} value={selectedDuration.leftLabel} placeholderTextColor={Colors.grey} style={{ ...Fonts.f_12, ...Margin.ml_8 }} /> </View> <Separator style={{ ...Margin.mt_8 }} /> </TouchableOpacity> </View> </View> <View style={{ ...Margin.mt_8, flexDirection: 'row', justifyContent: 'space-between' }}> <View style={{ flex: 1, ...Margin.mt_8, ...Margin.mr_20 }}> {isStartTime && ( <Fragment> <Text style={{ ...Fonts.f_10, ...Fonts.text_smoky_grey, ...Fonts.semibold }}> {startTimeLabel} </Text> <TouchableOpacity style={{ ...Margin.mt_4 }} onPress={() => { bsTimePicker.open() }} > <View style={{ flexDirection: 'row', alignItems: 'center' }}> <SvgXml xml={startTimeIcon} width={20} height={20} /> <TextInput placeholder={placeHolderStartTime} editable={false} onPress={() => {}} value={`${selectedHour}.${selectedMinute} ${timeSufix}`} placeholderTextColor={Colors.grey} style={{ ...Fonts.f_12, ...Margin.ml_8 }} /> </View> <Separator /> </TouchableOpacity> </Fragment> )} </View> <View style={{ flex: 1, ...Margin.mt_8 }}> {isPackage && ( <Fragment> <Text style={{ ...Fonts.f_10, ...Fonts.text_smoky_grey, ...Fonts.semibold }}> {packageLabel} </Text> <TouchableOpacity style={{ ...Margin.mt_4 }} onPress={() => { bsPackage.open() }} > <View style={{ flexDirection: 'row', alignItems: 'center' }}> <SvgXml xml={packageIcon} width={20} height={20} /> <TextInput placeholder={placeHolderPackage} editable={false} value={selectedPackage.leftLabel} onPress={() => {}} placeholderTextColor={Colors.grey} style={{ ...Fonts.f_12, ...Margin.ml_8 }} /> </View> <Separator /> </TouchableOpacity> </Fragment> )} </View> </View> </View> {footer && ( <View style={{ flex: 1, flexDirection: 'row', shadowColor: '#000', shadowOffset: { width: 0, height: 5 }, shadowOpacity: 0.2, shadowRadius: 5, elevation: 5, }} > <LinearGradient colors={[Colors.light_blue, Colors.blue]} style={footerStyle}> <View style={{ flex: 1, flexDirection: 'column', alignItems: 'center', justifyContent: 'center', }} > <Text style={{ ...Fonts.f_8, ...Fonts.text_white, ...Margin.mr_20 }}> {startRentLabel} </Text> {selectedDate && ( <View style={{ ...Margin.mt_4, alignItems: 'center', ...Margin.mr_20 }}> <Text style={{ ...Fonts.f_16, ...Fonts.text_white }}> {Moment(selectedDate).format('DD')} </Text> <Text style={{ ...Fonts.f_8, ...Fonts.text_white }}> {Moment(selectedDate).format('dddd | MMMM')} </Text> <Text style={{ ...Fonts.f_8, ...Fonts.text_white }}> {selectedPackage.rightLabel} </Text> </View> )} </View> <View style={{ flex: 1, flexDirection: 'column', alignItems: 'center', justifyContent: 'center', }} > <Text style={{ ...Fonts.f_8, ...Fonts.text_white, ...Margin.ml_20 }}> {endRentLabel} </Text> {endDate && ( <View style={{ ...Margin.mt_4, alignItems: 'center', ...Margin.ml_20 }}> <Text style={{ ...Fonts.f_16, ...Fonts.text_white }}> {Moment(endDate).format('DD')} </Text> <Text style={{ ...Fonts.f_8, ...Fonts.text_white }}> {Moment(endDate).format('dddd | MMMM')} </Text> <Text style={{ ...Fonts.f_8, ...Fonts.text_white }}> {selectedPackage.rightLabel} </Text> </View> )} </View> </LinearGradient> <View style={{ width: '100%', ...Row.row_1_25, alignItems: 'center', justifyContent: 'center', flex: 1, position: 'absolute', }} > <View style={{ borderRadius: 8, height: '100%', borderColor: 'white', borderWidth: 1, borderStyle: 'dashed', width: 2, height: '100%', }} /> </View> <View style={{ width: '100%', ...Row.row_1_25, alignItems: 'center', justifyContent: 'center', flex: 1, position: 'absolute', }} > <View style={{ height: 28, width: 28, backgroundColor: Colors.white, borderRadius: 14, justifyContent: 'center', alignItems: 'center', }} > <SvgXml xml={iconCTANext} width={28} height={28} /> </View> </View> </View> )} {searchButtonEnabled && ( <View style={{ flex: 1, ...Padding.ph_20, ...Padding.pv_12 }}> <PrimaryButton text={searchButtonLabel} onPress={onSearchButtonPress} /> </View> )} <CustomCityPicker placeholder={placeHolderLocationFilter} modalVisible={modalVisible} cities={citiesData} onCityClick={onCityClick} changeModalVisible={() => { changeModalVisible(false) }} /> <CustomTopSheet modalVisible={modalCalendar} changeModalVisible={(val) => { changeModalCalendar(val) onSaveDate() }} title={placeHolderStartDate} > <CustomCalendarPicker onDateChange={(date) => { changeSelectedDate(date) }} minDate={minDate} selectedDate={selectedDate} weekdays={weekdaysLabel} months={monthsLabel} /> </CustomTopSheet> <CustomBottomSheet title={placeHolderStartTime} botSheetRef={(ref) => (bsTimePicker = ref)} topRightComponent={() => renderRightText(2)} > <CustomTimePicker okLabel={okLabel} cancelLabel={cancelLabel} selectedHour={`${selectedHour}`} selectedMinute={`${selectedMinute}`} onValueChange={onValueChange} onOkPress={() => { if (bsTimePicker) { bsTimePicker.close() onSaveTime() } }} onCancelPress={() => { if (bsTimePicker) { bsTimePicker.close() onSaveTime() } }} /> </CustomBottomSheet> <CustomBottomSheet title={placeHolderDuration} botSheetRef={(ref) => (bsDuration = ref)} topRightComponent={() => renderRightText(3)} > <CustomItemPicker items={durationData} selectedItem={selectedDuration} selectedIndex={selectedDurationIndex} onSelectItem={onSelectDuration} okLabel={okLabel} cancelLabel={cancelLabel} onOkPress={() => { if (bsDuration) { bsDuration.close() } }} onCancelPress={() => { if (bsDuration) { bsDuration.close() } }} /> </CustomBottomSheet> <CustomBottomSheet title={'Rental Package'} botSheetRef={(ref) => (bsPackage = ref)} topRightComponent={() => renderRightText(4)} > <CustomItemPicker items={rentPackageData} selectedItem={selectedPackage} selectedIndex={selectedPackageIndex} onSelectItem={onSelectPackage} okLabel={okLabel} cancelLabel={cancelLabel} onOkPress={() => { if (bsPackage) { bsPackage.close() } }} onCancelPress={() => { if (bsPackage) { bsPackage.close() } }} /> </CustomBottomSheet> </View> ) } FilterArea.defaultProps = { locationFilterLabel: 'Pick-up City', placeHolderLocationFilter: 'Pilih Kota Sewa', startDateLabel: 'Pick-up Date', placeHolderStartDate: 'Pilih Tanggal Mulai', durationLabel: 'Duration', placeHolderDuration: 'Pilih Durasi', startTimeLabel: 'Pick-up Time', placeHolderStartTime: 'Pick-up Time', packageLabel: 'Rental Package', placeHolderPackage: 'Rental Package', citiesData: [], border: true, okLabel: 'Simpan', cancelLabel: 'Batal', weekdaysLabel: ['Min', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab'], monthsLabel: [ 'Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember', ], durationData: [ { leftLabel: '1 Hari', rightLabel: 'Pengembalian Rabu, 27 January 2020', }, { leftLabel: '2 Hari', rightLabel: 'Pengembalian Kamis, 28 January 2020', }, { leftLabel: '3 Hari', rightLabel: 'Pengembalian Jumat, 29 January 2020', }, ], rentPackageData: [ { leftLabel: '4 Hour', rightLabel: '09.00 - 13.00 WIB', }, { leftLabel: '8 Hour', rightLabel: '09.00 - 17.00 WIB', }, { leftLabel: '10 Hour', rightLabel: '09.00 - 19.00 WIB', }, ], selectedHour: '10', changeSelectedHour: () => {}, selectedMinute: '00', changeSelectedMinute: () => {}, selectedDuration: { leftLabel: '1 Hari', rightLabel: 'Pengembalian Rabu, 27 January 2020', }, changeSelectedDuration: () => {}, selectedDurationIndex: 0, changeSelectedDurationIndex: () => {}, selectedPackage: { leftLabel: '4 Hour', rightLabel: '09.00 - 13.00 WIB', }, changeSelectedPackage: () => {}, selectedPackageIndex: 0, changeSelectedPackageIndex: () => {}, selectedCity: null, changeSelectedCity: () => {}, selectedDate: new Date(), changeSelectedDate: () => {}, endDate: new Date().getTime() + 864000000, minDate: new Date(), maxDate: null, timeSufix: 'WIB', footer: true, startRentLabel: 'Pick-up', endRentLabel: 'Drop-off', searchButtonEnabled: false, searchButtonLabel: 'Search Car', onSearchButtonPress: () => {}, isStartTime: true, isPackage: true, onSaveTime: () => {}, onSaveDate: () => {}, } FilterArea.propTypes = { locationFilterLabel: PropTypes.string, placeHolderLocationFilter: PropTypes.string, location: PropTypes.string, startDateLabel: PropTypes.string, placeHolderStartDate: PropTypes.string, startDate: PropTypes.Date, durationLabel: PropTypes.string, placeHolderDuration: PropTypes.string, duration: PropTypes.number, startTimeLabel: PropTypes.string, placeHolderStartTime: PropTypes.string, startTime: PropTypes.string, packageLabel: PropTypes.string, placeHolderPackage: PropTypes.string, rentPackage: PropTypes.shape({}), citiesData: PropTypes.arrayOf(PropTypes.shape({})), border: PropTypes.bool, okLabel: PropTypes.string, cancelLabel: PropTypes.string, weekdaysLabel: PropTypes.arrayOf(PropTypes.string), monthsLabel: PropTypes.arrayOf(PropTypes.string), rentPackageData: PropTypes.arrayOf(PropTypes.shape({})), durationData: PropTypes.arrayOf(PropTypes.shape({})), selectedHour: PropTypes.string, changeSelectedHour: PropTypes.func, selectedMinute: PropTypes.string, changeSelectedMinute: PropTypes.func, selectedDuration: PropTypes.shape({}), changeSelectedDuration: PropTypes.func, selectedDurationIndex: PropTypes.number, changeSelectedDurationIndex: PropTypes.func, selectedPackage: PropTypes.shape({}), changeSelectedPackage: PropTypes.func, selectedPackageIndex: PropTypes.number, changeSelectedPackageIndex: PropTypes.func, selectedCity: PropTypes.shape({}), changeSelectedCity: PropTypes.func, selectedDate: PropTypes.Date, changeSelectedDate: PropTypes.func, timeSufix: PropTypes.string, footer: PropTypes.bool, startRentLabel: PropTypes.string, endRentLabel: PropTypes.string, searchButtonEnabled: PropTypes.bool, searchButtonLabel: PropTypes.string, onSearchButtonPress: PropTypes.func, isStartTime: PropTypes.bool, isPackage: PropTypes.bool, onSaveTime: PropTypes.func, onSaveDate: PropTypes.func, }
TTWShell/algorithms
leetcode/array/findPairs.go
/* https://leetcode.com/problems/k-diff-pairs-in-an-array/#/description Given an array of integers and an integer k, you need to find the number of unique k-diff pairs in the array. Here a k-diff pair is defined as an integer pair (i, j), where i and j are both numbers in the array and their absolute difference is k. Example 1: Input: [3, 1, 4, 1, 5], k = 2 Output: 2 Explanation: There are two 2-diff pairs in the array, (1, 3) and (3, 5). Although we have two 1s in the input, we should only return the number of unique pairs. Example 2: Input:[1, 2, 3, 4, 5], k = 1 Output: 4 Explanation: There are four 1-diff pairs in the array, (1, 2), (2, 3), (3, 4) and (4, 5). Example 3: Input: [1, 3, 1, 5, 4], k = 0 Output: 1 Explanation: There is one 0-diff pair in the array, (1, 1). Note: The pairs (i, j) and (j, i) count as the same pair. The length of the array won't exceed 10,000. All the integers in the given input belong to the range: [-1e7, 1e7]. */ package larray import "sort" func findPairs(nums []int, k int) int { sort.Ints(nums) max := func(a, b int) int { if a > b { return a } return b } count := 0 for i, j := 0, 0; i < len(nums); i++ { j := max(j, i+1) for j < len(nums) && nums[j]-nums[i] < k { j++ } if j < len(nums) && nums[j]-nums[i] == k { count++ } for i+1 < len(nums) && nums[i] == nums[i+1] { i++ } } return count }
Glasch/study
src/sample/chapter4/Vamps2.java
<reponame>Glasch/study<filename>src/sample/chapter4/Vamps2.java<gh_stars>0 package sample.chapter4; /** * Copyright (c) Anton on 27.07.2017. */ public class Vamps2 { }
lechium/iPhoneOS_12.1.1_Headers
System/Library/PrivateFrameworks/StoreKitUI.framework/SKUIStackedImageView.h
/* * This header is generated by classdump-dyld 1.0 * on Saturday, June 1, 2019 at 6:47:11 PM Mountain Standard Time * Operating System: Version 12.1.1 (Build 16C5050a) * Image Source: /System/Library/PrivateFrameworks/StoreKitUI.framework/StoreKitUI * classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by <NAME>. */ #import <StoreKitUI/StoreKitUI-Structs.h> #import <StoreKitUI/SKUIImageView.h> #import <libobjc.A.dylib/MPUStackViewDataSource.h> @class MPUBorderConfiguration, MPUStackView, MPUBorderDrawingCache, UIView, NSString; @interface SKUIStackedImageView : SKUIImageView <MPUStackViewDataSource> { MPUBorderConfiguration* _borderConfiguration; long long _stackDepth; MPUStackView* _stackView; MPUBorderDrawingCache* _borderDrawingCache; } @property (nonatomic,retain) MPUBorderDrawingCache * borderDrawingCache; //@synthesize borderDrawingCache=_borderDrawingCache - In the implementation block @property (assign,nonatomic,__weak) UIView * perspectiveTargetView; @property (assign,nonatomic) CGPoint vanishingPoint; @property (readonly) unsigned long long hash; @property (readonly) Class superclass; @property (copy,readonly) NSString * description; @property (copy,readonly) NSString * debugDescription; +(double)maximumPerspectiveHeightForSize:(CGSize)arg1 ; +(SKUIStackedImageConfiguration)_configurationForSize:(CGSize)arg1 ; -(void)setImageSize:(CGSize)arg1 ; -(void)setPerspectiveTargetView:(UIView *)arg1 ; -(void)setVanishingPoint:(CGPoint)arg1 ; -(void)updateForChangedDistanceFromVanishingPoint; -(UIView *)perspectiveTargetView; -(void)setBorderDrawingCache:(MPUBorderDrawingCache *)arg1 ; -(CGPoint)vanishingPoint; -(long long)numberOfItemsInStackView:(id)arg1 ; -(void)stackView:(id)arg1 applyAttributesToItem:(id)arg2 atIndex:(long long)arg3 ; -(void)stackView:(id)arg1 didCreateItem:(id)arg2 ; -(void)performCompressionAnimationWithCompletionHandler:(/*^block*/id)arg1 ; -(MPUBorderDrawingCache *)borderDrawingCache; -(void)setFrame:(CGRect)arg1 ; -(void)dealloc; -(void)setImage:(id)arg1 ; -(id)initWithFrame:(CGRect)arg1 ; -(void)layoutSubviews; -(void)setCenter:(CGPoint)arg1 ; @end
arnoldvaz27/Java-Codes
Java Codes/Programs 2/MyConstructor.java
<reponame>arnoldvaz27/Java-Codes public class MyConstructor { MyConstructor() { System.out.println("Object"); } public static void main(String args[]) { MyConstructor obj = new MyConstructor(); } }
maxgrytsuk/call42
migrations/1426775555150_add_user_to_calls_as_ref.js
<gh_stars>0 var mongojs = require('mongojs'), _ = require('lodash') config = require('../config/config'); var db = mongojs(config.db, ['calls', 'users']); var username = 'algorithm'; exports.up = function(next){ // Adding algo-rithm user refs to call entries (at this moment only algo-rithm user is present). // From this moment user refs will be added to each call entry on save. db.users.findOne({ username:username }, function(err, user) { db.calls.update( { user:null }, { $set:{ 'user': user._id } }, { multi: true }, function() { next(); } ) }); }; exports.down = function(next){ //no migrate down next(); };
NarrativeCompany/narrative
core/src/main/java/org/narrative/common/web/jsp/InternalServletRequest.java
package org.narrative.common.web.jsp; import org.narrative.common.util.UnexpectedError; import javax.servlet.AsyncContext; import javax.servlet.DispatcherType; import javax.servlet.RequestDispatcher; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.ServletInputStream; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpUpgradeHandler; import javax.servlet.http.Part; import java.io.BufferedReader; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.security.Principal; import java.util.Collection; import java.util.Collections; import java.util.Enumeration; import java.util.Locale; import java.util.Map; import java.util.Vector; /** * Created by IntelliJ IDEA. * User: paul * Date: May 1, 2006 * Time: 11:04:44 AM * To change this template use File | Settings | File Templates. */ public class InternalServletRequest implements HttpServletRequest { private final String servletPath; private final Locale locale; private final Vector locales = new Vector(); private final Map<String, Object> attributes; private final Map<String, String> parameters; private final HttpSession session; public InternalServletRequest(String servletPath, Locale locale, HttpSession session, Map<String, Object> attributes, Map<String, String> parameters) { this.servletPath = servletPath; this.locale = locale; this.locales.add(locale); this.attributes = attributes; this.parameters = parameters; this.session = session; } public String getAuthType() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public Cookie[] getCookies() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public long getDateHeader(String string) { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public String getHeader(String string) { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public Enumeration getHeaders(String string) { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public Enumeration getHeaderNames() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public int getIntHeader(String string) { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public String getMethod() { // bl: Jasper in Tomcat 8 apparently requires this to ensure "JSPs only permit GET POST or HEAD" return "GET"; } public String getPathInfo() { return null; } public String getPathTranslated() { return null; } public String getContextPath() { return ""; } public String getQueryString() { return ""; } public String getRemoteUser() { return ""; } public boolean isUserInRole(String string) { return false; } public Principal getUserPrincipal() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public String getRequestedSessionId() { return ""; } public String getRequestURI() { return ""; } public StringBuffer getRequestURL() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public String getServletPath() { return servletPath; } public HttpSession getSession(boolean b) { return session; } public HttpSession getSession() { return session; } public boolean isRequestedSessionIdValid() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public boolean isRequestedSessionIdFromCookie() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public boolean isRequestedSessionIdFromURL() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public boolean isRequestedSessionIdFromUrl() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public Object getAttribute(String string) { return attributes.get(string); } public Enumeration getAttributeNames() { return Collections.enumeration(attributes.keySet()); } public String getCharacterEncoding() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public void setCharacterEncoding(String string) throws UnsupportedEncodingException { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public int getContentLength() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public String getContentType() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public ServletInputStream getInputStream() throws IOException { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public String getParameter(String string) { return parameters.get(string); } public Enumeration getParameterNames() { return Collections.enumeration(parameters.keySet()); } public String[] getParameterValues(String string) { return parameters.values().toArray(new String[]{}); } public Map getParameterMap() { return parameters; } public String getProtocol() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public String getScheme() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public String getServerName() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public int getServerPort() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public BufferedReader getReader() throws IOException { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public String getRemoteAddr() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public String getRemoteHost() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public void setAttribute(String string, Object object) { attributes.put(string, object); } public void removeAttribute(String string) { attributes.remove(string); } public Locale getLocale() { return locale; } public Enumeration getLocales() { return locales.elements(); } public boolean isSecure() { return false; } public RequestDispatcher getRequestDispatcher(String string) { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public String getRealPath(String string) { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public int getRemotePort() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public String getLocalName() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public String getLocalAddr() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } public int getLocalPort() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } @Override public String changeSessionId() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } @Override public boolean authenticate(HttpServletResponse response) throws IOException, ServletException { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } @Override public void login(String username, String password) throws ServletException { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } @Override public void logout() throws ServletException { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } @Override public Collection<Part> getParts() throws IOException, ServletException { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } @Override public Part getPart(String name) throws IOException, ServletException { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } @Override public <T extends HttpUpgradeHandler> T upgrade(Class<T> httpUpgradeHandlerClass) throws IOException, ServletException { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } @Override public long getContentLengthLong() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } @Override public ServletContext getServletContext() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } @Override public AsyncContext startAsync() throws IllegalStateException { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } @Override public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse) throws IllegalStateException { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } @Override public boolean isAsyncStarted() { return false; } @Override public boolean isAsyncSupported() { return false; } @Override public AsyncContext getAsyncContext() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } @Override public DispatcherType getDispatcherType() { throw UnexpectedError.getRuntimeException("Not Supported in internal requests"); } }
CodeIsRunning/system-monitor-server
common/src/main/java/liuxf/live/monitor/dao/model/DdRobotConfig.java
<gh_stars>1-10 package liuxf.live.monitor.dao.model; import java.io.Serializable; import java.time.LocalDateTime; import lombok.Data; /** * @author liuxf * @date 2021/1/5 15:26 * @version 1.0 */ /** * 钉钉机器人配置 */ @Data public class DdRobotConfig implements Serializable { private Integer id; /** * 服务器id */ private Integer monitorServerId; /** * 推送群描述 */ private String note; /** * 推送秘钥 */ private String secret; /** * 推送连接 */ private String webHook; /** * 添加时间 */ private LocalDateTime createTime; /** * 更新时间 */ private LocalDateTime updateTime; private static final long serialVersionUID = 1L; }
fran81/expedientes
node_modules/eslint-plugin-angular/examples/no-run-logic.js
// example - valid: true angular.module('app').run(function(KITTENS, kittenService, startup) { kittenService.prefetchData(KITTENS); startup('foo', true, 1); }); // example - valid: true, options: [{allowParams: false}] angular.module('app').run(function(kittenService, startup) { kittenService.prefetchData(); startup(); }); // example - valid: false, errorMessage: "The run function may only contain call expressions" angular.module('app').run(function($window) { $window.addEventListener('deviceready', deviceready); function deviceready() {} }); // example - valid: false, options: [{allowParams: false}], errorMessage: "Run function call expressions may not take any arguments" angular.module('app').run(function(startup) { startup('foo', true, 1); });
iabhimanyu/Algorithms
Sorting/Timsort/Python/TimSort.py
# based off of this code https://gist.github.com/nandajavarma/a3a6b62f34e74ec4c31674934327bbd3 # <NAME> # https://skerritt.tech def binary_search(the_array, item, start, end): if start == end: if the_array[start] > item: return start else: return start + 1 if start > end: return start mid = round((start + end)/ 2) if the_array[mid] < item: return binary_search(the_array, item, mid + 1, end) elif the_array[mid] > item: return binary_search(the_array, item, start, mid - 1) else: return mid """ Insertion sort that timsort uses if the array size is small or if the size of the "run" is small """ def insertion_sort(the_array): l = len(the_array) for index in range(1, l): value = the_array[index] pos = binary_search(the_array, value, 0, index - 1) the_array = the_array[:pos] + [value] + the_array[pos:index] + the_array[index+1:] return the_array def merge(left, right): """Takes two sorted lists and returns a single sorted list by comparing the elements one at a time. [1, 2, 3, 4, 5, 6] """ if not left: return right if not right: return left if left[0] < right[0]: return [left[0]] + merge(left[1:], right) return [right[0]] + merge(left, right[1:]) def timsort(the_array): runs, sorted_runs = [], [] length = len(the_array) new_run = [the_array[0]] # for every i in the range of 1 to length of array for i in range(1, length): # if i is at the end of the list if i == length - 1: new_run.append(the_array[i]) runs.append(new_run) break # if the i'th element of the array is less than the one before it if the_array[i] < the_array[i-1]: # if new_run is set to None (NULL) if not new_run: runs.append([the_array[i]]) new_run.append(the_array[i]) else: runs.append(new_run) new_run = [] # else if its equal to or more than else: new_run.append(the_array[i]) # for every item in runs, append it using insertion sort for item in runs: sorted_runs.append(insertion_sort(item)) # for every run in sorted_runs, merge them sorted_array = [] for run in sorted_runs: sorted_array = merge(sorted_array, run) print(sorted_array) timsort([2, 3, 1, 5, 6, 7])
opensource-assist/fuschia
zircon/system/ulib/runtests-utils/fuchsia-run-test.cc
<gh_stars>0 // Copyright 2018 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <errno.h> #include <fcntl.h> #include <fuchsia/io/llcpp/fidl.h> #include <lib/async-loop/cpp/loop.h> #include <lib/async-loop/default.h> #include <lib/debugdata/debugdata.h> #include <lib/fdio/directory.h> #include <lib/fdio/io.h> #include <lib/fdio/namespace.h> #include <lib/fdio/spawn.h> #include <lib/fidl-async/cpp/bind.h> #include <lib/fzl/vmo-mapper.h> #include <lib/zx/clock.h> #include <lib/zx/job.h> #include <lib/zx/process.h> #include <libgen.h> #include <stdio.h> #include <string.h> #include <sys/stat.h> #include <unistd.h> #include <zircon/dlfcn.h> #include <zircon/process.h> #include <zircon/processargs.h> #include <zircon/status.h> #include <zircon/syscalls.h> #include <algorithm> #include <string> #include <utility> #include <fbl/auto_call.h> #include <fbl/string.h> #include <fbl/string_printf.h> #include <fbl/unique_fd.h> #include <fs/synchronous_vfs.h> #include <loader-service/loader-service.h> #include <runtests-utils/fuchsia-run-test.h> #include <runtests-utils/service-proxy-dir.h> namespace fio = ::llcpp::fuchsia::io; namespace runtests { namespace { // Path to helper binary which can run test as a component. This binary takes // component url as its parameter. constexpr char kRunTestComponentPath[] = "/bin/run-test-component"; // Path to helper binary which can run test as a v2 component. This binary takes // component url as its parameter. constexpr char kRunTestSuitePath[] = "/bin/run-test-suite"; fbl::String DirectoryName(const fbl::String& path) { char* cpath = strndup(path.data(), path.length()); fbl::String ret(dirname(cpath)); free(cpath); return ret; } fbl::String BaseName(const fbl::String& path) { char* cpath = strndup(path.data(), path.length()); fbl::String ret(basename(cpath)); free(cpath); return ret; } fbl::String RootName(const fbl::String& path) { const size_t i = strspn(path.c_str(), "/"); const char* start = &path.c_str()[i]; const char* end = strchr(start, '/'); if (end == nullptr) { end = &path.c_str()[path.size()]; } return fbl::String::Concat({"/", fbl::String(start, end - start)}); } std::optional<DumpFile> ProcessDataSinkDump(debugdata::DataSinkDump& data, fbl::unique_fd& data_sink_dir_fd, const char* path) { zx_status_t status; if (mkdirat(data_sink_dir_fd.get(), data.sink_name.c_str(), 0777) != 0 && errno != EEXIST) { fprintf(stderr, "FAILURE: cannot mkdir \"%s\" for data-sink: %s\n", data.sink_name.c_str(), strerror(errno)); return {}; } fbl::unique_fd sink_dir_fd{ openat(data_sink_dir_fd.get(), data.sink_name.c_str(), O_RDONLY | O_DIRECTORY)}; if (!sink_dir_fd) { fprintf(stderr, "FAILURE: cannot open data-sink directory \"%s\": %s\n", data.sink_name.c_str(), strerror(errno)); return {}; } zx_info_handle_basic_t info; status = data.file_data.get_info(ZX_INFO_HANDLE_BASIC, &info, sizeof(info), nullptr, nullptr); if (status != ZX_OK) { return {}; } char name[ZX_MAX_NAME_LEN]; status = data.file_data.get_property(ZX_PROP_NAME, name, sizeof(name)); if (status != ZX_OK || name[0] == '\0') { snprintf(name, sizeof(name), "unnamed.%" PRIu64, info.koid); } uint64_t size; status = data.file_data.get_size(&size); if (status != ZX_OK) { fprintf(stderr, "FAILURE: Cannot get size of VMO \"%s\" for data-sink \"%s\": %s\n", name, data.sink_name.c_str(), zx_status_get_string(status)); return {}; } fzl::VmoMapper mapper; if (size > 0) { zx_status_t status = mapper.Map(data.file_data, 0, size, ZX_VM_PERM_READ); if (status != ZX_OK) { fprintf(stderr, "FAILURE: Cannot map VMO \"%s\" for data-sink \"%s\": %s\n", name, data.sink_name.c_str(), zx_status_get_string(status)); return {}; } } else { fprintf(stderr, "WARNING: Empty VMO \"%s\" published for data-sink \"%s\"\n", name, data.sink_name.c_str()); } char filename[ZX_MAX_NAME_LEN]; snprintf(filename, sizeof(filename), "%s.%" PRIu64, data.sink_name.c_str(), info.koid); fbl::unique_fd fd{openat(sink_dir_fd.get(), filename, O_WRONLY | O_CREAT | O_EXCL, 0666)}; if (!fd) { fprintf(stderr, "FAILURE: Cannot open data-sink file \"%s\": %s\n", data.sink_name.c_str(), strerror(errno)); return {}; } // Strip any leading slashes (including a sequence of slashes) so the dump // file path is a relative to directory that contains the summary file. size_t i = strspn(path, "/"); auto dump_file = JoinPath(&path[i], JoinPath(data.sink_name, filename)); auto* buf = reinterpret_cast<uint8_t*>(mapper.start()); ssize_t count = size; while (count > 0) { ssize_t len = write(fd.get(), buf, count); if (len == -1) { fprintf(stderr, "FAILURE: Cannot write data to \"%s\": %s\n", dump_file.c_str(), strerror(errno)); return {}; } count -= len; buf += len; } return DumpFile{name, dump_file.c_str()}; } } // namespace void TestFileComponentInfo(const fbl::String& path, ComponentInfo* v1_info_out, ComponentInfo* v2_info_out) { if (strncmp(path.c_str(), kPkgPrefix, strlen(kPkgPrefix)) != 0) { return; } // Consume suffixes of the form // "test/<test filename>" or "test/disabled/<test filename>" bool is_disabled = (strstr(path.c_str(), "/disabled/") != nullptr); const auto folder_path = is_disabled ? DirectoryName(DirectoryName(DirectoryName(path))) : DirectoryName(DirectoryName(path)); // folder_path should also start with |kPkgPrefix| and should not be equal // to |kPkgPrefix|. if (strncmp(folder_path.c_str(), kPkgPrefix, strlen(kPkgPrefix)) != 0 || folder_path == fbl::String(kPkgPrefix)) { return; } const char* package_name = path.c_str() + strlen(kPkgPrefix); // find occurence of first '/' size_t i = 0; while (package_name[i] != '\0' && package_name[i] != '/') { i++; } const fbl::String package_name_str(package_name, i); const auto test_file_name = BaseName(path); *v1_info_out = { .component_url = fbl::StringPrintf("fuchsia-pkg://fuchsia.com/%s#meta/%s.cmx", package_name_str.c_str(), test_file_name.c_str()), .manifest_path = fbl::StringPrintf("%s/meta/%s.cmx", folder_path.c_str(), test_file_name.c_str())}; *v2_info_out = { .component_url = fbl::StringPrintf("fuchsia-pkg://fuchsia.com/%s#meta/%s.cm", package_name_str.c_str(), test_file_name.c_str()), .manifest_path = fbl::StringPrintf("%s/meta/%s.cm", folder_path.c_str(), test_file_name.c_str())}; ; } // If test is a component, this function will find appropriate component executor and modify launch // arguments. // Retuns: // |true|: if test is not a component, or if test is a component and it can find correct component // executor. // |false|: if setup fails. bool SetUpForTestComponent(const char* argv[], size_t argc, fbl::String* out_component_url, fbl::String* out_component_executor) { // Values used when running the test as a component. ComponentInfo v1_info, v2_info; const char* test_path = argv[0]; TestFileComponentInfo(test_path, &v1_info, &v2_info); // If we get a non empty |cmx_file_path|, check that it exists, and if // present launch the test as component using generated |component_url|. if (v1_info.manifest_path == "") { // test is not a component. return true; } struct stat s; const char* component_executor = ""; fbl::String component_url; // cmx file is present if (stat(v1_info.manifest_path.c_str(), &s) == 0) { component_executor = kRunTestComponentPath; component_url = v1_info.component_url; } else if (stat(v2_info.manifest_path.c_str(), &s) == 0) { // cm file is present component_executor = kRunTestSuitePath; component_url = v2_info.component_url; } else { // Can't find either cmx or cm file, this test is not a component. return true; } // Check whether the executor is present and print a more helpful error, rather than failing later // in the fdio_spawn_etc call if (stat(component_executor, &s) == 0) { *out_component_executor = component_executor; *out_component_url = std::move(component_url); } else { fprintf(stderr, "FAILURE: Cannot find '%s', cannot run %s as component." "binary.", component_executor, test_path); return false; } return true; } std::unique_ptr<Result> RunTest(const char* argv[], const char* output_dir, const char* output_filename, const char* test_name, uint64_t timeout_msec) { // The arguments passed to fdio_spawn_etc. May be overridden. const char** args = argv; // calculate size of argv size_t argc = 0; while (argv[argc] != nullptr) { argc++; } const char* path = argv[0]; fbl::String component_url; fbl::String component_executor; if (!SetUpForTestComponent(argv, argc, &component_url, &component_executor)) { return std::make_unique<Result>(path, FAILED_TO_LAUNCH, 0, 0); } const char* component_launch_args[argc + 2]; if (component_url.length() > 0) { component_launch_args[0] = component_executor.c_str(); component_launch_args[1] = component_url.c_str(); for (size_t i = 1; i <= argc; i++) { component_launch_args[1 + i] = argv[i]; } args = component_launch_args; } // Truncate the name on the left so the more important stuff on the right part of the path stays // in the name. const char* test_name_trunc = test_name; size_t test_name_length = strlen(test_name_trunc); if (test_name_length > ZX_MAX_NAME_LEN - 1) { test_name_trunc += test_name_length - (ZX_MAX_NAME_LEN - 1); } fbl::Vector<fdio_spawn_action_t> fdio_actions = { fdio_spawn_action_t{.action = FDIO_SPAWN_ACTION_SET_NAME, .name = {.data = test_name_trunc}}, }; zx_status_t status; zx::channel svc_proxy_req; fbl::RefPtr<ServiceProxyDir> proxy_dir; std::unique_ptr<fs::SynchronousVfs> vfs; // This must be declared after the vfs so that its destructor gets called before the vfs // destructor. We do this explicitly at the end of the function in the non-error case, but in // error cases we just rely on the destructors to clean things up. async::Loop loop{&kAsyncLoopConfigNoAttachToCurrentThread}; std::unique_ptr<debugdata::DebugData> debug_data; // Export the root namespace. fdio_flat_namespace_t* flat; if ((status = fdio_ns_export_root(&flat)) != ZX_OK) { fprintf(stderr, "FAILURE: Cannot export root namespace: %s\n", zx_status_get_string(status)); return std::make_unique<Result>(path, FAILED_UNKNOWN, 0, 0); } auto action_ns_entry = [](const char* prefix, zx_handle_t handle) { return fdio_spawn_action{.action = FDIO_SPAWN_ACTION_ADD_NS_ENTRY, .ns = { .prefix = prefix, .handle = handle, }}; }; // If |output_dir| is provided, set up the loader and debugdata services that will be // used to capture any data published. if (output_dir != nullptr) { fbl::unique_fd root_dir_fd{open("/", O_RDONLY | O_DIRECTORY)}; if (!root_dir_fd) { fprintf(stderr, "FAILURE: Could not open root directory /\n"); return std::make_unique<Result>(path, FAILED_UNKNOWN, 0, 0); } zx::channel svc_proxy; status = zx::channel::create(0, &svc_proxy, &svc_proxy_req); if (status != ZX_OK) { fprintf(stderr, "FAILURE: Cannot create channel: %s\n", zx_status_get_string(status)); return std::make_unique<Result>(path, FAILED_UNKNOWN, 0, 0); } zx::channel svc_handle; for (size_t i = 0; i < flat->count; ++i) { if (!strcmp(flat->path[i], "/svc")) { // Save the current /svc handle... svc_handle.reset(flat->handle[i]); // ...and replace it with the proxy /svc. fdio_actions.push_back(action_ns_entry("/svc", svc_proxy_req.get())); } else { fdio_actions.push_back(action_ns_entry(flat->path[i], flat->handle[i])); } } // Setup DebugData service implementation. debug_data = std::make_unique<debugdata::DebugData>(std::move(root_dir_fd)); // Setup proxy dir. proxy_dir = fbl::MakeRefCounted<ServiceProxyDir>(std::move(svc_handle)); auto node = fbl::MakeRefCounted<fs::Service>( [dispatcher = loop.dispatcher(), debug_data = debug_data.get()](zx::channel channel) { return fidl::Bind(dispatcher, std::move(channel), debug_data); }); proxy_dir->AddEntry(::llcpp::fuchsia::debugdata::DebugData::Name, node); // Setup VFS. vfs = std::make_unique<fs::SynchronousVfs>(loop.dispatcher()); vfs->ServeDirectory(std::move(proxy_dir), std::move(svc_proxy), fs::Rights::ReadWrite()); loop.StartThread(); } else { for (size_t i = 0; i < flat->count; ++i) { fdio_actions.push_back(action_ns_entry(flat->path[i], flat->handle[i])); } } // If |output_filename| is provided, prepare the file descriptors that will // be used to tee the stdout/stderr of the test into the associated file. fbl::unique_fd fds[2]; if (output_filename != nullptr) { int temp_fds[2] = {-1, -1}; if (pipe(temp_fds)) { fprintf(stderr, "FAILURE: Failed to create pipe: %s\n", strerror(errno)); return std::make_unique<Result>(test_name, FAILED_TO_LAUNCH, 0, 0); } fds[0].reset(temp_fds[0]); fds[1].reset(temp_fds[1]); fdio_actions.push_back( fdio_spawn_action{.action = FDIO_SPAWN_ACTION_CLONE_FD, .fd = {.local_fd = fds[1].get(), .target_fd = STDOUT_FILENO}}); fdio_actions.push_back( fdio_spawn_action{.action = FDIO_SPAWN_ACTION_TRANSFER_FD, .fd = {.local_fd = fds[1].get(), .target_fd = STDERR_FILENO}}); } zx::job test_job; status = zx::job::create(*zx::job::default_job(), 0, &test_job); if (status != ZX_OK) { fprintf(stderr, "FAILURE: zx::job::create() returned %d\n", status); return std::make_unique<Result>(test_name, FAILED_TO_LAUNCH, 0, 0); } auto auto_call_kill_job = fbl::MakeAutoCall([&test_job]() { test_job.kill(); }); status = test_job.set_property(ZX_PROP_NAME, "run-test", sizeof("run-test")); if (status != ZX_OK) { fprintf(stderr, "FAILURE: set_property() returned %d\n", status); return std::make_unique<Result>(test_name, FAILED_TO_LAUNCH, 0, 0); } // The TEST_ROOT_DIR environment variable allows tests that could be stored in // "/system" or "/boot" to discern where they are running, and modify paths // accordingly. // // TODO(BLD-463): The hard-coded set of prefixes is not ideal. Ideally, this // would instead set the "root" to the parent directory of the "test/" // subdirectory where globbing was done to collect the set of tests in // DiscoverAndRunTests(). But then it's not clear what should happen if // using `-f` to provide a list of paths instead of directories to glob. const fbl::String root = RootName(path); // |root_var| must be kept alive for |env_vars| since |env_vars| may hold // a pointer into it. fbl::String root_var; fbl::Vector<const char*> env_vars; if (root == "/system" || root == "/boot") { for (size_t i = 0; environ[i] != nullptr; ++i) { env_vars.push_back(environ[i]); } root_var = fbl::String::Concat({"TEST_ROOT_DIR=", root}); env_vars.push_back(root_var.c_str()); env_vars.push_back(nullptr); } const char* const* env_vars_p = !env_vars.is_empty() ? env_vars.begin() : nullptr; fds[1].release(); // To avoid double close since fdio_spawn_etc() closes it. zx::process process; char err_msg[FDIO_SPAWN_ERR_MSG_MAX_LENGTH]; const zx::time start_time = zx::clock::get_monotonic(); status = fdio_spawn_etc(test_job.get(), FDIO_SPAWN_CLONE_ALL & ~FDIO_SPAWN_CLONE_NAMESPACE, args[0], args, env_vars_p, fdio_actions.size(), fdio_actions.data(), process.reset_and_get_address(), err_msg); if (status != ZX_OK) { fprintf(stderr, "FAILURE: Failed to launch %s: %d (%s): %s\n", test_name, status, zx_status_get_string(status), err_msg); return std::make_unique<Result>(test_name, FAILED_TO_LAUNCH, 0, 0); } // Tee output. if (output_filename != nullptr) { FILE* output_file = fopen(output_filename, "w"); if (output_file == nullptr) { fprintf(stderr, "FAILURE: Could not open output file at %s: %s\n", output_filename, strerror(errno)); return std::make_unique<Result>(test_name, FAILED_DURING_IO, 0, 0); } char buf[1024]; ssize_t bytes_read = 0; while ((bytes_read = read(fds[0].get(), buf, sizeof(buf))) > 0) { fwrite(buf, 1, bytes_read, output_file); fwrite(buf, 1, bytes_read, stdout); } fflush(stdout); fflush(stderr); fflush(output_file); if (fclose(output_file)) { fprintf(stderr, "FAILURE: Could not close %s: %s", output_filename, strerror(errno)); return std::make_unique<Result>(test_name, FAILED_DURING_IO, 0, 0); } } zx::time deadline = zx::time::infinite(); if (timeout_msec) { deadline = zx::deadline_after(zx::msec(timeout_msec)); } status = process.wait_one(ZX_PROCESS_TERMINATED, deadline, nullptr); const zx::time end_time = zx::clock::get_monotonic(); const int64_t duration_milliseconds = (end_time - start_time).to_msecs(); if (status != ZX_OK) { fprintf(stderr, "FAILURE: Failed to wait for process exiting %s: %d\n", test_name, status); if (status == ZX_ERR_TIMED_OUT) { return std::make_unique<Result>(test_name, TIMED_OUT, 0, duration_milliseconds); } return std::make_unique<Result>(test_name, FAILED_TO_WAIT, 0, duration_milliseconds); } // Read the return code. zx_info_process_t proc_info; status = process.get_info(ZX_INFO_PROCESS, &proc_info, sizeof(proc_info), nullptr, nullptr); if (status != ZX_OK) { fprintf(stderr, "FAILURE: Failed to get process return code %s: %d\n", test_name, status); return std::make_unique<Result>(test_name, FAILED_TO_RETURN_CODE, 0, duration_milliseconds); } std::unique_ptr<Result> result; if (proc_info.return_code == 0) { fprintf(stderr, "PASSED: %s passed\n", test_name); result = std::make_unique<Result>(test_name, SUCCESS, 0, duration_milliseconds); } else { fprintf(stderr, "FAILURE: %s exited with nonzero status: %" PRId64 "\n", test_name, proc_info.return_code); result = std::make_unique<Result>(test_name, FAILED_NONZERO_RETURN_CODE, proc_info.return_code, duration_milliseconds); } if (output_dir == nullptr) { return result; } // Make sure that all job processes are dead before touching any data. auto_call_kill_job.call(); // Stop the loop. loop.Quit(); // Wait for any unfinished work to be completed. loop.JoinThreads(); // Run one more time until there are no unprocessed messages. loop.ResetQuit(); loop.Run(zx::time(0)); // Tear down the the VFS. vfs.reset(); fbl::unique_fd data_sink_dir_fd{open(output_dir, O_RDONLY | O_DIRECTORY)}; if (!data_sink_dir_fd) { printf("FAILURE: Could not open output directory %s: %s\n", output_dir, strerror(errno)); return result; } for (auto& data : debug_data->GetData()) { if (auto dump_file = ProcessDataSinkDump(data, data_sink_dir_fd, path)) { result->data_sinks[data.sink_name].push_back(*dump_file); } else if (result->return_code == 0) { result->launch_status = FAILED_COLLECTING_SINK_DATA; } } return result; } } // namespace runtests
PaulWang1905/tensorflow
tensorflow/core/framework/graph_to_functiondef.h
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_CORE_FRAMEWORK_GRAPH_TO_FUNCTIONDEF_H_ #define TENSORFLOW_CORE_FRAMEWORK_GRAPH_TO_FUNCTIONDEF_H_ #include "absl/types/optional.h" #include "tensorflow/core/framework/function.h" #include "tensorflow/core/graph/graph.h" #include "tensorflow/core/lib/core/status.h" namespace tensorflow { // Converts 'graph' to a FunctionDef 'fdef', with name 'name': // // (1) 'node->IsArg()' nodes converted to function inputs. // (2) 'node->IsRetval()' nodes converted to function output. // (3) 'control_ret' returns an optional with a control output name, that will // be added to the function `control_ret` map (see FunctionDef) and // `control_output` in Op definition (see OpDef). Control output name must // be unique for all control output nodes. // // Closely modeled on the Python code in tensorflow/python/framework/function.py Status GraphToFunctionDef( const Graph& graph, const string& name, const std::function<absl::optional<string>(const Node*)>& control_ret, FunctionDef* fdef); Status GraphToFunctionDef(const Graph& graph, const string& name, FunctionDef* fdef); } // namespace tensorflow #endif // TENSORFLOW_CORE_FRAMEWORK_GRAPH_TO_FUNCTIONDEF_H_
nicolasrosa/StereoVision
Eclipse/reprojectImageTo3D_calibON_bm/src/reprojectImageTo3D.h
/* * reprojectImageTo3D.h * * Created on: Jun 18, 2015 * Author: nicolasrosa */ #ifndef reproject_Image_To_3D_LIB_H_ #define reproject_Image_To_3D_LIB_H_ /* Libraries */ #include "cv.h" #include "highgui.h" #include "cvaux.h" #include "stdio.h" #include "opencv2/opencv.hpp" #include "trackObject.h" using namespace cv; using namespace std; /* Calibration */ #define RESOLUTION_640x480 //#define RESOLUTION_1280x720 #define CALIBRATION_ON /* Threshold, Erosion, Dilation and Blur Constants */ #define THRESH_VALUE 100 #define EROSION_SIZE 5 //SAR #define DILATION_SIZE 5 //SAR #define BLUR_SIZE 3 /* Custom Classes*/ class StereoProcessor{ public: StereoProcessor(int inputNum); //Constructor int getInputNum(); private: int inputNum; //float percentageOfDeletion; }; StereoProcessor::StereoProcessor(int number){ inputNum=number; } int StereoProcessor::getInputNum(){ return inputNum; } class ConfigFile{ public: string intrinsicsFileName; string extrinsicsFileName; string QmatrixFileName; public: void readConfigFile(ConfigFile *cfg); }; void ConfigFile::readConfigFile(ConfigFile* cfg){ FileStorage fs("config.yml", FileStorage::READ); if(!fs.isOpened()){ printf("Failed to open config.yml file.\n"); return; } fs["Intrinsics Path"] >> cfg->intrinsicsFileName; fs["Extrinsics Path"] >> cfg->extrinsicsFileName; fs["Q Matrix Path"] >> cfg->QmatrixFileName; fs.release(); cout << "Intrinsics Path: " << cfg->intrinsicsFileName << endl; cout << "Extrinsics Path: " << cfg->extrinsicsFileName << endl; cout << "Q Matrix Path: " << cfg->QmatrixFileName << endl; cout << "Config.yml Read Successfully." << endl << endl ; } /* Functions Scope */ void on_trackbar(int,void*); void createTrackbars(); void printHelp(); void openStereoSource(int inputNum,VideoCapture* capL,VideoCapture* capR,Mat* imageL,Mat* imageR); void stereoInit(StereoBM* bm); void stereoCalib(Mat &M1,Mat &D1,Mat &M2,Mat &D2,Mat &R,Mat &T,ConfigFile* cfg); void stereoSetparams(Rect* roi1,Rect* roi2,StereoBM* bm,int numRows,bool showStereoBMparams); void readQMatrix(Mat &Q,double* focalLength, double* baseline,ConfigFile* cfg); void calculateQMatrix(Mat &Q,Point2d imageCenter,double focalLength, double baseline); void imageProcessing1(Mat img, Mat imgMedian, Mat imgMedianBGR); void imageProcessing2(Mat src, Mat imgE, Mat imgED,Mat cameraFeedL,bool isTrackingObjects); void resizeFrame(Mat* frame1,Mat* frame2); void changeResolution(VideoCapture* cap_l,VideoCapture* cap_r); void contrast_and_brightness(Mat &left,Mat &right,float alpha,float beta); /* 3D Reconstruction Functions */ void eular2rot(double yaw,double pitch, double roll,Mat& dest); void lookat(Point3d from, Point3d to, Mat& destR); void projectImagefromXYZ(Mat &image, Mat &destimage, Mat &disp, Mat &destdisp, Mat &xyz, Mat &R, Mat &t, Mat &K, Mat &dist, bool isSub); void fillOcclusion(Mat& src, int invalidvalue, bool isInv); /* 3D Reconstruction Classes */ template <class T> static void projectImagefromXYZ_(Mat& image, Mat& destimage, Mat& disp, Mat& destdisp, Mat& xyz, Mat& R, Mat& t, Mat& K, Mat& dist, Mat& mask, bool isSub); template <class T> static void fillOcclusionInv_(Mat& src, T invalidvalue); template <class T> static void fillOcclusion_(Mat& src, T invalidvalue); /* Global Variables */ const string trackbarWindowName = "Stereo Param Setup"; const double focal_length = 752.093; const double baseline = -2.61138; bool isVideoFile=false,isImageFile=false,needCalibration=false,isTrackingObjects=true; bool showInputImage=true,showXYZ=false,showStereoParams=false,showFPS=false,showDisparityMap=false,show3Dreconstruction=false,showDiffImage=false; /* Trackbars Variables * Initial min and max BM Parameters values.These will be changed using trackbars */ int preFilterSize = 50; const int preFilterSize_MAX = 100; int preFilterCap = 100; const int preFilterCap_MAX = 100; int SADWindowSize = 25; const int SADWindowSize_MAX = 100; int minDisparity = 47; const int minDisparity_MAX = 100; int numberOfDisparities = 3; const int numberOfDisparities_MAX = 16; int textureThreshold = 30; const int textureThreshold_MAX = 100; int uniquenessRatio = 0; const int uniquenessRatio_MAX = 100; int speckleWindowSize = 0; const int speckleWindowSize_MAX = 100; int speckleRange = 0; const int speckleRange_MAX = 100; int disp12MaxDiff = 1; const int disp12MaxDiff_MAX = 1; #endif /* reproject_Image_To_3D_LIB_H_ */
MaddTheSane/MacPaf
src/TestData.java
<gh_stars>1-10 import java.util.GregorianCalendar; import com.redbugz.maf.Family; import com.redbugz.maf.Gender; import com.redbugz.maf.Individual; import com.redbugz.maf.test.MyIndividual; import com.redbugz.maf.test.TestFamily; /** * Created by IntelliJ IDEA. * User: logan * Date: Sep 14, 2003 * Time: 2:59:52 PM * To change this template use Options | File Templates. */ public class TestData { Individual primary = new MyIndividual("Test Data", "Person", Gender.MALE); Individual spouse = new MyIndividual("Spouse", "Maiden", Gender.FEMALE); Individual child1 = new MyIndividual("Child One Son", "Person", Gender.MALE); Individual child2 = new MyIndividual("Child Two Daughter", "Person", Gender.FEMALE); Individual mom = new MyIndividual("Mother", "Maiden", Gender.FEMALE); Individual dad = new MyIndividual("Father", "Person", Gender.MALE); Individual aunt = new MyIndividual("Aunt \"Auntie\"", "Person", Gender.FEMALE); Individual paternalGrandpa = new MyIndividual("Grandpa", "Person", Gender.MALE); Individual paternalGrandma = new MyIndividual("Grandma", "Maiden", Gender.FEMALE); Individual paternalGrandma2 = new MyIndividual("Grandma Two", "Maiden", Gender.FEMALE); Individual maternalGrandpa = new MyIndividual("Gramps", "Maiden", Gender.MALE); Individual maternalGrandma = new MyIndividual("Granny", "<NAME>", Gender.FEMALE); Family primaryFam = new TestFamily(primary, spouse, new Individual[] {child1, child2} , new GregorianCalendar(2000, 6, 23).getTime()); Family mom_dad = new TestFamily(dad, mom, new Individual[] {primary} , null); Family paternalGrandparents = new TestFamily(paternalGrandpa, paternalGrandma, new Individual[] {aunt} , null); Family paternalGrandparents2 = new TestFamily(paternalGrandpa, paternalGrandma2, new Individual[] {dad} , null); Family maternalGrandparents = new TestFamily(maternalGrandpa, maternalGrandma, new Individual[] {mom} , null); }
litongjava/java-ee-jfinal-study
java-ee-jfinal-4.9-study/jfinal-4.9-ppnt-jfinal-swagger-api/src/main/java/top/ppnt/jfinal/swagger/PpntSwaggerApp.java
<gh_stars>0 package top.ppnt.jfinal.swagger; import com.jfinal.server.undertow.UndertowServer; import top.ppnt.jfinal.swagger.config.AppConfig; public class PpntSwaggerApp { public static void main(String[] args) { UndertowServer.start(AppConfig.class); } }
nmcl/wfswarm-example-arjuna-old
graalvm/transactions/fork/narayana/ArjunaJTA/jdbc/tests/classes/com/hp/mwtests/ts/jdbc/basic/JDBC2Test.java
/* * JBoss, Home of Professional Open Source * Copyright 2006, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. * See the copyright.txt in the distribution for a * full listing of individual contributors. * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions * of the GNU Lesser General Public License, v. 2.1. * This program is distributed in the hope that it will be useful, but WITHOUT A * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public License, * v.2.1 along with this distribution; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. * * (C) 2005-2006, * @author JBoss Inc. */ /* * Copyright (C) 1998, 1999, 2000, * * Arjuna Solutions Limited, * Newcastle upon Tyne, * Tyne and Wear, * UK. * * $Id: JDBC2Test.java 2342 2006-03-30 13:06:17Z $ */ package com.hp.mwtests.ts.jdbc.basic; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.Properties; import javax.sql.XADataSource; import org.h2.Driver; import org.h2.jdbcx.JdbcDataSource; import org.junit.Before; import org.junit.Test; import com.arjuna.ats.internal.jdbc.DynamicClass; import com.arjuna.ats.jdbc.TransactionalDriver; public class JDBC2Test { protected Connection conn = null; protected Connection conn2 = null; protected boolean commit = true; protected boolean nested = false; protected boolean reuseconn = false; protected Properties dbProperties = null; protected String url = null; @Before public void setup() throws Exception { url = "jdbc:arjuna:"; Properties p = System.getProperties(); p.put("jdbc.drivers", Driver.class.getName()); System.setProperties(p); DriverManager.registerDriver(new TransactionalDriver()); dbProperties = new Properties(); JdbcDataSource ds = new JdbcDataSource(); ds.setURL("jdbc:h2:./h2/foo"); dbProperties.put(TransactionalDriver.XADataSource, ds); conn = DriverManager.getConnection(url, dbProperties); conn2 = DriverManager.getConnection(url, dbProperties); } @Test public void test() throws Exception { Statement stmt = null; // non-tx statement Statement stmtx = null; // will be a tx-statement stmt = conn.createStatement(); // non-tx statement try { stmt.executeUpdate("DROP TABLE test_table"); stmt.executeUpdate("DROP TABLE test_table2"); } catch (Exception e) { // Ignore } stmt.executeUpdate("CREATE TABLE test_table (a INTEGER,b INTEGER)"); stmt.executeUpdate("CREATE TABLE test_table2 (a INTEGER,b INTEGER)"); javax.transaction.UserTransaction tx = com.arjuna.ats.jta.UserTransaction.userTransaction(); try { System.out.println("Starting top-level transaction."); tx.begin(); if (nested) { System.out.println("Starting nested transaction."); tx.begin(); } stmtx = conn.createStatement(); // will be a tx-statement try { System.out.println("\nAdding entries to table 1."); stmtx.executeUpdate("INSERT INTO test_table (a, b) VALUES (1,2)"); ResultSet res1 = null; System.out.println("\nInspecting table 1."); res1 = stmtx.executeQuery("SELECT * FROM test_table"); int rowCount = 0; while (res1.next()) { System.out.println("Column 1: " + res1.getInt(1)); System.out.println("Column 2: " + res1.getInt(2)); rowCount++; } if ( rowCount != 1) { throw new Exception("Number of rows = "+rowCount+", test was expecting 1"); } System.out.println("\nAdding entries to table 2."); stmtx.executeUpdate("INSERT INTO test_table2 (a, b) VALUES (3,4)"); res1 = stmtx.executeQuery("SELECT * FROM test_table2"); System.out.println("\nInspecting table 2."); rowCount = 0; while (res1.next()) { System.out.println("Column 1: " + res1.getInt(1)); System.out.println("Column 2: " + res1.getInt(2)); rowCount++; } if ( rowCount != 1 ) { throw new Exception("Row count = "+rowCount+", test was expecting 1"); } } catch (SQLException e) { e.printStackTrace(System.err); tx.rollback(); if (nested) tx.rollback(); try { conn.close(); } catch (Exception ex) { } fail(); } catch (Exception e) { e.printStackTrace(System.err); if (nested) tx.rollback(); tx.rollback(); try { conn.close(); } catch (Exception ex) { } fail(); } System.out.print("\nNow attempting to "); if (commit) { System.out.print("commit "); tx.commit(); } else { System.out.print("rollback "); tx.rollback(); } System.out.println("changes."); System.out.println("\nNow checking state of table 1."); tx.begin(); if (!reuseconn) { conn = DriverManager.getConnection(url, dbProperties); } stmtx = conn.createStatement(); ResultSet res2 = null; res2 = stmtx.executeQuery("SELECT * FROM test_table"); int rowCount = 0; while (res2.next()) { System.out.println("Column 1: " + res2.getInt(1)); System.out.println("Column 2: " + res2.getInt(2)); rowCount++; } if ( commit ) { if ( rowCount != 1 ) { throw new Exception("Committed row count = "+rowCount+", test expected 1"); } } else { if ( rowCount != 0 ) { throw new Exception("Rolledback row count = "+rowCount+", test expected 0"); } } conn.close(); // connections must be closed before committing a JTA transaction tx.commit(); tx.begin(); assertTrue(conn.isClosed()); if (!reuseconn) { conn = DriverManager.getConnection(url, dbProperties); } System.out.println("\nNow checking state of table 2."); stmtx = conn.createStatement(); res2 = stmtx.executeQuery("SELECT * FROM test_table2"); rowCount = 0; while (res2.next()) { System.out.println("Column 1: " + res2.getInt(1)); System.out.println("Column 2: " + res2.getInt(2)); rowCount++; } if ( commit ) { if ( rowCount != 1 ) { throw new Exception("Committed row count = "+rowCount+", test expected 1"); } } else { if ( rowCount != 0 ) { throw new Exception("Rolledback row count = "+rowCount+", test expected 0"); } } tx.commit(); } catch (Exception ex) { try { tx.rollback(); } catch (Exception exp) { } fail(); } try { conn.close(); } catch (Exception e) { } } @Test public void testCloseUnused() throws Exception { assertFalse(conn.isClosed()); conn.close(); assertTrue(conn.isClosed()); } @Test public void testCloseUsed() throws Exception { javax.transaction.UserTransaction tx = com.arjuna.ats.jta.UserTransaction.userTransaction(); assertFalse(conn.isClosed()); tx.begin(); conn.createStatement().close(); assertFalse(conn.isClosed()); conn.close(); tx.commit(); assertTrue(conn.isClosed()); } }
jlbrewe/hub
manager/projects/migrations/0024_auto_20201206_0819.py
<filename>manager/projects/migrations/0024_auto_20201206_0819.py # Generated by Django 3.1.4 on 2020-12-06 08:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('projects', '0023_auto_20201202_0349'), ] operations = [ migrations.AlterField( model_name='review', name='status', field=models.CharField(choices=[('PENDING', 'Pending'), ('REQUESTED', 'Requested'), ('CANCELLED', 'Cancelled'), ('ACCEPTED', 'Accepted'), ('DECLINED', 'Declined'), ('COMPLETED', 'Completed'), ('EXTRACTING', 'Retrieval in progress'), ('EXTRACTED', 'Retrieved'), ('FAILED', 'Retrieval failed'), ('REGISTERED', 'Registered')], default='PENDING', help_text='The status of the review.', max_length=16), ), ]
jwillemsen/sidecar
GUI/Preset.cc
#include "QtCore/QSettings" #include "QtCore/QStringList" #include "LogUtils.h" #include "Preset.h" #include "PresetManager.h" #include "Setting.h" using namespace SideCar::GUI; Logger::Log& Preset::Log() { static Logger::Log& log_ = Logger::Log::Find("SideCar.GUI.Preset"); return log_; } Preset::Preset(const QString& name, PresetManager* parent) : QObject(parent), name_(name), values_(), dirty_(false) { Logger::ProcLog log("Preset", Log()); LOGINFO << name << std::endl; } Preset* Preset::duplicate(const QString& name) { Preset* preset = new Preset(name, getParent()); preset->values_ = values_; return preset; } void Preset::setValue(int index, const QVariant& value) { static Logger::ProcLog log("setValue", Log()); LOGINFO << name_ << std::endl; while (values_.size() <= index) values_.append(QVariant()); if (value == values_[index]) { ; } else if (!values_[index].isValid()) { values_[index] = value; } else { if (!getParent()->isRestoring() && !dirty_) { LOGDEBUG << "*** Preset: " << name_ << " setting: " << getParent()->getSetting(index)->getName() << " old: '" << values_[index].toString() << "' (" << values_[index].typeName() << ") new: '" << value.toString() << "' (" << value.typeName() << ")" << std::endl; dirty_ = true; } values_[index] = value; } } void Preset::save(QSettings& file, const QStringList& names) { static Logger::ProcLog log("save", Log()); LOGINFO << "name: " << name_ << std::endl; file.beginGroup(name_); { for (int index = 0; index < names.size(); ++index) { LOGINFO << "name: " << names[index] << " value: " << values_[index].toString() << std::endl; file.setValue(names[index], values_[index]); } } file.endGroup(); dirty_ = false; } void Preset::restore(QSettings& file, const QList<Setting*>& settings, bool apply) { static Logger::ProcLog log("restore", Log()); LOGINFO << "restoring " << name_ << " apply: " << apply << std::endl; values_.clear(); bool isOldVersion = getParent()->isOldVersion(); file.beginGroup(name_); { for (int index = 0; index < settings.size(); ++index) { const QString& name = settings[index]->getName(); QVariant value = file.value(name); bool doApply = apply; if (!value.isValid()) { doApply = false; value = settings[index]->getOpaqueValue(); } else if (isOldVersion) { value = getParent()->upgradeSetting(name, value); } LOGDEBUG << "name: " << name << " value: " << value.toString() << " doApply: " << doApply << std::endl; values_.append(value); if (doApply) settings[index]->restoreValue(value); } } file.endGroup(); dirty_ = false; } void Preset::restoreOne(QSettings& file, Setting* setting) { static Logger::ProcLog log("restoreOne", Log()); LOGINFO << "restoring " << name_ << std::endl; file.beginGroup(name_); { QVariant value = file.value(setting->getName()); bool ok = value.isValid(); if (!ok) value = setting->getOpaqueValue(); LOGDEBUG << "name: " << setting->getName() << " value: " << value.toString() << std::endl; values_.append(value); if (ok) setting->restoreValue(value); } file.endGroup(); } void Preset::apply(const QList<Setting*>& settings) { static Logger::ProcLog log("apply", Log()); LOGINFO << "name: " << name_ << std::endl; for (int index = 0; index < settings.size(); ++index) { settings[index]->restoreValue(values_[index]); } } PresetManager* Preset::getParent() const { return qobject_cast<PresetManager*>(parent()); } void Preset::expand(int index, const QVariant& value) { while (values_.size() < index) values_.append(QVariant()); values_.append(value); }
dplbsd/soc2013
head/contrib/ntp/sntp/libopts/putshell.c
/* * $Id: putshell.c,v 4.18 2007/02/04 17:44:12 bkorb Exp $ * Time-stamp: "2007-01-13 10:29:39 bkorb" * * This module will interpret the options set in the tOptions * structure and print them to standard out in a fashion that * will allow them to be interpreted by the Bourne or Korn shells. */ /* * Automated Options copyright 1992-2007 <NAME> * * Automated Options is free software. * You may redistribute it and/or modify it under the terms of the * GNU General Public License, as published by the Free Software * Foundation; either version 2, or (at your option) any later version. * * Automated Options is distributed in the hope that 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 Automated Options. See the file "COPYING". If not, * write to: The Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * As a special exception, Bruce Korb gives permission for additional * uses of the text contained in his release of AutoOpts. * * The exception is that, if you link the AutoOpts library with other * files to produce an executable, this does not by itself cause the * resulting executable to be covered by the GNU General Public License. * Your use of that executable is in no way restricted on account of * linking the AutoOpts library code into it. * * This exception does not however invalidate any other reasons why * the executable file might be covered by the GNU General Public License. * * This exception applies only to the code released by Bruce Korb under * the name AutoOpts. If you copy code from other sources under the * General Public License into a copy of AutoOpts, as the General Public * License permits, the exception does not apply to the code that you add * in this way. To avoid misleading anyone as to the status of such * modified files, you must delete this exception notice from them. * * If you write modifications of your own for AutoOpts, it is your choice * whether to permit this exception to apply to your modifications. * If you do not wish that, delete this exception notice. */ /* = = = START-STATIC-FORWARD = = = */ /* static forward declarations maintained by :mkfwd */ static void putQuotedStr( tCC* pzStr ); /* = = = END-STATIC-FORWARD = = = */ /* * Make sure embedded single quotes come out okay. The initial quote has * been emitted and the closing quote will be upon return. */ static void putQuotedStr( tCC* pzStr ) { /* * Handle empty strings to make the rest of the logic simpler. */ if ((pzStr == NULL) || (*pzStr == NUL)) { fputs( "''", stdout ); return; } /* * Emit any single quotes/apostrophes at the start of the string and * bail if that is all we need to do. */ while (*pzStr == '\'') { fputs( "\\'", stdout ); pzStr++; } if (*pzStr == NUL) return; /* * Start the single quote string */ fputc( '\'', stdout ); for (;;) { tCC* pz = strchr( pzStr, '\'' ); if (pz == NULL) break; /* * Emit the string up to the single quote (apostrophe) we just found. */ (void)fwrite( pzStr, (size_t)(pz - pzStr), (size_t)1, stdout ); fputc( '\'', stdout ); pzStr = pz; /* * Emit an escaped apostrophe for every one we find. * If that ends the string, do not re-open the single quotes. */ while (*++pzStr == '\'') fputs( "\\'", stdout ); if (*pzStr == NUL) return; fputc( '\'', stdout ); } /* * If we broke out of the loop, we must still emit the remaining text * and then close the single quote string. */ fputs( pzStr, stdout ); fputc( '\'', stdout ); } /*=export_func optionPutShell * what: write a portable shell script to parse options * private: * arg: tOptions*, pOpts, the program options descriptor * doc: This routine will emit portable shell script text for parsing * the options described in the option definitions. =*/ void optionPutShell( tOptions* pOpts ) { int optIx = 0; tSCC zOptCtFmt[] = "OPTION_CT=%d\nexport OPTION_CT\n"; tSCC zOptNumFmt[] = "%1$s_%2$s=%3$d # 0x%3$X\nexport %1$s_%2$s\n"; tSCC zOptDisabl[] = "%1$s_%2$s=%3$s\nexport %1$s_%2$s\n"; tSCC zOptValFmt[] = "%s_%s="; tSCC zOptEnd[] = "\nexport %s_%s\n"; tSCC zFullOptFmt[]= "%1$s_%2$s='%3$s'\nexport %1$s_%2$s\n"; tSCC zEquivMode[] = "%1$s_%2$s_MODE='%3$s'\nexport %1$s_%2$s_MODE\n"; printf( zOptCtFmt, pOpts->curOptIdx-1 ); do { tOptDesc* pOD = pOpts->pOptDesc + optIx; if (SKIP_OPT(pOD)) continue; /* * Equivalence classes are hard to deal with. Where the * option data wind up kind of squishes around. For the purposes * of emitting shell state, they are not recommended, but we'll * do something. I guess we'll emit the equivalenced-to option * at the point in time when the base option is found. */ if (pOD->optEquivIndex != NO_EQUIVALENT) continue; /* equivalence to a different option */ /* * Equivalenced to a different option. Process the current option * as the equivalenced-to option. Keep the persistent state bits, * but copy over the set-state bits. */ if (pOD->optActualIndex != optIx) { tOptDesc* p = pOpts->pOptDesc + pOD->optActualIndex; p->optArg = pOD->optArg; p->fOptState &= OPTST_PERSISTENT_MASK; p->fOptState |= pOD->fOptState & ~OPTST_PERSISTENT_MASK; printf( zEquivMode, pOpts->pzPROGNAME, pOD->pz_NAME, p->pz_NAME ); pOD = p; } /* * If the argument type is a set membership bitmask, then we always * emit the thing. We do this because it will always have some sort * of bitmask value and we need to emit the bit values. */ if (OPTST_GET_ARGTYPE(pOD->fOptState) == OPARG_TYPE_MEMBERSHIP) { char const * pz; uintptr_t val = 1; printf( zOptNumFmt, pOpts->pzPROGNAME, pOD->pz_NAME, (int)(uintptr_t)(pOD->optCookie) ); pOD->optCookie = (void*)(uintptr_t)~0UL; (*(pOD->pOptProc))( (tOptions*)2UL, pOD ); /* * We are building the typeset list. The list returned starts with * 'none + ' for use by option saving stuff. We must ignore that. */ pz = pOD->optArg.argString + 7; while (*pz != NUL) { printf( "typeset -x -i %s_", pOD->pz_NAME ); pz += strspn( pz, " +\t\n\f" ); for (;;) { int ch = *(pz++); if (islower( ch )) fputc( toupper( ch ), stdout ); else if (isalnum( ch )) fputc( ch, stdout ); else if (isspace( ch ) || (ch == '+')) goto name_done; else if (ch == NUL) { pz--; goto name_done; } else fputc( '_', stdout ); } name_done:; printf( "=%1$lu # 0x%1$lX\n", (unsigned long)val ); val <<= 1; } AGFREE(pOD->optArg.argString); pOD->optArg.argString = NULL; pOD->fOptState &= ~OPTST_ALLOC_ARG; continue; } /* * IF the option was either specified or it wakes up enabled, * then we will emit information. Otherwise, skip it. * The idea is that if someone defines an option to initialize * enabled, we should tell our shell script that it is enabled. */ if (UNUSED_OPT( pOD ) && DISABLED_OPT( pOD )) continue; /* * Handle stacked arguments */ if ( (pOD->fOptState & OPTST_STACKED) && (pOD->optCookie != NULL) ) { tSCC zOptCookieCt[] = "%1$s_%2$s_CT=%3$d\nexport %1$s_%2$s_CT\n"; tArgList* pAL = (tArgList*)pOD->optCookie; tCC** ppz = pAL->apzArgs; int ct = pAL->useCt; printf( zOptCookieCt, pOpts->pzPROGNAME, pOD->pz_NAME, ct ); while (--ct >= 0) { tSCC numarg_z[] = "%s_%s_%d="; tSCC end_z[] = "\nexport %s_%s_%d\n"; printf( numarg_z, pOpts->pzPROGNAME, pOD->pz_NAME, pAL->useCt - ct ); putQuotedStr( *(ppz++) ); printf( end_z, pOpts->pzPROGNAME, pOD->pz_NAME, pAL->useCt - ct ); } } /* * If the argument has been disabled, * Then set its value to the disablement string */ else if ((pOD->fOptState & OPTST_DISABLED) != 0) printf( zOptDisabl, pOpts->pzPROGNAME, pOD->pz_NAME, (pOD->pz_DisablePfx != NULL) ? pOD->pz_DisablePfx : "false" ); /* * If the argument type is numeric, the last arg pointer * is really the VALUE of the string that was pointed to. */ else if (OPTST_GET_ARGTYPE(pOD->fOptState) == OPARG_TYPE_NUMERIC) printf( zOptNumFmt, pOpts->pzPROGNAME, pOD->pz_NAME, (int)pOD->optArg.argInt ); /* * If the argument type is an enumeration, then it is much * like a text value, except we call the callback function * to emit the value corresponding to the "optArg" number. */ else if (OPTST_GET_ARGTYPE(pOD->fOptState) == OPARG_TYPE_ENUMERATION) { printf( zOptValFmt, pOpts->pzPROGNAME, pOD->pz_NAME ); fputc( '\'', stdout ); (*(pOD->pOptProc))( (tOptions*)1UL, pOD ); fputc( '\'', stdout ); printf( zOptEnd, pOpts->pzPROGNAME, pOD->pz_NAME ); } /* * If the argument type is numeric, the last arg pointer * is really the VALUE of the string that was pointed to. */ else if (OPTST_GET_ARGTYPE(pOD->fOptState) == OPARG_TYPE_BOOLEAN) printf( zFullOptFmt, pOpts->pzPROGNAME, pOD->pz_NAME, (pOD->optArg.argBool == 0) ? "false" : "true" ); /* * IF the option has an empty value, * THEN we set the argument to the occurrence count. */ else if ( (pOD->optArg.argString == NULL) || (pOD->optArg.argString[0] == NUL) ) printf( zOptNumFmt, pOpts->pzPROGNAME, pOD->pz_NAME, pOD->optOccCt ); /* * This option has a text value */ else { printf( zOptValFmt, pOpts->pzPROGNAME, pOD->pz_NAME ); putQuotedStr( pOD->optArg.argString ); printf( zOptEnd, pOpts->pzPROGNAME, pOD->pz_NAME ); } } while (++optIx < pOpts->presetOptCt ); if ( ((pOpts->fOptSet & OPTPROC_REORDER) != 0) && (pOpts->curOptIdx < pOpts->origArgCt)) { fputs( "set --", stdout ); for (optIx = pOpts->curOptIdx; optIx < pOpts->origArgCt; optIx++) { char* pzArg = pOpts->origArgVect[ optIx ]; if (strchr( pzArg, '\'' ) == NULL) printf( " '%s'", pzArg ); else { fputs( " '", stdout ); for (;;) { char ch = *(pzArg++); switch (ch) { case '\'': fputs( "'\\''", stdout ); break; case NUL: goto arg_done; default: fputc( ch, stdout ); break; } } arg_done:; fputc( '\'', stdout ); } } fputs( "\nOPTION_CT=0\n", stdout ); } } /* * Local Variables: * mode: C * c-file-style: "stroustrup" * indent-tabs-mode: nil * End: * end of autoopts/putshell.c */
gamladz/gamladz.github.io
node_modules/material-icons-svg/components/twotone/Gamepad.js
<gh_stars>0 "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const react_1 = __importDefault(require("react")); const ReactComponent = props => (react_1.default.createElement("svg", Object.assign({ viewBox: "0 0 24 24", width: "1em", height: "1em" }, props), react_1.default.createElement("path", { fill: "none", d: "M0 0h24v24H0V0z" }), react_1.default.createElement("g", null, react_1.default.createElement("path", { opacity: 0.3, d: "M6.67 11H4v2h2.67l1-1zM13 6.67V4h-2v2.67l1 1zM11 17.33V20h2v-2.67l-1-1zM16.33 12l1 1H20v-2h-2.67z" }), react_1.default.createElement("path", { d: "M9 16.5V22h6v-5.5l-3-3-3 3zm4 3.5h-2v-2.67l1-1 1 1V20zM15 7.5V2H9v5.5l3 3 3-3zM11 4h2v2.67l-1 1-1-1V4zM7.5 9H2v6h5.5l3-3-3-3zm-.83 4H4v-2h2.67l1 1-1 1zM16.5 9l-3 3 3 3H22V9h-5.5zm3.5 4h-2.67l-1-1 1-1H20v2z" })))); exports.default = ReactComponent;
rmehri01/Housing-Finder
core/src/test/scala/tokens/GeneratorSpec.scala
package tokens import cats.effect.{ExitCode, IO} import cats.implicits._ import dev.profunktor.auth.jwt.{JwtAuth, JwtSecretKey} import io.circe.Json import io.circe.testing.ArbitraryInstances import pdi.jwt.JwtClaim import suite.PureTestSuite import tokens.TokenGenerator._ import utilities.arbitraries._ class GeneratorSpec extends PureTestSuite with ArbitraryInstances { forAll { (j: Json, s: JwtSecretKey) => spec("Token is made and decoded successfully") { val c = JwtClaim(Json.obj(("claim", j)).toString) for { // Encoding and decoding the claim should result in the same JSON t <- mkToken(c, s) a = JwtAuth.hmac(s.value, algo) c <- decodeToken(t, a) } yield assert(c.value == j) } } spec("Main runs properly with default settings") { assert( TokenGenerator.run.unsafeRunSync == ExitCode.Success ).pure[IO] } }
tharindusathis/sourcecodes-of-CodeReadingTheOpenSourcePerspective
ace/tao/tao_idl/be/be_visitor_valuetype/valuetype_ci.cpp
// // valuetype_ci.cpp,v 1.2 1999/08/04 17:03:46 coryan Exp // // ============================================================================ // // = LIBRARY // TAO IDL // // = FILENAME // valuetype_ci.cpp // // = DESCRIPTION // Visitor generating code for Valuetypes in the client inline file // // = AUTHOR // <NAME> <<EMAIL>> // based on code from Aniruddha Gokhale // // ============================================================================ #include "idl.h" #include "idl_extern.h" #include "be.h" #include "be_visitor_valuetype.h" ACE_RCSID(be_visitor_valuetype, valuetype_ci, "valuetype_ci.cpp,v 1.2 1999/08/04 17:03:46 coryan Exp") // ************************************************** // Valuetype visitor for client inline // ************************************************** be_visitor_valuetype_ci::be_visitor_valuetype_ci (be_visitor_context *ctx) : be_visitor_valuetype (ctx), opt_accessor_ (0) { } be_visitor_valuetype_ci::~be_visitor_valuetype_ci (void) { } int be_visitor_valuetype_ci::visit_valuetype (be_valuetype *node) { TAO_OutStream *os; // output stream if (node->cli_inline_gen () || node->imported ()) return 0; // need to access it in visit_field () if (node->opt_accessor ()) this->opt_accessor_ = 1; os = this->ctx_->stream (); os->indent (); // start from the current indentation level // generate the constructors and destructor *os << "ACE_INLINE" << be_nl; *os << node->name () << "::" << node->local_name () << " () // default constructor" << be_nl; *os << "{}" << be_nl << be_nl; *os << "ACE_INLINE" << be_nl; *os << node->name () << "::~" << node->local_name () << " () // destructor" << be_nl; *os << "{}\n" << be_nl; *os << "ACE_INLINE const char* " << be_nl << node->name() << "::_tao_obv_static_repository_id ()" << be_nl << "{" << be_idt_nl << "return \"" << node->repoID () << "\";" << be_uidt_nl << "}\n\n"; // generate the ifdefined macro for the _var type os->gen_ifdef_macro (node->flat_name (), "_var"); if (node->gen_var_impl () == -1) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_ci::" "visit_valuetype - " "codegen for _var failed\n"), -1); } os->gen_endif (); // generate the ifdefined macro for the _out type os->gen_ifdef_macro (node->flat_name (), "_out"); if (node->gen_out_impl () == -1) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_ci::" "visit_valuetype - " "codegen for _out failed\n"), -1); } os->gen_endif (); // generate inline methods for elements of our scope if (this->visit_scope (node) == -1) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_ci::" "visit_valuetype - " "codegen for scope failed\n"), -1); } return 0; } int be_visitor_valuetype_ci::visit_field (be_field *node) { if (opt_accessor_) { be_visitor_context *ctx = new be_visitor_context (*this->ctx_); be_visitor_valuetype_field_cs *visitor = new be_visitor_valuetype_field_cs (ctx); visitor->in_obv_space_ = 0; visitor->setenclosings ("ACE_INLINE "); if (visitor->visit_field (node) == -1) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_ci::" "visit_field - " "visit_field failed\n" ), -1); } delete visitor; } return 0; }
amahussein/vespa
vespalib/src/vespa/vespalib/data/slime/object_value.h
<gh_stars>1-10 // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "value.h" #include "nix_value.h" #include "symbol.h" #include "symbol_lookup.h" #include "symbol_table.h" #include "value_factory.h" #include "symbol_inserter.h" #include <vespa/vespalib/stllike/vector_map.h> #include <vespa/vespalib/util/stash.h> namespace vespalib::slime { /** * Class representing a collection of unordered values that can be * looked up by symbol. **/ class ObjectValue : public Value { private: struct hasher { size_t operator () (const Symbol & s) const { return s.getValue(); } }; typedef vector_map<Symbol, Value*> SymbolValueMap; SymbolTable &_symbolTable; Stash &_stash; SymbolValueMap _fields; Cursor &setIfUnset(SymbolInserter &symbol, const ValueFactory &input) { Value *&pos = _fields[symbol.insert()]; if (pos != nullptr) { return *NixValue::invalid(); } pos = input.create(_stash); return *pos; } Value *lookup(const SymbolLookup &symbol) const { auto pos = _fields.find(symbol.lookup()); if (pos == _fields.end()) { return NixValue::invalid(); } return pos->second; } protected: Cursor &setLeaf(Symbol sym, const ValueFactory &input) override; Cursor &setLeaf(Memory name, const ValueFactory &input) override; public: ObjectValue(SymbolTable &table, Stash & stash) : _symbolTable(table), _stash(stash), _fields() { _fields.reserve(4); } ObjectValue(SymbolTable &table, Stash & stash, SymbolInserter &symbol, Value *value) : _symbolTable(table), _stash(stash), _fields() { _fields.reserve(4); _fields[symbol.insert()] = value; } ObjectValue(const ObjectValue &) = delete; ObjectValue &operator=(const ObjectValue &) = delete; Type type() const override { return OBJECT::instance; } size_t children() const override { return _fields.size(); } size_t fields() const override { return _fields.size(); } void traverse(ObjectSymbolTraverser &ot) const override; void traverse(ObjectTraverser &ot) const override; Cursor &operator[](Symbol sym) const override; Cursor &operator[](Memory name) const override; Cursor &setArray(Symbol sym) override; Cursor &setObject(Symbol sym) override; Cursor &setArray(Memory name) override; Cursor &setObject(Memory name) override; Symbol resolve(Memory symbol_name) override; ~ObjectValue() override = default; }; }
VISTALL/consulo-kotlin
compiler/tests/org/jetbrains/kotlin/codegen/generated/AbstractBlackBoxCodegenTest.java
/* * Copyright 2010-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jetbrains.kotlin.codegen.generated; import com.intellij.openapi.util.io.FileUtil; import com.intellij.util.ArrayUtil; import com.intellij.util.Processor; import kotlin.Charsets; import kotlin.io.IoPackage; import org.jetbrains.annotations.NotNull; import org.jetbrains.kotlin.cli.common.output.outputUtils.OutputUtilsPackage; import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles; import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment; import org.jetbrains.kotlin.codegen.CodegenTestCase; import org.jetbrains.kotlin.codegen.GenerationUtils; import org.jetbrains.kotlin.config.CompilerConfiguration; import org.jetbrains.kotlin.psi.JetFile; import org.jetbrains.kotlin.test.ConfigurationKind; import org.jetbrains.kotlin.test.InTextDirectivesUtils; import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.TestJdkKind; import org.jetbrains.kotlin.utils.UtilsPackage; import java.io.File; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Collections; import java.util.List; import static org.jetbrains.kotlin.cli.jvm.config.ConfigPackage.addJavaSourceRoot; import static org.jetbrains.kotlin.cli.jvm.config.ConfigPackage.addJvmClasspathRoot; import static org.jetbrains.kotlin.codegen.CodegenTestUtil.compileJava; import static org.jetbrains.kotlin.load.kotlin.PackageClassUtils.getPackageClassFqName; public abstract class AbstractBlackBoxCodegenTest extends CodegenTestCase { public void doTest(@NotNull String filename) { createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_AND_ANNOTATIONS); blackBoxFileByFullPath(filename); } public void doTestAgainstJava(@NotNull String filename) { blackBoxFileAgainstJavaByFullPath(filename); } public void doTestWithJava(@NotNull String filename) { try { blackBoxFileWithJavaByFullPath(filename); } catch (Exception e) { throw UtilsPackage.rethrow(e); } } public void doTestWithStdlib(@NotNull String filename) { myEnvironment = JetTestUtils.createEnvironmentWithJdkAndNullabilityAnnotationsFromIdea( getTestRootDisposable(), getTestConfigurationKind(filename), getTestJdkKind(filename) ); blackBoxFileByFullPath(filename); } private static ConfigurationKind getTestConfigurationKind(String filename) { return InTextDirectivesUtils.isDirectiveDefined( IoPackage.readText(new File(filename), Charsets.UTF_8), "NO_KOTLIN_REFLECT" ) ? ConfigurationKind.NO_KOTLIN_REFLECT : ConfigurationKind.ALL; } public void doTestMultiFile(@NotNull String folderName) { final List<String> files = new ArrayList<String>(2); FileUtil.processFilesRecursively(new File(folderName), new Processor<File>() { @Override public boolean process(File file) { if (file.getName().endsWith(".kt")) { files.add(relativePath(file)); } return true; } }); doTestMultiFile(files); } protected void doTestMultiFile(@NotNull List<String> files) { createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.ALL); Collections.sort(files); loadFiles(ArrayUtil.toStringArray(files)); blackBox(); } // NOTE: tests under fullJdk/ are run with FULL_JDK instead of MOCK_JDK @NotNull private static TestJdkKind getTestJdkKind(@NotNull String sourcePath) { if (sourcePath.contains("compiler/testData/codegen/boxWithStdlib/fullJdk")) { return TestJdkKind.FULL_JDK; } return InTextDirectivesUtils.isDirectiveDefined( IoPackage.readText(new File(sourcePath), Charsets.UTF_8), "FULL_JDK" ) ? TestJdkKind.FULL_JDK : TestJdkKind.MOCK_JDK; } private void blackBoxFileAgainstJavaByFullPath(@NotNull String ktFileFullPath) { String ktFile = relativePath(new File(ktFileFullPath)); File javaClassesTempDirectory = compileJava(ktFile.replaceFirst("\\.kt$", ".java")); myEnvironment = KotlinCoreEnvironment.createForTests( getTestRootDisposable(), JetTestUtils.compilerConfigurationForTests( ConfigurationKind.ALL, getTestJdkKind(ktFileFullPath), JetTestUtils.getAnnotationsJar(), javaClassesTempDirectory ), EnvironmentConfigFiles.JVM_CONFIG_FILES ); loadFile(ktFile); blackBox(); } private void blackBoxFileWithJavaByFullPath(@NotNull String directory) throws Exception { File dirFile = new File(directory); final List<String> javaFilePaths = new ArrayList<String>(); final List<String> ktFilePaths = new ArrayList<String>(); FileUtil.processFilesRecursively(dirFile, new Processor<File>() { @Override public boolean process(File file) { String path = relativePath(file); if (path.endsWith(".kt")) { ktFilePaths.add(path); } else if (path.endsWith(".java")) { javaFilePaths.add(path); } return true; } }); CompilerConfiguration configuration = JetTestUtils.compilerConfigurationForTests( ConfigurationKind.ALL, TestJdkKind.MOCK_JDK, JetTestUtils.getAnnotationsJar() ); addJavaSourceRoot(configuration, dirFile); myEnvironment = KotlinCoreEnvironment.createForTests(getTestRootDisposable(), configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES); loadFiles(ArrayUtil.toStringArray(ktFilePaths)); classFileFactory = GenerationUtils.compileManyFilesGetGenerationStateForTest(myEnvironment.getProject(), myFiles.getPsiFiles()).getFactory(); File kotlinOut = JetTestUtils.tmpDir(toString()); OutputUtilsPackage.writeAllTo(classFileFactory, kotlinOut); File javaOut = compileJava(javaFilePaths, kotlinOut.getPath()); // Add javac output to classpath so that the created class loader can find generated Java classes addJvmClasspathRoot(configuration, javaOut); blackBox(); } private void blackBoxFileByFullPath(@NotNull String filename) { loadFileByFullPath(filename); blackBox(); } protected void blackBox() { // If there are many files, the first of them should contain the 'box(): String' function JetFile firstFile = myFiles.getPsiFiles().get(0); String fqName = getPackageClassFqName(firstFile.getPackageFqName()).asString(); Class<?> aClass = generateClass(fqName); try { Method method = aClass.getMethod("box"); String r = (String) method.invoke(null); assertEquals("OK", r); } catch (Throwable e) { System.out.println(generateToText()); throw UtilsPackage.rethrow(e); } } }
DamieFC/chromium
chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/editing_test.js
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Include test fixture. GEN_INCLUDE([ '//chrome/browser/resources/chromeos/accessibility/chromevox/testing/chromevox_next_e2e_test_base.js', ]); /** * Test fixture for editing tests. */ ChromeVoxEditingTest = class extends ChromeVoxNextE2ETest { constructor() { super(); } press(keyCode, modifiers) { return function() { EventGenerator.sendKeyPress(keyCode, modifiers); }; } waitForEditableEvent() { return new Promise(resolve => { DesktopAutomationHandler.instance.textEditHandler_.onEvent = (e) => resolve(e); }); } }; const doc = ` <label for='singleLine'>singleLine</label> <input type='text' id='singleLine' value='Single line field'><br> <label for='textarea'>textArea</label> <textarea id='textarea'> Line 1&#xa; line 2&#xa; line 3 </textarea> `; TEST_F('ChromeVoxEditingTest', 'Focus', function() { const mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(doc, function(root) { const singleLine = root.find( {role: RoleType.TEXT_FIELD, attributes: {name: 'singleLine'}}); const textarea = root.find({role: RoleType.TEXT_FIELD, attributes: {name: 'textArea'}}); singleLine.focus(); mockFeedback.expectSpeech('singleLine', 'Single line field', 'Edit text') .expectBraille( 'singleLine Single line field ed', {startIndex: 11, endIndex: 11}) .call(textarea.focus.bind(textarea)) .expectSpeech('textArea', 'Line 1\nline 2\nline 3', 'Text area') .expectBraille( 'textArea Line 1\nline 2\nline 3 mled', {startIndex: 9, endIndex: 9}); mockFeedback.replay(); }); }); TEST_F('ChromeVoxEditingTest', 'Multiline', function() { const mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(doc, function(root) { const textarea = root.find({role: RoleType.TEXT_FIELD, attributes: {name: 'textArea'}}); textarea.focus(); mockFeedback.expectSpeech('textArea', 'Line 1\nline 2\nline 3', 'Text area') .expectBraille( 'textArea Line 1\nline 2\nline 3 mled', {startIndex: 9, endIndex: 9}) .call(textarea.setSelection.bind(textarea, 1, 1)) .expectSpeech('i') .expectBraille('Line 1\nmled', {startIndex: 1, endIndex: 1}) .call(textarea.setSelection.bind(textarea, 7, 7)) .expectSpeech('line 2') .expectBraille('line 2\n', {startIndex: 0, endIndex: 0}) .call(textarea.setSelection.bind(textarea, 7, 13)) .expectSpeech('line 2', 'selected') .expectBraille('line 2\n', {startIndex: 0, endIndex: 6}); mockFeedback.replay(); }); }); TEST_F('ChromeVoxEditingTest', 'TextButNoSelectionChange', function() { const mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( ` <h1>Test doc</h1> <input type='text' id='input' value='text1'> <!-- We don't seem to get an event in js when the automation setSelection function is called, so poll for the actual change. --> <script> let timer; let input = document.getElementById('input'); function poll(e) { if (input.selectionStart == 0) { return; } input.value = 'text2'; window.clearInterval(timer); } timer = window.setInterval(poll, 200); </script> `, function(root) { const input = root.find({role: RoleType.TEXT_FIELD}); input.focus(); mockFeedback.expectSpeech('text1', 'Edit text') .expectBraille('text1 ed', {startIndex: 0, endIndex: 0}) .call(input.setSelection.bind(input, 5, 5)) .expectBraille('text2 ed', {startIndex: 5, endIndex: 5}); mockFeedback.replay(); }); }); TEST_F('ChromeVoxEditingTest', 'RichTextMoveByLine', function() { // Turn on rich text output settings. localStorage['announceRichTextAttributes'] = 'true'; const mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( ` <div role="textbox" contenteditable> <h2>hello</h2> <div><br></div> <p>This is a <a href="#test">test</a> of rich text</p> </div> <button id="go">Go</button> <script> let dir = 'forward'; let line = 0; document.getElementById('go').addEventListener('click', function() { let sel = getSelection(); sel.modify('move', dir, 'line'); if (dir == 'forward') { line++; } else { line--; } if (line == 0) { dir = 'forward'; } if (line == 2) { dir = 'backward'; } }, true); </script> `, function(root) { const input = root.find({role: RoleType.TEXT_FIELD}); const go = root.find({role: RoleType.BUTTON}); const moveByLine = go.doDefault.bind(go); this.listenOnce(input, 'focus', function() { mockFeedback.call(moveByLine) .expectSpeech('\n') .expectBraille('\n') .call(moveByLine) .expectSpeech('This is a ', 'test', 'Link', ' of rich text') .expectBraille('This is a test of rich text') .call(moveByLine) .expectSpeech('\n') .expectBraille('\n') .call(moveByLine) .expectSpeech('hello', 'Heading 2') .expectBraille('hello h2 mled') .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'RichTextMoveByCharacter', function() { // Turn on rich text output settings. localStorage['announceRichTextAttributes'] = 'true'; const mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( ` <div role="textbox" contenteditable>This <b>is</b> a test.</div> <button id="go">Go</button> <script> let dir = 'forward'; let char = 0; document.getElementById('go').addEventListener('click', function() { let sel = getSelection(); sel.modify('move', dir, 'character'); if (dir == 'forward') { char++; } else { char--; } if (char == 0) { dir = 'forward'; } if (line == 16) { dir = 'backward'; } }, true); </script> `, function(root) { const input = root.find({role: RoleType.TEXT_FIELD}); const go = root.find({role: RoleType.BUTTON}); const moveByChar = go.doDefault.bind(go); const lineText = 'This is a test. mled'; this.listenOnce(input, 'focus', function() { mockFeedback.call(moveByChar) .expectSpeech('h') .expectBraille(lineText, {startIndex: 1, endIndex: 1}) .call(moveByChar) .expectSpeech('i') .expectBraille(lineText, {startIndex: 2, endIndex: 2}) .call(moveByChar) .expectSpeech('s') .expectBraille(lineText, {startIndex: 3, endIndex: 3}) .call(moveByChar) .expectSpeech(' ') .expectBraille(lineText, {startIndex: 4, endIndex: 4}) .call(moveByChar) .expectSpeech('i') .expectSpeech('Bold') .expectBraille(lineText, {startIndex: 5, endIndex: 5}) .call(moveByChar) .expectSpeech('s') .expectBraille(lineText, {startIndex: 6, endIndex: 6}) .call(moveByChar) .expectSpeech(' ') .expectSpeech('Not bold') .expectBraille(lineText, {startIndex: 7, endIndex: 7}) .call(moveByChar) .expectSpeech('a') .expectBraille(lineText, {startIndex: 8, endIndex: 8}) .call(moveByChar) .expectSpeech(' ') .expectBraille(lineText, {startIndex: 9, endIndex: 9}) .replay(); }); input.focus(); }); }); TEST_F( 'ChromeVoxEditingTest', 'RichTextMoveByCharacterAllAttributes', function() { // Turn on rich text output settings. localStorage['announceRichTextAttributes'] = 'true'; const mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( ` <div role="textbox" contenteditable> <p style="font-size:20px; font-family:times"> <b style="color:#ff0000">Move</b> <i>through</i> <u style="font-family:georgia">text</u> by <strike style="font-size:12px; color:#0000ff">character</strike> <a href="#">test</a>! </p> </div> <button id="go">Go</button> <script> document.getElementById('go').addEventListener('click', function() { let sel = getSelection(); sel.modify('move', 'forward', 'character'); }, true); </script> `, function(root) { const input = root.find({role: RoleType.TEXT_FIELD}); const go = root.find({role: RoleType.BUTTON}); const moveByChar = go.doDefault.bind(go); const lineText = 'Move through text by character test! mled'; const lineOnLinkText = 'Move through text by character test lnk ! mled'; this.listenOnce( input, chrome.automation.EventType.FOCUS, function() { mockFeedback.call(moveByChar) .expectSpeech('o') .expectSpeech('Size 20') .expectSpeech('Red, 100% opacity.') .expectSpeech('Bold') .expectSpeech('Font Tinos') .expectBraille(lineText, {startIndex: 1, endIndex: 1}) .call(moveByChar) .expectSpeech('v') .expectBraille(lineText, {startIndex: 2, endIndex: 2}) .call(moveByChar) .expectSpeech('e') .expectBraille(lineText, {startIndex: 3, endIndex: 3}) .call(moveByChar) .expectSpeech(' ') .expectSpeech('Black, 100% opacity.') .expectSpeech('Not bold') .expectBraille(lineText, {startIndex: 4, endIndex: 4}) .call(moveByChar) .expectSpeech('t') .expectSpeech('Italic') .expectBraille(lineText, {startIndex: 5, endIndex: 5}) .call(moveByChar) .expectSpeech('h') .expectBraille(lineText, {startIndex: 6, endIndex: 6}) .call(moveByChar) .expectSpeech('r') .expectBraille(lineText, {startIndex: 7, endIndex: 7}) .call(moveByChar) .expectSpeech('o') .expectBraille(lineText, {startIndex: 8, endIndex: 8}) .call(moveByChar) .expectSpeech('u') .expectBraille(lineText, {startIndex: 9, endIndex: 9}) .call(moveByChar) .expectSpeech('g') .expectBraille(lineText, {startIndex: 10, endIndex: 10}) .call(moveByChar) .expectSpeech('h') .expectBraille(lineText, {startIndex: 11, endIndex: 11}) .call(moveByChar) .expectSpeech(' ') .expectSpeech('Not italic') .expectBraille(lineText, {startIndex: 12, endIndex: 12}) .call(moveByChar) .expectSpeech('t') .expectSpeech('Underline') .expectSpeech('Font Gelasio') .expectBraille(lineText, {startIndex: 13, endIndex: 13}) .call(moveByChar) .expectSpeech('e') .expectBraille(lineText, {startIndex: 14, endIndex: 14}) .call(moveByChar) .expectSpeech('x') .expectBraille(lineText, {startIndex: 15, endIndex: 15}) .call(moveByChar) .expectSpeech('t') .expectBraille(lineText, {startIndex: 16, endIndex: 16}) .call(moveByChar) .expectSpeech(' ') .expectSpeech('Not underline') .expectSpeech('Font Tinos') .expectBraille(lineText, {startIndex: 17, endIndex: 17}) .call(moveByChar) .expectSpeech('b') .expectBraille(lineText, {startIndex: 18, endIndex: 18}) .call(moveByChar) .expectSpeech('y') .expectBraille(lineText, {startIndex: 19, endIndex: 19}) .call(moveByChar) .expectSpeech(' ') .expectBraille(lineText, {startIndex: 20, endIndex: 20}) .call(moveByChar) .expectSpeech('c') .expectSpeech('Size 12') .expectSpeech('Blue, 100% opacity.') .expectSpeech('Line through') .expectBraille(lineText, {startIndex: 21, endIndex: 21}) .call(moveByChar) .expectSpeech('h') .expectBraille(lineText, {startIndex: 22, endIndex: 22}) .call(moveByChar) .expectSpeech('a') .expectBraille(lineText, {startIndex: 23, endIndex: 23}) .call(moveByChar) .expectSpeech('r') .expectBraille(lineText, {startIndex: 24, endIndex: 24}) .call(moveByChar) .expectSpeech('a') .expectBraille(lineText, {startIndex: 25, endIndex: 25}) .call(moveByChar) .expectSpeech('c') .expectBraille(lineText, {startIndex: 26, endIndex: 26}) .call(moveByChar) .expectSpeech('t') .expectBraille(lineText, {startIndex: 27, endIndex: 27}) .call(moveByChar) .expectSpeech('e') .expectBraille(lineText, {startIndex: 28, endIndex: 28}) .call(moveByChar) .expectSpeech('r') .expectBraille(lineText, {startIndex: 29, endIndex: 29}) .call(moveByChar) .expectSpeech(' ') .expectSpeech('Size 20') .expectSpeech('Black, 100% opacity.') .expectSpeech('Not line through') .expectBraille(lineText, {startIndex: 30, endIndex: 30}) .call(moveByChar) .expectSpeech('t') .expectSpeech('Blue, 100% opacity.') .expectSpeech('Link') .expectSpeech('Underline') .expectBraille( lineOnLinkText, {startIndex: 31, endIndex: 31}) .call(moveByChar) .expectSpeech('e') .expectBraille( lineOnLinkText, {startIndex: 32, endIndex: 32}) .call(moveByChar) .expectSpeech('s') .expectBraille( lineOnLinkText, {startIndex: 33, endIndex: 33}) .call(moveByChar) .expectSpeech('t') .expectBraille( lineOnLinkText, {startIndex: 34, endIndex: 34}) .call(moveByChar) .expectSpeech('!') .expectSpeech('Black, 100% opacity.') .expectSpeech('Not link') .expectSpeech('Not underline') .expectBraille(lineText, {startIndex: 35, endIndex: 35}) .replay(); }); input.focus(); }); }); // Tests specifically for cursor workarounds. TEST_F( 'ChromeVoxEditingTest', 'RichTextMoveByCharacterNodeWorkaround', function() { const mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( ` <div role="textbox" contenteditable>hello <b>world</b></div> <button id="go">Go</button> <script> document.getElementById('go').addEventListener('click', function() { let sel = getSelection(); sel.modify('move', 'forward', 'character'); }, true); </script> `, function(root) { const input = root.find({role: RoleType.TEXT_FIELD}); const go = root.find({role: RoleType.BUTTON}); const moveByChar = go.doDefault.bind(go); const lineText = 'hello world mled'; this.listenOnce(input, 'focus', function() { mockFeedback.call(moveByChar) .expectSpeech('e') .expectBraille(lineText, {startIndex: 1, endIndex: 1}) .call(moveByChar) .expectSpeech('l') .expectBraille(lineText, {startIndex: 2, endIndex: 2}) .call(moveByChar) .expectSpeech('l') .expectBraille(lineText, {startIndex: 3, endIndex: 3}) .call(moveByChar) .expectSpeech('o') .expectBraille(lineText, {startIndex: 4, endIndex: 4}) .call(moveByChar) .expectSpeech(' ') .expectBraille(lineText, {startIndex: 5, endIndex: 5}) .call(moveByChar) .expectSpeech('w') .expectBraille(lineText, {startIndex: 6, endIndex: 6}) .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'RichTextMoveByCharacterEndOfLine', function() { const mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( ` <div role="textbox" contenteditable>Test</div> <button id="go">Go</button> <script> document.getElementById('go').addEventListener('click', function() { let sel = getSelection(); sel.modify('move', 'forward', 'character'); }, true); </script> `, function(root) { const input = root.find({role: RoleType.TEXT_FIELD}); const go = root.find({role: RoleType.BUTTON}); const moveByChar = go.doDefault.bind(go); const lineText = 'Test mled'; this.listenOnce(input, 'focus', function() { mockFeedback.call(moveByChar) .expectSpeech('e') .expectBraille(lineText, {startIndex: 1, endIndex: 1}) .call(moveByChar) .expectSpeech('s') .expectBraille(lineText, {startIndex: 2, endIndex: 2}) .call(moveByChar) .expectSpeech('t') .expectBraille(lineText, {startIndex: 3, endIndex: 3}) .call(moveByChar) .expectSpeech('\n') .expectBraille(lineText, {startIndex: 4, endIndex: 4}) .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'RichTextLinkOutput', function() { // Turn on rich text output settings. localStorage['announceRichTextAttributes'] = 'true'; const mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( ` <div role="textbox" contenteditable>a <a href="#">test</a></div> <button id="go">Go</button> <script> document.getElementById('go').addEventListener('click', function() { let sel = getSelection(); sel.modify('move', 'forward', 'character'); }, true); </script> `, function(root) { const input = root.find({role: RoleType.TEXT_FIELD}); const go = root.find({role: RoleType.BUTTON}); const moveByChar = go.doDefault.bind(go); const lineText = 'a test mled'; const lineOnLinkText = 'a test lnk mled'; this.listenOnce(input, 'focus', function() { mockFeedback.call(moveByChar) .expectSpeech(' ') .expectBraille(lineText, {startIndex: 1, endIndex: 1}) .call(moveByChar) .expectSpeech('t') .expectSpeech('Blue, 100% opacity.') .expectSpeech('Link') .expectSpeech('Underline') .expectBraille(lineOnLinkText, {startIndex: 2, endIndex: 2}) .call(moveByChar) .expectSpeech('e') .expectBraille(lineOnLinkText, {startIndex: 3, endIndex: 3}) .call(moveByChar) .expectSpeech('s') .expectBraille(lineOnLinkText, {startIndex: 4, endIndex: 4}) .call(moveByChar) .expectSpeech('t') .expectBraille(lineOnLinkText, {startIndex: 5, endIndex: 5}) .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'RichTextExtendByCharacter', function() { const mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( ` <div role="textbox" contenteditable>Te<br>st</div> <button id="go">Go</button> <script> document.getElementById('go').addEventListener('click', function() { let sel = getSelection(); sel.modify('extend', 'forward', 'character'); }, true); </script> `, function(root) { const input = root.find({role: RoleType.TEXT_FIELD}); const go = root.find({role: RoleType.BUTTON}); const moveByChar = go.doDefault.bind(go); this.listenOnce(input, 'focus', function() { mockFeedback.call(moveByChar) .expectSpeech('T', 'selected') .call(moveByChar) .expectSpeech('e', 'added to selection') .call(moveByChar) .expectSpeech('selected') .call(moveByChar) // This gets described by the line logic in EditableLine. .expectSpeech('s', 'selected') .call(moveByChar) .expectSpeech('t', 'added to selection') .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'RichTextImageByCharacter', function() { const mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( ` <p contenteditable> <img alt="dog"> is a <img alt="cat"> test </p> <button id="go">Go</button> <script> let dir = 'forward'; let moveCount = 0; document.getElementById('go').addEventListener('click', function() { moveCount++; if (moveCount == 9) { dir = 'backward'; } let sel = getSelection(); sel.modify('move', dir, 'character'); }, true); </script> `, function(root) { const input = root.find({role: RoleType.PARAGRAPH}); const go = root.find({role: RoleType.BUTTON}); const moveByChar = go.doDefault.bind(go); this.listenOnce(input, 'focus', function() { const lineText = 'dog is a cat test mled'; const lineOnCatText = 'dog is a cat img test mled'; // This is initial output from focusing the contenteditable (which has // no role). mockFeedback.expectSpeech( 'dog', 'Image', ' is a ', 'cat', 'Image', ' test'); mockFeedback.expectBraille('dog img is a cat img test'); const moves = [ {speech: [' '], braille: [lineText, {startIndex: 3, endIndex: 3}]}, {speech: ['i'], braille: [lineText, {startIndex: 4, endIndex: 4}]}, {speech: ['s'], braille: [lineText, {startIndex: 5, endIndex: 5}]}, {speech: [' '], braille: [lineText, {startIndex: 6, endIndex: 6}]}, {speech: ['a'], braille: [lineText, {startIndex: 7, endIndex: 7}]}, {speech: [' '], braille: [lineText, {startIndex: 8, endIndex: 8}]}, { speech: ['cat', 'Image'], braille: [lineOnCatText, {startIndex: 9, endIndex: 9}] }, {speech: [' '], braille: [lineText, {startIndex: 12, endIndex: 12}]} ]; for (const item of moves) { mockFeedback.call(moveByChar); mockFeedback.expectSpeech.apply(mockFeedback, item.speech); mockFeedback.expectBraille.apply(mockFeedback, item.braille); } const backMoves = moves.reverse(); backMoves.shift(); for (const backItem of backMoves) { mockFeedback.call(moveByChar); mockFeedback.expectSpeech.apply(mockFeedback, backItem.speech); mockFeedback.expectBraille.apply(mockFeedback, backItem.braille); } mockFeedback.replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'RichTextSelectByLine', function() { const mockFeedback = this.createMockFeedback(); // Use digit strings like "11111" and "22222" because the character widths // of digits are always the same. This means the test can move down one line // middle of "11111" and reliably hit a given character position in "22222", // regardless of font configuration. https://crbug.com/898213 this.runWithLoadedTree( ` <div> <button id="go">Go</button> </div> <p contenteditable> 11111 line<br> 22222 line<br> 33333 line<br> </p> <script> let commands = [ ['extend', 'forward', 'character'], ['extend', 'forward', 'character'], ['extend', 'forward', 'line'], ['extend', 'forward', 'line'], ['extend', 'backward', 'line'], ['extend', 'backward', 'line'], ['extend', 'forward', 'documentBoundary'], ['move', 'forward', 'character'], ['move', 'backward', 'character'], ['move', 'backward', 'character'], ['extend', 'backward', 'line'], ['extend', 'backward', 'line'], ['extend', 'forward', 'line'], ]; document.getElementById('go').addEventListener('click', function() { let sel = getSelection(); sel.modify.apply(sel, commands.shift()); }, true); </script> `, function(root) { const input = root.find({role: RoleType.PARAGRAPH}); const go = root.find({role: RoleType.BUTTON}); const move = go.doDefault.bind(go); this.listenOnce(input, 'focus', function() { // By character. mockFeedback.call(move) .expectSpeech('1', 'selected') .expectBraille('11111 line\nmled', {startIndex: 0, endIndex: 1}) .call(move) .expectSpeech('1', 'added to selection') .expectBraille('11111 line\nmled', {startIndex: 0, endIndex: 2}) // Forward selection. // Growing. // By line (notice the partial selections from the first and // second lines). .call(move) .expectSpeech('111 line \n 22', 'selected') .expectBraille('22222 line\n', {startIndex: 0, endIndex: 2}) .call(move) .expectSpeech('222 line \n 33', 'selected') .expectBraille('33333 line\n', {startIndex: 0, endIndex: 2}) // Shrinking. .call(move) .expectSpeech('222 line \n 33', 'unselected') .expectBraille('22222 line\n', {startIndex: 0, endIndex: 2}) .call(move) .expectSpeech('11', 'selected') .expectBraille('11111 line\nmled', {startIndex: 0, endIndex: 2}) // Document boundary. .call(move) .expectSpeech( '111 line \n 22222 line \n 33333 line \n \n', 'selected') .expectBraille('33333 line\n', {startIndex: 0, endIndex: 10}) // The script repositions the caret to the 'n' of the third line. .call(move) .expectSpeech('33333 line') .expectBraille('33333 line\n', {startIndex: 10, endIndex: 10}) .call(move) .expectSpeech('e') .expectBraille('33333 line\n', {startIndex: 9, endIndex: 9}) .call(move) .expectSpeech('n') .expectBraille('33333 line\n', {startIndex: 8, endIndex: 8}) // Backward selection. // Growing. .call(move) .expectSpeech('ne \n 33333 li', 'selected') .expectBraille('22222 line\n', {startIndex: 8, endIndex: 11}) .call(move) .expectSpeech('ne \n 22222 li', 'selected') .expectBraille('11111 line\n', {startIndex: 8, endIndex: 11}) // Shrinking. .call(move) .expectSpeech('ne \n 22222 li', 'unselected') .expectBraille('22222 line\n', {startIndex: 8, endIndex: 11}) .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'EditableLineOneStaticText', function() { this.runWithLoadedTree( ` <p contenteditable style="word-spacing:100000px">this is a test</p> `, function(root) { const staticText = root.find({role: RoleType.STATIC_TEXT}); let e = new editing.EditableLine(staticText, 0, staticText, 0); assertEquals('this ', e.text); assertEquals(0, e.startOffset); assertEquals(0, e.endOffset); assertEquals(0, e.localStartOffset); assertEquals(0, e.localEndOffset); assertEquals(0, e.containerStartOffset); assertEquals(4, e.containerEndOffset); e = new editing.EditableLine(staticText, 1, staticText, 1); assertEquals('this ', e.text); assertEquals(1, e.startOffset); assertEquals(1, e.endOffset); assertEquals(1, e.localStartOffset); assertEquals(1, e.localEndOffset); assertEquals(0, e.containerStartOffset); assertEquals(4, e.containerEndOffset); e = new editing.EditableLine(staticText, 5, staticText, 5); assertEquals('is ', e.text); assertEquals(0, e.startOffset); assertEquals(0, e.endOffset); assertEquals(5, e.localStartOffset); assertEquals(5, e.localEndOffset); assertEquals(0, e.containerStartOffset); assertEquals(2, e.containerEndOffset); e = new editing.EditableLine(staticText, 7, staticText, 7); assertEquals('is ', e.text); assertEquals(2, e.startOffset); assertEquals(2, e.endOffset); assertEquals(7, e.localStartOffset); assertEquals(7, e.localEndOffset); assertEquals(0, e.containerStartOffset); assertEquals(2, e.containerEndOffset); }); }); TEST_F('ChromeVoxEditingTest', 'EditableLineTwoStaticTexts', function() { this.runWithLoadedTree( ` <p contenteditable>hello <b>world</b></p> `, function(root) { const text = root.find({role: RoleType.STATIC_TEXT}); const bold = text.nextSibling; let e = new editing.EditableLine(text, 0, text, 0); assertEquals('hello world', e.text); assertEquals(0, e.startOffset); assertEquals(0, e.endOffset); assertEquals(0, e.localStartOffset); assertEquals(0, e.localEndOffset); assertEquals(0, e.containerStartOffset); assertEquals(5, e.containerEndOffset); e = new editing.EditableLine(text, 5, text, 5); assertEquals('hello world', e.text); assertEquals(5, e.startOffset); assertEquals(5, e.endOffset); assertEquals(5, e.localStartOffset); assertEquals(5, e.localEndOffset); assertEquals(0, e.containerStartOffset); assertEquals(5, e.containerEndOffset); e = new editing.EditableLine(bold, 0, bold, 0); assertEquals('hello world', e.text); assertEquals(6, e.startOffset); assertEquals(6, e.endOffset); assertEquals(0, e.localStartOffset); assertEquals(0, e.localEndOffset); assertEquals(6, e.containerStartOffset); assertEquals(10, e.containerEndOffset); e = new editing.EditableLine(bold, 4, bold, 4); assertEquals('hello world', e.text); assertEquals(10, e.startOffset); assertEquals(10, e.endOffset); assertEquals(4, e.localStartOffset); assertEquals(4, e.localEndOffset); assertEquals(6, e.containerStartOffset); assertEquals(10, e.containerEndOffset); }); }); TEST_F('ChromeVoxEditingTest', 'EditableLineEquality', function() { this.runWithLoadedTree( ` <div contenteditable role="textbox"> <p style="word-spacing:100000px">this is a test</p> <p>hello <b>world</b></p> </div> `, function(root) { const thisIsATest = root.findAll({role: RoleType.PARAGRAPH})[0].firstChild; const hello = root.findAll({role: RoleType.PARAGRAPH})[1].firstChild; const world = root.findAll({role: RoleType.PARAGRAPH})[1].lastChild; // The same position -- sanity check. let e1 = new editing.EditableLine(thisIsATest, 0, thisIsATest, 0); assertEquals('this ', e1.text); assertTrue(e1.isSameLine(e1)); // Offset into the same soft line. let e2 = new editing.EditableLine(thisIsATest, 1, thisIsATest, 1); assertTrue(e1.isSameLine(e2)); // Boundary. e2 = new editing.EditableLine(thisIsATest, 4, thisIsATest, 4); assertTrue(e1.isSameLine(e2)); // Offsets into different soft lines. e2 = new editing.EditableLine(thisIsATest, 5, thisIsATest, 5); assertEquals('is ', e2.text); assertFalse(e1.isSameLine(e2)); // Sanity check; second soft line. assertTrue(e2.isSameLine(e2)); // Different offsets into second soft line. e1 = new editing.EditableLine(thisIsATest, 6, thisIsATest, 6); assertTrue(e1.isSameLine(e2)); // Boundary. e1 = new editing.EditableLine(thisIsATest, 7, thisIsATest, 7); assertTrue(e1.isSameLine(e2)); // Third line. e1 = new editing.EditableLine(thisIsATest, 8, thisIsATest, 8); assertEquals('a ', e1.text); assertFalse(e1.isSameLine(e2)); // Last line. e2 = new editing.EditableLine(thisIsATest, 10, thisIsATest, 10); assertEquals('test', e2.text); assertFalse(e1.isSameLine(e2)); // Boundary. e1 = new editing.EditableLine(thisIsATest, 13, thisIsATest, 13); assertTrue(e1.isSameLine(e2)); // Cross into new paragraph. e2 = new editing.EditableLine(hello, 0, hello, 0); assertEquals('hello world', e2.text); assertFalse(e1.isSameLine(e2)); // On same node, with multi-static text line. e1 = new editing.EditableLine(hello, 1, hello, 1); assertTrue(e1.isSameLine(e2)); // On same node, with multi-static text line; boundary. e1 = new editing.EditableLine(hello, 5, hello, 5); assertTrue(e1.isSameLine(e2)); // On different node, with multi-static text line. e1 = new editing.EditableLine(world, 1, world, 1); assertTrue(e1.isSameLine(e2)); // Another mix of lines. e2 = new editing.EditableLine(thisIsATest, 9, thisIsATest, 9); assertFalse(e1.isSameLine(e2)); }); }); TEST_F('ChromeVoxEditingTest', 'EditableLineStrictEquality', function() { this.runWithLoadedTree( ` <div contenteditable role="textbox"> <p style="word-spacing:100000px">this is a test</p> <p>hello <b>world</b></p> </div> `, function(root) { const thisIsATest = root.findAll({role: RoleType.PARAGRAPH})[0].firstChild; const hello = root.findAll({role: RoleType.PARAGRAPH})[1].firstChild; const world = root.findAll({role: RoleType.PARAGRAPH})[1].lastChild; // The same position -- sanity check. let e1 = new editing.EditableLine(thisIsATest, 0, thisIsATest, 0); assertEquals('this ', e1.text); assertTrue(e1.isSameLineAndSelection(e1)); // Offset into the same soft line. let e2 = new editing.EditableLine(thisIsATest, 1, thisIsATest, 1); assertFalse(e1.isSameLineAndSelection(e2)); // Boundary. e2 = new editing.EditableLine(thisIsATest, 4, thisIsATest, 4); assertFalse(e1.isSameLineAndSelection(e2)); // Offsets into different soft lines. e2 = new editing.EditableLine(thisIsATest, 5, thisIsATest, 5); assertEquals('is ', e2.text); assertFalse(e1.isSameLineAndSelection(e2)); // Sanity check; second soft line. assertTrue(e2.isSameLineAndSelection(e2)); // Different offsets into second soft line. e1 = new editing.EditableLine(thisIsATest, 6, thisIsATest, 6); assertFalse(e1.isSameLineAndSelection(e2)); // Boundary. e1 = new editing.EditableLine(thisIsATest, 7, thisIsATest, 7); assertFalse(e1.isSameLineAndSelection(e2)); // Cross into new paragraph. e2 = new editing.EditableLine(hello, 0, hello, 0); assertEquals('hello world', e2.text); assertFalse(e1.isSameLineAndSelection(e2)); // On same node, with multi-static text line. e1 = new editing.EditableLine(hello, 1, hello, 1); assertFalse(e1.isSameLineAndSelection(e2)); // On same node, with multi-static text line; boundary. e1 = new editing.EditableLine(hello, 5, hello, 5); assertFalse(e1.isSameLineAndSelection(e2)); }); }); TEST_F('ChromeVoxEditingTest', 'EditableLineBaseLineAnchorOrFocus', function() { this.runWithLoadedTree( ` <div contenteditable role="textbox"> <p style="word-spacing:100000px">this is a test</p> <p>hello <b>world</b></p> </div> `, function(root) { const thisIsATest = root.findAll({role: RoleType.PARAGRAPH})[0].firstChild; const hello = root.findAll({role: RoleType.PARAGRAPH})[1].firstChild; const world = root.findAll({role: RoleType.PARAGRAPH})[1].lastChild; // The same position -- sanity check. let e1 = new editing.EditableLine(thisIsATest, 0, thisIsATest, 0, true); assertEquals('this ', e1.text); // Offsets into different soft lines; base on focus (default). e1 = new editing.EditableLine(thisIsATest, 0, thisIsATest, 6); assertEquals('is ', e1.text); // Notice that the offset is truncated at the beginning of the line. assertEquals(0, e1.startOffset); // Notice that the end offset is properly retained. assertEquals(1, e1.endOffset); // Offsets into different soft lines; base on anchor. e1 = new editing.EditableLine(thisIsATest, 0, thisIsATest, 6, true); assertEquals('this ', e1.text); assertEquals(0, e1.startOffset); // Notice that the end offset is truncated up to the end of // line. assertEquals(5, e1.endOffset); // Across paragraph selection with base line on focus. e1 = new editing.EditableLine(thisIsATest, 5, hello, 2); assertEquals('hello world', e1.text); assertEquals(0, e1.startOffset); assertEquals(2, e1.endOffset); // Across paragraph selection with base line on anchor. e1 = new editing.EditableLine(thisIsATest, 5, hello, 2, true); assertEquals('is ', e1.text); assertEquals(0, e1.startOffset); assertEquals(3, e1.endOffset); }); }); TEST_F('ChromeVoxEditingTest', 'IsValidLine', function() { this.runWithLoadedTree( ` <div contenteditable role="textbox"> <p style="word-spacing:100000px">this is a test</p> <p>end</p> </div> `, function(root) { // Each word is on its own line, but parented by a static text. const [text, endText] = root.findAll({role: RoleType.STATIC_TEXT}); // The EditableLine object automatically adjusts to surround the line no // matter what the input is. const line = new editing.EditableLine(text, 0, text, 0); assertTrue(line.isValidLine()); // During the course of editing operations, this line may become // invalidted. For example, if a user starts typing into the line, the // bounding nodes might change. // Simulate that here by modifying private state. // This puts the line at offset 8 (|this is a|). line.localLineStartContainerOffset_ = 0; line.localLineEndContainerOffset_ = 8; assertFalse(line.isValidLine()); // This puts us in the first line. line.localLineStartContainerOffset_ = 0; line.localLineEndContainerOffset_ = 4; assertTrue(line.isValidLine()); // This is still fine (for our purposes) because the line is still // intact. line.localLineStartContainerOffset_ = 0; line.localLineEndContainerOffset_ = 2; assertTrue(line.isValidLine()); // The line has changed. The end has been moved for some reason. line.lineEndContainer_ = endText; assertFalse(line.isValidLine()); }); }); TEST_F('ChromeVoxEditingTest', 'TelTrimsWhitespace', function() { const mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( ` <div id="go"></div> <input id="input" type="tel"></input> <script> let data = [ '6 ', '60 ', '601 ', '60 ' ]; let go = document.getElementById('go'); let input = document.getElementById('input'); let index = 0; go.addEventListener('click', function() { input.value = data[index]; index++; input.selectionStart = index; input.selectionEnd = index; }, true); </script> `, function(root) { const input = root.find({role: RoleType.TEXT_FIELD}); const go = root.find({role: RoleType.GENERIC_CONTAINER}); const enterKey = go.doDefault.bind(go); this.listenOnce(input, 'focus', function() { mockFeedback.call(enterKey) .expectSpeech('6') .call(enterKey) .expectSpeech('0') .call(enterKey) .expectSpeech('1') // Deletion. .call(enterKey) .expectSpeech('1') .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'BackwardWordDelete', function() { const mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( ` <div style='max-width: 5px; overflow-wrap: normal' contenteditable> this is a test </div> `, function(root) { const input = root.find({attributes: {nonAtomicTextFieldRoot: true}}); this.listenOnce(input, 'focus', function() { mockFeedback.call(this.press(KeyCode.END, {ctrl: true})) .expectSpeech('test') .call(this.press(KeyCode.BACK, {ctrl: true})) .expectSpeech('test, deleted') .expectBraille('a\u00a0', {startIndex: 2, endIndex: 2}) .call(this.press(KeyCode.BACK, {ctrl: true})) .expectSpeech('a , deleted') .expectBraille('is\u00a0', {startIndex: 3, endIndex: 3}) .call(this.press(KeyCode.BACK, {ctrl: true})) .expectSpeech('is , deleted') .expectBraille('this\u00a0mled', {startIndex: 5, endIndex: 5}) .call(this.press(KeyCode.BACK, {ctrl: true})) .expectBraille(' mled', {startIndex: 0, endIndex: 0}) .replay(); }); input.focus(); }); }); TEST_F( 'ChromeVoxEditingTest', 'BackwardWordDeleteAcrossParagraphs', function() { const mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( ` <div style='max-width: 5px; overflow-wrap: normal' contenteditable role="textbox"> <p>first line</p> <p>second line</p> </div> `, function(root) { const input = root.find({role: RoleType.TEXT_FIELD}); this.listenOnce(input, 'focus', function() { mockFeedback.call(this.press(KeyCode.END, {ctrl: true})) .expectSpeech('line') .call(this.press(KeyCode.BACK, {ctrl: true})) .expectSpeech('line, deleted') .call(this.press(KeyCode.BACK, {ctrl: true})) .expectSpeech('second , deleted') .call(this.press(KeyCode.BACK, {ctrl: true})) .expectSpeech('line') .call(this.press(KeyCode.BACK, {ctrl: true})) .expectSpeech('line, deleted') .call(this.press(KeyCode.BACK, {ctrl: true})) .expectSpeech('first , deleted') .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'GrammarErrors', function() { const mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( ` <div contenteditable="true" role="textbox"> This <span aria-invalid="grammar">are</span> a test </div> <button id="go">Go</button> <script> document.getElementById('go').addEventListener('click', function() { let sel = getSelection(); sel.modify('move', 'forward', 'character'); }, true); </script> `, function(root) { const input = root.find({role: RoleType.TEXT_FIELD}); const go = root.find({role: RoleType.BUTTON}); const moveByChar = go.doDefault.bind(go); this.listenOnce(input, 'focus', function() { mockFeedback.call(moveByChar) .expectSpeech('h') .call(moveByChar) .expectSpeech('i') .call(moveByChar) .expectSpeech('s') .call(moveByChar) .expectSpeech(' ') .call(moveByChar) .expectSpeech('a', 'Grammar error') .call(moveByChar) .expectSpeech('r') .call(moveByChar) .expectSpeech('e') .call(moveByChar) .expectSpeech(' ', 'Leaving grammar error') .replay(); }); input.focus(); }); }); // Flaky test, crbug.com/1098642. TEST_F( 'ChromeVoxEditingTest', 'DISABLED_CharacterTypedAfterNewLine', function() { const mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( ` <p>start</p> <div contenteditable role="textbox"> <p>hello</p> </div> `, function(root) { const input = root.find({role: RoleType.TEXT_FIELD}); this.listenOnce(input, 'focus', function() { mockFeedback.call(this.press(KeyCode.END, {ctrl: true})) .expectSpeech('hello') .call(this.press(KeyCode.RETURN)) .expectSpeech('\n') .call(this.press(KeyCode.A)) .expectSpeech('a') .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'SelectAll', function() { const mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( ` <div contenteditable role="textbox"> <p>first line</p> <p>second line</p> <p>third line</p> </div> `, function(root) { const input = root.find({role: RoleType.TEXT_FIELD}); this.listenOnce(input, 'focus', function() { mockFeedback.call(this.press(KeyCode.END, {ctrl: true})) .expectSpeech('third line') .call(this.press(KeyCode.A, {ctrl: true})) .expectSpeech('first line second line third line', 'selected') .call(this.press(KeyCode.UP)) .expectSpeech('second line') .call(this.press(KeyCode.A, {ctrl: true})) .expectSpeech('first line second line third line', 'selected') .call(this.press(KeyCode.HOME, {ctrl: true})) .expectSpeech('first line') .call(this.press(KeyCode.A, {ctrl: true})) .expectSpeech('first line second line third line', 'selected') .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'TextAreaBrailleEmptyLine', function() { const mockFeedback = this.createMockFeedback(); this.runWithLoadedTree('<textarea></textarea>', function(root) { const textarea = root.find({role: RoleType.TEXT_FIELD}); this.listenOnce(textarea, 'focus', function() { this.listenOnce(textarea, 'valueInTextFieldChanged', function() { mockFeedback.call(this.press(KeyCode.UP)).expectBraille('\n'); mockFeedback.call(this.press(KeyCode.UP)).expectBraille('two\n'); mockFeedback.call(this.press(KeyCode.UP)).expectBraille('one\n'); mockFeedback.call(this.press(KeyCode.UP)).expectBraille('\n'); mockFeedback.call(this.press(KeyCode.UP)) .expectBraille('test\nmled') .replay(); }); }); textarea.focus(); textarea.setValue('test\n\none\ntwo\n\nthree'); }); }); TEST_F('ChromeVoxEditingTest', 'MoveByCharacterIntent', function() { const mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( ` <div contenteditable role="textbox"> <p>123</p> <p>456</p> </div> `, function(root) { const input = root.find({role: RoleType.TEXT_FIELD}); this.listenOnce(input, 'focus', function() { mockFeedback.call(this.press(KeyCode.RIGHT)) .expectSpeech('2') .call(this.press(KeyCode.RIGHT)) .expectSpeech('3') .call(this.press(KeyCode.RIGHT)) .expectSpeech('\n') .call(this.press(KeyCode.RIGHT)) .expectSpeech('4') .call(this.press(KeyCode.LEFT)) .expectSpeech('\n') .call(this.press(KeyCode.LEFT)) .expectSpeech('3') .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'MoveByLineIntent', function() { const mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( ` <div contenteditable role="textbox"> <p>123</p> <p>456</p> <p>789</p> </div> `, function(root) { const input = root.find({role: RoleType.TEXT_FIELD}); this.listenOnce(input, 'focus', function() { mockFeedback.call(this.press(KeyCode.DOWN)) .expectSpeech('456') .call(this.press(KeyCode.DOWN)) .expectSpeech('789') .call(this.press(KeyCode.UP)) .expectSpeech('456') .call(this.press(KeyCode.UP)) .expectSpeech('123') .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'SelectAllBareTextContent', function() { const mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( ` <div contenteditable role="textbox">unread</div> `, function(root) { const input = root.find({role: RoleType.TEXT_FIELD}); this.listenOnce(input, 'focus', function() { mockFeedback.call(this.press(KeyCode.END, {ctrl: true})) .expectSpeech('unread') .call(this.press(KeyCode.A, {ctrl: true})) .expectSpeech('unread', 'selected') .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'NonBreakingSpaceNewLine', function() { const mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( ` <div contenteditable role="textbox">&nbsp</div> `, function(root) { const input = root.find({role: RoleType.TEXT_FIELD}); this.listenOnce(input, 'focus', function() { mockFeedback .call(() => { const node = root.find({role: RoleType.INLINE_TEXT_BOX}); const line = new editing.EditableLine(node, 0, node, 0); const prev = new editing.EditableLine(node.root, 1, node.root, 1); const editableHandler = DesktopAutomationHandler.instance .textEditHandler_.editableText_; editableHandler.handleSpeech_( line, prev, line, line, prev, prev, true, []); }) .expectSpeech('\n') .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'InputEvents', function() { const site = `<input type="text"></input>`; this.runWithLoadedTree(site, async function(root) { const input = root.find({role: RoleType.TEXT_FIELD}); input.focus(); await new Promise(resolve => { this.listenOnce(input, 'focus', resolve); }); // EventType.TEXT_SELECTION_CHANGED fires on focus as well. // // TODO(nektar): Deprecate and remove TEXT_SELECTION_CHANGED. event = await this.waitForEditableEvent(); assertEquals(EventType.TEXT_SELECTION_CHANGED, event.type); assertEquals(input, event.target); assertEquals('', input.value); this.press(KeyCode.A)(); event = await this.waitForEditableEvent(); assertEquals(EventType.VALUE_IN_TEXT_FIELD_CHANGED, event.type); assertEquals(input, event.target); assertEquals('a', input.value); // We deliberately used EventType.TEXT_SELECTION_CHANGED instead of // EventType.DOCUMENT_SELECTION_CHANGED for text fields. event = await this.waitForEditableEvent(); assertEquals(EventType.TEXT_SELECTION_CHANGED, event.type); assertEquals(input, event.target); assertEquals('a', input.value); this.press(KeyCode.B)(); event = await this.waitForEditableEvent(); assertEquals(EventType.VALUE_IN_TEXT_FIELD_CHANGED, event.type); assertEquals(input, event.target); assertEquals('ab', input.value); event = await this.waitForEditableEvent(); assertEquals(EventType.TEXT_SELECTION_CHANGED, event.type); assertEquals(input, event.target); assertEquals('ab', input.value); }); }); TEST_F('ChromeVoxEditingTest', 'TextAreaEvents', function() { const site = `<textarea></textarea>`; this.runWithLoadedTree(site, async function(root) { const textArea = root.find({role: RoleType.TEXT_FIELD}); textArea.focus(); await new Promise(resolve => { this.listenOnce(textArea, 'focus', resolve); }); let event = await this.waitForEditableEvent(); assertEquals(EventType.DOCUMENT_SELECTION_CHANGED, event.type); assertEquals(textArea, event.target); assertEquals('', textArea.value); this.press(KeyCode.A)(); event = await this.waitForEditableEvent(); assertEquals(EventType.DOCUMENT_SELECTION_CHANGED, event.type); assertEquals(textArea, event.target); assertEquals('a', textArea.value); this.press(KeyCode.B)(); event = await this.waitForEditableEvent(); assertEquals(EventType.DOCUMENT_SELECTION_CHANGED, event.type); assertEquals(textArea, event.target); assertEquals('ab', textArea.value); }); }); TEST_F('ChromeVoxEditingTest', 'ContentEditableEvents', function() { const site = `<div role="textbox" contenteditable></div>`; this.runWithLoadedTree(site, async function(root) { const contentEditable = root.find({role: RoleType.TEXT_FIELD}); contentEditable.focus(); await new Promise(resolve => { this.listenOnce(contentEditable, 'focus', resolve); }); let event = await this.waitForEditableEvent(); assertEquals(EventType.DOCUMENT_SELECTION_CHANGED, event.type); assertEquals(contentEditable, event.target); assertEquals('', contentEditable.value); this.press(KeyCode.A)(); event = await this.waitForEditableEvent(); assertEquals(EventType.DOCUMENT_SELECTION_CHANGED, event.type); assertEquals(contentEditable, event.target); assertEquals('a', contentEditable.value); this.press(KeyCode.B)(); event = await this.waitForEditableEvent(); assertEquals(EventType.DOCUMENT_SELECTION_CHANGED, event.type); assertEquals(contentEditable, event.target); assertEquals('ab', contentEditable.value); }); }); TEST_F('ChromeVoxEditingTest', 'MarkedContent', function() { const mockFeedback = this.createMockFeedback(); const site = ` <div contenteditable role="textbox"> <p>Start</p> <span>This is </span><span role="mark">my</span><span> text.</span> <br> <span>This is </span><span role="mark" aria-roledescription="Comment">your</span><span> text.</span> <br> <span>This is </span><span role="suggestion"><span role="insertion">their</span></span><span> text.</span> <br> <span>This is </span><span role="suggestion"><span role="deletion">everyone's</span></span><span> text.</span> </div> `; this.runWithLoadedTree(site, function(root) { const input = root.find({role: RoleType.TEXT_FIELD}); this.listenOnce(input, 'focus', function() { mockFeedback.call(this.press(KeyCode.DOWN)) .expectSpeech( 'This is ', 'my', 'Marked content', ' text.', 'Exited Marked content.') .call(this.press(KeyCode.DOWN)) .expectSpeech( 'This is ', 'your', 'Comment', ' text.', 'Exited Comment.') .call(this.press(KeyCode.DOWN)) .expectSpeech( 'This is ', 'Suggestion', 'Insertion', 'their', ' text.', 'Exited Insertion.', 'Exited Suggestion.') .call(this.press(KeyCode.DOWN)) .expectSpeech( 'This is ', 'Suggestion', 'Deletion', `everyone's`, ' text.', 'Exited Deletion.', 'Exited Suggestion.') .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'NestedInsertionDeletion', function() { const mockFeedback = this.createMockFeedback(); const site = ` <div contenteditable role="textbox"> <p>Start</p> <span>I </span> <span role="suggestion" aria-description="Username"> <span role="insertion">was</span> <span role="deletion">am</span></span><span> typing</span> <p>End</p> </div> `; this.runWithLoadedTree(site, function(root) { const input = root.find({role: RoleType.TEXT_FIELD}); this.listenOnce(input, 'focus', function() { mockFeedback.call(this.press(KeyCode.DOWN)) .expectSpeech( 'I ', 'Suggestion', 'Username', 'Insertion', 'was', 'Exited Insertion.', 'Deletion', 'am', ' typing', 'Exited Deletion.', 'Exited Suggestion.') .call(this.press(KeyCode.DOWN)) .expectSpeech('End') .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'Separator', function() { // In the past, an ARIA leaf role would cause subtree content to be removed. // However, the new decision is to not remove any content the user might // interact with. const mockFeedback = this.createMockFeedback(); const site = ` <div contenteditable="true" role="textbox"> <p>Start</p> <p><span>Hello</span></p> <p><span role="separator">Separator content should be read</span></p> <p><span>World</span></p> </div> `; this.runWithLoadedTree(site, function(root) { const input = root.find({role: RoleType.TEXT_FIELD}); this.listenOnce(input, 'focus', function() { mockFeedback.call(this.press(KeyCode.DOWN)) .expectSpeech('Hello') .call(this.press(KeyCode.DOWN)) .expectSpeech('Separator content should be read') .call(this.press(KeyCode.DOWN)) .expectSpeech('World') .call(this.press(KeyCode.LEFT)) .expectSpeech('\n') .replay(); }); input.focus(); }); }); // Test for the issue in crbug.com/1203840. This case was causing an infinite // loop in ChromeVox's editable line data computation. This test ensures we // workaround potential infinite loops correctly, and should be removed once the // proper fix is implemented in blink. TEST_F( 'ChromeVoxEditingTest', 'EditableLineInfiniteLoopWorkaround', function() { const mockFeedback = this.createMockFeedback(); const site = ` <div contenteditable="true" role="textbox"> <p>Start</p> <table> <tbody> <tr> <td> <span> <span style="font-size:13.333333333333332px;">This is a test<span>&nbsp;</span></span></span> </td> </tr> </tbody> </table> <span>End</span> </div> `; this.runWithLoadedTree(site, function(root) { const input = root.find({role: RoleType.TEXT_FIELD}); this.listenOnce(input, 'focus', function() { mockFeedback.call(this.press(KeyCode.DOWN)) .expectSpeech('This is a test') .call(this.press(KeyCode.DOWN)) .expectSpeech('End') .replay(); }); input.focus(); }); });
Weiichengg/main
src/main/java/seedu/address/model/hirelah/storage/StorageManager.java
<reponame>Weiichengg/main package seedu.address.model.hirelah.storage; import java.io.IOException; import java.nio.file.Path; import java.util.Optional; import java.util.logging.Logger; import seedu.address.commons.core.LogsCenter; import seedu.address.commons.exceptions.DataConversionException; import seedu.address.commons.exceptions.IllegalValueException; import seedu.address.model.ReadOnlyUserPrefs; import seedu.address.model.UserPrefs; import seedu.address.model.hirelah.AttributeList; import seedu.address.model.hirelah.Interviewee; import seedu.address.model.hirelah.IntervieweeList; import seedu.address.model.hirelah.MetricList; import seedu.address.model.hirelah.QuestionList; import seedu.address.model.hirelah.Transcript; import seedu.address.storage.UserPrefsStorage; /** * Manages storage of different Sessions data in local storage. */ public class StorageManager implements Storage { private static final Logger logger = LogsCenter.getLogger(seedu.address.storage.StorageManager.class); private UserPrefsStorage userPrefsStorage; private IntervieweeStorage intervieweeStorage; private AttributeStorage attributeStorage; private QuestionStorage questionStorage; private MetricStorage metricStorage; private TranscriptStorage transcriptStorage; private ModelStorage modelStorage; public StorageManager(UserPrefsStorage userPrefsStorage, IntervieweeStorage intervieweeStorage, AttributeStorage attributeStorage, QuestionStorage questionStorage, MetricStorage metricStorage, TranscriptStorage transcriptStorage, ModelStorage modelStorage) { super(); this.userPrefsStorage = userPrefsStorage; this.intervieweeStorage = intervieweeStorage; this.attributeStorage = attributeStorage; this.questionStorage = questionStorage; this.metricStorage = metricStorage; this.transcriptStorage = transcriptStorage; this.modelStorage = modelStorage; } // ================ InterviewStorage methods ============================== /** Save all the IntervieweeList into their Json file*/ public void saveInterviewee(IntervieweeList source) throws IOException { logger.fine("Attempting to write to Interviewee data file: " + getIntervieweeDirectory()); intervieweeStorage.saveInterview(source); } public Optional<IntervieweeList> readInterviewee(QuestionList questionList, AttributeList attributeList, Boolean initialModel) throws DataConversionException { return readInterviewee(intervieweeStorage.getPath(), questionList, attributeList, initialModel); } /** Reads the Json file and converts them to Interviewee objects*/ public Optional<IntervieweeList> readInterviewee(Path filepath, QuestionList questionList, AttributeList attributeList, Boolean initialModel) throws DataConversionException { logger.fine("Attempting to read data from Interviewee file: " + filepath); return intervieweeStorage .readInterviewee(filepath, questionList, attributeList, initialModel, this.transcriptStorage); } public Path getIntervieweeDirectory() { return intervieweeStorage.getPath(); } // ================ AttributeStorage methods ============================== /** Save all the AttributeList into their Json file*/ public void saveAttribute(AttributeList source) throws IOException, IllegalValueException { logger.fine("Attempting to write to Attribute data file: " + getAttributeDirectory()); attributeStorage.saveAttributes(source); } public Optional<AttributeList> readAttribute() throws DataConversionException { return readAttribute(attributeStorage.getPath()); } /** Reads the Json file and converts them to Interviewee objects*/ public Optional<AttributeList> readAttribute(Path filepath) throws DataConversionException { logger.fine("Attempting to read data from Attribute file: " + filepath); return attributeStorage.readAttribute(filepath); } public Path getAttributeDirectory() { return attributeStorage.getPath(); } // ================ QuestionStorage methods ============================== /** Save all the QuestionList into their Json file*/ public void saveQuestion(QuestionList source) throws IOException { logger.fine("Attempting to write to Metric data file: " + getQuestionDirectory()); questionStorage.saveQuestions(source); } public Optional<QuestionList> readQuestion() throws DataConversionException { return readQuestion(questionStorage.getPath()); } /** Reads the Json file and converts them to Interviewee objects*/ public Optional<QuestionList> readQuestion(Path filepath) throws DataConversionException { logger.fine("Attempting to read data from Question file: " + filepath); return questionStorage.readQuestion(filepath); } public Path getQuestionDirectory() { return questionStorage.getPath(); } // ================ MetricStorage methods ================================ /** Save all the MetricList into their Json file*/ public void saveMetric(MetricList source) throws IOException, IllegalValueException { logger.fine("Attempting to write to Metric data file: " + getMetricDirectory()); metricStorage.saveMetrics(source); } public Optional<MetricList> readMetric() throws DataConversionException { return readMetric(metricStorage.getPath()); } /** Reads the Json file and converts them to Interviewee objects */ public Optional<MetricList> readMetric(Path filepath) throws DataConversionException { logger.fine("Attempting to read data from Metric file: " + filepath); return metricStorage.readMetric(filepath); } public Path getMetricDirectory() { return metricStorage.getPath(); } // ================ TranscriptStorage methods ================================ /** Save all the MetricList into their Json file */ public void saveTranscript(Interviewee source) throws IOException { logger.fine("Attempting to write to Transcript data file: " + getMetricDirectory()); transcriptStorage.saveTranscript(source); } /** Reads the Json file and converts them to Interviewee objects */ public Optional<Transcript> readTranscript(Path filepath, QuestionList questionList, AttributeList attributeList) throws DataConversionException { logger.fine("Attempting to read data from Transcript file: " + filepath); return transcriptStorage.readTranscript(filepath, questionList, attributeList); } // ================ ModelStorage methods ================================ public Path getModelDirectory() { return modelStorage.getPath(); } /** * Saves the Model state to hard disk. * * @param model the model state - whether the model is finalised. * @throws IOException if an error occurs while writing the file. */ public void saveModel(Boolean model) throws IOException { logger.fine("Attempting to write to Model data file: " + getModelDirectory()); modelStorage.saveModel(model); } public Optional<Boolean> readModel() throws DataConversionException { return readModel(getModelDirectory()); } /** * */ public Optional<Boolean> readModel(Path filePath) throws DataConversionException { logger.fine("Attempting to read data from Model file: " + filePath); return modelStorage.readModel(filePath); } public Path getTranscriptDirectory() { return transcriptStorage.getPath(); } // ================ UserPrefsStorage methods ============================== @Override public Path getUserPrefsFilePath() { return userPrefsStorage.getUserPrefsFilePath(); } @Override public Optional<UserPrefs> readUserPrefs() throws DataConversionException, IOException { return userPrefsStorage.readUserPrefs(); } @Override public void saveUserPrefs(ReadOnlyUserPrefs userPrefs) throws IOException { userPrefsStorage.saveUserPrefs(userPrefs); } }
joaojunior10/StormIDS
StormEngine/src/main/java/util/rules/payload/RegexGenerator.java
<filename>StormEngine/src/main/java/util/rules/payload/RegexGenerator.java package util.rules.payload; import com.google.gson.Gson; import util.rules.payload.options.Content; import java.util.List; import java.util.regex.Pattern; /** * Created by joao on 8/11/15. */ public class RegexGenerator { public static Pattern generate(List<Content> contents){ StringBuilder regex = new StringBuilder(); for(Content content : contents){ String depth = ""; String offset = ""; String distance = "0"; String nocase = ""; if(content.nocase){ nocase = "(?i)"; } if(content.depth != null) { depth = content.depth.toString(); } if(content.offset != null) { offset = "^"; distance = content.offset.toString(); } if(content.distance != null){ distance = content.distance.toString(); } if(content.within != null){ depth = content.within.toString(); } content.content = content.content.replaceAll("(?=[]\\[+&|!(){}^\"~*?:\\\\-])", "\\\\"); String contentPattern = String.format("%s%s(.|\\n|\\r\\n){%s,%s}%s",nocase,offset, distance,depth,content.content); regex.append(contentPattern); } // try { // Pattern test = Pattern.compile(regex.toString()); // }catch (Exception e){ // Gson gson = new Gson(); //// System.err.println(gson.toJson(contents)); // } return Pattern.compile(regex.toString()); } }
specs-feup/kadabra
KadabraAst/src/pt/up/fe/specs/kadabra/ast/decl/TypeDecl.java
/** * Copyright 2021 SPeCS. * * 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. under the License. */ package pt.up.fe.specs.kadabra.ast.decl; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Optional; import org.suikasoft.jOptions.Datakey.DataKey; import org.suikasoft.jOptions.Datakey.KeyFactory; import org.suikasoft.jOptions.Interfaces.DataStore; import pt.up.fe.specs.kadabra.ast.KadabraNode; public class TypeDecl extends Decl { /// DATAKEYS BEGIN public final static DataKey<String> QUALIFIED_PREFIX = KeyFactory.string("qualifiedPrefix"); public static final DataKey<Optional<TypeDecl>> SUPER = KeyFactory.optional("super"); public static final DataKey<List<TypeDecl>> INTERFACES = KeyFactory.list("interfaces", TypeDecl.class); /// DATAKEYS END private static final TypeDecl NO_TYPE; static { var data = DataStore.newInstance(TypeDecl.class); NO_TYPE = new TypeDecl(data, Collections.emptyList()); } /** * * @return a singleton TypeDecl representing "No type" */ public static TypeDecl getNoType() { return NO_TYPE; } public static boolean isNoType(TypeDecl type) { return type == NO_TYPE; } public TypeDecl(DataStore data, Collection<? extends KadabraNode> children) { super(data, children); } }
gsteri1/OG-Platform
projects/OG-Analytics/tests/unit/com/opengamma/financial/interestrate/payments/method/CapFloorCMSSpreadSABRBinormalMethodTest.java
/** * Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.financial.interestrate.payments.method; import static org.testng.AssertJUnit.assertEquals; import static org.testng.AssertJUnit.assertTrue; import it.unimi.dsi.fastutil.doubles.DoubleAVLTreeSet; import java.util.List; import javax.time.calendar.LocalDateTime; import javax.time.calendar.Period; import javax.time.calendar.TimeZone; import javax.time.calendar.ZonedDateTime; import org.testng.annotations.Test; import com.opengamma.financial.convention.businessday.BusinessDayConvention; import com.opengamma.financial.convention.businessday.BusinessDayConventionFactory; import com.opengamma.financial.convention.calendar.Calendar; import com.opengamma.financial.convention.calendar.MondayToFridayCalendar; import com.opengamma.financial.convention.daycount.DayCount; import com.opengamma.financial.convention.daycount.DayCountFactory; import com.opengamma.financial.instrument.index.CMSIndex; import com.opengamma.financial.instrument.index.IborIndex; import com.opengamma.financial.instrument.payment.CapFloorCMSSpreadDefinition; import com.opengamma.financial.instrument.swap.SwapFixedIborDefinition; import com.opengamma.financial.interestrate.ParRateCalculator; import com.opengamma.financial.interestrate.PresentValueCurveSensitivitySABRCalculator; import com.opengamma.financial.interestrate.PresentValueSABRCalculator; import com.opengamma.financial.interestrate.PresentValueSABRSensitivityDataBundle; import com.opengamma.financial.interestrate.PresentValueSABRSensitivitySABRCalculator; import com.opengamma.financial.interestrate.InterestRateCurveSensitivity; import com.opengamma.financial.interestrate.TestsDataSets; import com.opengamma.financial.interestrate.YieldCurveBundle; import com.opengamma.financial.interestrate.method.SensitivityFiniteDifference; import com.opengamma.financial.interestrate.payments.CapFloorCMS; import com.opengamma.financial.interestrate.payments.CapFloorCMSSpread; import com.opengamma.financial.interestrate.payments.CouponCMS; import com.opengamma.financial.interestrate.payments.CouponIbor; import com.opengamma.financial.interestrate.payments.Payment; import com.opengamma.financial.interestrate.swap.definition.FixedCouponSwap; import com.opengamma.financial.model.option.definition.SABRInterestRateCorrelationParameters; import com.opengamma.financial.model.option.definition.SABRInterestRateDataBundle; import com.opengamma.financial.model.option.definition.SABRInterestRateParameters; import com.opengamma.financial.model.option.pricing.analytic.formula.BlackFunctionData; import com.opengamma.financial.model.option.pricing.analytic.formula.EuropeanVanillaOption; import com.opengamma.financial.model.option.pricing.analytic.formula.NormalPriceFunction; import com.opengamma.financial.model.volatility.NormalImpliedVolatilityFormula; import com.opengamma.math.function.DoubleFunction1D; import com.opengamma.math.function.Function1D; import com.opengamma.math.function.RealPolynomialFunction1D; import com.opengamma.util.money.Currency; import com.opengamma.util.money.CurrencyAmount; import com.opengamma.util.time.DateUtils; import com.opengamma.util.tuple.DoublesPair; /** * Tests the pricing of CMS spread option in binormal with correlation by strike approach. */ public class CapFloorCMSSpreadSABRBinormalMethodTest { //Swaps private static final Currency CUR = Currency.USD; private static final Calendar CALENDAR = new MondayToFridayCalendar("A"); private static final BusinessDayConvention BUSINESS_DAY = BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Modified Following"); private static final boolean IS_EOM = true; private static final ZonedDateTime SETTLEMENT_DATE = DateUtils.getUTCDate(2011, 3, 17); private static final Period FIXED_PAYMENT_PERIOD = Period.ofMonths(6); private static final DayCount FIXED_DAY_COUNT = DayCountFactory.INSTANCE.getDayCount("30/360"); private static final boolean FIXED_IS_PAYER = true; // Irrelevant for the underlying private static final double RATE = 0.0; // Irrelevant for the underlying private static final Period INDEX_TENOR = Period.ofMonths(3); private static final int SETTLEMENT_DAYS = 2; private static final DayCount DAY_COUNT = DayCountFactory.INSTANCE.getDayCount("Actual/360"); private static final IborIndex IBOR_INDEX = new IborIndex(CUR, INDEX_TENOR, SETTLEMENT_DAYS, CALENDAR, DAY_COUNT, BUSINESS_DAY, IS_EOM); // Swap 10Y private static final Period ANNUITY_TENOR_1 = Period.ofYears(10); private static final CMSIndex CMS_INDEX_1 = new CMSIndex(FIXED_PAYMENT_PERIOD, FIXED_DAY_COUNT, IBOR_INDEX, ANNUITY_TENOR_1); private static final SwapFixedIborDefinition SWAP_DEFINITION_1 = SwapFixedIborDefinition.from(SETTLEMENT_DATE, CMS_INDEX_1, 1.0, RATE, FIXED_IS_PAYER); // Swap 2Y private static final Period ANNUITY_TENOR_2 = Period.ofYears(2); private static final CMSIndex CMS_INDEX_2 = new CMSIndex(FIXED_PAYMENT_PERIOD, FIXED_DAY_COUNT, IBOR_INDEX, ANNUITY_TENOR_2); private static final SwapFixedIborDefinition SWAP_DEFINITION_2 = SwapFixedIborDefinition.from(SETTLEMENT_DATE, CMS_INDEX_2, 1.0, RATE, FIXED_IS_PAYER); // CMS spread coupon private static final double NOTIONAL = 100000000; private static final ZonedDateTime PAYMENT_DATE = DateUtils.getUTCDate(2011, 4, 6); private static final ZonedDateTime FIXING_DATE = DateUtils.getUTCDate(2010, 12, 30); private static final ZonedDateTime ACCRUAL_START_DATE = DateUtils.getUTCDate(2011, 1, 5); private static final ZonedDateTime ACCRUAL_END_DATE = DateUtils.getUTCDate(2011, 4, 5); private static final DayCount PAYMENT_DAY_COUNT = DayCountFactory.INSTANCE.getDayCount("Actual/360"); private static final double PAYMENT_ACCRUAL_FACTOR = PAYMENT_DAY_COUNT.getDayCountFraction(ACCRUAL_START_DATE, ACCRUAL_END_DATE); private static final double STRIKE = 0.0010; // 10 bps private static final boolean IS_CAP = true; // to derivatives private static final ZonedDateTime REFERENCE_DATE = DateUtils.getUTCDate(2008, 8, 18); private static final String FUNDING_CURVE_NAME = "Funding"; private static final String FORWARD_CURVE_NAME = "Forward"; private static final String[] CURVES_NAME = {FUNDING_CURVE_NAME, FORWARD_CURVE_NAME}; private static final FixedCouponSwap<? extends Payment> SWAP_1 = SWAP_DEFINITION_1.toDerivative(REFERENCE_DATE, CURVES_NAME); private static final FixedCouponSwap<? extends Payment> SWAP_2 = SWAP_DEFINITION_2.toDerivative(REFERENCE_DATE, CURVES_NAME); private static final DayCount ACT_ACT = DayCountFactory.INSTANCE.getDayCount("Actual/Actual ISDA"); private static final ZonedDateTime REFERENCE_DATE_ZONED = ZonedDateTime.of(LocalDateTime.ofMidnight(REFERENCE_DATE), TimeZone.UTC); private static final double PAYMENT_TIME = ACT_ACT.getDayCountFraction(REFERENCE_DATE_ZONED, PAYMENT_DATE); private static final double FIXING_TIME = ACT_ACT.getDayCountFraction(REFERENCE_DATE_ZONED, FIXING_DATE); private static final double SETTLEMENT_TIME = ACT_ACT.getDayCountFraction(REFERENCE_DATE_ZONED, SWAP_DEFINITION_1.getFixedLeg().getNthPayment(0).getAccrualStartDate()); private static final CapFloorCMSSpreadDefinition CMS_SPREAD_DEFINITION = new CapFloorCMSSpreadDefinition(CUR, PAYMENT_DATE, ACCRUAL_START_DATE, ACCRUAL_END_DATE, PAYMENT_ACCRUAL_FACTOR, NOTIONAL, FIXING_DATE, SWAP_DEFINITION_1, CMS_INDEX_1, SWAP_DEFINITION_2, CMS_INDEX_2, STRIKE, IS_CAP); private static final CapFloorCMSSpread CMS_SPREAD = new CapFloorCMSSpread(CUR, PAYMENT_TIME, PAYMENT_ACCRUAL_FACTOR, NOTIONAL, FIXING_TIME, SWAP_1, CMS_INDEX_1, SWAP_2, CMS_INDEX_2, SETTLEMENT_TIME, STRIKE, IS_CAP, FUNDING_CURVE_NAME); private static final YieldCurveBundle CURVES = TestsDataSets.createCurves1(); private static final SABRInterestRateParameters SABR_PARAMETERS = TestsDataSets.createSABR1(); private static final SABRInterestRateDataBundle SABR_BUNDLE = new SABRInterestRateDataBundle(SABR_PARAMETERS, CURVES); private static final double CORRELATION = 0.80; private static final DoubleFunction1D CORRELATION_FUNCTION = new RealPolynomialFunction1D(new double[] {CORRELATION}); // Constant function private static final CapFloorCMSSpreadSABRBinormalMethod METHOD = new CapFloorCMSSpreadSABRBinormalMethod(CORRELATION_FUNCTION); @Test(expectedExceptions = IllegalArgumentException.class) public void testNotNullCorrelation() { new CapFloorCMSSpreadSABRBinormalMethod(null); } @Test public void getter() { final double correlation = 0.80; final DoubleFunction1D correlationFunction = new RealPolynomialFunction1D(new double[] {correlation}); // Constant function final CapFloorCMSSpreadSABRBinormalMethod method = new CapFloorCMSSpreadSABRBinormalMethod(correlationFunction); assertEquals("CMS spread binormal method: correlation function getter", correlationFunction, method.getCorrelation()); } @Test /** * Tests the present value against the price explicitly computed for constant correlation. */ public void presentValue() { final double correlation = 0.80; final DoubleFunction1D correlationFunction = new RealPolynomialFunction1D(new double[] {correlation}); // Constant function final CapFloorCMSSpreadSABRBinormalMethod method = new CapFloorCMSSpreadSABRBinormalMethod(correlationFunction); final double cmsSpreadPrice = method.presentValue(CMS_SPREAD, SABR_BUNDLE).getAmount(); final double discountFactorPayment = CURVES.getCurve(FUNDING_CURVE_NAME).getDiscountFactor(PAYMENT_TIME); final CouponCMSSABRReplicationMethod methodCms = CouponCMSSABRReplicationMethod.getDefaultInstance(); final CapFloorCMSSABRReplicationMethod methodCmsCap = CapFloorCMSSABRReplicationMethod.getDefaultInstance(); final NormalImpliedVolatilityFormula impliedVolatility = new NormalImpliedVolatilityFormula(); final NormalPriceFunction normalPrice = new NormalPriceFunction(); final ParRateCalculator parRate = ParRateCalculator.getInstance(); final CouponCMS cmsCoupon1 = CouponCMS.from(CMS_SPREAD, SWAP_1, SETTLEMENT_TIME); final CouponCMS cmsCoupon2 = CouponCMS.from(CMS_SPREAD, SWAP_2, SETTLEMENT_TIME); final double cmsCoupon1Price = methodCms.presentValue(cmsCoupon1, SABR_BUNDLE); final double cmsCoupon2Price = methodCms.presentValue(cmsCoupon2, SABR_BUNDLE); final double expectedRate1 = cmsCoupon1Price / discountFactorPayment / cmsCoupon1.getNotional() / cmsCoupon1.getPaymentYearFraction(); final double expectedRate2 = cmsCoupon2Price / discountFactorPayment / cmsCoupon2.getNotional() / cmsCoupon2.getPaymentYearFraction(); final double forward1 = parRate.visit(SWAP_1, CURVES); final double forward2 = parRate.visit(SWAP_2, CURVES); final CapFloorCMS cmsCap1 = CapFloorCMS.from(cmsCoupon1, forward1, true); final CapFloorCMS cmsCap2 = CapFloorCMS.from(cmsCoupon2, forward2, true); final double cmsCap1Price = methodCmsCap.presentValue(cmsCap1, SABR_BUNDLE).getAmount(); final double cmsCap2Price = methodCmsCap.presentValue(cmsCap2, SABR_BUNDLE).getAmount(); final EuropeanVanillaOption optionCap1 = new EuropeanVanillaOption(forward1, FIXING_TIME, true); final BlackFunctionData dataCap1 = new BlackFunctionData(expectedRate1, 1.0, 0.0); final double cmsCap1IV = impliedVolatility.getImpliedVolatility(dataCap1, optionCap1, cmsCap1Price / discountFactorPayment / cmsCoupon1.getNotional() / cmsCoupon1.getPaymentYearFraction()); final EuropeanVanillaOption optionCap2 = new EuropeanVanillaOption(forward2, FIXING_TIME, true); final BlackFunctionData dataCap2 = new BlackFunctionData(expectedRate2, 1.0, 0.0); final double cmsCap2IV = impliedVolatility.getImpliedVolatility(dataCap2, optionCap2, cmsCap2Price / discountFactorPayment / cmsCoupon2.getNotional() / cmsCoupon2.getPaymentYearFraction()); double spreadVol = cmsCap1IV * cmsCap1IV - 2 * correlation * cmsCap1IV * cmsCap2IV + cmsCap2IV * cmsCap2IV; spreadVol = Math.sqrt(spreadVol); final EuropeanVanillaOption optionSpread = new EuropeanVanillaOption(STRIKE, FIXING_TIME, IS_CAP); final BlackFunctionData dataSpread = new BlackFunctionData(expectedRate1 - expectedRate2, 1.0, spreadVol); final Function1D<BlackFunctionData, Double> priceFunction = normalPrice.getPriceFunction(optionSpread); final double cmsSpreadPriceExpected = discountFactorPayment * priceFunction.evaluate(dataSpread) * CMS_SPREAD.getNotional() * CMS_SPREAD.getPaymentYearFraction(); assertEquals("CMS spread: price with constant correlation", cmsSpreadPriceExpected, cmsSpreadPrice, 1.0E-2); } @Test /** * Tests the present value against the price explicitly computed for constant correlation. */ public void presentValueMethodVsCalculator() { final PresentValueSABRCalculator calculator = PresentValueSABRCalculator.getInstance(); SABRInterestRateCorrelationParameters sabrCorrelation = SABRInterestRateCorrelationParameters.from(SABR_PARAMETERS, CORRELATION_FUNCTION); SABRInterestRateDataBundle sabrBundleCor = new SABRInterestRateDataBundle(sabrCorrelation, CURVES); CurrencyAmount pvMethod = METHOD.presentValue(CMS_SPREAD, sabrBundleCor); double pvCalculator = calculator.visit(CMS_SPREAD, sabrBundleCor); assertEquals("CMS spread: present value Method vs Calculator", pvMethod.getAmount(), pvCalculator, 1.0E-2); } @Test /** * Tests the implied correlation computation for a range of correlations. */ public void impliedCorrelation() { final YieldCurveBundle curves = TestsDataSets.createCurves1(); final SABRInterestRateParameters sabrParameter = TestsDataSets.createSABR1(); final SABRInterestRateDataBundle sabrBundle = new SABRInterestRateDataBundle(sabrParameter, curves); final double[] correlation = new double[] {-0.50, 0.00, 0.50, 0.75, 0.80, 0.85, 0.90, 0.95, 0.99}; final int nbCor = correlation.length; final double[] impliedCorrelation = new double[nbCor]; for (int loopcor = 0; loopcor < nbCor; loopcor++) { final DoubleFunction1D correlationFunction = new RealPolynomialFunction1D(new double[] {correlation[loopcor]}); // Constant function final CapFloorCMSSpreadSABRBinormalMethod method = new CapFloorCMSSpreadSABRBinormalMethod(correlationFunction); final double cmsSpreadPrice = method.presentValue(CMS_SPREAD, sabrBundle).getAmount(); impliedCorrelation[loopcor] = method.impliedCorrelation(CMS_SPREAD, sabrBundle, cmsSpreadPrice); assertEquals("CMS spread cap/floor: implied correlation", correlation[loopcor], impliedCorrelation[loopcor], 1.0E-12); } } @Test /** * Tests the price curve sensitivity of CMS coupon and cap/floor using replication in the SABR framework. Values are tested against finite difference values. */ public void presentValueCurveSensitivity() { InterestRateCurveSensitivity pvcsCap = METHOD.presentValueSensitivity(CMS_SPREAD, SABR_BUNDLE); pvcsCap = pvcsCap.clean(); final double deltaTolerancePrice = 2.5E+6; //Testing note: The computed sensitivity does not change the strike of the ATM strike with the curves. final double deltaShift = 1.0E-6; String bumpedCurveName = "Bumped Curve"; // 1. Forward curve sensitivity final String[] CurveNameBumpedForward = {FUNDING_CURVE_NAME, bumpedCurveName}; final CapFloorCMSSpread capBumpedForward = (CapFloorCMSSpread) CMS_SPREAD_DEFINITION.toDerivative(REFERENCE_DATE, CurveNameBumpedForward); DoubleAVLTreeSet forwardTime = new DoubleAVLTreeSet(); for (int loopcpn = 0; loopcpn < CMS_SPREAD.getUnderlyingSwap1().getSecondLeg().getNumberOfPayments(); loopcpn++) { CouponIbor cpn = (CouponIbor) CMS_SPREAD.getUnderlyingSwap1().getSecondLeg().getNthPayment(loopcpn); forwardTime.add(cpn.getFixingPeriodStartTime()); forwardTime.add(cpn.getFixingPeriodEndTime()); } for (int loopcpn = 0; loopcpn < CMS_SPREAD.getUnderlyingSwap2().getSecondLeg().getNumberOfPayments(); loopcpn++) { CouponIbor cpn = (CouponIbor) CMS_SPREAD.getUnderlyingSwap2().getSecondLeg().getNthPayment(loopcpn); forwardTime.add(cpn.getFixingPeriodStartTime()); forwardTime.add(cpn.getFixingPeriodEndTime()); } double[] nodeTimesForward = forwardTime.toDoubleArray(); double[] sensiForwardMethod = SensitivityFiniteDifference.curveSensitivity(capBumpedForward, SABR_BUNDLE, FORWARD_CURVE_NAME, bumpedCurveName, nodeTimesForward, deltaShift, METHOD); List<DoublesPair> sensiPvForward = pvcsCap.getSensitivities().get(FORWARD_CURVE_NAME); for (int loopnode = 0; loopnode < sensiForwardMethod.length; loopnode++) { final DoublesPair pairPv = sensiPvForward.get(loopnode); assertEquals("Sensitivity CMS cap/floor pv to forward curve: Node " + loopnode, nodeTimesForward[loopnode], pairPv.getFirst(), 1E-8); assertEquals("Sensitivity finite difference method: node sensitivity " + loopnode + " - Difference " + (sensiForwardMethod[loopnode] - pairPv.second), sensiForwardMethod[loopnode], pairPv.second, deltaTolerancePrice); } // 2. Discounting curve sensitivity final String[] CurveNameBumpedDisc = {bumpedCurveName, FORWARD_CURVE_NAME}; final CapFloorCMSSpread capBumpedDisc = (CapFloorCMSSpread) CMS_SPREAD_DEFINITION.toDerivative(REFERENCE_DATE, CurveNameBumpedDisc); DoubleAVLTreeSet discTime = new DoubleAVLTreeSet(); discTime.add(capBumpedDisc.getPaymentTime()); for (int loopcpn = 0; loopcpn < CMS_SPREAD.getUnderlyingSwap1().getSecondLeg().getNumberOfPayments(); loopcpn++) { CouponIbor cpn = (CouponIbor) CMS_SPREAD.getUnderlyingSwap1().getSecondLeg().getNthPayment(loopcpn); discTime.add(cpn.getPaymentTime()); } for (int loopcpn = 0; loopcpn < CMS_SPREAD.getUnderlyingSwap2().getSecondLeg().getNumberOfPayments(); loopcpn++) { CouponIbor cpn = (CouponIbor) CMS_SPREAD.getUnderlyingSwap2().getSecondLeg().getNthPayment(loopcpn); discTime.add(cpn.getPaymentTime()); } double[] nodeTimesDisc = discTime.toDoubleArray(); double[] sensiDiscMethod = SensitivityFiniteDifference.curveSensitivity(capBumpedDisc, SABR_BUNDLE, FUNDING_CURVE_NAME, bumpedCurveName, nodeTimesDisc, deltaShift, METHOD); List<DoublesPair> sensiPvDisc = pvcsCap.getSensitivities().get(FUNDING_CURVE_NAME); for (int loopnode = 0; loopnode < sensiDiscMethod.length; loopnode++) { final DoublesPair pairPv = sensiPvDisc.get(loopnode); assertEquals("Sensitivity CMS cap/floor pv to forward curve: Node " + loopnode, nodeTimesDisc[loopnode], pairPv.getFirst(), 1E-8); assertEquals("Sensitivity finite difference method: node sensitivity " + loopnode, pairPv.second, sensiDiscMethod[loopnode], deltaTolerancePrice); } } @Test /** * Tests the present value against the price explicitly computed for constant correlation. */ public void presentValueCurveSensitivityMethodVsCalculator() { final PresentValueCurveSensitivitySABRCalculator calculator = PresentValueCurveSensitivitySABRCalculator.getInstance(); SABRInterestRateCorrelationParameters sabrCorrelation = SABRInterestRateCorrelationParameters.from(SABR_PARAMETERS, CORRELATION_FUNCTION); SABRInterestRateDataBundle sabrBundleCor = new SABRInterestRateDataBundle(sabrCorrelation, CURVES); InterestRateCurveSensitivity pvcsMethod = METHOD.presentValueSensitivity(CMS_SPREAD, sabrBundleCor); InterestRateCurveSensitivity pvcsCalculator = new InterestRateCurveSensitivity(calculator.visit(CMS_SPREAD, sabrBundleCor)); assertEquals("CMS spread: curve sensitivity Method vs Calculator", pvcsMethod, pvcsCalculator); } @Test /** * Tests the present value SABR parameters sensitivity vs finite difference. */ public void presentValueSABRSensitivity() { final double pv = METHOD.presentValue(CMS_SPREAD, SABR_BUNDLE).getAmount(); final PresentValueSABRSensitivityDataBundle pvsCapLong = METHOD.presentValueSABRSensitivity(CMS_SPREAD, SABR_BUNDLE); // SABR sensitivity vs finite difference final double shift = 0.0001; final double shiftAlpha = 0.00001; double maturity1 = CMS_SPREAD.getUnderlyingSwap1().getFixedLeg().getNthPayment(CMS_SPREAD.getUnderlyingSwap1().getFixedLeg().getNumberOfPayments() - 1).getPaymentTime() - CMS_SPREAD.getSettlementTime(); final DoublesPair expectedExpiryTenor1 = new DoublesPair(CMS_SPREAD.getFixingTime(), maturity1); double maturity2 = CMS_SPREAD.getUnderlyingSwap2().getFixedLeg().getNthPayment(CMS_SPREAD.getUnderlyingSwap2().getFixedLeg().getNumberOfPayments() - 1).getPaymentTime() - CMS_SPREAD.getSettlementTime(); final DoublesPair expectedExpiryTenor2 = new DoublesPair(CMS_SPREAD.getFixingTime(), maturity2); // Alpha sensitivity vs finite difference computation final SABRInterestRateParameters sabrParameterAlphaBumped = TestsDataSets.createSABR1AlphaBumped(shiftAlpha); final SABRInterestRateDataBundle sabrBundleAlphaBumped = new SABRInterestRateDataBundle(sabrParameterAlphaBumped, CURVES); final double pvLongPayerAlphaBumped = METHOD.presentValue(CMS_SPREAD, sabrBundleAlphaBumped).getAmount(); final double expectedAlphaSensi = (pvLongPayerAlphaBumped - pv) / shiftAlpha; assertEquals("Number of alpha sensitivity", pvsCapLong.getAlpha().keySet().size(), 2); assertEquals("Alpha sensitivity expiry/tenor", pvsCapLong.getAlpha().keySet().contains(expectedExpiryTenor1), true); assertEquals("Alpha sensitivity expiry/tenor", pvsCapLong.getAlpha().keySet().contains(expectedExpiryTenor2), true); assertEquals("Alpha sensitivity value", expectedAlphaSensi, pvsCapLong.getAlpha().get(expectedExpiryTenor1) + pvsCapLong.getAlpha().get(expectedExpiryTenor2), 5.0E+3); // Rho sensitivity vs finite difference computation final SABRInterestRateParameters sabrParameterRhoBumped = TestsDataSets.createSABR1RhoBumped(); final SABRInterestRateDataBundle sabrBundleRhoBumped = new SABRInterestRateDataBundle(sabrParameterRhoBumped, CURVES); final double pvLongPayerRhoBumped = METHOD.presentValue(CMS_SPREAD, sabrBundleRhoBumped).getAmount(); final double expectedRhoSensi = (pvLongPayerRhoBumped - pv) / shift; assertEquals("Number of rho sensitivity", pvsCapLong.getRho().keySet().size(), 2); assertEquals("Rho sensitivity expiry/tenor", pvsCapLong.getRho().keySet().contains(expectedExpiryTenor1), true); assertEquals("Rho sensitivity expiry/tenor", pvsCapLong.getRho().keySet().contains(expectedExpiryTenor2), true); assertEquals("Rho sensitivity value", expectedRhoSensi, pvsCapLong.getRho().get(expectedExpiryTenor1) + pvsCapLong.getRho().get(expectedExpiryTenor2), 3.0E+1); // Alpha sensitivity vs finite difference computation final SABRInterestRateParameters sabrParameterNuBumped = TestsDataSets.createSABR1NuBumped(); final SABRInterestRateDataBundle sabrBundleNuBumped = new SABRInterestRateDataBundle(sabrParameterNuBumped, CURVES); final double pvLongPayerNuBumped = METHOD.presentValue(CMS_SPREAD, sabrBundleNuBumped).getAmount(); final double expectedNuSensi = (pvLongPayerNuBumped - pv) / shift; assertEquals("Number of nu sensitivity", pvsCapLong.getNu().keySet().size(), 2); assertTrue("Nu sensitivity expiry/tenor", pvsCapLong.getNu().keySet().contains(expectedExpiryTenor1)); assertTrue("Nu sensitivity expiry/tenor", pvsCapLong.getNu().keySet().contains(expectedExpiryTenor2)); assertEquals("Nu sensitivity value", expectedNuSensi, pvsCapLong.getNu().get(expectedExpiryTenor1) + pvsCapLong.getNu().get(expectedExpiryTenor2), 2.0E+2); } @Test /** * Tests the present value against the price explicitly computed for constant correlation. */ public void presentValueSABRSensitivityMethodVsCalculator() { final PresentValueSABRSensitivitySABRCalculator calculator = PresentValueSABRSensitivitySABRCalculator.getInstance(); SABRInterestRateCorrelationParameters sabrCorrelation = SABRInterestRateCorrelationParameters.from(SABR_PARAMETERS, CORRELATION_FUNCTION); SABRInterestRateDataBundle sabrBundleCor = new SABRInterestRateDataBundle(sabrCorrelation, CURVES); PresentValueSABRSensitivityDataBundle pvcsMethod = METHOD.presentValueSABRSensitivity(CMS_SPREAD, sabrBundleCor); PresentValueSABRSensitivityDataBundle pvcsCalculator = calculator.visit(CMS_SPREAD, sabrBundleCor); assertEquals("CMS spread: SABR sensitivity Method vs Calculator", pvcsMethod, pvcsCalculator); } @Test(enabled = false) /** * Tests of performance. "enabled = false" for the standard testing. */ public void performance() { long startTime, endTime; final int nbTest = 100; double[] pv = new double[nbTest]; PresentValueSABRSensitivityDataBundle[] pvss = new PresentValueSABRSensitivityDataBundle[nbTest]; InterestRateCurveSensitivity[] pvcs = new InterestRateCurveSensitivity[nbTest]; startTime = System.currentTimeMillis(); for (int looptest = 0; looptest < nbTest; looptest++) { pv[looptest] = METHOD.presentValue(CMS_SPREAD, SABR_BUNDLE).getAmount(); } endTime = System.currentTimeMillis(); System.out.println(nbTest + " CMS spread cap by replication (price): " + (endTime - startTime) + " ms"); startTime = System.currentTimeMillis(); for (int looptest = 0; looptest < nbTest; looptest++) { pvcs[looptest] = METHOD.presentValueSensitivity(CMS_SPREAD, SABR_BUNDLE); } endTime = System.currentTimeMillis(); System.out.println(nbTest + " CMS spread cap by replication (curve risk): " + (endTime - startTime) + " ms"); startTime = System.currentTimeMillis(); for (int looptest = 0; looptest < nbTest; looptest++) { pvss[looptest] = METHOD.presentValueSABRSensitivity(CMS_SPREAD, SABR_BUNDLE); } endTime = System.currentTimeMillis(); System.out.println(nbTest + " CMS spread cap by replication (sabr risk): " + (endTime - startTime) + " ms"); } }
wincle626/Xilinx_Embedded_Driver_Example
XilinxProcessorIPLib/drivers/usb/doc/html/api/xusb__intr_8c.js
var xusb__intr_8c = [ [ "XUsb_DmaIntrSetHandler", "group__usb__v5__0.html#ga6fbf5a1ddbca576e8c1e7d235da878ab", null ], [ "XUsb_EpSetHandler", "group__usb__v5__0.html#gae7fef0669e6d6094cc2af067195cc04d", null ], [ "XUsb_ErrIntrSetHandler", "group__usb__v5__0.html#gaa2a8bba76c93470302e179d7c4d864ac", null ], [ "XUsb_IntrDisable", "group__usb__v5__0.html#ga6a9e88138c012fcfa32717eeaab1e5b1", null ], [ "XUsb_IntrEnable", "group__usb__v5__0.html#gafcd3e91e72783087a0c6902724b8087f", null ], [ "XUsb_IntrHandler", "group__usb__v5__0.html#gacc119aa9f628ab0cc3fac2f63073e386", null ], [ "XUsb_IntrSetHandler", "group__usb__v5__0.html#gada7caf770f82936ab7493b67d143b9a9", null ], [ "XUsb_UlpiIntrSetHandler", "group__usb__v5__0.html#ga0573097a6ec999bac0f865dc18113df3", null ] ];
justindriggers/vulkan-java-api
src/main/java/com/justindriggers/vulkan/models/SampleCount.java
<reponame>justindriggers/vulkan-java-api package com.justindriggers.vulkan.models; import org.lwjgl.vulkan.VK10; public enum SampleCount implements Maskable { ONE(VK10.VK_SAMPLE_COUNT_1_BIT), TWO(VK10.VK_SAMPLE_COUNT_2_BIT), FOUR(VK10.VK_SAMPLE_COUNT_4_BIT), EIGHT(VK10.VK_SAMPLE_COUNT_8_BIT), SIXTEEN(VK10.VK_SAMPLE_COUNT_16_BIT), THIRTY_TWO(VK10.VK_SAMPLE_COUNT_32_BIT), SIXTY_FOUR(VK10.VK_SAMPLE_COUNT_64_BIT); private final int bit; SampleCount(final int bit) { this.bit = bit; } @Override public int getBitValue() { return bit; } }
eloylp/go-training
networked/main.go
package main import ( "fmt" "log" "net" "time" ) func main() { go func() { addr, err := net.ResolveTCPAddr("tcp", "127.0.0.1:3000") if err != nil { log.Fatal(err) } l, err := net.ListenTCP("tcp", addr) if err != nil { log.Fatal(err) } for { c, err := l.Accept() if err != nil { log.Fatal(err) } for { b := make([]byte, 1024) _, err = c.Read(b) if err != nil { log.Fatal(err) } fmt.Println("server received: ", string(b)) _, err = c.Write([]byte("pong")) if err != nil { log.Fatal(err) } } } }() addr, err := net.ResolveTCPAddr("tcp", "localhost:3000") if err != nil { log.Fatal(err) } c, err := net.DialTCP("tcp", nil, addr) if err != nil { log.Fatal(err) } defer c.Close() for { if _, err := c.Write([]byte("ping")); err != nil { log.Fatal(err) } b := make([]byte, 1024) _, _ = c.Read(b) fmt.Println(string(b)) time.Sleep(time.Second) } }
bazaarvoice/cloudbreak
integration-test/src/main/java/com/sequenceiq/it/cloudbreak/newway/LdapTest.java
<filename>integration-test/src/main/java/com/sequenceiq/it/cloudbreak/newway/LdapTest.java package com.sequenceiq.it.cloudbreak.newway; import java.util.function.BiConsumer; import java.util.function.Function; import com.sequenceiq.cloudbreak.api.model.ldap.LdapValidationRequest; import com.sequenceiq.it.IntegrationTestContext; public class LdapTest extends LdapTestEntity { private static final String LDAPTEST = "LDAPTEST"; private final LdapValidationRequest ldapValidationRequest = new LdapValidationRequest(); private LdapTest() { super(LDAPTEST); } private static Function<IntegrationTestContext, LdapTest> getTestContext(String key) { return (testContext) -> testContext.getContextParam(key, LdapTest.class); } static Function<IntegrationTestContext, LdapTest> getNew() { return (testContext) -> new LdapTest(); } public static LdapTest request() { return new LdapTest(); } public LdapValidationRequest getRequest() { return ldapValidationRequest; } public static Action<LdapTest> testConnect(String key) { return new Action<>(getTestContext(key), LdapConfigAction::testConnect); } public static Action<LdapTest> testConnect() { return testConnect(LDAPTEST); } public static Assertion<LdapTest> assertThis(BiConsumer<LdapTest, IntegrationTestContext> check) { return new Assertion<>(getTestContext(GherkinTest.RESULT), check); } }
vangthao95/llvm
include/llvm/Support/BinaryStream.h
<filename>include/llvm/Support/BinaryStream.h //===- BinaryStream.h - Base interface for a stream of data -----*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLVM_SUPPORT_BINARYSTREAM_H #define LLVM_SUPPORT_BINARYSTREAM_H #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/BitmaskEnum.h" #include "llvm/Support/BinaryStreamError.h" #include "llvm/Support/Endian.h" #include "llvm/Support/Error.h" #include <cstdint> namespace llvm { enum BinaryStreamFlags { BSF_None = 0, BSF_Write = 1, // Stream supports writing. BSF_Append = 2, // Writing can occur at offset == length. LLVM_MARK_AS_BITMASK_ENUM(/* LargestValue = */ BSF_Append) }; /// \brief An interface for accessing data in a stream-like format, but which /// discourages copying. Instead of specifying a buffer in which to copy /// data on a read, the API returns an ArrayRef to data owned by the stream's /// implementation. Since implementations may not necessarily store data in a /// single contiguous buffer (or even in memory at all), in such cases a it may /// be necessary for an implementation to cache such a buffer so that it can /// return it. class BinaryStream { public: virtual ~BinaryStream() = default; virtual llvm::support::endianness getEndian() const = 0; /// \brief Given an offset into the stream and a number of bytes, attempt to /// read the bytes and set the output ArrayRef to point to data owned by the /// stream. virtual Error readBytes(uint32_t Offset, uint32_t Size, ArrayRef<uint8_t> &Buffer) = 0; /// \brief Given an offset into the stream, read as much as possible without /// copying any data. virtual Error readLongestContiguousChunk(uint32_t Offset, ArrayRef<uint8_t> &Buffer) = 0; /// \brief Return the number of bytes of data in this stream. virtual uint32_t getLength() = 0; /// \brief Return the properties of this stream. virtual BinaryStreamFlags getFlags() const { return BSF_None; } protected: Error checkOffsetForRead(uint32_t Offset, uint32_t DataSize) { if (Offset > getLength()) return make_error<BinaryStreamError>(stream_error_code::invalid_offset); if (getLength() < DataSize + Offset) return make_error<BinaryStreamError>(stream_error_code::stream_too_short); return Error::success(); } }; /// \brief A BinaryStream which can be read from as well as written to. Note /// that writing to a BinaryStream always necessitates copying from the input /// buffer to the stream's backing store. Streams are assumed to be buffered /// so that to be portable it is necessary to call commit() on the stream when /// all data has been written. class WritableBinaryStream : public BinaryStream { public: ~WritableBinaryStream() override = default; /// \brief Attempt to write the given bytes into the stream at the desired /// offset. This will always necessitate a copy. Cannot shrink or grow the /// stream, only writes into existing allocated space. virtual Error writeBytes(uint32_t Offset, ArrayRef<uint8_t> Data) = 0; /// \brief For buffered streams, commits changes to the backing store. virtual Error commit() = 0; /// \brief Return the properties of this stream. BinaryStreamFlags getFlags() const override { return BSF_Write; } protected: Error checkOffsetForWrite(uint32_t Offset, uint32_t DataSize) { if (!(getFlags() & BSF_Append)) return checkOffsetForRead(Offset, DataSize); if (Offset > getLength()) return make_error<BinaryStreamError>(stream_error_code::invalid_offset); return Error::success(); } }; } // end namespace llvm #endif // LLVM_SUPPORT_BINARYSTREAM_H
photonstorm/lazer
src/texture/blendmodes/webgl/SoftLight.js
export default function SoftLight (gl) { return { type: 10, mode: [gl.ONE, gl.ONE_MINUS_SRC_ALPHA] } }
chav1961/funnypro
src/main/java/chav1961/funnypro/core/interfaces/IFProEntitiesRepo.java
<gh_stars>0 package chav1961.funnypro.core.interfaces; import chav1961.funnypro.core.interfaces.IFProOperator.OperatorSort; import chav1961.funnypro.core.interfaces.IFProOperator.OperatorType; import chav1961.purelib.basic.exceptions.PrintingException; import chav1961.purelib.basic.exceptions.SyntaxException; import chav1961.purelib.basic.interfaces.SyntaxTreeInterface; import chav1961.purelib.streams.interfaces.CharacterSource; import chav1961.purelib.streams.interfaces.CharacterTarget; /** * <p>This interface supports entities repo functionality</p> * @author <NAME> aka chav1961 * @since 0.0.1 * @lastUpdate 0.0.2 */ public interface IFProEntitiesRepo extends IFProStreamSerializable, AutoCloseable { /** * <p>This interface describes content of the string and term trees in the FProVM database</p> * @author <NAME> aka chav1961 * @since 0.0.1 */ interface SerializableString extends IFProStreamSerializable, IFProStringSerializable { } /** * <p>This enumeration is used to classify terms detected by the term tree:</p> * <ul> * <li>operator - term is operator</li> * <li>term - term is ordinal term</li> * <li>anonymous - term is anonymous variable</li> * <li>variable - term is variable</li> * <li>op - term is :- op/3</li> * </ul> * @author <NAME> aka chav1961 * @since 0.0.1 */ public enum Classification { operator, term, anonymous, variable, op } /** * <p>Get string repository for the system</p> * @return string repository */ SyntaxTreeInterface<SerializableString> stringRepo(); /** * <p>Get term repository for the system</p> * @return term repository */ SyntaxTreeInterface<SerializableString> termRepo(); /** * <p>Get fact/rule base for the system</p> * @return fact/rule base for the system */ IFProRepo predicateRepo(); /** * <p>Get external plugin repository for the system</p> * @return external plugin repository */ IFProExternalPluginsRepo pluginsRepo(); /** * <p>Classify the given entity id</p> * @param id entity id to classify * @return classification result */ Classification classify(long id); /** * <p>Classify id as operator type</p> * @param id id to classify * @return operator type or null if classification failed */ OperatorType operatorType(long id); /** * <p>Get operator definitions under the given condition. Returned set will be ordered by priority:</p> * <ul> * <li>from min to max value, if minPrty &lt; maxPrty</li> * <li>from max to min value, if minPrty &gt; maxPrty</li> * </ul> * @param id operator id to get definitions * @param minPrty min available operator priority. See remarks above * @param maxPrty max available operator priority. See remarks above * @param types operator types to select. * @return operator declarations for the given condition */ IFProOperator[] getOperatorDef(long id, int minPrty, int maxPrty, OperatorSort sort); /** * <p>Place operator definition in the repo</p> * @param op operator definition to place */ void putOperatorDef(IFProOperator op); /** * <p>Get priorities of all operators in the system. * @return operator priorities ordered from MIN to MAX; */ int[] getOperatorPriorities(); /** * <p>Get all operators registered * @return all operators registered. Can be empty but not null */ Iterable<IFProOperator> registeredOperators(); /** * <p>Consult data to the repo</p> * @param source source to consult data from * @throws SyntaxException if any parsing data problems were detected */ void consult(CharacterSource source) throws SyntaxException; /** * <p>Consult data to the repo</p> * @param source source to consult data from * @param from start position to consult data * @return end position after consulting data * @throws SyntaxException if any parsing data problems were detected */ int consult(char[] source, int from) throws SyntaxException; /** * <p>Save repo to the given target</p> * @param target target to save repo to * @throws PrintingException if any data printing problems were detected */ void save(CharacterTarget target) throws PrintingException; /** * <p>Save repo to the given target</p> * @param target target to save repo to * @param from start position to save repo * @return end position after repo saving * @throws PrintingException if any data printing problems were detected */ int save(char[] target, int from) throws PrintingException; }
kuanpern/jupyterlab-snippets-multimenus
example_snippets/multimenus_snippets/Snippets/SciPy/Special functions/Other Special Functions/factorialk $n(!!...!)$ = multifactorial of order $k$.py
special.factorialk(n, k, exact=False)
v0idp/virtuoso-codegen
include/VROSC/MicrophoneEffectsManager.hpp
<gh_stars>0 // Autogenerated from CppHeaderCreator // Created by Sc2ad // ========================================================================= #pragma once // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" #include "beatsaber-hook/shared/utils/byref.hpp" // Including type: UnityEngine.MonoBehaviour #include "UnityEngine/MonoBehaviour.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils-methods.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils-properties.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils-fields.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Type namespace: VROSC namespace VROSC { // Forward declaring type: MicrophoneEffectsManager class MicrophoneEffectsManager; } #include "beatsaber-hook/shared/utils/il2cpp-type-check.hpp" NEED_NO_BOX(::VROSC::MicrophoneEffectsManager); DEFINE_IL2CPP_ARG_TYPE(::VROSC::MicrophoneEffectsManager*, "VROSC", "MicrophoneEffectsManager"); // Type namespace: VROSC namespace VROSC { // Size: 0x29 #pragma pack(push, 1) // Autogenerated type: VROSC.MicrophoneEffectsManager // [TokenAttribute] Offset: FFFFFFFF class MicrophoneEffectsManager : public ::UnityEngine::MonoBehaviour { public: public: // private System.Boolean _active // Size: 0x1 // Offset: 0x18 bool active; // Field size check static_assert(sizeof(bool) == 0x1); // Padding between fields: active and: reverbVolumeAdjustment char __padding0[0x3] = {}; // private System.Single _reverbVolumeAdjustment // Size: 0x4 // Offset: 0x1C float reverbVolumeAdjustment; // Field size check static_assert(sizeof(float) == 0x4); // private System.Single _preampReverb // Size: 0x4 // Offset: 0x20 float preampReverb; // Field size check static_assert(sizeof(float) == 0x4); // private System.Single _proximityReverbMultiplier // Size: 0x4 // Offset: 0x24 float proximityReverbMultiplier; // Field size check static_assert(sizeof(float) == 0x4); // private System.Boolean _useProximity // Size: 0x1 // Offset: 0x28 bool useProximity; // Field size check static_assert(sizeof(bool) == 0x1); public: // Deleting conversion operator: operator ::System::IntPtr constexpr operator ::System::IntPtr() const noexcept = delete; // Get instance field reference: private System.Boolean _active [[deprecated("Use field access instead!")]] bool& dyn__active(); // Get instance field reference: private System.Single _reverbVolumeAdjustment [[deprecated("Use field access instead!")]] float& dyn__reverbVolumeAdjustment(); // Get instance field reference: private System.Single _preampReverb [[deprecated("Use field access instead!")]] float& dyn__preampReverb(); // Get instance field reference: private System.Single _proximityReverbMultiplier [[deprecated("Use field access instead!")]] float& dyn__proximityReverbMultiplier(); // Get instance field reference: private System.Boolean _useProximity [[deprecated("Use field access instead!")]] bool& dyn__useProximity(); // public System.Void .ctor() // Offset: 0xAC745C template<::il2cpp_utils::CreationType creationType = ::il2cpp_utils::CreationType::Temporary> static MicrophoneEffectsManager* New_ctor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MicrophoneEffectsManager::.ctor"); return THROW_UNLESS((::il2cpp_utils::New<MicrophoneEffectsManager*, creationType>())); } // public System.Void Activate() // Offset: 0xAC6D64 void Activate(); // public System.Void Deactivate() // Offset: 0xAC6DEC void Deactivate(); // public System.Void SetProximity(System.Single proximity) // Offset: 0xAC696C void SetProximity(float proximity); // public System.Void SetPreampReverb(System.Single preampReverb) // Offset: 0xAC7448 void SetPreampReverb(float preampReverb); // public System.Void SetPreviewReverb(System.Boolean enabled) // Offset: 0xAC7004 void SetPreviewReverb(bool enabled); // System.Void SetUseProximity(System.Boolean state) // Offset: 0xAC7450 void SetUseProximity(bool state); }; // VROSC.MicrophoneEffectsManager #pragma pack(pop) static check_size<sizeof(MicrophoneEffectsManager), 40 + sizeof(bool)> __VROSC_MicrophoneEffectsManagerSizeCheck; static_assert(sizeof(MicrophoneEffectsManager) == 0x29); } #include "beatsaber-hook/shared/utils/il2cpp-utils-methods.hpp" // Writing MetadataGetter for method: VROSC::MicrophoneEffectsManager::New_ctor // Il2CppName: .ctor // Cannot get method pointer of value based method overload from template for constructor! // Try using FindMethod instead! // Writing MetadataGetter for method: VROSC::MicrophoneEffectsManager::Activate // Il2CppName: Activate template<> struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (VROSC::MicrophoneEffectsManager::*)()>(&VROSC::MicrophoneEffectsManager::Activate)> { static const MethodInfo* get() { return ::il2cpp_utils::FindMethod(classof(VROSC::MicrophoneEffectsManager*), "Activate", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{}); } }; // Writing MetadataGetter for method: VROSC::MicrophoneEffectsManager::Deactivate // Il2CppName: Deactivate template<> struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (VROSC::MicrophoneEffectsManager::*)()>(&VROSC::MicrophoneEffectsManager::Deactivate)> { static const MethodInfo* get() { return ::il2cpp_utils::FindMethod(classof(VROSC::MicrophoneEffectsManager*), "Deactivate", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{}); } }; // Writing MetadataGetter for method: VROSC::MicrophoneEffectsManager::SetProximity // Il2CppName: SetProximity template<> struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (VROSC::MicrophoneEffectsManager::*)(float)>(&VROSC::MicrophoneEffectsManager::SetProximity)> { static const MethodInfo* get() { static auto* proximity = &::il2cpp_utils::GetClassFromName("System", "Single")->byval_arg; return ::il2cpp_utils::FindMethod(classof(VROSC::MicrophoneEffectsManager*), "SetProximity", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{proximity}); } }; // Writing MetadataGetter for method: VROSC::MicrophoneEffectsManager::SetPreampReverb // Il2CppName: SetPreampReverb template<> struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (VROSC::MicrophoneEffectsManager::*)(float)>(&VROSC::MicrophoneEffectsManager::SetPreampReverb)> { static const MethodInfo* get() { static auto* preampReverb = &::il2cpp_utils::GetClassFromName("System", "Single")->byval_arg; return ::il2cpp_utils::FindMethod(classof(VROSC::MicrophoneEffectsManager*), "SetPreampReverb", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{preampReverb}); } }; // Writing MetadataGetter for method: VROSC::MicrophoneEffectsManager::SetPreviewReverb // Il2CppName: SetPreviewReverb template<> struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (VROSC::MicrophoneEffectsManager::*)(bool)>(&VROSC::MicrophoneEffectsManager::SetPreviewReverb)> { static const MethodInfo* get() { static auto* enabled = &::il2cpp_utils::GetClassFromName("System", "Boolean")->byval_arg; return ::il2cpp_utils::FindMethod(classof(VROSC::MicrophoneEffectsManager*), "SetPreviewReverb", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{enabled}); } }; // Writing MetadataGetter for method: VROSC::MicrophoneEffectsManager::SetUseProximity // Il2CppName: SetUseProximity template<> struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (VROSC::MicrophoneEffectsManager::*)(bool)>(&VROSC::MicrophoneEffectsManager::SetUseProximity)> { static const MethodInfo* get() { static auto* state = &::il2cpp_utils::GetClassFromName("System", "Boolean")->byval_arg; return ::il2cpp_utils::FindMethod(classof(VROSC::MicrophoneEffectsManager*), "SetUseProximity", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{state}); } };
vinthuy/galang_math_learning
array/array_test.go
package array import "testing" func TestSwap(t *testing.T) { a := []int{1, 3, 4, 5} Swap(a, 2, 3) t.Log(a) }
franciscorgodoy/sistema-gastronomico
sis_gastronomico/productos/urls.py
<filename>sis_gastronomico/productos/urls.py from django.urls import path from sis_gastronomico.productos.views import ( BorrarProducto, BorrarTipoProducto, CrearProducto, CrearTipoProducto, ListarProductos, ListarTipoProducto, UpdateProducto, UpdateTipoProducto, ) app_name = "productos" urlpatterns = [ # path("", index, name="index"), path("", ListarProductos.as_view(), name="index"), path("crear_producto/", CrearProducto.as_view(), name="crear_producto"), path( "crear_tipo_producto", CrearTipoProducto.as_view(), name="crear_tipo_producto" ), path("borrar_producto/<int:pk>", BorrarProducto.as_view(), name="borrar_producto"), path( "borrar_tipo_producto/<int:pk>", BorrarTipoProducto.as_view(), name="borrar_tipo_producto", ), path( "listar_tipo_producto", ListarTipoProducto.as_view(), name="listar_tipo_producto", ), path("update_producto/<int:pk>", UpdateProducto.as_view(), name="update_producto"), path( "update_tipo_producto/<int:pk>", UpdateTipoProducto.as_view(), name="update_tipo_producto", ), ]
harshavardhanc/sunbird-analytics
platform-modules/batch-models/src/main/scala/org/ekstep/analytics/job/IGraphExecutionModel.scala
package org.ekstep.analytics.job import org.ekstep.analytics.framework.IGraphExecutionModelTemplate import org.ekstep.analytics.framework.IJob import org.ekstep.analytics.framework.util.CommonUtil import org.ekstep.analytics.framework.util.JobLogger import org.apache.spark.SparkContext import org.ekstep.analytics.framework.JobConfig import org.ekstep.analytics.framework.util.JSONUtils import org.ekstep.analytics.framework.JobContext import org.ekstep.analytics.framework.Level._ import org.joda.time.format.DateTimeFormat import org.joda.time.DateTime /** * @author mahesh */ trait IGraphExecutionModel extends IGraphExecutionModelTemplate with optional.Application with IJob { implicit val className = "org.ekstep.analytics.job.IGraphExecutionModel" override def name() : String = "GraphExecutionModel"; def main(config: String)(implicit sc: Option[SparkContext] = None) { JobLogger.init(name) JobLogger.start("Started processing of " + name, Option(Map("config" -> config, "model" -> name, "date" -> DateTimeFormat.forPattern("yyyy-MM-dd").print(DateTime.now())))); val jobConfig = JSONUtils.deserialize[JobConfig](config); if (null == sc.getOrElse(null)) { JobContext.parallelization = 10; implicit val sparkContext = CommonUtil.getSparkContext(JobContext.parallelization, jobConfig.appName.getOrElse(jobConfig.model)); try { _execute(jobConfig); } catch { case ex: Exception => JobLogger.log(ex.getMessage, None, ERROR); JobLogger.end(name + " processing failed", "FAILED", Option(Map("model" -> name, "date" -> DateTimeFormat.forPattern("yyyy-MM-dd").print(DateTime.now()), "timeTaken" -> Double.box(0), "statusMsg" -> ex.getMessage))); ex.printStackTrace(); } finally { CommonUtil.closeSparkContext(); } } else { implicit val sparkContext: SparkContext = sc.getOrElse(null); _execute(jobConfig); } } private def _execute(jobConfig: JobConfig)(implicit sparkContext: SparkContext) = { val input = sparkContext.emptyRDD[String]; val time = CommonUtil.time({ execute(input, jobConfig.modelParams); JobContext.cleanUpRDDs(); }) JobLogger.end(name + " processing complete", "SUCCESS", Option(Map("model" -> name, "date" -> DateTimeFormat.forPattern("yyyy-MM-dd").print(DateTime.now()), "timeTaken" -> time._1))); } }
tuanducdesign/spacy-course
exercises/de/exc_02_02_01.py
<gh_stars>1-10 import spacy nlp = spacy.blank("de") doc = nlp("Ich habe eine Katze") # Schlage den Hash für das Wort "Katze" nach katze_hash = ____.____.____[____] print(katze_hash) # Schlage katze_hash nach, um den String zu erhalten katze_string = ____.____.____[____] print(katze_string)
esahcorp/2cmall
2cmall-common/src/main/java/com/cambrian/common/valid/UpdateGroup.java
package com.cambrian.common.valid; /** * @author kuma 2020-10-16 */ public interface UpdateGroup { }
icbat/RFTools
src/main/java/mcjty/rftools/commands/CmdListReceivers.java
package mcjty.rftools.commands; import mcjty.lib.varia.BlockPosTools; import mcjty.rftools.blocks.teleporter.TeleportDestinationClientInfo; import mcjty.rftools.blocks.teleporter.TeleportDestinations; import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.TextComponentString; import java.util.Collection; public class CmdListReceivers extends AbstractRfToolsCommand { @Override public String getHelp() { return ""; } @Override public String getCommand() { return "list"; } @Override public int getPermissionLevel() { return 0; } @Override public boolean isClientSide() { return false; } @Override public void execute(ICommandSender sender, String[] args) { TeleportDestinations destinations = TeleportDestinations.getDestinations(sender.getEntityWorld()); Collection<TeleportDestinationClientInfo> validDestinations = destinations.getValidDestinations(sender.getEntityWorld(), null); for (TeleportDestinationClientInfo clientInfo : validDestinations) { int id = clientInfo.getDimension(); ITextComponent component = new TextComponentString(" Receiver: dimension=" + id + ", location=" + BlockPosTools.toString(clientInfo.getCoordinate())); if (sender instanceof EntityPlayer) { ((EntityPlayer) sender).sendStatusMessage(component, false); } else { sender.sendMessage(component); } } } }
stitheridge/isis
testing/unittestsupport/applib/src/main/java/org/apache/isis/testing/unittestsupport/applib/dom/repo/FinderInteraction.java
<gh_stars>0 /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.isis.testing.unittestsupport.applib.dom.repo; import java.util.Map; import org.apache.isis.applib.query.Query; import org.apache.isis.applib.query.QueryDefault; public class FinderInteraction { public enum FinderMethod { FIRST_MATCH, ALL_MATCHES, ALL_INSTANCES, UNIQUE_MATCH } private QueryDefault<?> queryDefault; private FinderInteraction.FinderMethod finderMethod; public FinderInteraction(Query<?> query, FinderInteraction.FinderMethod finderMethod) { super(); this.queryDefault = (QueryDefault<?>) query; this.finderMethod = finderMethod; } public QueryDefault<?> getQueryDefault() { return queryDefault; } public FinderInteraction.FinderMethod getFinderMethod() { return finderMethod; } public Class<?> getResultType() { return queryDefault.getResultType(); } public String getQueryName() { return queryDefault.getQueryName(); } public Map<String, Object> getArgumentsByParameterName() { return queryDefault.getArgumentsByParameterName(); } public int numArgs() { return queryDefault.getArgumentsByParameterName().size(); } }
1690296356/jdk
test/jdk/java/lang/management/ManagementFactory/ThreadMXBeanProxy.java
/* * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* * @test * @bug 5086470 6358247 7193302 8048215 * @summary Test type conversion when invoking ThreadMXBean.dumpAllThreads * through proxy. * @author <NAME> * * @run main ThreadMXBeanProxy */ import static java.lang.management.ManagementFactory.*; import java.lang.management.*; import java.util.*; import java.util.concurrent.locks.*; import java.util.concurrent.TimeUnit; import java.io.*; import javax.management.*; public class ThreadMXBeanProxy { private static MBeanServer server = ManagementFactory.getPlatformMBeanServer(); private static ThreadMXBean mbean; static Mutex mutex = new Mutex(); static Object lock = new Object(); static Object waiter = new Object(); static MyThread thread = new MyThread(); public static void main(String[] argv) throws Exception { mbean = newPlatformMXBeanProxy(server, THREAD_MXBEAN_NAME, ThreadMXBean.class); if (!mbean.isSynchronizerUsageSupported()) { System.out.println("Monitoring of synchronizer usage not supported"); return; } thread.setDaemon(true); thread.start(); // wait until myThread acquires mutex and lock owner is set. while (!(mutex.isLocked() && mutex.getLockOwner() == thread)) { try { Thread.sleep(100); } catch (InterruptedException e) { throw new RuntimeException(e); } } // 'thread' holds the mutex, which means it must also have the monitor of // 'waiter' at least until it does the wait(). So we acquire the monitor of // 'waiter' here, which ensures that 'thread' must be in wait() synchronized(waiter) { } long[] ids = new long[] { thread.getId() }; // validate the local access ThreadInfo[] infos = getThreadMXBean().getThreadInfo(ids, true, true); if (infos.length != 1) { throw new RuntimeException("Returned ThreadInfo[] of length=" + infos.length + ". Expected to be 1."); } thread.checkThreadInfo(infos[0]); // validate the remote access infos = mbean.getThreadInfo(ids, true, true); if (infos.length != 1) { throw new RuntimeException("Returned ThreadInfo[] of length=" + infos.length + ". Expected to be 1."); } thread.checkThreadInfo(infos[0]); boolean found = false; infos = mbean.dumpAllThreads(true, true); for (ThreadInfo ti : infos) { if (ti.getThreadId() == thread.getId()) { thread.checkThreadInfo(ti); found = true; } } if (!found) { throw new RuntimeException("No ThreadInfo found for MyThread"); } System.out.println("Test passed"); } static class MyThread extends Thread { public MyThread() { super("MyThread"); } public void run() { synchronized (lock) { synchronized(waiter) { mutex.lock(); try { waiter.wait(); } catch (InterruptedException e) { throw new RuntimeException(e); } } } } int OWNED_MONITORS = 1; int OWNED_SYNCS = 1; void checkThreadInfo(ThreadInfo info) { if (!getName().equals(info.getThreadName())) { throw new RuntimeException("Name: " + info.getThreadName() + " not matched. Expected: " + getName()); } MonitorInfo[] monitors = info.getLockedMonitors(); if (monitors.length != OWNED_MONITORS) { throw new RuntimeException("Number of locked monitors = " + monitors.length + " not matched. Expected: " + OWNED_MONITORS); } MonitorInfo m = monitors[0]; StackTraceElement ste = m.getLockedStackFrame(); int depth = m.getLockedStackDepth(); StackTraceElement[] stacktrace = info.getStackTrace(); if (!ste.equals(stacktrace[depth])) { System.out.println("LockedStackFrame:- " + ste); System.out.println("StackTrace at " + depth + " :-" + stacktrace[depth]); throw new RuntimeException("LockedStackFrame does not match " + "stack frame in ThreadInfo.getStackTrace"); } String className = lock.getClass().getName(); int hcode = System.identityHashCode(lock); if (!className.equals(m.getClassName()) || hcode != m.getIdentityHashCode() || !m.getLockedStackFrame().getMethodName().equals("run")) { System.out.println(info); throw new RuntimeException("MonitorInfo " + m + " doesn't match."); } LockInfo[] syncs = info.getLockedSynchronizers(); if (syncs.length != OWNED_SYNCS) { throw new RuntimeException("Number of locked syncs = " + syncs.length + " not matched. Expected: " + OWNED_SYNCS); } AbstractOwnableSynchronizer s = mutex.getSync(); String lockName = s.getClass().getName(); hcode = System.identityHashCode(s); if (!lockName.equals(syncs[0].getClassName())) { throw new RuntimeException("LockInfo : " + syncs[0] + " class name not matched. Expected: " + lockName); } if (hcode != syncs[0].getIdentityHashCode()) { throw new RuntimeException("LockInfo: " + syncs[0] + " IdentityHashCode not matched. Expected: " + hcode); } LockInfo li = info.getLockInfo(); if (li == null) { throw new RuntimeException("Expected non-null LockInfo"); } } } static class Mutex implements Lock, java.io.Serializable { // Our internal helper class class Sync extends AbstractQueuedSynchronizer { // Report whether in locked state protected boolean isHeldExclusively() { return getState() == 1; } // Acquire the lock if state is zero public boolean tryAcquire(int acquires) { assert acquires == 1; // Otherwise unused if (compareAndSetState(0, 1)) { setExclusiveOwnerThread(Thread.currentThread()); return true; } return false; } // Release the lock by setting state to zero protected boolean tryRelease(int releases) { assert releases == 1; // Otherwise unused if (getState() == 0) throw new IllegalMonitorStateException(); setExclusiveOwnerThread(null); setState(0); return true; } // Provide a Condition Condition newCondition() { return new ConditionObject(); } // Deserialize properly private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); setState(0); // reset to unlocked state } protected Thread getLockOwner() { return getExclusiveOwnerThread(); } } // The sync object does all the hard work. We just forward to it. private final Sync sync = new Sync(); public void lock() { sync.acquire(1); } public boolean tryLock() { return sync.tryAcquire(1); } public void unlock() { sync.release(1); } public Condition newCondition() { return sync.newCondition(); } public boolean isLocked() { return sync.isHeldExclusively(); } public boolean hasQueuedThreads() { return sync.hasQueuedThreads(); } public void lockInterruptibly() throws InterruptedException { sync.acquireInterruptibly(1); } public boolean tryLock(long timeout, TimeUnit unit) throws InterruptedException { return sync.tryAcquireNanos(1, unit.toNanos(timeout)); } public Thread getLockOwner() { return sync.getLockOwner(); } public AbstractOwnableSynchronizer getSync() { return sync; } } }
mu340881/alios_Integrate
build/compiler/nds32le-elf-mculib-v3/nds32le-elf/include/c++/4.9.3/nds32le-elf/mvh/bits/time_members.h
<reponame>mu340881/alios_Integrate ../../mcmodel-large/mvh/mext-dsp/mext-zol/bits/time_members.h
janstenpickle/shapeless-config
metrics/prometheus/src/main/scala/extruder/metrics/prometheus/push/PrometheusPushMetricSettings.scala
package extruder.metrics.prometheus.push import extruder.metrics.dimensional.DimensionalMetricSettings import io.prometheus.client.exporter.PushGateway trait PrometheusPushMetricSettings extends DimensionalMetricSettings { def pushGateway: PushGateway = new PushGateway("127.0.0.1:9091") def jobName: String = "extruder" def jobInstance: String = "extruder" }
Tim-HU/sphinx-report
doc/trackers/UserTrackers.py
<gh_stars>1-10 import sys, os, re, random, glob from SphinxReport.Tracker import Tracker from collections import OrderedDict as odict from SphinxReport.ResultBlock import ResultBlock, ResultBlocks from SphinxReport import Utils import matplotlib from matplotlib import pyplot as plt from rpy2.robjects import r as R import rpy2.robjects as ro import rpy2.robjects.numpy2ri def getCurrentRDevice(): '''return the numerical device id of the current device.''' return R["dev.cur"]()[0] class MatplotlibData( Tracker ): '''create plot using matplotlib.''' slices = ("slice1", "slice2") tracks = ("track1", "track2", "track3") def __call__(self, track, slice = None): s = [random.randint(0,20) for x in range(40)] random.shuffle( s ) # do the plotting fig = plt.figure() plt.plot( s ) return odict( (("text", "#$mpl %i$#" % fig.number),) ) class RPlotData( Tracker ): '''create plot using R.''' slices = ("slice1", "slice2") tracks = ("track1", "track2", "track3") def __call__(self, track, slice = None): s = [random.randint(0,20) for x in range(40)] random.shuffle( s ) # do the plotting R.x11() R.plot( s, s ) return odict( (("text", "#$rpl %i$#" % getCurrentRDevice()),) ) IMAGEDIR = os.path.join( os.path.dirname( os.path.abspath( __file__ )), "..", "images") class Images( Tracker ): tracks = glob.glob( os.path.join( IMAGEDIR, "*.png" ) ) def __call__(self, track, slice = None ): rst_text = ''' This is a preface .. figure:: %s Some more text for the figure\n''' % track return odict( (("rst", rst_text),) ) class Images2( Tracker ): tracks = "all" def __call__(self, track, slice = None ): blocks = ResultBlocks() block = ''' .. figure:: %(image)s :height: 300 ''' for image in glob.glob( os.path.join( IMAGEDIR, "*.png" )): blocks.append( ResultBlock( text = block % locals(), title = "image" ) ) return odict( (("rst", "\n".join( Utils.layoutBlocks( blocks, layout = "columns-2"))),))
aplocon/sis
core/sis-referencing/src/main/java/org/apache/sis/distance/LatLonPointRadius.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.sis.distance; //JDK imports import java.awt.geom.Area; import java.awt.geom.Path2D; import java.awt.geom.Rectangle2D; // GeoAPI import import org.opengis.geometry.DirectPosition; //SIS imports import org.apache.sis.geometry.DirectPosition2D; import org.apache.sis.measure.Longitude; /** * Represents a 2D point associated with a radius to enable great circle * estimation on earth surface. * * <div class="warning"><b>Warning:</b> This class may be refactored as a geometric object in a future SIS version. * Current implementation does not verify the CRS of circle center or the datum.</div> */ public class LatLonPointRadius { private final DirectPosition center; private final double radius; /** * Creates a representation of point-radius search region. * * @param center * the center of the search region * @param radius * the radius of the search region */ public LatLonPointRadius(DirectPosition center, double radius) { this.center = center; this.radius = radius; } /** * Gets the circular region approximation on the earth surface using haversine * formula. * * @param numberOfPoints * the number of points used to estimate the circular region * @return an array of DirectPosition2D representing the points that estimate the * circular region */ public DirectPosition2D[] getCircularRegionApproximation(int numberOfPoints) { if (radius >= DistanceUtils.HALF_EARTH_CIRCUMFERENCE) { DirectPosition2D[] points = new DirectPosition2D[5]; points[0] = new DirectPosition2D(-180.0, -90.0); points[1] = new DirectPosition2D(-180.0, 90.0); points[2] = new DirectPosition2D(180.0, 90.0); points[3] = new DirectPosition2D(180.0, -90.0); points[4] = points[0]; return points; } // plus one to add closing point DirectPosition2D[] points = new DirectPosition2D[numberOfPoints + 1]; double bearingIncrement = 0; if (numberOfPoints > 0) { bearingIncrement = 360/numberOfPoints; } for (int i = 0; i < numberOfPoints; i++) { points[i] = DistanceUtils.getPointOnGreatCircle(center.getOrdinate(1), center.getOrdinate(0), radius, i * bearingIncrement); } points[numberOfPoints] = points[0]; return points; } /** * Calculates the rectangular region enclosing the circular search region. * * @param numberOfPoints * the number of points used to estimate the circular search region * @return Java Rectangle2D object that bounds the circlar search region */ public Rectangle2D getRectangularRegionApproximation(int numberOfPoints) { if (radius >= DistanceUtils.HALF_EARTH_CIRCUMFERENCE) { return new Rectangle2D.Double(0.0, 0.0, 360.0, 180.0); } int numberOfCrossOvers = 0; Path2D path = new Path2D.Double(); DirectPosition2D initPT = DistanceUtils.getPointOnGreatCircle(center.getOrdinate(1), center.getOrdinate(0), radius, 0); path.moveTo(initPT.x + 180.0, initPT.y + 90.0); DirectPosition2D currPT = initPT; for (int i = 1; i < 360; i++) { DirectPosition2D pt = DistanceUtils.getPointOnGreatCircle(center.getOrdinate(1), center.getOrdinate(0), radius, i); path.lineTo(pt.x + 180.0, pt.y + 90.0); if (dateLineCrossOver(Longitude.normalize(currPT.x), Longitude.normalize(pt.x))) { numberOfCrossOvers++; } currPT = pt; } if (dateLineCrossOver(Longitude.normalize(initPT.x), Longitude.normalize(currPT.x))) { numberOfCrossOvers++; } /** * If the path crosses the dateline once, it's a special case, so take care * of it differently. It will need to include areas around the pole. */ if (numberOfCrossOvers == 1) { Rectangle2D r = path.getBounds2D(); Rectangle2D lowerHalf = new Rectangle2D.Double(0.0, 0.0, 360.0, r.getMaxY()); if (lowerHalf.contains(center.getOrdinate(0) + 180.0, center.getOrdinate(1) + 90.0)) { return lowerHalf; } else { return new Rectangle2D.Double(0.0, r.getMinY(), 360.0, 180.0 - r.getMinY()); } } if (path.contains(center.getOrdinate(0) + 180.0, center.getOrdinate(1) + 90.0)) { Rectangle2D r = path.getBounds2D(); if ((r.getMaxX() - r.getMinX()) > 359.0) { return new Rectangle2D.Double(0.0, 0.0, 360.0, 180.0); } else if (r.getMinX() < 0 || r.getMaxX() > 360.0) { /** * For circles that crosses the dateline instead of splitting in half * and having to go down the tree twice, for first version span * longitude 360.0 and use the exact height of the box */ return new Rectangle2D.Double(0.0, r.getY(), 360.0, r.getHeight()); } else { return path.getBounds2D(); } } else { Area pathArea = new Area(path); Area wholeMap = new Area(new Rectangle2D.Double(0.0, 0.0, 360.0, 180.0)); wholeMap.subtract(pathArea); return wholeMap.getBounds2D(); } } /** * Returns true if the line segment connecting the two specified longitudes * crosses the international dateline. * * @param longitude1 * first longitude * @param longitude2 * second longitude * @return true if the line segment crosses the internation dateline, false * otherwise */ private static boolean dateLineCrossOver(double longitude1, double longitude2) { return (Math.abs(longitude1 - longitude2) > 180.0); } }
saikrishna-M-8520/vertice
provision/rancher/provisioner.go
<filename>provision/rancher/provisioner.go package rancher import ( "bytes" // "errors" "fmt" "io" "io/ioutil" // "net/url" "strings" "text/tabwriter" log "github.com/Sirupsen/logrus" //"github.com/megamsys/go-rancher/v2" "github.com/megamsys/libgo/action" "github.com/megamsys/libgo/cmd" "github.com/megamsys/libgo/utils" constants "github.com/megamsys/libgo/utils" lb "github.com/megamsys/vertice/logbox" "github.com/megamsys/vertice/provision" "github.com/megamsys/vertice/provision/rancher/cluster" "github.com/megamsys/vertice/provision/rancher/container" "github.com/megamsys/vertice/repository" "github.com/megamsys/vertice/router" _ "github.com/megamsys/vertice/router/route53" "github.com/megamsys/vertice/toml" ) var mainRancherProvisioner *rancherProvisioner func init() { mainRancherProvisioner = &rancherProvisioner{} provision.Register("rancher", mainRancherProvisioner) } type rancherProvisioner struct { cluster *cluster.Cluster collectionName string storage cluster.Storage } type Rancher struct { Enabled bool `json:"enabled" toml:"enabled"` Regions []Region `json:"region" toml:"region"` } type Region struct { RancherZone string `json:"rancher_zone" toml:"rancher_zone"` RancherEndPoint string `json:"rancher" toml:"rancher"` Registry string `json:"registry" toml:"registry"` CPUPeriod toml.Duration `json:"cpu_period" toml:"cpu_period"` CPUQuota toml.Duration `json:"cpu_quota" toml:"cpu_quota"` AdminId string `json:"admin_id" toml:"admin_id"` AdminAccess string `json:"access_key" toml:"access_key"` AdminSecret string `json:"secret_key" toml:"secret_key"` } func (p *rancherProvisioner) Cluster() *cluster.Cluster { if p.cluster == nil { panic("✗ rancher cluster") } return p.cluster } func (p *rancherProvisioner) String() string { if p.cluster == nil { return "✗ rancher cluster" } return "ready" } func (p *rancherProvisioner) Initialize(m interface{}) error { return p.initRancherCluster(m) } func (p *rancherProvisioner) initRancherCluster(i interface{}) error { var err error if p.storage == nil { p.storage, err = buildClusterStorage() if err != nil { return err } } if w, ok := i.(Rancher); ok { var nodes []cluster.Node for i := 0; i < len(w.Regions); i++ { m := w.Regions[i].toMap() n := cluster.Node{ Address: m[cluster.RANCHER_SERVER], //rancher endpoint Metadata: m, } nodes = append(nodes, n) } //register nodes using the map. p.cluster, err = cluster.New(p.storage, nodes...) if err != nil { return err } } return nil } //convert the config to just a map. func (c Region) toMap() map[string]string { m := make(map[string]string) m[cluster.RANCHER_ZONE] = c.RancherZone m[cluster.RANCHER_SERVER] = c.RancherEndPoint m[cluster.ADMIN_ID] = c.AdminId m[cluster.ACCESSKEY] = c.AdminAccess m[cluster.SECRETKEY] = c.AdminSecret m[cluster.RANCHER_REGISTRY] = c.Registry m[cluster.RANCHER_CPUPERIOD] = c.CPUPeriod.String() m[cluster.RANCHER_CPUQUOTA] = c.CPUQuota.String() return m } func buildClusterStorage() (cluster.Storage, error) { return &cluster.MapStorage{}, nil } func getRouterForBox(box *provision.Box) (router.Router, error) { routerName, err := box.GetRouter() if err != nil { return nil, err } return router.Get(routerName) } func (p *rancherProvisioner) StartupMessage() (string, error) { w := new(tabwriter.Writer) var b bytes.Buffer w.Init(&b, 0, 8, 0, '\t', 0) b.Write([]byte(cmd.Colorfy(" > rancher ", "white", "", "bold") + "\t" + cmd.Colorfy(p.String(), "cyan", "", ""))) fmt.Fprintln(w) w.Flush() return strings.TrimSpace(b.String()), nil } func (p *rancherProvisioner) GitDeploy(box *provision.Box, w io.Writer) (string, error) { imageId, err := p.gitDeploy(box.Repo, box.ImageVersion, w) if err != nil { return "", err } return p.deployPipeline(box, imageId, w) } func (p *rancherProvisioner) gitDeploy(re *repository.Repo, version string, w io.Writer) (string, error) { return p.getBuildImage(re, version), nil //return "",nil } func (p *rancherProvisioner) ImageDeploy(box *provision.Box, imageId string, w io.Writer) (string, error) { isValid, err := isValidBoxImage(box.GetFullName(), imageId) if err != nil { return "", err } if !isValid { return "", fmt.Errorf("invalid image for box %s: %s", box.GetFullName(), imageId) } return p.deployPipeline(box, imageId, w) } func (p *rancherProvisioner) BackupDeploy(box *provision.Box, imageId string, w io.Writer) (string, error) { return "", nil } func (p *rancherProvisioner) deployPipeline(box *provision.Box, imageId string, w io.Writer) (string, error) { fmt.Fprintf(w, lb.W(lb.DEPLOY, lb.INFO, fmt.Sprintf("--- deploy box (%s, image:%s)", box.GetFullName(), imageId))) actions := []*action.Action{ &updateStatusInScylla, &createContainer, &updateContainerIdInScylla, &MileStoneUpdate, &updateStatusInScylla, &waitToContainerUp, &MileStoneUpdate, &updateStatusInScylla, &setNetworkInfo, &updateStatusInScylla, // &followLogsAndCommit, // &MileStoneUpdate, // &updateStatusInScylla, } pipeline := action.NewPipeline(actions...) args := runContainerActionsArgs{ box: box, imageId: imageId, writer: w, isDeploy: true, buildingImage: imageId, containerState: constants.StateInitializing, containerStatus: constants.StatusContainerLaunching, provisioner: p, } err := pipeline.Execute(args) if err != nil { fmt.Fprintf(w, lb.W(lb.DEPLOY, lb.ERROR, fmt.Sprintf("deploy pipeline for box (%s) --> %s", box.GetFullName(), err))) return "", err } return imageId, nil } func (p *rancherProvisioner) Destroy(box *provision.Box, w io.Writer) error { fmt.Fprintf(w, lb.W(lb.DESTORYING, lb.INFO, fmt.Sprintf("\n--- destroying box (%s) ----", box.GetFullName()))) containers, err := p.listContainersByBox(box) if err != nil { fmt.Fprintf(w, lb.W(lb.DESTORYING, lb.ERROR, fmt.Sprintf("Failed to list box containers (%s) --> %s", box.GetFullName(), err))) return err } args := changeUnitsPipelineArgs{ box: box, toRemove: containers, writer: ioutil.Discard, provisioner: p, boxDestroy: true, } pipeline := action.NewPipeline( &destroyOldContainers, //&removeOldRoutes, ) err = pipeline.Execute(args) if err != nil { return err } return nil } func (p *rancherProvisioner) Start(box *provision.Box, process string, w io.Writer) error { containers, err := p.listContainersByBox(box) if err != nil { fmt.Fprintf(w, lb.W(lb.STARTING, lb.ERROR, fmt.Sprintf("Failed to list box containers (%s) --> %s", box.GetFullName(), err))) } return runInContainers(containers, func(c *container.Container, _ chan *container.Container) error { err := c.Start(&container.StartArgs{ Provisioner: p, Box: box, }) if err != nil { return err } c.SetStatus(constants.StatusContainerStarting) return nil }, nil, true) } func (p *rancherProvisioner) Stop(box *provision.Box, process string, w io.Writer) error { containers, err := p.listContainersByBox(box) if err != nil { fmt.Fprintf(w, lb.W(lb.STOPPING, lb.ERROR, fmt.Sprintf("Failed to list box containers (%s) --> %s", box.GetFullName(), err))) } return runInContainers(containers, func(c *container.Container, _ chan *container.Container) error { err := c.Stop(p) if err != nil { log.Errorf("Failed to stop %q: %s", box.GetFullName(), err) } return err }, nil, true) } func (p *rancherProvisioner) Restart(box *provision.Box, process string, w io.Writer) error { return nil } func (*rancherProvisioner) Addr(box *provision.Box) (string, error) { r, err := getRouterForBox(box) if err != nil { log.Errorf("Failed to get router: %s", err) return "", err } addr, err := r.Addr(box.GetFullName()) if err != nil { log.Errorf("Failed to obtain box %s address: %s", box.GetFullName(), err) return "", err } return addr, nil } func (p *rancherProvisioner) SetBoxStatus(box *provision.Box, w io.Writer, status utils.Status) error { fmt.Fprintf(w, lb.W(lb.DEPLOY, lb.INFO, fmt.Sprintf("---- status %s box %s ----", box.GetFullName(), status.String()))) actions := []*action.Action{ //&updateStatusInScylla, } pipeline := action.NewPipeline(actions...) args := runContainerActionsArgs{ box: box, writer: w, containerStatus: status, provisioner: p, } err := pipeline.Execute(args) if err != nil { log.Errorf("error on execute status pipeline for box %s - %s", box.GetFullName(), err) return err } return nil } func (p *rancherProvisioner) SetCName(box *provision.Box, cname string) error { r, err := getRouterForBox(box) if err != nil { return err } return r.SetCName(cname, box.PublicIp) } func (p *rancherProvisioner) UnsetCName(box *provision.Box, cname string) error { r, err := getRouterForBox(box) if err != nil { return err } return r.UnsetCName(cname, box.PublicIp) } // PlatformAdd build and push a new docker platform to register func (p *rancherProvisioner) PlatformAdd(name string, args map[string]string, w io.Writer) error { /* if args["dockerfile"] == "" { return errors.New("Rancherfile is required.") } if _, err := url.ParseRequestURI(args["rancherfile"]); err != nil { return errors.New("rancherfile parameter should be an url.") } imageName := platformImageName(name) cluster := p.Cluster() buildOptions := docker.BuildImageOptions{ Name: imageName, NoCache: true, RmTmpContainer: true, Remote: args["dockerfile"], InputStream: nil, OutputStream: w, } err := cluster.BuildImage(buildOptions) if err != nil { return err } parts := strings.Split(imageName, ":") var tag string if len(parts) > 2 { imageName = strings.Join(parts[:len(parts)-1], ":") tag = parts[len(parts)-1] } else if len(parts) > 1 { imageName = parts[0] tag = parts[1] } else { imageName = parts[0] tag = "latest" }*/ //return p.PushImage("", tag) return nil } func (p *rancherProvisioner) PlatformUpdate(name string, args map[string]string, w io.Writer) error { return p.PlatformAdd(name, args, w) } func (p *rancherProvisioner) PlatformRemove(name string) error { /* err := p.Cluster().RemoveImage(platformImageName(name)) if err != nil && err == docker.ErrNoSuchImage { log.Errorf("error on remove image %s from docker.", name) return nil } return err */ return nil } func (p *rancherProvisioner) Shell(opts provision.ShellOptions) error { var ( err error ) _, err = p.GetContainerByBox(opts.Box) if err != nil { return err } //return c.Shell(p, opts.Conn, opts.Conn, opts.Conn, container.Pty{Width: opts.Width, Height: opts.Height, Term: opts.Term}) return nil } func (p *rancherProvisioner) ExecuteCommandOnce(stdout, stderr io.Writer, box *provision.Box, cmd string, args ...string) error { _, err := p.GetContainerByBox(box) if err != nil { return err } //return container.Exec(p, stdout, stderr, cmd, args...) return nil } func (p *rancherProvisioner) MetricEnvs(start, end int64, point string, w io.Writer) ([]interface{}, error) { /* fmt.Fprintf(w, lb.W(lb.BILLING, lb.INFO, fmt.Sprintf("\n--- metrics collect for node (%s) ----", point))) //res, err := p.Cluster().Showback(start, end, point) if err != nil { fmt.Fprintf(w, lb.W(lb.BILLING, lb.ERROR, fmt.Sprintf("--- pull metrics for the duration error(%d, %d)-->%s", start, end))) return nil, err } fmt.Fprintf(w, lb.W(lb.BILLING, lb.INFO, fmt.Sprintf("--- pull metrics for the duration (%d, %d)OK", start, end))) //return res, nil */ var b []interface{} //a :=[]string{} //b = a return b, nil } func (p *rancherProvisioner) SaveImage(box *provision.Box, w io.Writer) error { return nil } func (p *rancherProvisioner) DeleteImage(box *provision.Box, w io.Writer) error { return nil } func (p *rancherProvisioner) CreateSnapshot(box *provision.Box, w io.Writer) error { return nil } func (p *rancherProvisioner) DeleteSnapshot(box *provision.Box, w io.Writer) error { return nil } func (p *rancherProvisioner) RestoreSnapshot(box *provision.Box, w io.Writer) error { return nil } func (p *rancherProvisioner) AttachDisk(box *provision.Box, w io.Writer) error { return nil } func (p *rancherProvisioner) DetachDisk(box *provision.Box, w io.Writer) error { return nil } func (p *rancherProvisioner) Suspend(box *provision.Box, process string, w io.Writer) error { return nil } func (p *rancherProvisioner) TriggerBills(account_id, cat_id, name string) error { /* cont := &container.Container{ Name: name, CartonId: cat_id, AccountId: account_id, } err := cont.Deduct() if err != nil { return err } */ return nil }
adrienlacombe-ledger/bitcoinPoS
bitcoinPoSTdisplay/libraries/TFT_eSPI/examples/Sprite/Animated_dial/dial.h
<reponame>adrienlacombe-ledger/bitcoinPoS /* A dial jpeg file can be converted to a byte array using: https://tomeko.net/online_tools/file_to_hex.php?lang=en Paste the byte array into a sketch tab "jpeg_name" and add two lines at the start with a unique array name: #include <pgmspace.h> const uint8_t jpeg_name[] PROGMEM = { At the end add: }; See example below. Include the tab in the main sketch, e.g.: #include "jpeg_name.h" */ #include <pgmspace.h> const uint8_t dial[] PROGMEM = { 0xFF, 0xD8, 0xFF, 0xE0, 0x00, 0x10, 0x4A, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x01, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0xFF, 0xE1, 0x00, 0x5A, 0x45, 0x78, 0x69, 0x66, 0x00, 0x00, 0x4D, 0x4D, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x05, 0x03, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x4A, 0x03, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x51, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x51, 0x11, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0E, 0xC3, 0x51, 0x12, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0E, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x86, 0xA0, 0x00, 0x00, 0xB1, 0x8F, 0xFF, 0xDB, 0x00, 0x43, 0x00, 0x02, 0x01, 0x01, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x05, 0x03, 0x03, 0x03, 0x03, 0x03, 0x06, 0x04, 0x04, 0x03, 0x05, 0x07, 0x06, 0x07, 0x07, 0x07, 0x06, 0x07, 0x07, 0x08, 0x09, 0x0B, 0x09, 0x08, 0x08, 0x0A, 0x08, 0x07, 0x07, 0x0A, 0x0D, 0x0A, 0x0A, 0x0B, 0x0C, 0x0C, 0x0C, 0x0C, 0x07, 0x09, 0x0E, 0x0F, 0x0D, 0x0C, 0x0E, 0x0B, 0x0C, 0x0C, 0x0C, 0xFF, 0xDB, 0x00, 0x43, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x06, 0x03, 0x03, 0x06, 0x0C, 0x08, 0x07, 0x08, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0xFF, 0xC0, 0x00, 0x11, 0x08, 0x00, 0xF0, 0x00, 0xF0, 0x03, 0x01, 0x22, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01, 0xFF, 0xC4, 0x00, 0x1F, 0x00, 0x00, 0x01, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0xFF, 0xC4, 0x00, 0xB5, 0x10, 0x00, 0x02, 0x01, 0x03, 0x03, 0x02, 0x04, 0x03, 0x05, 0x05, 0x04, 0x04, 0x00, 0x00, 0x01, 0x7D, 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xA1, 0x08, 0x23, 0x42, 0xB1, 0xC1, 0x15, 0x52, 0xD1, 0xF0, 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0A, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFF, 0xC4, 0x00, 0x1F, 0x01, 0x00, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0xFF, 0xC4, 0x00, 0xB5, 0x11, 0x00, 0x02, 0x01, 0x02, 0x04, 0x04, 0x03, 0x04, 0x07, 0x05, 0x04, 0x04, 0x00, 0x01, 0x02, 0x77, 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, 0xA1, 0xB1, 0xC1, 0x09, 0x23, 0x33, 0x52, 0xF0, 0x15, 0x62, 0x72, 0xD1, 0x0A, 0x16, 0x24, 0x34, 0xE1, 0x25, 0xF1, 0x17, 0x18, 0x19, 0x1A, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x43, 0x44, 0x45, 0x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0xD3, 0x11, 0xC7, 0x23, 0xCD, 0xD4, 0x64, 0x5F, 0x28, 0xA1, 0xEC, 0xD6, 0xEB, 0x71, 0xF4, 0x15, 0xF8, 0xCF, 0xFB, 0x7F, 0xFF, 0x00, 0xC1, 0xC1, 0x1F, 0xB4, 0x0F, 0xED, 0xE3, 0x6F, 0x7D, 0xA1, 0x9D, 0x6E, 0x3F, 0x87, 0x1E, 0x03, 0xBC, 0xDF, 0x1B, 0x78, 0x77, 0xC2, 0xEF, 0x25, 0xB0, 0xBB, 0x84, 0xE4, 0x6C, 0xBB, 0xBA, 0x27, 0xCF, 0xB8, 0x05, 0x4E, 0x19, 0x0B, 0x2C, 0x2C, 0x46, 0x7C, 0xA1, 0x5F, 0x0E, 0x51, 0x49, 0x53, 0x8A, 0x2F, 0x9D, 0x85, 0x14, 0x51, 0x56, 0x48, 0x51, 0x45, 0x14, 0x00, 0x51, 0x45, 0x14, 0x00, 0x51, 0x45, 0x14, 0x01, 0xFF, 0xD9 };
lmeysel/fa-compatible-icons
la/toiletSolid.js
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var prefix = 'la'; var iconName = 'toilet-solid'; var width = 512; var height = 512; var ligatures = []; var unicode = null; var svgPathData = 'M 96 64 C 87.625008 64 79.062496 66.937504 73 73 C 66.937504 79.062496 64 87.625008 64 96 L 64 272 C 64 316.62501 90.437504 353.87501 128 377.5 L 128 448 L 368 448 L 368 377.5 C 405.5625 353.87501 432 316.62501 432 272 L 432 256 L 224 256 L 224 96 C 224 87.625008 221.0625 79.062496 215 73 C 208.9375 66.937504 200.37501 64 192 64 L 96 64 z M 96 96 L 192 96 L 192 256 L 96 256 L 96 96 z M 128 128 L 128 176 L 160 176 L 160 128 L 128 128 z M 101 288 L 395 288 C 389.3125 315.62501 373.12501 340 344.5 355.5 L 336 360 L 336 416 L 160 416 L 160 360 L 151.5 355.5 C 122.87501 340 106.6875 315.62501 101 288 z '; exports.definition = { prefix: prefix, iconName: iconName, icon: [ width, height, ligatures, unicode, svgPathData ]}; exports.laToiletSolid = exports.definition; exports.prefix = prefix; exports.iconName = iconName; exports.width = width; exports.height = height; exports.ligatures = ligatures; exports.unicode = unicode; exports.svgPathData = svgPathData;
ewangchong/bob-lab
src/main/java/com/codergray/lintcode/list/RemoveDuplicatesfromSortedList.java
package com.codergray.lintcode.list; public class RemoveDuplicatesfromSortedList { public static void main(String[] args) { ListNode n1 = new ListNode(1); ListNode n2 = new ListNode(1); n1.next = n2; ListNode n3 = new ListNode(2); n2.next = n3; ListNode x = deleteDuplicates(n1); x.print(); } public static ListNode deleteDuplicates(ListNode head) { ListNode pre = head; if (head == null || head.next == null) return head; ListNode curr = head.next; while (curr!= null) { if (pre.val == curr.val) { pre.next = curr.next; } else { pre = pre.next; } curr = curr.next; } return head; } }
vishnupsingh523/java-carnival-learning
conStatement/table.java
<gh_stars>1-10 import java.util.Scanner; public class table { public static void main(String[] args) { Scanner ob = new Scanner(System.in); System.out.println("Enter a number : "); int n = ob.nextInt(); int i=1; while(i<=10) { System.out.println(n + " x " + i + " = " + n*i); i++; } // loop will get stuck infinte i++; } }
jmolloy/pedigree
src/modules/system/TUI/TuiSyscallManager.cc
<gh_stars>10-100 /* * Copyright (c) 2008 <NAME>, <NAME>, <NAME> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include <processor/SyscallManager.h> #include <processor/Processor.h> #include <processor/VirtualAddressSpace.h> #include <process/Scheduler.h> #include <machine/Machine.h> #include <machine/Keyboard.h> #include <machine/InputManager.h> #include <console/Console.h> #include <Log.h> #include <Module.h> #include <config/Config.h> #include "TuiSyscallManager.h" #include "Console.h" #include "tuiSyscallNumbers.h" // UserConsole *g_Consoles[256]; // UserConsole *g_UserConsole = 0; //size_t g_UserConsoleId = 0; TuiSyscallManager g_TuiSyscallManager; /// Current console, by PID. Tree<uint64_t, UserConsole *> g_UserConsoleMap; // All consoles within a process, by PID. Tree<uint64_t, Tree<uintptr_t, UserConsole *>* > g_ConsolesMap; void TuiSyscallManager::initialise() { SyscallManager::instance().registerSyscallHandler(TUI, this); } uintptr_t TuiSyscallManager::call(uintptr_t function, uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4, uintptr_t p5) { if (function >= serviceEnd) { ERROR("TuiSyscallManager: invalid function called: " << Dec << static_cast<int>(function)); return 0; } return SyscallManager::instance().syscall(posix, function, p1, p2, p3, p4, p5); } uintptr_t TuiSyscallManager::syscall(SyscallState &state) { uintptr_t p1 = state.getSyscallParameter(0); uintptr_t p2 = state.getSyscallParameter(1); uintptr_t p3 = state.getSyscallParameter(2); uintptr_t p4 = state.getSyscallParameter(3); uintptr_t p5 = state.getSyscallParameter(4); static uintptr_t currBuff = 0; // Set locals, if any. uint64_t pid = Processor::information().getCurrentThread()->getParent()->getId(); UserConsole *g_UserConsole = g_UserConsoleMap.lookup(pid); Tree<uintptr_t, UserConsole *> *g_Consoles = g_ConsolesMap.lookup(pid); if(!g_Consoles) { g_Consoles = new Tree<uintptr_t, UserConsole *>; g_ConsolesMap.insert(pid, g_Consoles); } switch (state.getSyscallNumber()) { case TUI_NEXT_REQUEST: case TUI_NEXT_REQUEST_ASYNC: if (!g_UserConsole) { WARNING("Next request with no console"); return 0; } else return g_UserConsole->nextRequest(p1, reinterpret_cast<char*>(p2), reinterpret_cast<size_t*>(p3), p4, reinterpret_cast<size_t*>(p5), state.getSyscallNumber() == TUI_NEXT_REQUEST_ASYNC); case TUI_REQUEST_PENDING: { if (!g_UserConsole) WARNING("Request pending with no console"); else g_UserConsole->requestPending(); return 0; } case TUI_RESPOND_TO_PENDING: { if (!g_UserConsole) WARNING("Respond to pending with no console"); else g_UserConsole->respondToPending(static_cast<size_t>(p1), reinterpret_cast<char*>(p2), static_cast<size_t>(p3)); return 0; } case TUI_CREATE_CONSOLE: { size_t id = static_cast<size_t>(p1); char *name = reinterpret_cast<char*>(p2); UserConsole *pC = new UserConsole(); ConsoleManager::instance().registerConsole(String(name), pC, id); g_Consoles->insert(id, pC); if (!g_UserConsole) { g_UserConsoleMap.insert(pid, pC); // g_UserConsoleId = id; } return 0; } case TUI_SET_CTTY: { char *name = reinterpret_cast<char*>(p1); Processor::information().getCurrentThread()->getParent()->setCtty(ConsoleManager::instance().getConsole(String(name))); break; } case TUI_SET_CURRENT_CONSOLE: { if (g_UserConsole) { g_UserConsole->stopCurrentBlock(); g_UserConsoleMap.remove(pid); } //g_UserConsoleId = p1; g_UserConsole = g_Consoles->lookup(p1); g_UserConsoleMap.insert(pid, g_UserConsole); break; } case TUI_STOP_REQUEST_QUEUE: if (!g_UserConsole) WARNING("Request queue tried to stop without a console"); else g_UserConsole->stopCurrentBlock(); break; case TUI_DATA_CHANGED: { char *name = reinterpret_cast<char*>(p1); ConsoleFile *pConsole = ConsoleManager::instance().getConsoleFile(g_UserConsole); pConsole->dataIsReady(); break; } default: ERROR ("TuiSyscallManager: invalid syscall received: " << Dec << state.getSyscallNumber() << Hex); return 0; } return 0; } static void init() { g_TuiSyscallManager.initialise(); } static void destroy() { } MODULE_INFO("TUI", &init, &destroy, "console", "gfx-deps");
jzz4012650/simple_proxy
src/popup/components/Header.js
import React, { useState, useEffect } from 'react' import { makeStyles } from '@material-ui/styles' import AppBar from '@material-ui/core/AppBar' import Toolbar from '@material-ui/core/Toolbar' import Typography from '@material-ui/core/Typography' import IconButton from '@material-ui/core/IconButton' import Button from '@material-ui/core/Button' import ListItemText from '@material-ui/core/ListItemText' import ListItemIcon from '@material-ui/core/ListItemIcon' import Menu from '@material-ui/core/Menu' import MenuItem from '@material-ui/core/MenuItem' import ArrowDropDown from '@material-ui/icons/ArrowDropDown' import IconSetting from '@material-ui/icons/Settings' import RemoveCircle from '@material-ui/icons/RemoveCircle' import RemoveCircleOutline from '@material-ui/icons/RemoveCircleOutline' import IconDesktop from '@material-ui/icons/DesktopMac' import IconDirect from '@material-ui/icons/SwapHoriz' import { SYSTEM, DIRECT, BLACK_LIST, WHITE_LIST, PROXY_MODES, PROXY_MODE_MAP } from '../../constants/proxyModes' import { updateProxyMode, getProxyMode, getProxyServers } from '../../services/config' import { Tooltip } from '@material-ui/core' const modeIcons = { [SYSTEM]: <IconDesktop />, [DIRECT]: <IconDirect />, [BLACK_LIST]: <RemoveCircle />, [WHITE_LIST]: <RemoveCircleOutline /> } const useStyle = makeStyles(theme => ({ leftIcon: { marginRight: theme.spacing(1) }, flex: { flex: 1, margin: theme.spacing(1) } })) const Header = ({ setModified }) => { const classes = useStyle() const [mode, setMode] = useState(SYSTEM) const [warn, setWarn] = useState(false) const [anchorEl, setAnchorEl] = useState(null) const initProxyMode = async () => { const mode = await getProxyMode() setMode(mode) const proxyServers = await getProxyServers() if (!proxyServers.length) { setWarn(true) } } const handleModeChange = async (mode) => { await updateProxyMode(mode) setModified(true) setMode(mode) setAnchorEl(null) } useEffect(() => { initProxyMode() }, []) return ( <AppBar position="static" color="primary"> <Toolbar> <Typography type="title" color="inherit"> {chrome.i18n.getMessage('proxy_mode')} </Typography> <Button aria-controls="mode-menu" aria-haspopup="true" className={classes.flex} color="inherit" onClick={e => setAnchorEl(e.currentTarget)}> {React.cloneElement(modeIcons[mode], { className: classes.leftIcon })} {PROXY_MODE_MAP[mode].title} <ArrowDropDown /> </Button> <Menu id="mode-menu" keepMounted open={Boolean(anchorEl)} anchorEl={anchorEl} onClose={() => setAnchorEl(null)}> {PROXY_MODES.map((d, i) => <MenuItem dense key={i} value={d.name} selected={mode === d.name} onClick={() => handleModeChange(d.name)}> <ListItemIcon> {modeIcons[d.name]} </ListItemIcon> <ListItemText primary={d.title} secondary={d.desc} /> </MenuItem> )} </Menu> <Tooltip arrow open={warn} title={chrome.i18n.getMessage('no_proxy_server_warning')}> <IconButton size="small" onClick={() => chrome.runtime.openOptionsPage()}> <IconSetting /> </IconButton> </Tooltip> </Toolbar> </AppBar > ) } export default Header
Mvwivs/tp_advanced_cpp_project
include/http/HTTP.hpp
#pragma once #include <string> #include <optional> #include <vector> #include <string_view> #include <cstdint> namespace http { // Compare two strings case insensetive bool iequals(const std::string& a, const std::string& b); namespace HTTP { // Exception used to indicate parsing errors class ParsingException : public std::runtime_error { public: ParsingException(const std::string& messsage); }; // HTTP method enum class Method { GET, POST }; // convert string to `Method` std::optional<Method> get_method(std::string method); // HTTP Version enum class Version { HTTP_1_0, HTTP_1_1 }; // convert string to `Version` std::optional<Version> get_version(std::string version); // convert `Version` to string std::string map_version(Version version); // HTTP start line (first line: method, target, version) struct StartLine { Method method; std::string target; Version version; }; // HTTP headers struct Header { std::string name; std::string value; }; // HTTP parameters struct Parameter { std::string name; std::string value; }; // HTTP Request struct Request { StartLine startLine; // request first line std::vector<Header> headers; // header list std::optional<std::string> body; // request body if present std::optional<std::vector<Parameter>> parameters; // parameter vector if present Request() = default; Request(const std::string& data); ~Request() = default; // try to get header from request struct const std::string& getHeader(const std::string& header_name) const; private: // parse parameters from target (GET) or body (POST) void parseParameters(const std::string& data); }; // Status code of HTTP request using StatusCode = uint16_t; // Get message for status code std::string status_message(StatusCode code); // status (first) line of response struct StatusLine { // does not contain status text Version version; StatusCode code; }; // HTTP response struct Response { StatusLine statusLine; // response first line std::vector<Header> headers; // response header list std::optional<std::string> body; // response body if present // build response message, content-length is set automatically std::string to_string() const; }; // HTTP request "head" end sequence constexpr std::string_view end_seq = "\r\n\r\n"; } // namespace HTTP } // namespace http
PascalGuenther/gecko_sdk
util/third_party/aws_iot_libs/libraries/coreMQTT/source/include/core_mqtt_state.h
<reponame>PascalGuenther/gecko_sdk<filename>util/third_party/aws_iot_libs/libraries/coreMQTT/source/include/core_mqtt_state.h /* * coreMQTT v1.1.0 * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /** * @file core_mqtt_state.h * @brief Function to keep state of MQTT PUBLISH packet deliveries. */ #ifndef CORE_MQTT_STATE_H #define CORE_MQTT_STATE_H #include "core_mqtt.h" /** * @ingroup mqtt_constants * @brief Initializer value for an #MQTTStateCursor_t, indicating a search * should start at the beginning of a state record array */ #define MQTT_STATE_CURSOR_INITIALIZER ( ( size_t ) 0 ) /** * @ingroup mqtt_basic_types * @brief Cursor for iterating through state records. */ typedef size_t MQTTStateCursor_t; /** * @cond DOXYGEN_IGNORE * Doxygen should ignore this section, this enum is private. * * @brief Value indicating either send or receive. */ typedef enum MQTTStateOperation { MQTT_SEND, MQTT_RECEIVE } MQTTStateOperation_t; /** @endcond */ /** * @fn MQTTStatus_t MQTT_ReserveState( MQTTContext_t * pMqttContext, uint16_t packetId, MQTTQoS_t qos ); * @brief Reserve an entry for an outgoing QoS 1 or Qos 2 publish. * * @param[in] pMqttContext Initialized MQTT context. * @param[in] packetId The ID of the publish packet. * @param[in] qos 1 or 2. * * @return MQTTSuccess, MQTTNoMemory, or MQTTStateCollision. */ /** * @cond DOXYGEN_IGNORE * Doxygen should ignore this definition, this function is private. */ MQTTStatus_t MQTT_ReserveState( MQTTContext_t * pMqttContext, uint16_t packetId, MQTTQoS_t qos ); /** @endcond */ /** * @fn MQTTPublishState_t MQTT_CalculateStatePublish( MQTTStateOperation_t opType, MQTTQoS_t qos ) * @brief Calculate the new state for a publish from its qos and operation type. * * @param[in] opType Send or Receive. * @param[in] qos 0, 1, or 2. * * @return The calculated state. */ /** * @cond DOXYGEN_IGNORE * Doxygen should ignore this definition, this function is private. */ MQTTPublishState_t MQTT_CalculateStatePublish( MQTTStateOperation_t opType, MQTTQoS_t qos ); /** @endcond */ /** * @fn MQTTStatus_t MQTT_UpdateStatePublish( MQTTContext_t * pMqttContext, uint16_t packetId, MQTTStateOperation_t opType, MQTTQoS_t qos, MQTTPublishState_t * pNewState ); * @brief Update the state record for a PUBLISH packet. * * @param[in] pMqttContext Initialized MQTT context. * @param[in] packetId ID of the PUBLISH packet. * @param[in] opType Send or Receive. * @param[in] qos 0, 1, or 2. * @param[out] pNewState Updated state of the publish. * * @return #MQTTBadParameter, #MQTTIllegalState, #MQTTStateCollision or * #MQTTSuccess. */ /** * @cond DOXYGEN_IGNORE * Doxygen should ignore this definition, this function is private. */ MQTTStatus_t MQTT_UpdateStatePublish( MQTTContext_t * pMqttContext, uint16_t packetId, MQTTStateOperation_t opType, MQTTQoS_t qos, MQTTPublishState_t * pNewState ); /** @endcond */ /** * @fn MQTTPublishState_t MQTT_CalculateStateAck( MQTTPubAckType_t packetType, MQTTStateOperation_t opType, MQTTQoS_t qos ); * @brief Calculate the state from a PUBACK, PUBREC, PUBREL, or PUBCOMP. * * @param[in] packetType PUBACK, PUBREC, PUBREL, or PUBCOMP. * @param[in] opType Send or Receive. * @param[in] qos 1 or 2. * * @return The calculated state. */ /** * @cond DOXYGEN_IGNORE * Doxygen should ignore this definition, this function is private. */ MQTTPublishState_t MQTT_CalculateStateAck( MQTTPubAckType_t packetType, MQTTStateOperation_t opType, MQTTQoS_t qos ); /** @endcond */ /** * @fn MQTTStatus_t MQTT_UpdateStateAck( MQTTContext_t * pMqttContext, uint16_t packetId, MQTTPubAckType_t packetType, MQTTStateOperation_t opType, MQTTPublishState_t * pNewState ); * @brief Update the state record for an ACKed publish. * * @param[in] pMqttContext Initialized MQTT context. * @param[in] packetId ID of the ack packet. * @param[in] packetType PUBACK, PUBREC, PUBREL, or PUBCOMP. * @param[in] opType Send or Receive. * @param[out] pNewState Updated state of the publish. * * @return #MQTTBadParameter if an invalid parameter is passed; * #MQTTBadResponse if the packet from the network is not found in the records; * #MQTTIllegalState if the requested update would result in an illegal transition; * #MQTTSuccess otherwise. */ /** * @cond DOXYGEN_IGNORE * Doxygen should ignore this definition, this function is private. */ MQTTStatus_t MQTT_UpdateStateAck( MQTTContext_t * pMqttContext, uint16_t packetId, MQTTPubAckType_t packetType, MQTTStateOperation_t opType, MQTTPublishState_t * pNewState ); /** @endcond */ /** * @fn uint16_t MQTT_PubrelToResend( const MQTTContext_t * pMqttContext, MQTTStateCursor_t * pCursor, MQTTPublishState_t * pState ); * @brief Get the packet ID of next pending PUBREL ack to be resent. * * This function will need to be called to get the packet for which a PUBREL * need to be sent when a session is reestablished. Calling this function * repeatedly until packet id is 0 will give all the packets for which * a PUBREL need to be resent in the correct order. * * @param[in] pMqttContext Initialized MQTT context. * @param[in,out] pCursor Index at which to start searching. * @param[out] pState State indicating that PUBREL packet need to be sent. */ /** * @cond DOXYGEN_IGNORE * Doxygen should ignore this definition, this function is private. */ uint16_t MQTT_PubrelToResend( const MQTTContext_t * pMqttContext, MQTTStateCursor_t * pCursor, MQTTPublishState_t * pState ); /** @endcond */ /** * @brief Get the packet ID of next pending publish to be resent. * * This function will need to be called to get the packet for which a publish * need to be sent when a session is reestablished. Calling this function * repeatedly until packet id is 0 will give all the packets for which * a publish need to be resent in the correct order. * * @param[in] pMqttContext Initialized MQTT context. * @param[in,out] pCursor Index at which to start searching. * * <b>Example</b> * @code{c} * * // For this example assume this function returns an outgoing unacknowledged * // QoS 1 or 2 publish from its packet identifier. * MQTTPublishInfo_t * getPublish( uint16_t packetID ); * * // Variables used in this example. * MQTTStatus_t status; * MQTTStateCursor_t cursor = MQTT_STATE_CURSOR_INITIALIZER; * bool sessionPresent; * uint16_t packetID; * MQTTPublishInfo_t * pResendPublish = NULL; * MQTTConnectInfo_t connectInfo = { 0 }; * * // This is assumed to have been initialized before the call to MQTT_Connect(). * MQTTContext_t * pContext; * * // Set clean session to false to attempt session resumption. * connectInfo.cleanSession = false; * connectInfo.pClientIdentifier = "someClientID"; * connectInfo.clientIdentifierLength = strlen( connectInfo.pClientIdentifier ); * connectInfo.keepAliveSeconds = 60; * // Optional connect parameters are not relevant to this example. * * // Create an MQTT connection. Use 100 milliseconds as a timeout. * status = MQTT_Connect( pContext, &connectInfo, NULL, 100, &sessionPresent ); * * if( status == MQTTSuccess ) * { * if( sessionPresent ) * { * // Loop while packet ID is nonzero. * while( ( packetID = MQTT_PublishToResend( pContext, &cursor ) ) != 0 ) * { * // Assume this function will succeed. * pResendPublish = getPublish( packetID ); * // Set DUP flag. * pResendPublish->dup = true; * status = MQTT_Publish( pContext, pResendPublish, packetID ); * * if( status != MQTTSuccess ) * { * // Application can decide how to handle a failure. * } * } * } * else * { * // The broker did not resume a session, so we can clean up the * // list of outgoing publishes. * } * } * @endcode */ /* @[declare_mqtt_publishtoresend] */ uint16_t MQTT_PublishToResend( const MQTTContext_t * pMqttContext, MQTTStateCursor_t * pCursor ); /* @[declare_mqtt_publishtoresend] */ /** * @fn const char * MQTT_State_strerror( MQTTPublishState_t state ); * @brief State to string conversion for state engine. * * @param[in] state The state to convert to a string. * * @return The string representation of the state. */ /** * @cond DOXYGEN_IGNORE * Doxygen should ignore this definition, this function is private. */ const char * MQTT_State_strerror( MQTTPublishState_t state ); /** @endcond */ #endif /* ifndef CORE_MQTT_STATE_H */
LeeYang21/WanAndroid
app/src/main/java/com/yl/wanandroid/view/user/SettingActivity.java
package com.yl.wanandroid.view.user; import android.content.DialogInterface; import android.content.Intent; import android.support.v7.app.AlertDialog; import android.support.v7.widget.Toolbar; import android.text.TextUtils; import android.view.View; import android.widget.TextView; import com.yl.wanandroid.R; import com.yl.wanandroid.app.Constant; import com.yl.wanandroid.base.BaseMvpActivity; import com.yl.wanandroid.presenter.UserPresenter; import com.yl.wanandroid.utils.AppUtils; import com.yl.wanandroid.utils.PrefsUtils; import com.yl.wanandroid.view.IntroActivity; import butterknife.BindView; public class SettingActivity extends BaseMvpActivity<UserView, UserPresenter> implements UserView, View.OnClickListener { @BindView(R.id.toolbar) Toolbar toolbar; @BindView(R.id.tv_clean_cache) TextView tvCleanCache; @BindView(R.id.tv_help_and_callback) TextView tvHelpAndCallback; @BindView(R.id.tv_about) TextView tvAbout; @BindView(R.id.tv_sign_out) TextView tvSignOut; @BindView(R.id.tv_app_info) TextView tvAppInfo; @Override public int getLayoutId() { return R.layout.activity_setting; } @Override public void initView() { if (!PrefsUtils.getBoolean(this, Constant.KEY_IS_LOGON)) { tvSignOut.setVisibility(View.GONE); } tvAppInfo.setText(getString(R.string.label_app_info, AppUtils.getName(this), AppUtils.getVersionName(this))); } @Override public void initListener() { toolbar.setNavigationOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); tvCleanCache.setOnClickListener(this); tvHelpAndCallback.setOnClickListener(this); tvAbout.setOnClickListener(this); tvSignOut.setOnClickListener(this); } @Override public UserPresenter initPresenter() { return new UserPresenter(); } @Override public void onLoginOrRegisterSucceed() { } @Override public void onSignOutSucceed() { PrefsUtils.setBoolean(this, Constant.KEY_IS_LOGON, false); PrefsUtils.setString(this, Constant.KEY_USER_NAME, null); PrefsUtils.setString(this, Constant.KEY_LOCAL_COOKIE, null); dismissProgressDialog(); showMsg(getString(R.string.label_has_signed_out)); Intent intent = new Intent(this, IntroActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); startActivity(intent); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.tv_clean_cache: String cacheSize = AppUtils.getCacheSize(SettingActivity.this); if (TextUtils.isEmpty(cacheSize)) showMsg(getString(R.string.label_no_cache)); else showTipDialog(getString(R.string.label_clean_cache), getString(R.string.label_confirm_to_clean_cache, cacheSize), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { AppUtils.cleanCache(SettingActivity.this); showMsg(getString(R.string.label_has_cleaned_cache)); } }); break; case R.id.tv_help_and_callback: showMsg("暂未完成的功能"); break; case R.id.tv_about: showMsg("暂未完成的功能"); break; case R.id.tv_sign_out: showTipDialog(getString(R.string.label_sign_out), getString(R.string.label_confirm_to_sign_out), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { showProgressDialog(getString(R.string.label_on_signing_out)); mPresenter.signOut(); } }); break; default: } } public void showTipDialog(String title, String msg, DialogInterface.OnClickListener listener) { AlertDialog.Builder tip = new AlertDialog.Builder(this); tip.setTitle(title).setMessage(msg); tip.setPositiveButton(R.string.label_OK, listener).setNegativeButton(R.string.label_cancel, null); tip.create().show(); } }
pujiaolin/datacollector
sshtunnel-lib/src/main/java/com/streamsets/service/sshtunnel/SshTunnelServiceImpl.java
<filename>sshtunnel-lib/src/main/java/com/streamsets/service/sshtunnel/SshTunnelServiceImpl.java /* * Copyright 2019 StreamSets Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.streamsets.service.sshtunnel; import com.streamsets.pipeline.api.ConfigDefBean; import com.streamsets.pipeline.api.ConfigGroups; import com.streamsets.pipeline.api.ConfigIssue; import com.streamsets.pipeline.api.StageException; import com.streamsets.pipeline.api.base.BaseService; import com.streamsets.pipeline.api.impl.Utils; import com.streamsets.pipeline.api.service.ServiceDef; import com.streamsets.pipeline.api.service.sshtunnel.SshTunnelService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.stream.Collectors; /** * SSH Tunnel service implementation. * <p/> * Provides embedded SSH tunnel entry points (as many as needed) for the stage using the service. */ @ServiceDef( provides = SshTunnelService.class, version = 1, upgraderDef = "sshtunnel-upgrader.yaml", label = "SSH Tunnel" ) @ConfigGroups(Groups.class) public class SshTunnelServiceImpl extends BaseService implements SshTunnelService { private static final Logger LOG = LoggerFactory.getLogger(SshTunnelServiceImpl.class); private int state; // 0 created, 1 inited, 2 error, 3 started, 4 stopped, 5 destroyed @ConfigDefBean(groups = {"SSH_TUNNEL"}) public SshTunnelConfigBean sshTunnelConfig; private SshTunnel.Builder sshTunnelBuilder; private PortsForwarding portsForwarding; //visible for testing SshTunnel.Builder createSshTunnelBuilder() { return SshTunnel.builder(); } @Override public List<ConfigIssue> init() { Utils.checkState(state == 0, "Already inited"); LOG.debug("Initializing SSH Tunnel service"); List issues = new ArrayList(); if (sshTunnelConfig.sshTunneling) { SshKeyInfoBean sshKeyInfo = sshTunnelConfig.getSshKeyInfo(); if (sshKeyInfo != null) { //splitting the fingerprints config into one a List<String> of fingerprints //didn't feel like bringing in Guava just for this. List<String> fingerprints = Arrays.stream(sshTunnelConfig.sshHostFingerprints.split(",")) .map(String::trim) .filter(e -> !e.isEmpty()) .collect(Collectors.toList()); sshTunnelBuilder = createSshTunnelBuilder() .setSshHost(sshTunnelConfig.sshHost) .setSshPort(sshTunnelConfig.sshPort) .setSshUser(sshTunnelConfig.sshUsername) .setSshHostFingerprints(fingerprints) .setSshPrivateKey(sshKeyInfo.getPrivateKey()) .setSshPublicKey(sshKeyInfo.getPublicKey()) .setSshPrivateKeyPassword(sshKeyInfo.getPassword()) .setReadyTimeOut(sshTunnelConfig.sshReadyTimeout) .setSshKeepAlive(sshTunnelConfig.sshKeepAlive) ; try { // create a dummy tunnel to verify required config values are set. It does not check correctness of data here. sshTunnelBuilder.build(); } catch (Exception ex) { issues.add(getContext().createConfigIssue( Groups.SSH_TUNNEL.name(), "", Errors.SSH_TUNNEL_03, ex.getMessage() )); } } } state = (issues.isEmpty()) ? 1 : 2; return issues; } @Override public void destroy() { LOG.debug("Destroying SSH Tunnel service"); if (state == 3) { stop(); } state = 5; } @Override public boolean isEnabled() { return sshTunnelConfig.sshTunneling; } @Override public Map<HostPort, HostPort> start(List<HostPort> targetHostsPorts) { Utils.checkState(state == 1, "Not in inited state"); state = 3; if (sshTunnelBuilder == null) { LOG.debug("SSH tunneling disabled, creating a NoOpPortsForwarding"); portsForwarding = new NoOpPortsForwarding(targetHostsPorts); } else { LOG.debug("SSH tunneling enabled, creating an ActivePortsForwarding"); try { portsForwarding = new ActivePortsForwarding(sshTunnelBuilder.build(), targetHostsPorts); } catch (Exception ex) { state = 2; throw ex; } } portsForwarding.start(); state = 3; return portsForwarding.getPortMapping(); } @Override public void healthCheck() throws StageException { Utils.checkState(state == 3, "Not in started state"); portsForwarding.healthCheck(); } @Override public void stop() { Utils.checkState(state == 3, "Not in started state"); state = 4; portsForwarding.stop(); } }
jlifeby/seasoncard-web
service-mongo/src/main/java/com/jlife/abon/service/EventService.java
<reponame>jlifeby/seasoncard-web package com.jlife.abon.service; import com.jlife.abon.entity.Event; import com.jlife.abon.entity.Participant; import org.springframework.data.mongodb.core.query.Query; import java.util.List; /** * @author <NAME> * @author <NAME> */ public interface EventService { void registerToEvent(Participant participant); List<Participant> getParticipants(String event); List<Event> getActualEventSortedByDate(); List<Event> getActualEvents(int page, int size); List<Event> getActualEventsByOrganization(String org); List<Event> getPastEvents(String org); List<Event> getDraftEvents(String org); List<Event> getActualEventsByCity(String city, int page, int size); List<Event> getActualEventsByCategory(String category, int page, int size); List<Event> getActualEventsByCityAndCategory(String city, String category, int page, int size); List<Event> searchFullText(String text, int page, int size); List<Event> search(Query query); void removeEvent(String eventId); }
DeerTears/gb-studio
appData/src/gb/include/hUGEDriverRoutines.h
#ifndef HUGEDRIVER_ROUTINES_H_INCLUDE #define HUGEDRIVER_ROUTINES_H_INCLUDE void hUGETrackerRoutine(unsigned char ch, unsigned char param, unsigned char tick) __nonbanked; static const hUGERoutine_t routines[] = { hUGETrackerRoutine, hUGETrackerRoutine, hUGETrackerRoutine, hUGETrackerRoutine, hUGETrackerRoutine, hUGETrackerRoutine, hUGETrackerRoutine, hUGETrackerRoutine, hUGETrackerRoutine, hUGETrackerRoutine, hUGETrackerRoutine, hUGETrackerRoutine, hUGETrackerRoutine, hUGETrackerRoutine, hUGETrackerRoutine, hUGETrackerRoutine, }; #endif
agustinaindah/wonderdeal
app/src/main/java/id/wonderdeal/wonderdealapps/features/checkout/order_success/OrderSuccessDialogFragment.java
package id.wonderdeal.wonderdealapps.features.checkout.order_success; import android.app.Dialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.DialogFragment; import android.support.v7.app.AlertDialog; import android.view.LayoutInflater; import android.view.View; import android.view.WindowManager; import android.widget.FrameLayout; import android.widget.TableLayout; import android.widget.TextView; import com.android.tonyvu.sc.util.CartHelper; import com.google.gson.JsonObject; import butterknife.BindString; import butterknife.BindView; import butterknife.ButterKnife; import id.wonderdeal.wonderdealapps.R; import id.wonderdeal.wonderdealapps.features.main.MainActivity2; import id.wonderdeal.wonderdealapps.utils.Consts; /** * Created by agustinaindah on 23/10/2017. */ public class OrderSuccessDialogFragment extends DialogFragment { @BindView(R.id.txtOrderID) TextView txtOrderID; @BindView(R.id.tblRekening) TableLayout tblRekening; @BindView(R.id.txtNamaPerusahaan) TextView txtNamaPerusahaan; @BindView(R.id.txtTransfer) TextView txtTransfer; @BindView(R.id.frCheckoutSuccess) FrameLayout frCheckoutSuccess; @BindString(R.string.label_order_received) String strOrderReceived; public static OrderSuccessDialogFragment newInstance(String orderId, String paymentMethod) { Bundle args = new Bundle(); args.putString("order_id", orderId); args.putString(Consts.ARG_TYPE,paymentMethod); OrderSuccessDialogFragment fragment = new OrderSuccessDialogFragment(); fragment.setArguments(args); return fragment; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public Dialog onCreateDialog(Bundle savedInstanceState) { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); LayoutInflater inflater = getActivity().getLayoutInflater(); View view = inflater.inflate(R.layout.dialog_fragment_checkout_success, null); ButterKnife.bind(this, view); txtOrderID.setText(getArguments().getString("order_id", "")); if (getArguments().getString(Consts.ARG_TYPE, "").equals(Consts.COD)){ txtNamaPerusahaan.setVisibility(View.GONE); txtTransfer.setVisibility(View.GONE); frCheckoutSuccess.setVisibility(View.GONE); tblRekening.setVisibility(View.GONE); } setCancelable(false); builder.setView(view) .setTitle(strOrderReceived) .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int which) { CartHelper.getCart().clear(); Intent intent = new Intent(getActivity(), MainActivity2.class); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); } }); final AlertDialog alertDialog = builder.create(); return alertDialog; } @Override public void onResume() { super.onResume(); if (getDialog() == null) return; int width = getResources().getDisplayMetrics().widthPixels; getDialog().getWindow().setLayout(width, WindowManager.LayoutParams.WRAP_CONTENT); } }
merrier/Meezao-front
web_design/plugin_demo/Autocomplete/js/demo.js
<gh_stars>1-10 /** * Created by Yangyue on 2017/2/28. */ $( function() { var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++", "Clojure", "COBOL", "ColdFusion", "Erlang", "Fortran", "Groovy", "Haskell", "Java", "JavaScript", "Lisp", "Perl", "PHP", "Python", "Ruby", "Scala", "Scheme" ]; $( "#tags" ).autocomplete({ source: availableTags }); singleAuto(".auto_single_input",availableTags); multipleAuto(".auto_multiple_input",availableTags); //--------------------自动完成搜索单选------------------- function singleAuto(input,source){ $(input).autocomplete({ source: source, minLength: 0, autoFocus: true }); } //--------------------自动完成搜索-单选------------------ //--------------------自动完成搜索多选------------------- function multipleAuto(input,source){ $(input).autocomplete({ source: source, minLength: 0, autoFocus: true, _renderItem:function (ul, item) { return $("<li></li>") .append(item.label) .appendTo(ul); }, select: function( event, ui ) { var span=$("<span class='auto_span'><i class='fa fa-close float_right_multiple'></i></span>"); span.html(ui.item.label+"<i class='fa fa-close float_right_multiple'></i>"); span.attr("data-id",ui.item.value); if(ui.item.label=="全部"){ //选择全部时移除其它选项并禁止选择 $(this).parent().find("span").each(function(i){ $(this).remove(); }); $(this).parent().append(span); $(this).val("").attr("disabled",true); $(this).parents(".auto_input_div").css("height","68px"); }else{ //不允许重复添加 var flag=0; $(this).parent().find("span").each(function(i){ if(ui.item.label==$(this).text()){ flag=1; } }); if(flag){ alert("不允许重复添加选项!"); $(this).val(""); }else{ $(this).parent().append(span); $(this).val(""); var p_height=parseInt($(this).parents(".auto_input_div").css("height"))+34; $(this).parents(".auto_input_div").css("height",p_height+"px"); } } return false; } }); } //--------------------自动完成搜索多选------------------- //--------------------展开所有选项----------------------- $('.dropdown_menu_div').on('click', function() { var auto_input=$(this).prev("div").children(".auto_input"); if (auto_input.autocomplete("widget").is(":visible")) { auto_input.autocomplete("close"); return; } $(this).blur(); auto_input.autocomplete('search', ''); auto_input.focus(); }); //--------------------展开所有选项----------------------- //-------------自动完成多选删除选项------------------------------------ $(document).on("click",".float_right_multiple",function(){ var span=$(this).parent(); span.prevAll('.auto_input').attr("disabled",false); var p_height=parseInt($(this).parents(".auto_input_div").css("height"))-34; $(this).parents(".auto_input_div").css("height",p_height+"px"); span.remove(); }); //-------------自动完成多选删除选项------------------------------------ } );
adrienpoly/covidliste
db/migrate/20210405145759_create_campaign_batches.rb
<reponame>adrienpoly/covidliste class CreateCampaignBatches < ActiveRecord::Migration[6.1] def change create_table :campaign_batches do |t| t.references :campaign, foreign_key: true t.references :vaccination_center, foreign_key: true t.references :partner, foreign_key: true t.timestamp :expires_at, null: false t.integer :size, null: false t.integer :duration_in_minutes, null: false, default: 10 t.check_constraint("size > 0", name: "size_gt_zero") t.check_constraint("duration_in_minutes > 0", name: "duration_in_minutes_gt_zero") t.timestamps end end end
alexanderchiran/JavaSE11ProgrammerI_1Z0-815
ProjectJavaSE11/src/section3/string1/TestValueOf.java
<gh_stars>1-10 package section3.string1; public class TestValueOf { public static void main(String[] args) { String george = "FredGeorgeSmith"; // Constructor used to get substring // beginning offset index 4 inclusive, and 6 characters long String shortGeorge1 = new String(george.toCharArray(), 4, 6); System.out.println("shortGeorge1 = " + shortGeorge1); // valueOf method used to get substring // beginning offset index 4 inclusive, and 6 characters long String shortGeorge2 = String.valueOf(george.toCharArray(), 4, 6); System.out.println("shortGeorge2 = " + shortGeorge2); // The method substring uses offsets, // beginning offset (inclusive) and ending offset (exclusive) // What happens if we use same parameter values examples above? String shortGeorge3 = george.substring(4, 6); System.out.println("shortGeorge3 = " + shortGeorge3); // let's change our second parameter value... String shortGeorge4 = george.substring(4, 10); System.out.println("shortGeorge4 = " + shortGeorge4); // Notice that none of these methods change george variable itself System.out.println("george = " + george); } }
zpublic/cozy
src/Practice/CozyKnightCore/CozyKnightCore.h
<reponame>zpublic/cozy #ifndef __COZY_KNIGHT_CORE__ #define __COZY_KNIGHT_CORE__ #include "stdafx.h" #include "CozyDef.h" #include "iknight.h" #include <vector> class COZY_API CozyKnightCore : public IKnight { public: CozyKnightCore(); virtual void Release(); virtual void Attach(HANDLE hProcess); virtual void Detach(); virtual IKnightTask* CreateTask(); virtual size_t GetTaskCount(); virtual IKnightTask* GetTask(size_t index); virtual void DeleteTask(IKnightTask* pTask); virtual void ClearTask(); virtual void SaveAddress(const ADDRESS_INFO& addr); virtual ADDRESS_LIST GetSavedAddress(); virtual size_t GetSavedAddressCount(); virtual void DeleteSavedAddress(size_t index); virtual void ClearSavedAddress(); virtual void CozyKnightCore::UpdateSavedAddress(size_t index, const ADDRESS_INFO& addr); virtual BOOL ModifyValue(const ADDRESS_INFO& addr, int value); virtual BOOL ReadValue(const ADDRESS_INFO& addr, int& nValue); protected: ~CozyKnightCore(); private: std::vector<IKnightTask*> m_vecTaskList; ADDRESS_LIST m_SavedAddrList; HANDLE m_hTarget; }; EXTERN_C COZY_API IKnight* GetInstance() { return new CozyKnightCore(); } #endif // __COZY_KNIGHT_CORE__
imranq2/SparkAutoMapper.FHIR
spark_auto_mapper_fhir/value_sets/purpose_of_use.py
<reponame>imranq2/SparkAutoMapper.FHIR from __future__ import annotations from spark_auto_mapper_fhir.fhir_types.uri import FhirUri from spark_auto_mapper_fhir.value_sets.generic_type import GenericTypeCode from spark_auto_mapper.type_definitions.defined_types import AutoMapperTextInputType # This file is auto-generated by generate_classes so do not edit manually # noinspection PyPep8Naming class PurposeOfUse(GenericTypeCode): """ v3.PurposeOfUse From: http://terminology.hl7.org/ValueSet/v3-PurposeOfUse in v3-codesystems.xml Supports communication of purpose of use at a general level. """ def __init__(self, value: AutoMapperTextInputType): super().__init__(value=value) """ http://terminology.hl7.org/CodeSystem/v3-ActReason """ codeset: FhirUri = "http://terminology.hl7.org/CodeSystem/v3-ActReason" class PurposeOfUseValues: """ Identifies the reason the patient is assigned to this accommodation type From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ ActAccommodationReason = PurposeOfUse("_ActAccommodationReason") """ Description:Codes used to specify reasons or criteria relating to coverage provided under a policy or program. May be used to convey reasons pertaining to coverage contractual provisions, including criteria for eligibility, coverage limitations, coverage maximums, or financial participation required of covered parties. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ ActCoverageReason = PurposeOfUse("_ActCoverageReason") """ Description:The rationale or purpose for an act relating to information management, such as archiving information for the purpose of complying with an enterprise data retention policy. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ ActInformationManagementReason = PurposeOfUse("_ActInformationManagementReason") """ Description: Types of reasons why a substance is invalid for use. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ ActInvalidReason = PurposeOfUse("_ActInvalidReason") """ Domain specifies the codes used to describe reasons why a Provider is cancelling an Invoice or Invoice Grouping. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ ActInvoiceCancelReason = PurposeOfUse("_ActInvoiceCancelReason") """ A coded description of the reason for why a patient did not receive a scheduled immunization. (important for public health strategy From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ ActNoImmunizationReason = PurposeOfUse("_ActNoImmunizationReason") """ Indicates why a fulfiller refused to fulfill a supply order, and considered it important to notify other providers of their decision. E.g. "Suspect fraud", "Possible abuse", "Contraindicated". (used when capturing 'refusal to fill' annotations) From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ ActSupplyFulfillmentRefusalReason = PurposeOfUse( "_ActSupplyFulfillmentRefusalReason" ) """ Definition:Specifies the reason that an event occurred in a clinical research study. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ ClinicalResearchEventReason = PurposeOfUse("_ClinicalResearchEventReason") """ Definition:SSpecifies the reason that a test was performed or observation collected in a clinical research study. Note:This set of codes are not strictly reasons, but are used in the currently Normative standard. Future revisions of the specification will model these as ActRelationships and thes codes may subsequently be retired. Thus, these codes should not be used for new specifications. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ ClinicalResearchObservationReason = PurposeOfUse( "_ClinicalResearchObservationReason" ) """ Description:Indicates why the prescription should be suspended. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ CombinedPharmacyOrderSuspendReasonCode = PurposeOfUse( "_CombinedPharmacyOrderSuspendReasonCode" ) """ Description:Identifies reasons for nullifying (retracting) a particular control act. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ ControlActNullificationReasonCode = PurposeOfUse( "_ControlActNullificationReasonCode" ) """ Description: Reasons to refuse a transaction to be undone. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ ControlActNullificationRefusalReasonType = PurposeOfUse( "_ControlActNullificationRefusalReasonType" ) """ Identifies why a specific query, request, or other trigger event occurred. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ ControlActReason = PurposeOfUse("_ControlActReason") """ Description:Identifies why a change is being made to a record. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ GenericUpdateReasonCode = PurposeOfUse("_GenericUpdateReasonCode") """ Definition:A collection of concepts identifying why the patient's profile is being queried. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ PatientProfileQueryReason = PurposeOfUse("_PatientProfileQueryReasonCode") """ Definition:Indicates why the request to transfer a prescription from one dispensing facility to another has been refused. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ PharmacySupplyRequestFulfillerRevisionRefusalReasonCode = PurposeOfUse( "_PharmacySupplyRequestFulfillerRevisionRefusalReasonCode" ) """ Description: Identifies why a request to add (or activate) a record is being refused. Examples include the receiving system not able to match the identifier and find that record in the receiving system, having no permission, or a detected issue exists which precludes the requested action. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ RefusalReasonCode = PurposeOfUse("_RefusalReasonCode") """ Reasons for cancelling or rescheduling an Appointment From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ SchedulingActReason = PurposeOfUse("_SchedulingActReason") """ Indicates why the act revision (status update) is being refused. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ StatusRevisionRefusalReasonCode = PurposeOfUse("_StatusRevisionRefusalReasonCode") """ Definition:Indicates why the requested authorization to prescribe or dispense a medication has been refused. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ SubstanceAdministrationPermissionRefusalReasonCode = PurposeOfUse( "_SubstanceAdministrationPermissionRefusalReasonCode" ) """ Reasons why substitution of a substance administration request is not permitted. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ SubstanceAdminSubstitutionNotAllowedReason = PurposeOfUse( "_SubstanceAdminSubstitutionNotAllowedReason" ) """ SubstanceAdminSubstitutionReason From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ SubstanceAdminSubstitutionReason = PurposeOfUse("_SubstanceAdminSubstitutionReason") """ The explanation for why a patient is moved from one location to another within the organization From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ TransferActReason = PurposeOfUse("_TransferActReason") """ Definition: This domain is used to document reasons for providing a billable service; the billable services may include both clinical services and social services. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ ActBillableServiceReason = PurposeOfUse("_ActBillableServiceReason") """ From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ BONUS = PurposeOfUse("BONUS") """ Description:The level of coverage under the policy or program is available only to children From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ ChildrenOnly = PurposeOfUse("CHD") """ Description:The level of coverage under the policy or program is available only to a subscriber's dependents. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ DependentsOnly = PurposeOfUse("DEP") """ Description:The level of coverage under the policy or program is available to an employee and his or her children. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ EmployeeAndChildren = PurposeOfUse("ECH") """ From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ EDU = PurposeOfUse("EDU") """ Description:The level of coverage under the policy or program is available only to an employee. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ EmployeeOnly = PurposeOfUse("EMP") """ Description:The level of coverage under the policy or program is available to an employee and his or her spouse. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ EmployeeAndSpouse = PurposeOfUse("ESP") """ Description:The level of coverage under the policy or program is available to a subscriber's family. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ Family = PurposeOfUse("FAM") """ Description:The level of coverage under the policy or program is available to an individual. From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ Individual = PurposeOfUse("IND") """ From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ INVOICE = PurposeOfUse("INVOICE") """ From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ PROA = PurposeOfUse("PROA") """ From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ RECOV = PurposeOfUse("RECOV") """ From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ RETRO = PurposeOfUse("RETRO") """ Description:The level of coverage under the policy or program is available to a subscriber's spouse and children From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ SpouseAndChildren = PurposeOfUse("SPC") """ Description:The level of coverage under the policy or program is available only to a subscribers spouse From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ SpouseOnly = PurposeOfUse("SPO") """ From: http://terminology.hl7.org/CodeSystem/v3-ActReason in v3-codesystems.xml """ TRAN = PurposeOfUse("TRAN")
guzy/OnceCloud
oncecloud-web-dao/src/main/java/com/oncecloud/dao/HostInformationDAO.java
<reponame>guzy/OnceCloud package com.oncecloud.dao; import java.util.List; import com.oncecloud.entity.HostInformation; public interface HostInformationDAO { /** * 分页获取主机列表 * @param page, limit, search * @return list */ public abstract List<HostInformation> getOnePageList(int page, int limit); /** * 查询总数 * @param search * @return */ public abstract int countAllHostList(); /** * 保存录入信息 * @param info * @return */ public abstract boolean saveInformation(HostInformation info); /** * 删除记录 * @param infoid * @return */ public abstract boolean doDeleteInfo(int infoid); /** * 获取记录 * @param infoid * @return */ public abstract HostInformation getInformation(int infoid); /** * 获取记录 * @param infoid * @return */ public abstract HostInformation getInformationByUserid(int userid); /** * 获取所有记录 * @return */ public abstract List<HostInformation> getAllList(); /** * 获取所有记录 * @return */ public abstract List<HostInformation> getAllListbyNetid(int netid); }
georgecao/armeria
core/src/test/java/com/linecorp/armeria/server/throttling/RateLimitingThrottlingStrategyTest.java
<reponame>georgecao/armeria /* * Copyright 2017 LINE Corporation * * LINE Corporation licenses this file to you under the Apache License, * version 2.0 (the "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package com.linecorp.armeria.server.throttling; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.when; import org.junit.Rule; import org.junit.Test; import org.mockito.Mock; import org.mockito.junit.MockitoJUnit; import org.mockito.junit.MockitoRule; import com.google.common.util.concurrent.RateLimiter; import com.linecorp.armeria.common.Request; public class RateLimitingThrottlingStrategyTest { @Rule public MockitoRule mocks = MockitoJUnit.rule(); @Mock private RateLimiter rateLimiter; @Test public void rateLimit() { final RateLimitingThrottlingStrategy<Request> strategy = new RateLimitingThrottlingStrategy<>(rateLimiter); when(rateLimiter.tryAcquire()).thenReturn(true) .thenReturn(false) .thenReturn(true); assertThat(strategy.accept(null, null).toCompletableFuture().join()).isEqualTo(true); assertThat(strategy.accept(null, null).toCompletableFuture().join()).isEqualTo(false); assertThat(strategy.accept(null, null).toCompletableFuture().join()).isEqualTo(true); } }
zealoussnow/chromium
ash/services/ime/decoder/system_engine_unittest.cc
<reponame>zealoussnow/chromium<filename>ash/services/ime/decoder/system_engine_unittest.cc // Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ash/services/ime/decoder/system_engine.h" #include "ash/constants/ash_features.h" #include "base/test/bind.h" #include "base/test/scoped_feature_list.h" #include "base/test/task_environment.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" namespace chromeos { namespace ime { constexpr char kImeSpec[] = "xkb:us::eng"; class TestDecoderState; // The fake decoder state has to be available globally because // ImeDecoder::EntryPoints is a list of stateless C functions, so the only way // to have a stateful fake is to have a global reference to it. TestDecoderState* g_test_decoder_state = nullptr; mojo::ScopedMessagePipeHandle MessagePipeHandleFromInt(uint32_t handle) { return mojo::ScopedMessagePipeHandle(mojo::MessagePipeHandle(handle)); } struct MockInputMethod : public mojom::InputMethod { MOCK_METHOD(void, OnFocus, (chromeos::ime::mojom::InputFieldInfoPtr input_field_info, chromeos::ime::mojom::InputMethodSettingsPtr settings), (override)); MOCK_METHOD(void, OnBlur, (), (override)); MOCK_METHOD(void, OnSurroundingTextChanged, (const std::string& text, uint32_t offset, chromeos::ime::mojom::SelectionRangePtr selection_range), (override)); MOCK_METHOD(void, OnCompositionCanceledBySystem, (), (override)); MOCK_METHOD(void, ProcessKeyEvent, (chromeos::ime::mojom::PhysicalKeyEventPtr event, ProcessKeyEventCallback callback), (override)); MOCK_METHOD(void, OnCandidateSelected, (uint32_t selected_candidate_index), (override)); }; class TestDecoderState { public: bool ConnectToInputMethod(const char* ime_spec, uint32_t receiver_pipe_handle, uint32_t host_pipe_handle, uint32_t host_pipe_version) { receiver.Bind(mojo::PendingReceiver<mojom::InputMethod>( MessagePipeHandleFromInt(receiver_pipe_handle))); input_method_host.Bind(mojo::PendingRemote<mojom::InputMethodHost>( MessagePipeHandleFromInt(host_pipe_handle), host_pipe_version)); return true; } MockInputMethod mock_input_method; mojo::Receiver<mojom::InputMethod> receiver{&mock_input_method}; mojo::Remote<mojom::InputMethodHost> input_method_host; }; ImeDecoder::EntryPoints CreateDecoderEntryPoints(TestDecoderState* state) { g_test_decoder_state = state; ImeDecoder::EntryPoints entry_points; entry_points.init_once = [](ImeCrosPlatform* platform) {}; entry_points.connect_to_input_method = [](const char* ime_spec, uint32_t receiver_pipe_handle, uint32_t host_pipe_handle, uint32_t host_pipe_version) { return g_test_decoder_state->ConnectToInputMethod( ime_spec, receiver_pipe_handle, host_pipe_handle, host_pipe_version); }; entry_points.is_input_method_connected = []() { return false; }; return entry_points; } struct MockInputMethodHost : public ime::mojom::InputMethodHost { MOCK_METHOD(void, CommitText, (const std::u16string& text, mojom::CommitTextCursorBehavior cursor_behavior), (override)); MOCK_METHOD(void, SetComposition, (const std::u16string& text, std::vector<mojom::CompositionSpanPtr> spans), (override)); MOCK_METHOD(void, SetCompositionRange, (uint32_t start_index, uint32_t end_index), (override)); MOCK_METHOD(void, FinishComposition, (), (override)); MOCK_METHOD(void, DeleteSurroundingText, (uint32_t num_before_cursor, uint32_t num_after_cursor), (override)); MOCK_METHOD(void, HandleAutocorrect, (mojom::AutocorrectSpanPtr autocorrect_span), (override)); MOCK_METHOD(void, RequestSuggestions, (mojom::SuggestionsRequestPtr request, RequestSuggestionsCallback callback), (override)); MOCK_METHOD(void, DisplaySuggestions, (const std::vector<ime::TextSuggestion>& suggestions), (override)); MOCK_METHOD(void, UpdateCandidatesWindow, (mojom::CandidatesWindowPtr window), (override)); MOCK_METHOD(void, RecordUkm, (mojom::UkmEntryPtr entry), (override)); MOCK_METHOD(void, ReportKoreanAction, (mojom::KoreanAction action), (override)); MOCK_METHOD(void, ReportKoreanSettings, (mojom::KoreanSettingsPtr settings), (override)); }; // Sets up the test environment for Mojo and inject a mock ImeEngineMainEntry. class SystemEngineTest : public testing::Test { private: // Mojo calls need a SequencedTaskRunner. base::test::SingleThreadTaskEnvironment task_environment; }; TEST_F(SystemEngineTest, BindRequestConnectsInputMethod) { TestDecoderState state; FakeDecoderEntryPointsForTesting(CreateDecoderEntryPoints(&state)); SystemEngine engine(/*platform=*/nullptr); mojo::Remote<mojom::InputMethod> input_method; MockInputMethodHost mock_host; mojo::Receiver<mojom::InputMethodHost> receiver{&mock_host}; EXPECT_TRUE(engine.BindRequest(kImeSpec, input_method.BindNewPipeAndPassReceiver(), receiver.BindNewPipeAndPassRemote())); ASSERT_TRUE(input_method.is_bound()); EXPECT_TRUE(input_method.is_connected()); } TEST_F(SystemEngineTest, CanSendMessagesAfterBinding) { TestDecoderState state; FakeDecoderEntryPointsForTesting(CreateDecoderEntryPoints(&state)); SystemEngine engine(/*platform=*/nullptr); mojo::Remote<mojom::InputMethod> input_method; MockInputMethodHost mock_host; mojo::Receiver<mojom::InputMethodHost> receiver{&mock_host}; EXPECT_TRUE(engine.BindRequest(kImeSpec, input_method.BindNewPipeAndPassReceiver(), receiver.BindNewPipeAndPassRemote())); EXPECT_CALL(state.mock_input_method, OnBlur); // Send any Mojo message to the input method. input_method->OnBlur(); input_method.FlushForTesting(); } TEST_F(SystemEngineTest, CanReceiveMessagesAfterBinding) { TestDecoderState state; FakeDecoderEntryPointsForTesting(CreateDecoderEntryPoints(&state)); SystemEngine engine(/*platform=*/nullptr); mojo::Remote<mojom::InputMethod> input_method; MockInputMethodHost mock_host; mojo::Receiver<mojom::InputMethodHost> receiver{&mock_host}; EXPECT_TRUE(engine.BindRequest(kImeSpec, input_method.BindNewPipeAndPassReceiver(), receiver.BindNewPipeAndPassRemote())); EXPECT_CALL(mock_host, FinishComposition); // Send any Mojo message from the input method. state.input_method_host->FinishComposition(); state.input_method_host.FlushForTesting(); } } // namespace ime } // namespace chromeos
madmax983/aura
aura-util/src/main/java/org/auraframework/util/date/AuraDateUtil.java
<reponame>madmax983/aura /* * Copyright (C) 2013 salesforce.com, inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.auraframework.util.date; import java.util.Date; public class AuraDateUtil { public static Long isoToLong(String isoDateString) { Date date = isoToDate(isoDateString); return (date != null) ? date.getTime() : null; } public static Date isoToDate(String isoDateString) { if (isoDateString == null || isoDateString.isEmpty()) { return null; } else { return DateServiceImpl.get().getGenericISO8601Converter().parse(isoDateString); } } }
DeNA/PacketProxyHub
api-server/app/src/main/java/com/packetproxyhub/interactor/OrgMemberService.java
/* * Copyright 2021 DeNA Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.packetproxyhub.interactor; import com.packetproxyhub.entity.*; import com.packetproxyhub.entity.AccessChecker.AccessChecker; import javax.inject.Inject; import java.util.Objects; import java.util.Set; import java.util.stream.Collectors; public class OrgMemberService implements IOrgMemberService { @Inject private IRepository repository; @Inject private IAccountService accountService; @Override public Ids listOrgMembers(Id accountId, Id orgId) throws Exception { if (!AccessChecker.create(accountId, repository).isOrgReadable(orgId)) { throw new IllegalAccessException(); } return repository.listOrgMembersInOrg(orgId); } @Override public Accounts searchAccount(Id accountId, Id orgId, String nameKey) throws Exception { if (!AccessChecker.create(accountId, repository).isOrgReadable(orgId)) { throw new IllegalAccessException(); } Ids orgMemberIds = repository.listOrgMembersInOrg(orgId); Set<Id> orgMemberAccountIds = orgMemberIds.set().stream().map(orgMemberId -> { OrgMember orgMember = repository.getOrgMember(orgMemberId); return orgMember.getAccountId(); }).collect(Collectors.toSet()); Accounts accounts = accountService.searchAccount(nameKey); Set<Account> accountSet = accounts.set().stream().filter(account -> orgMemberAccountIds.contains(account.getId()) ).collect(Collectors.toSet()); return Accounts.createWithInit(accountSet); } @Override public OrgMember getOrgMember(Id accountId, Id orgId, Id orgMemberId) throws Exception { if (!AccessChecker.create(accountId, repository).isOrgReadable(orgId)) { throw new IllegalAccessException(); } return repository.getOrgMember(orgMemberId); } @Override public OrgMembers getOrgMembers(Id accountId, Id orgId) throws Exception { Ids orgMemberIds = repository.listOrgMembersInOrg(orgId); Set<OrgMember> orgMemberSet = orgMemberIds.set().stream().map(orgMemberId -> repository.getOrgMember(orgMemberId)).collect(Collectors.toSet()); return OrgMembers.create(orgMemberSet); } @Override public Id createOrgMember(Id accountId, Id orgId, OrgMember orgMember) throws Exception { if (!AccessChecker.create(accountId, repository).isOrgWritable(orgId)) { throw new IllegalAccessException(); } OrgMember newOrgMember = OrgMember.create( orgMember.getAccountId(), orgMember.getRole()); return repository.insertOrgMemberToOrg(orgId, newOrgMember); } @Override public void removeOrgMember(Id accountId, Id orgId, Id orgMemberId) throws Exception { if (!AccessChecker.create(accountId, repository).isOrgWritable(orgId)) { throw new IllegalAccessException(); } repository.removeOrgMemberFromOrg(orgId, orgMemberId); } @Override public void updateOrgMember(Id accountId, Id orgId, Id orgMemberId, OrgMember orgMember) throws Exception { if (!AccessChecker.create(accountId, repository).isOrgWritable(orgId)) { throw new IllegalAccessException(); } OrgMember newOrgMember = OrgMember.create( orgMemberId, orgMember.getAccountId(), orgMember.getRole()); repository.updateOrgMember(orgId, newOrgMember); } }
smit-hinsu/iree
iree/base/internal/threading_darwin.c
// Copyright 2020 The IREE Authors // // Licensed under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // NOTE: must be first to ensure that we can define settings for all includes. #include "iree/base/internal/threading_impl.h" #if defined(IREE_PLATFORM_APPLE) #include <errno.h> #include <mach/mach.h> #include <mach/thread_act.h> #include <pthread.h> #include <string.h> #include "iree/base/internal/atomics.h" #include "iree/base/internal/threading.h" #include "iree/base/tracing.h" // Useful to see how pthreads is implemented on (old) darwin: // https://opensource.apple.com/source/Libc/Libc-825.40.1/pthreads/pthread.c.auto.html struct iree_thread_t { iree_atomic_ref_count_t ref_count; iree_allocator_t allocator; char name[16]; pthread_t handle; mach_port_t mach_port; iree_thread_entry_t entry; void* entry_arg; iree_atomic_int32_t is_suspended; }; static qos_class_t iree_thread_qos_class_for_priority_class( iree_thread_priority_class_t priority_class); static void iree_thread_set_name(const char* name) { IREE_TRACE_ZONE_BEGIN(z0); pthread_setname_np(name); IREE_TRACE_SET_THREAD_NAME(name); IREE_TRACE_ZONE_END(z0); } static void* iree_thread_start_routine(void* param) { // NOTE: we own a reference to the thread handle so that the creation // thread can't delete this out from under us. iree_thread_t* thread = (iree_thread_t*)param; // Set the thread name used by debuggers and tracy (which must be called on // the thread). iree_thread_set_name(thread->name); // "Consume" the entry info so that we don't see it again (as we don't own // its lifetime). iree_thread_entry_t entry = thread->entry; void* entry_arg = thread->entry_arg; thread->entry = NULL; thread->entry_arg = NULL; // Release our ownership of the thread handle. If the creating thread doesn't // want it this will free the memory and fully detach the thread. iree_thread_release(thread); // Call the user thread entry point function. // Note that this can be a tail-call which saves a stack frame in all threads // (which is really just to make call stacks in debuggers much cleaner). return (void*)((uintptr_t)entry(entry_arg)); } iree_status_t iree_thread_create(iree_thread_entry_t entry, void* entry_arg, iree_thread_create_params_t params, iree_allocator_t allocator, iree_thread_t** out_thread) { IREE_TRACE_ZONE_BEGIN(z0); // Allocate our thread struct; we'll use it to shuttle params into the thread // (including the user-specified entry_arg). iree_thread_t* thread = NULL; iree_status_t status = iree_allocator_malloc(allocator, sizeof(*thread), (void**)&thread); if (!iree_status_is_ok(status)) { IREE_TRACE_ZONE_END(z0); return status; } iree_atomic_ref_count_init(&thread->ref_count); thread->allocator = allocator; thread->entry = entry; thread->entry_arg = entry_arg; iree_strncpy_s(thread->name, IREE_ARRAYSIZE(thread->name), params.name.data, iree_min(params.name.size, IREE_ARRAYSIZE(thread->name) - 1)); iree_atomic_store_int32(&thread->is_suspended, params.create_suspended ? 1 : 0, iree_memory_order_relaxed); pthread_attr_t thread_attr; pthread_attr_init(&thread_attr); pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_JOINABLE); if (params.stack_size) { pthread_attr_setstacksize(&thread_attr, params.stack_size); } // Ensure we start with the right QoS class. qos_class_t qos_class = iree_thread_qos_class_for_priority_class(params.priority_class); pthread_attr_set_qos_class_np(&thread_attr, qos_class, 0); // Retain the thread for the thread itself; this way if the caller immediately // releases the iree_thread_t handle the thread won't explode. iree_thread_retain(thread); *out_thread = thread; // Create the thread either suspended or running as the user requested. int rc; if (params.create_suspended) { IREE_TRACE_ZONE_BEGIN_NAMED(z1, "pthread_create_suspended_np"); rc = pthread_create_suspended_np(&thread->handle, &thread_attr, &iree_thread_start_routine, thread); IREE_TRACE_ZONE_END(z1); } else { IREE_TRACE_ZONE_BEGIN_NAMED(z1, "pthread_create"); rc = pthread_create(&thread->handle, &thread_attr, &iree_thread_start_routine, thread); IREE_TRACE_ZONE_END(z1); } pthread_attr_destroy(&thread_attr); if (rc != 0) { iree_thread_release(thread); // for self iree_thread_release(thread); // for caller *out_thread = NULL; IREE_TRACE_ZONE_END(z0); return iree_make_status(IREE_STATUS_INTERNAL, "thread creation failed with %d", rc); } thread->mach_port = pthread_mach_thread_np(thread->handle); if (params.initial_affinity.specified) { iree_thread_request_affinity(thread, params.initial_affinity); } IREE_TRACE_ZONE_END(z0); return iree_ok_status(); } static void iree_thread_delete(iree_thread_t* thread) { IREE_TRACE_ZONE_BEGIN(z0); iree_thread_resume(thread); pthread_join(thread->handle, NULL); iree_allocator_free(thread->allocator, thread); IREE_TRACE_ZONE_END(z0); } void iree_thread_retain(iree_thread_t* thread) { if (thread) { iree_atomic_ref_count_inc(&thread->ref_count); } } void iree_thread_release(iree_thread_t* thread) { if (thread && iree_atomic_ref_count_dec(&thread->ref_count) == 1) { iree_thread_delete(thread); } } uintptr_t iree_thread_id(iree_thread_t* thread) { return (uintptr_t)thread->handle; } // Maps an IREE iree_thread_priority_class_t value to a QoS type. // https://developer.apple.com/library/archive/documentation/Performance/Conceptual/EnergyGuide-iOS/PrioritizeWorkWithQoS.html static qos_class_t iree_thread_qos_class_for_priority_class( iree_thread_priority_class_t priority_class) { switch (priority_class) { case IREE_THREAD_PRIORITY_CLASS_LOWEST: return QOS_CLASS_BACKGROUND; case IREE_THREAD_PRIORITY_CLASS_LOW: return QOS_CLASS_UTILITY; default: case IREE_THREAD_PRIORITY_CLASS_NORMAL: return QOS_CLASS_DEFAULT; case IREE_THREAD_PRIORITY_CLASS_HIGH: return QOS_CLASS_USER_INITIATED; case IREE_THREAD_PRIORITY_CLASS_HIGHEST: return QOS_CLASS_USER_INTERACTIVE; } } iree_thread_override_t* iree_thread_priority_class_override_begin( iree_thread_t* thread, iree_thread_priority_class_t priority_class) { IREE_TRACE_ZONE_BEGIN(z0); qos_class_t qos_class = iree_thread_qos_class_for_priority_class(priority_class); pthread_override_t override = pthread_override_qos_class_start_np(thread->handle, qos_class, 0); IREE_TRACE_ZONE_END(z0); return (iree_thread_override_t*)override; } void iree_thread_override_end(iree_thread_override_t* override) { IREE_TRACE_ZONE_BEGIN(z0); pthread_override_qos_class_end_np((pthread_override_t)override); IREE_TRACE_ZONE_END(z0); } void iree_thread_request_affinity(iree_thread_t* thread, iree_thread_affinity_t affinity) { if (!affinity.specified) return; IREE_TRACE_ZONE_BEGIN(z0); // See: // https://gist.github.com/Coneko/4234842 // https://fergofrog.com/code/cbowser/xnu/osfmk/mach/thread_policy.h.html // http://www.hybridkernel.com/2015/01/18/binding_threads_to_cores_osx.html thread_affinity_policy_data_t policy_data = {affinity.id}; thread_policy_set(thread->mach_port, THREAD_AFFINITY_POLICY, (thread_policy_t)(&policy_data), THREAD_AFFINITY_POLICY_COUNT); IREE_TRACE_ZONE_END(z0); } void iree_thread_resume(iree_thread_t* thread) { IREE_TRACE_ZONE_BEGIN(z0); // NOTE: we don't track the suspend/resume depth here because we don't // expose suspend as an operation (yet). If we did we'd want to make sure we // always balance suspend/resume or else we'll mess with any // debuggers/profilers that may be suspending threads for their own uses. int32_t expected = 1; if (iree_atomic_compare_exchange_strong_int32( &thread->is_suspended, &expected, 0, iree_memory_order_seq_cst, iree_memory_order_seq_cst)) { thread_resume(thread->mach_port); } IREE_TRACE_ZONE_END(z0); } #endif // IREE_PLATFORM_APPLE
NadinOk/chat
client/src/logic/chat_window/mx_run_chat_list.c
// // Created by <NAME> on 22.11.2020. // #include <client.h> #include <mx_data.h> #include <mx_connection.h> #define GET (void *)-1 void chat_list_del(t_list **list) { while (*list) { t_chat *chat = (t_chat *)(*list)->data; mx_pop_front(list); mx_chat_del(&chat); } } void mx_append_and_print(t_chat *chat, t_window_widgets *widgets, char *active_login) { GtkWidget *row, *login, *box; login = NULL; int participants_size = mx_list_size(chat->participants); row = gtk_list_box_row_new(); box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); if (participants_size == 2) { t_list *list = chat->participants; while (list) { t_user *user = (t_user *)list->data; if (mx_strcmp(user->login, active_login)) { char *s = 0; mx_str_append(&s, user->first_name); mx_str_append(&s, " "); mx_str_append(&s, user->last_name); login = gtk_label_new(s); break; } list = list->next; } } else if (participants_size > 2 && chat->name) login = gtk_label_new(chat->name); else if (participants_size > 2 && !chat->name) login = gtk_label_new("Unnamed"); gtk_container_add(GTK_CONTAINER(row), box); gtk_box_pack_start(GTK_BOX(box), login, FALSE, FALSE, 15); gtk_box_set_spacing(GTK_BOX(box), 40); gtk_list_box_insert(GTK_LIST_BOX(widgets->s_chat_window->scrolled_chats_list), row, -1); g_object_set_data(G_OBJECT(row), "chat_id", mx_itoa(chat->id)); gtk_widget_set_name(row, "contact_row"); gtk_widget_show_all(row); } void mx_show_conversation_list(t_list *list) { t_info *info = gs_info(GET); while (list) { t_chat *chat = (t_chat *)list->data; mx_append_and_print(chat, info->widgets, info->user_info->login); list = list->next; } } static void chat_list_completion(e_connection_code code, t_response *response) { if (code != E_CONNECTION_CODE_OK) mx_printline("Connection error"); else if (response->code == E_STATUS_CODE_OK) { t_list *list = mx_chat_list_from_json(response->body); mx_show_conversation_list(list); chat_list_del(&list); } else print_error(response); } void mx_run_chat_list(char *token, char *ip, int port) { t_connection *connection = mx_connection_open(ip, port); t_request *request = mx_request_chat_list(token); connection->send(connection, request, chat_list_completion); mx_request_delete(&request); mx_connection_close(&connection); }
smagill/opensphere-desktop
open-sphere-base/test-support/src/main/java/io/opensphere/core/matchers/URLComparator.java
<reponame>smagill/opensphere-desktop<filename>open-sphere-base/test-support/src/main/java/io/opensphere/core/matchers/URLComparator.java package io.opensphere.core.matchers; import java.net.URL; import java.util.Comparator; /** * Compares two url's by comparing their string representations. * */ public class URLComparator implements Comparator<URL> { @Override public int compare(URL o1, URL o2) { return o1.toString().compareTo(o2.toString()); } }
leetobin/firebrick
coreboot/src/vendorcode/amd/agesa/f14/Proc/CPU/Family/0x10/cpuF10Utilities.c
<gh_stars>1-10 /* $NoKeywords:$ */ /** * @file * * AMD Family_10 specific utility functions. * * Provides numerous utility functions specific to family 10h. * * @xrefitem bom "File Content Label" "Release Content" * @e project: AGESA * @e sub-project: CPU/F10 * @e \$Revision: 37150 $ @e \$Date: 2010-08-31 23:53:37 +0800 (Tue, 31 Aug 2010) $ * */ /* ***************************************************************************** * * Copyright (c) 2011, 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 ADVANCED MICRO DEVICES, INC. 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. * * *************************************************************************** * */ /*---------------------------------------------------------------------------------------- * M O D U L E S U S E D *---------------------------------------------------------------------------------------- */ #include "AGESA.h" #include "amdlib.h" #include "Ids.h" #include "cpuRegisters.h" #include "cpuFamilyTranslation.h" #include "cpuPstateTables.h" #include "cpuF10PowerMgmt.h" #include "cpuApicUtilities.h" #include "cpuServices.h" #include "GeneralServices.h" #include "cpuF10Utilities.h" #include "cpuPostInit.h" #include "Filecode.h" CODE_GROUP (G1_PEICC) RDATA_GROUP (G1_PEICC) #define FILECODE PROC_CPU_FAMILY_0X10_CPUF10UTILITIES_FILECODE /*---------------------------------------------------------------------------------------- * D E F I N I T I O N S A N D M A C R O S *---------------------------------------------------------------------------------------- */ // Register encodings for F3xD8[VSRampTime/VSSlamTime] CONST UINT32 ROMDATA VSSlamTime[8] = { 10, // 000b: 10us 20, // 001b: 20us 30, // 010b: 30us 40, // 011b: 40us 60, // 100b: 60us 100, // 101b: 100us 200, // 110b: 200us 500 // 111b: 500us }; extern CPU_FAMILY_SUPPORT_TABLE PstateFamilyServiceTable; /*---------------------------------------------------------------------------------------- * T Y P E D E F S A N D S T R U C T U R E S *---------------------------------------------------------------------------------------- */ /*---------------------------------------------------------------------------------------- * P R O T O T Y P E S O F L O C A L F U N C T I O N S *---------------------------------------------------------------------------------------- */ /*---------------------------------------------------------------------------------------- * E X P O R T E D F U N C T I O N S *---------------------------------------------------------------------------------------- */ /*---------------------------------------------------------------------------------------*/ /** * Performs the necessary steps for the 'Software Initiated CPU * Voltage Transitions.' * * @param[in] VidCode VID code to transition to * @param[in] StdHeader Header for library and services * */ VOID F10PmSwVoltageTransition ( IN UINT32 VidCode, IN AMD_CONFIG_PARAMS *StdHeader ) { UINT32 PciRegister; UINT32 Socket; UINT32 Module; UINT32 Ignored; UINT64 MsrReg; PCI_ADDR PciAddress; AGESA_STATUS IgnoredSts; IdentifyCore (StdHeader, &Socket, &Module, &Ignored, &IgnoredSts); GetPciAddress (StdHeader, Socket, Module, &PciAddress, &IgnoredSts); PciAddress.Address.Function = FUNC_3; PciAddress.Address.Register = PW_CTL_MISC_REG; LibAmdPciRead (AccessWidth32, PciAddress, &PciRegister, StdHeader); if (((POWER_CTRL_MISC_REGISTER *) &PciRegister)->SlamVidMode == 1) { LibAmdMsrRead (MSR_COFVID_CTL, &MsrReg, StdHeader); ((COFVID_CTRL_MSR *) &MsrReg)->CpuVid = VidCode; LibAmdMsrWrite (MSR_COFVID_CTL, &MsrReg, StdHeader); F10WaitOutVoltageTransition (TRUE, StdHeader); } else return; } /*---------------------------------------------------------------------------------------*/ /** * Performs the necessary steps for the 'Software Initiated NB * Voltage Transitions.' * * This can only be run by a local core 0. * * @param[in] VidCode VID code to transition to * @param[in] SlamMode Whether voltage is to be slammed, or stepped * @param[in] StdHeader Header for library and services * */ VOID F10PmSwVoltageTransitionServerNb ( IN UINT32 VidCode, IN BOOLEAN SlamMode, IN AMD_CONFIG_PARAMS *StdHeader ) { UINT32 Core; UINT32 NbVidStatus; UINT32 Socket; UINT32 IgnoredModule; UINT32 IgnoredCore; UINT32 CoreNum; AP_TASK TaskPtr; AGESA_STATUS IgnoredSts; SW_VOLT_TRANS_NB RemoteInput; RemoteInput.VidCode = VidCode; RemoteInput.SlamMode = SlamMode; TaskPtr.FuncAddress.PfApTaskIO = F10SwVoltageTransitionServerNbCore; TaskPtr.DataTransfer.DataSizeInDwords = SIZE_IN_DWORDS (SW_VOLT_TRANS_NB); TaskPtr.DataTransfer.DataPtr = &RemoteInput; TaskPtr.DataTransfer.DataTransferFlags = 0; TaskPtr.ExeFlags = WAIT_FOR_CORE; IdentifyCore (StdHeader, &Socket, &IgnoredModule, &IgnoredCore, &IgnoredSts); GetActiveCoresInCurrentSocket (&CoreNum, StdHeader); do { NbVidStatus = TaskPtr.FuncAddress.PfApTaskIO (&RemoteInput, StdHeader); for (Core = 1; Core < (UINT8) CoreNum; Core++) { NbVidStatus |= ApUtilRunCodeOnSocketCore ((UINT8)Socket, (UINT8)Core, &TaskPtr, StdHeader); } F10WaitOutVoltageTransition (SlamMode, StdHeader); } while (NbVidStatus != 0); return; } /*---------------------------------------------------------------------------------------*/ /** * Returns current VsSlamTime in microseconds. * * @param[out] VsTimeUsecs Provides the wait time needed for a Slam Voltage transition. * @param[in] SlamMode Whether voltage is to be slammed, or stepped * @param[in] StdHeader Header for library and services * */ VOID F10GetCurrentVsTimeInUsecs ( OUT UINT32 *VsTimeUsecs, IN BOOLEAN SlamMode, IN AMD_CONFIG_PARAMS *StdHeader ) { UINT8 RegisterEncoding; UINT32 PciRegister; UINT32 Socket; UINT32 Module; UINT32 Ignored; CONST UINT16 SlamTimes[8] = {10, 20, 30, 40, 60, 100, 200, 500}; PCI_ADDR PciAddress; AGESA_STATUS IgnoredSts; IdentifyCore (StdHeader, &Socket, &Module, &Ignored, &IgnoredSts); GetPciAddress (StdHeader, Socket, Module, &PciAddress, &IgnoredSts); PciAddress.Address.Function = FUNC_3; PciAddress.Address.Register = CPTC1_REG; LibAmdPciRead (AccessWidth32, PciAddress, &PciRegister, StdHeader); if (SlamMode) { RegisterEncoding = (UINT8) ((CLK_PWR_TIMING_CTRL1_REGISTER *) &PciRegister)->VSSlamTime; } else { RegisterEncoding = (UINT8) ((CLK_PWR_TIMING_CTRL1_REGISTER *) &PciRegister)->VSRampTime; } *VsTimeUsecs = (UINT32) SlamTimes[RegisterEncoding]; } /*---------------------------------------------------------------------------------------*/ /** * Spins until VsSlamTime microseconds have expired. * * @param[in] SlamMode Whether voltage is to be slammed, or stepped * @param[in] StdHeader Header for library and services * */ VOID F10WaitOutVoltageTransition ( IN BOOLEAN SlamMode, IN AMD_CONFIG_PARAMS *StdHeader ) { UINT32 VsTimeUsecs; F10GetCurrentVsTimeInUsecs (&VsTimeUsecs, SlamMode, StdHeader); WaitMicroseconds (VsTimeUsecs, StdHeader); return; } /*---------------------------------------------------------------------------------------*/ /** * Code required to be run on every local core in order to perform * the steps necessary for 'Software Initiated NB Voltage * Transitions.' * * @param[out] InputData Family specific data needed to perform a Voltage transition. * @param[in] StdHeader Header for library and services. * * @retval zero All Voltage Transitions are completed. * @retval one There are Voltage transitions remaining to reach target. * */ UINT32 F10SwVoltageTransitionServerNbCore ( IN VOID *InputData, IN AMD_CONFIG_PARAMS *StdHeader ) { UINT32 VidCode; UINT64 MsrReg; if (((SW_VOLT_TRANS_NB *) InputData)->SlamMode) { VidCode = ((SW_VOLT_TRANS_NB *) InputData)->VidCode; } else { LibAmdMsrRead (MSR_COFVID_STS, &MsrReg, StdHeader); VidCode = (UINT32) (((COFVID_STS_MSR *) &MsrReg)->CurNbVid); if (VidCode > ((SW_VOLT_TRANS_NB *) InputData)->VidCode) { --VidCode; } else if (VidCode < ((SW_VOLT_TRANS_NB *) InputData)->VidCode) { ++VidCode; } } LibAmdMsrRead (MSR_COFVID_CTL, &MsrReg, StdHeader); ((COFVID_CTRL_MSR *) &MsrReg)->NbVid = VidCode; LibAmdMsrWrite (MSR_COFVID_CTL, &MsrReg, StdHeader); if (VidCode == ((SW_VOLT_TRANS_NB *) InputData)->VidCode) { return 0; } else { return 1; } } /*---------------------------------------------------------------------------------------*/ /** * Calculate and reprogram F3xD8[VSSlamTime] based on the algorithm in the BKDG. * * This function determines the largest voltage step that the core will have * to make, calculates how much time it will take for the voltage to stabilize, * and programs the necessary encoded value for the amount of time discovered. * * @param[in] PciAddress Segment/bus/device of a module on the socket * to program. * @param[in] CpuEarlyParams Service parameters * @param[in] StdHeader Config handle for library and services. * */ VOID F10ProgramVSSlamTimeOnSocket ( IN PCI_ADDR *PciAddress, IN AMD_CPU_EARLY_PARAMS *CpuEarlyParams, IN AMD_CONFIG_PARAMS *StdHeader ) { UINT8 NbVid; UINT8 P0VidCode; UINT8 PminVidCode; UINT32 AndMask; UINT32 MsrAddr; UINT32 OrMask; UINT32 PciRegister; UINT64 MsrReg; BOOLEAN IsPviMode; PCI_ADDR LocalPciAddress; // Get F3xA0[PviMode] LocalPciAddress.AddressValue = PciAddress->AddressValue; LocalPciAddress.Address.Function = FUNC_3; LocalPciAddress.Address.Register = PW_CTL_MISC_REG; LibAmdPciRead (AccessWidth32, LocalPciAddress, &PciRegister, StdHeader); if (((POWER_CTRL_MISC_REGISTER *) &PciRegister)->PviMode == 1) { IsPviMode = TRUE; } else { IsPviMode = FALSE; } // Get P0's voltage LibAmdMsrRead (PS_REG_BASE, &MsrReg, StdHeader); P0VidCode = (UINT8) (((PSTATE_MSR *) &MsrReg)->CpuVid); // If SVI, we only care about CPU VID. // If PVI, determine the higher voltage between NB and CPU if (IsPviMode) { NbVid = (UINT8) (((PSTATE_MSR *) &MsrReg)->NbVid); if (P0VidCode > NbVid) { P0VidCode = NbVid; } } // Get Pmin's index LibAmdMsrRead (MSR_PSTATE_CURRENT_LIMIT, &MsrReg, StdHeader); MsrAddr = (UINT32) ((((PSTATE_CURLIM_MSR *) &MsrReg)->PstateMaxVal) + PS_REG_BASE); // Get Pmin's VID LibAmdMsrRead (MsrAddr, &MsrReg, StdHeader); PminVidCode = (UINT8) (((PSTATE_MSR *) &MsrReg)->CpuVid); // If SVI, we only care about CPU VID. // If PVI, determine the higher voltage b/t NB and CPU if (IsPviMode) { NbVid = (UINT8) (((PSTATE_MSR *) &MsrReg)->NbVid); if (PminVidCode > NbVid) { PminVidCode = NbVid; } } // Program F3xD8[VSSlamTime] LocalPciAddress.Address.Register = CPTC1_REG; AndMask = 0xFFFFFFFF; ((CLK_PWR_TIMING_CTRL1_REGISTER *) &AndMask)->VSSlamTime = 0; OrMask = 0x00000000; ((CLK_PWR_TIMING_CTRL1_REGISTER *) &OrMask)->VSSlamTime = F10GetSlamTimeEncoding (P0VidCode, PminVidCode, CpuEarlyParams, VSSlamTime, StdHeader); ModifyCurrentSocketPci (&LocalPciAddress, AndMask, OrMask, StdHeader); } /*---------------------------------------------------------------------------------------*/ /** * Returns the encoded voltage stabilization slam time for the executing * family 10h core. * * This function looks up the appropriate encoded value for the desired * VID codes. * * @param[in] HighVoltageVid VID code of the higher voltage. * @param[in] LowVoltageVid VID code of the lower voltage. * @param[in] CpuEarlyParams Service parameters * @param[in] SlamTimeTable Look-up table of slam times. * @param[in] StdHeader Config handle for library and services. * * @retval Encoded register value. * */ UINT32 F10GetSlamTimeEncoding ( IN UINT8 HighVoltageVid, IN UINT8 LowVoltageVid, IN AMD_CPU_EARLY_PARAMS *CpuEarlyParams, IN CONST UINT32 *SlamTimeTable, IN AMD_CONFIG_PARAMS *StdHeader ) { UINT32 SlamTime; UINT32 EncodedSlamTime; UINT32 VoltageDifference; ASSERT (LowVoltageVid >= HighVoltageVid); ASSERT (CpuEarlyParams->PlatformConfig.VrmProperties[CoreVrm].SlewRate != 0); // Calculate Slam Time // VSSlamTime = 0.4us/mV (or 0.2us/mV) * Vhigh - Vlow // In our case, we will scale the values by 100 to avoid // decimals. VoltageDifference = (UINT32) ((LowVoltageVid - HighVoltageVid) * 12500); SlamTime = (VoltageDifference / CpuEarlyParams->PlatformConfig.VrmProperties[CoreVrm].SlewRate) + CpuEarlyParams->PlatformConfig.VrmProperties[CoreVrm].AdditionalDelay; if (VoltageDifference % CpuEarlyParams->PlatformConfig.VrmProperties[CoreVrm].SlewRate) { SlamTime++; } // Now round up to nearest register setting for (EncodedSlamTime = 0; EncodedSlamTime < 8; EncodedSlamTime++) { if (SlamTime <= SlamTimeTable[EncodedSlamTime]) { break; } } if (EncodedSlamTime > 7) { // The VRMs are too slow for this CPU. Set to max, and fire an error trap. IDS_ERROR_TRAP; EncodedSlamTime = 7; } return (EncodedSlamTime); } /*---------------------------------------------------------------------------------------*/ /** * Disables the desired P-state. * * @CpuServiceMethod{::F_CPU_DISABLE_PSTATE}. * * @param[in] FamilySpecificServices The current Family Specific Services. * @param[in] StateNumber The P-State to disable. * @param[in] StdHeader Header for library and services * * @retval AGESA_SUCCESS Always succeeds. */ AGESA_STATUS F10DisablePstate ( IN CPU_SPECIFIC_SERVICES *FamilySpecificServices, IN UINT8 StateNumber, IN AMD_CONFIG_PARAMS *StdHeader ) { UINT64 MsrReg; ASSERT (StateNumber < NM_PS_REG); LibAmdMsrRead (PS_REG_BASE + (UINT32) StateNumber, &MsrReg, StdHeader); ((PSTATE_MSR *) &MsrReg)->PsEnable = 0; LibAmdMsrWrite (PS_REG_BASE + (UINT32) StateNumber, &MsrReg, StdHeader); return (AGESA_SUCCESS); } /*---------------------------------------------------------------------------------------*/ /** * Transitions the executing core to the desired P-state. * * @CpuServiceMethod{::F_CPU_TRANSITION_PSTATE}. * * @param[in] FamilySpecificServices The current Family Specific Services. * @param[in] StateNumber The new P-State to make effective. * @param[in] WaitForTransition True if the caller wants the transition completed upon return. * @param[in] StdHeader Header for library and services * * @retval AGESA_SUCCESS Always Succeeds */ AGESA_STATUS F10TransitionPstate ( IN CPU_SPECIFIC_SERVICES *FamilySpecificServices, IN UINT8 StateNumber, IN BOOLEAN WaitForTransition, IN AMD_CONFIG_PARAMS *StdHeader ) { UINT64 MsrReg; ASSERT (StateNumber < NM_PS_REG); LibAmdMsrRead (PS_REG_BASE + (UINT32) StateNumber, &MsrReg, StdHeader); ASSERT (((PSTATE_MSR *) &MsrReg)->PsEnable == 1); LibAmdMsrRead (MSR_PSTATE_CTL, &MsrReg, StdHeader); ((PSTATE_CTRL_MSR *) &MsrReg)->PstateCmd = (UINT64) StateNumber; LibAmdMsrWrite (MSR_PSTATE_CTL, &MsrReg, StdHeader); if (WaitForTransition) { do { LibAmdMsrRead (MSR_PSTATE_STS, &MsrReg, StdHeader); } while (((PSTATE_STS_MSR *) &MsrReg)->CurPstate != (UINT64) StateNumber); } return (AGESA_SUCCESS); } /*---------------------------------------------------------------------------------------*/ /** * Determines the rate at which the executing core's time stamp counter is * incrementing. * * @CpuServiceMethod{::F_CPU_GET_TSC_RATE}. * * @param[in] FamilySpecificServices The current Family Specific Services. * @param[out] FrequencyInMHz TSC actual frequency. * @param[in] StdHeader Header for library and services. * * @return The most severe status of all called services */ AGESA_STATUS F10GetTscRate ( IN CPU_SPECIFIC_SERVICES *FamilySpecificServices, OUT UINT32 *FrequencyInMHz, IN AMD_CONFIG_PARAMS *StdHeader ) { UINT64 MsrReg; PSTATE_CPU_FAMILY_SERVICES *FamilyServices; FamilyServices = NULL; GetFeatureServicesOfCurrentCore (&PstateFamilyServiceTable, (const VOID **)&FamilyServices, StdHeader); ASSERT (FamilyServices != NULL); LibAmdMsrRead (0xC0010015, &MsrReg, StdHeader); if ((MsrReg & 0x01000000) != 0) { return (FamilyServices->GetPstateFrequency (FamilyServices, 0, FrequencyInMHz, StdHeader)); } else { return (FamilySpecificServices->GetCurrentNbFrequency (FamilySpecificServices, FrequencyInMHz, StdHeader)); } } /*---------------------------------------------------------------------------------------*/ /** * Determines the NB clock on the desired node. * * @CpuServiceMethod{::F_CPU_GET_NB_FREQ}. * * @param[in] FamilySpecificServices The current Family Specific Services. * @param[out] FrequencyInMHz Northbridge clock frequency in MHz. * @param[in] StdHeader Header for library and services. * * @return AGESA_SUCCESS FrequencyInMHz is valid. */ AGESA_STATUS F10GetCurrentNbFrequency ( IN CPU_SPECIFIC_SERVICES *FamilySpecificServices, OUT UINT32 *FrequencyInMHz, IN AMD_CONFIG_PARAMS *StdHeader ) { UINT32 Socket; UINT32 Module; UINT32 Core; UINT32 NbFid; UINT32 PciRegister; UINT64 MsrReg; PCI_ADDR PciAddress; AGESA_STATUS ReturnCode; // get the local node ID IdentifyCore (StdHeader, &Socket, &Module, &Core, &ReturnCode); if (ReturnCode == AGESA_SUCCESS) { GetPciAddress (StdHeader, Socket, Module, &PciAddress, &ReturnCode); if (ReturnCode == AGESA_SUCCESS) { PciAddress.Address.Function = FUNC_3; PciAddress.Address.Register = CPTC0_REG; LibAmdPciRead (AccessWidth32, PciAddress, &PciRegister, StdHeader); NbFid = ((CLK_PWR_TIMING_CTRL_REGISTER *) &PciRegister)->NbFid; LibAmdMsrRead (MSR_COFVID_STS, &MsrReg, StdHeader); if (((COFVID_STS_MSR *) &MsrReg)->CurNbDid == 0) { *FrequencyInMHz = ((NbFid + 4) * 200); } else { *FrequencyInMHz = (((NbFid + 4) * 200) / 2); } } } return ReturnCode; } /*---------------------------------------------------------------------------------------*/ /** * Initially launches the desired core to run from the reset vector. * * @CpuServiceMethod{::F_CPU_AP_INITIAL_LAUNCH}. * * @param[in] FamilySpecificServices The current Family Specific Services. * @param[in] SocketNum The Processor on which the core is to be launched * @param[in] ModuleNum The Module in that processor containing that core * @param[in] CoreNum The Core to launch * @param[in] PrimaryCoreNum The id of the module's primary core. * @param[in] StdHeader Header for library and services * * @retval TRUE The core was launched * @retval FALSE The core was previously launched */ BOOLEAN F10LaunchApCore ( IN CPU_SPECIFIC_SERVICES *FamilySpecificServices, IN UINT32 SocketNum, IN UINT32 ModuleNum, IN UINT32 CoreNum, IN UINT32 PrimaryCoreNum, IN AMD_CONFIG_PARAMS *StdHeader ) { UINT32 NodeRelativeCoreNum; UINT32 PciRegister; PCI_ADDR PciAddress; BOOLEAN LaunchFlag; AGESA_STATUS Ignored; // Code Start LaunchFlag = FALSE; NodeRelativeCoreNum = CoreNum - PrimaryCoreNum; GetPciAddress (StdHeader, SocketNum, ModuleNum, &PciAddress, &Ignored); PciAddress.Address.Function = FUNC_0; switch (NodeRelativeCoreNum) { case 0: PciAddress.Address.Register = HT_INIT_CTRL; LibAmdPciRead (AccessWidth32, PciAddress, &PciRegister, StdHeader); if ((PciRegister & HT_INIT_CTRL_REQ_DIS) != 0) { PciRegister &= ~HT_INIT_CTRL_REQ_DIS; LibAmdPciWrite (AccessWidth32, PciAddress, &PciRegister, StdHeader); LaunchFlag = TRUE; } else { LaunchFlag = FALSE; } break; case 1: PciAddress.Address.Register = HT_TRANS_CTRL; LibAmdPciRead (AccessWidth32, PciAddress, &PciRegister, StdHeader); if ((PciRegister & HT_TRANS_CTRL_CPU1_EN) == 0) { PciRegister |= HT_TRANS_CTRL_CPU1_EN; LibAmdPciWrite (AccessWidth32, PciAddress, &PciRegister, StdHeader); LaunchFlag = TRUE; } else { LaunchFlag = FALSE; } break; case 2: PciAddress.Address.Register = ECS_HT_TRANS_CTRL; LibAmdPciRead (AccessWidth32, PciAddress, &PciRegister, StdHeader); if ((PciRegister & ECS_HT_TRANS_CTRL_CPU2_EN) == 0) { PciRegister |= ECS_HT_TRANS_CTRL_CPU2_EN; LibAmdPciWrite (AccessWidth32, PciAddress, &PciRegister, StdHeader); LaunchFlag = TRUE; } else { LaunchFlag = FALSE; } break; case 3: PciAddress.Address.Register = ECS_HT_TRANS_CTRL; LibAmdPciRead (AccessWidth32, PciAddress, &PciRegister, StdHeader); if ((PciRegister & ECS_HT_TRANS_CTRL_CPU3_EN) == 0) { PciRegister |= ECS_HT_TRANS_CTRL_CPU3_EN; LibAmdPciWrite (AccessWidth32, PciAddress, &PciRegister, StdHeader); LaunchFlag = TRUE; } else { LaunchFlag = FALSE; } break; case 4: PciAddress.Address.Register = ECS_HT_TRANS_CTRL; LibAmdPciRead (AccessWidth32, PciAddress, &PciRegister, StdHeader); if ((PciRegister & ECS_HT_TRANS_CTRL_CPU4_EN) == 0) { PciRegister |= ECS_HT_TRANS_CTRL_CPU4_EN; LibAmdPciWrite (AccessWidth32, PciAddress, &PciRegister, StdHeader); LaunchFlag = TRUE; } else { LaunchFlag = FALSE; } break; case 5: PciAddress.Address.Register = ECS_HT_TRANS_CTRL; LibAmdPciRead (AccessWidth32, PciAddress, &PciRegister, StdHeader); if ((PciRegister & ECS_HT_TRANS_CTRL_CPU5_EN) == 0) { PciRegister |= ECS_HT_TRANS_CTRL_CPU5_EN; LibAmdPciWrite (AccessWidth32, PciAddress, &PciRegister, StdHeader); LaunchFlag = TRUE; } else { LaunchFlag = FALSE; } break; default: break; } return (LaunchFlag); } /*---------------------------------------------------------------------------------------*/ /** * Get CPU Specific Platform Type Info. * * @CpuServiceMethod{::F_CPU_GET_PLATFORM_TYPE_SPECIFIC_INFO}. * * This function returns Returns the platform features. * * @param[in] FamilySpecificServices The current Family Specific Services. * @param[in,out] Features The Features supported by this platform. * @param[in] StdHeader Handle of Header for calling lib functions and services. * * @retval AGESA_SUCCESS Always succeeds. */ AGESA_STATUS F10GetPlatformTypeSpecificInfo ( IN CPU_SPECIFIC_SERVICES *FamilySpecificServices, IN OUT PLATFORM_FEATS *Features, IN AMD_CONFIG_PARAMS *StdHeader ) { return (AGESA_SUCCESS); } /*---------------------------------------------------------------------------------------*/ /** * Provide the features of the next HT link. * * @CpuServiceMethod{::F_GET_NEXT_HT_LINK_FEATURES}. * * This method is different than the HT Phy Features method, because for the phy registers * sublink 1 matches and should be programmed if the link is ganged but for PCI config * registers sublink 1 is reserved if the link is ganged. * * @param[in] FamilySpecificServices The current Family Specific Services. * @param[in,out] Link Initially zero, each call returns the link number; * caller passes it back unmodified each call. * @param[in,out] LinkBase Initially the PCI bus, device, function=0, offset=0; * Each call returns the HT Host Capability function and offset; * Caller may use it to access registers, but must @b not modify it; * Each new call passes the previous value as input. * @param[out] HtHostFeats The link's features. * @param[in] StdHeader Standard Head Pointer * * @retval TRUE Valid link and features found. * @retval FALSE No more links. */ BOOLEAN F10GetNextHtLinkFeatures ( IN CPU_SPECIFIC_SERVICES *FamilySpecificServices, IN OUT UINTN *Link, IN OUT PCI_ADDR *LinkBase, OUT HT_HOST_FEATS *HtHostFeats, IN AMD_CONFIG_PARAMS *StdHeader ) { PCI_ADDR PciAddress; UINT32 RegValue; UINT32 ExtendedFreq; UINTN LinkOffset; BOOLEAN Result; ASSERT (FamilySpecificServices != NULL); // No features present unless link is good and connected. HtHostFeats->HtHostValue = 0; Result = TRUE; // Find next link. if (LinkBase->Address.Register == 0) { // Beginning iteration now. LinkBase->Address.Register = HT_CAPABILITIES_POINTER; LibAmdPciReadBits (*LinkBase, 7, 0, &RegValue, StdHeader); } else { // Get next link offset. LibAmdPciReadBits (*LinkBase, 15, 8, &RegValue, StdHeader); } if (RegValue == 0) { // Are we at the end? Check if we can move to another function. if (LinkBase->Address.Function == 0) { LinkBase->Address.Function = 4; LinkBase->Address.Register = HT_CAPABILITIES_POINTER; LibAmdPciReadBits (*LinkBase, 7, 0, &RegValue, StdHeader); } } if (RegValue != 0) { // Not at end, process the found link. LinkBase->Address.Register = RegValue; // Compute link number *Link = (((LinkBase->Address.Function == 4) ? 4 : 0) + ((LinkBase->Address.Register - 0x80) >> 5)); // Handle pending link power off, check End of Chain, Xmit Off. PciAddress = *LinkBase; PciAddress.Address.Register = PciAddress.Address.Register + HT_LINK_CONTROL_REG_OFFSET; LibAmdPciReadBits (PciAddress, 7, 6, &RegValue, StdHeader); if (RegValue == 0) { // Check coherency (HTHOST_LINK_TYPE_REG = 0x18) PciAddress = *LinkBase; PciAddress.Address.Register = PciAddress.Address.Register + HT_LINK_TYPE_REG_OFFSET; LibAmdPciReadBits (PciAddress, 4, 0, &RegValue, StdHeader); if (RegValue == 3) { HtHostFeats->HtHostFeatures.Coherent = 1; } else if (RegValue == 7) { HtHostFeats->HtHostFeatures.NonCoherent = 1; } } // If link was not connected, don't check other attributes, make sure // to return zero, no match. if ((HtHostFeats->HtHostFeatures.Coherent == 1) || (HtHostFeats->HtHostFeatures.NonCoherent == 1)) { // Check gen3 PciAddress = *LinkBase; PciAddress.Address.Register = PciAddress.Address.Register + HT_LINK_EXTENDED_FREQ; LibAmdPciRead (AccessWidth32, PciAddress, &ExtendedFreq, StdHeader); PciAddress = *LinkBase; PciAddress.Address.Register = PciAddress.Address.Register + HT_LINK_FREQ_OFFSET; LibAmdPciRead (AccessWidth32, PciAddress, &RegValue, StdHeader); RegValue = (((ExtendedFreq & 0x1) << 4) | ((RegValue & 0x00000F00) >> 8)); if (RegValue > 6) { HtHostFeats->HtHostFeatures.Ht3 = 1; } else { HtHostFeats->HtHostFeatures.Ht1 = 1; } // Check ganged. Must check the bit for sublink 0. LinkOffset = (*Link > 3) ? ((*Link - 4) * 4) : (*Link * 4); PciAddress = *LinkBase; PciAddress.Address.Function = 0; PciAddress.Address.Register = ((UINT32)LinkOffset + 0x170); LibAmdPciReadBits (PciAddress, 0, 0, &RegValue, StdHeader); if (RegValue == 0) { HtHostFeats->HtHostFeatures.UnGanged = 1; } else { if (*Link < 4) { HtHostFeats->HtHostFeatures.Ganged = 1; } else { // If this is a sublink 1 but it will be ganged, clear all features. HtHostFeats->HtHostValue = 0; } } } } else { // End of links. Result = FALSE; } return Result; } /*---------------------------------------------------------------------------------------*/ /** * Checks to see if the HT phy register table entry should be applied * * @CpuServiceMethod{::F_NEXT_LINK_HAS_HTFPY_FEATS}. * * Find the next link which matches, if any. * This method will match for sublink 1 if the link is ganged and sublink 0 matches. * * @param[in] FamilySpecificServices The current Family Specific Services. * @param[in,out] HtHostCapability Initially the PCI bus, device, function=0, offset=0; * Each call returns the HT Host Capability function and offset; * Caller may use it to access registers, but must @b not modify it; * Each new call passes the previous value as input. * @param[in,out] Link Initially zero, each call returns the link number; caller passes it back unmodified each call. * @param[in] HtPhyLinkType Link type field from a register table entry to compare against * @param[out] MatchedSublink1 TRUE: It is actually just sublink 1 that matches, FALSE: any other condition. * @param[out] Frequency0 The frequency of sublink0 (200 MHz if not connected). * @param[out] Frequency1 The frequency of sublink1 (200 MHz if not connected). * @param[in] StdHeader Standard Head Pointer * * @retval TRUE Link matches * @retval FALSE No more links * */ BOOLEAN F10NextLinkHasHtPhyFeats ( IN CPU_SPECIFIC_SERVICES *FamilySpecificServices, IN OUT PCI_ADDR *HtHostCapability, IN OUT UINT32 *Link, IN HT_PHY_LINK_FEATS *HtPhyLinkType, OUT BOOLEAN *MatchedSublink1, OUT HT_FREQUENCIES *Frequency0, OUT HT_FREQUENCIES *Frequency1, IN AMD_CONFIG_PARAMS *StdHeader ) { UINT32 RegValue; UINT32 ExtendedFreq; PCI_ADDR PciAddress; PCI_ADDR SubLink1Address; HT_PHY_LINK_FEATS LinkType; BOOLEAN IsReallyCheckingBoth; BOOLEAN IsFound; BOOLEAN Result; ASSERT (*Link < 4); ASSERT (HtPhyLinkType != NULL); // error checks: No unknown link type bits set and not a "match none" ASSERT ((HtPhyLinkType->HtPhyLinkValue & ~(HTPHY_LINKTYPE_ALL)) == 0); ASSERT (HtPhyLinkType->HtPhyLinkValue != 0); Result = FALSE; IsFound = FALSE; while (!IsFound) { *Frequency0 = 0; *Frequency1 = 0; IsReallyCheckingBoth = FALSE; *MatchedSublink1 = FALSE; LinkType.HtPhyLinkValue = 0; // Find next link. PciAddress = *HtHostCapability; if (PciAddress.Address.Register == 0) { // Beginning iteration now. PciAddress.Address.Register = HT_CAPABILITIES_POINTER; LibAmdPciReadBits (PciAddress, 7, 0, &RegValue, StdHeader); } else { // Get next link offset. LibAmdPciReadBits (PciAddress, 15, 8, &RegValue, StdHeader); } if (RegValue != 0) { HtHostCapability->Address.Register = RegValue; // Compute link number of this sublink pair (so we don't need to account for function). *Link = ((HtHostCapability->Address.Register - 0x80) >> 5); // Set the link indicators. This assumes each sublink set is contiguous, that is, links 3, 2, 1, 0 and 7, 6, 5, 4. LinkType.HtPhyLinkValue |= (HTPHY_LINKTYPE_SL0_LINK0 << *Link); LinkType.HtPhyLinkValue |= (HTPHY_LINKTYPE_SL1_LINK4 << *Link); // if ganged, don't read sublink 1, but use sublink 0 to check. SubLink1Address = *HtHostCapability; // Check ganged. Since we got called for sublink 0, sublink 1 is implemented also, // but only access it if it is also unganged. PciAddress = *HtHostCapability; PciAddress.Address.Function = 0; PciAddress.Address.Register = ((*Link * 4) + 0x170); LibAmdPciRead (AccessWidth32, PciAddress, &RegValue, StdHeader); RegValue = (RegValue & 0x01); if (RegValue == 0) { // Then really read sublink1, rather than using sublink0 SubLink1Address.Address.Function = 4; IsReallyCheckingBoth = TRUE; } // Checks for Sublink 0 // Handle pending link power off, check End of Chain, Xmit Off. PciAddress = *HtHostCapability; PciAddress.Address.Register = PciAddress.Address.Register + HT_LINK_CONTROL_REG_OFFSET; LibAmdPciReadBits (PciAddress, 7, 6, &RegValue, StdHeader); if (RegValue == 0) { // Check coherency (HTHOST_LINK_TYPE_REG = 0x18) PciAddress = *HtHostCapability; PciAddress.Address.Register = PciAddress.Address.Register + HT_LINK_TYPE_REG_OFFSET; LibAmdPciRead (AccessWidth32, PciAddress, &RegValue, StdHeader); if ((RegValue & 0x1F) == 3) { LinkType.HtPhyLinkFeatures.HtPhySL0Coh = 1; } else if ((RegValue & 0x1F) == 7) { LinkType.HtPhyLinkFeatures.HtPhySL0NonCoh = 1; } } // If link was not connected, don't check other attributes, make sure // to return zero, no match. (Phy may be powered off.) if ((LinkType.HtPhyLinkFeatures.HtPhySL0Coh) || (LinkType.HtPhyLinkFeatures.HtPhySL0NonCoh)) { // Check gen3 PciAddress = *HtHostCapability; PciAddress.Address.Register = PciAddress.Address.Register + HT_LINK_EXTENDED_FREQ; LibAmdPciRead (AccessWidth32, PciAddress, &ExtendedFreq, StdHeader); PciAddress = *HtHostCapability; PciAddress.Address.Register = PciAddress.Address.Register + HT_LINK_FREQ_OFFSET; LibAmdPciRead (AccessWidth32, PciAddress, &RegValue, StdHeader); RegValue = (((ExtendedFreq & 0x1) << 4) | ((RegValue & 0x00000F00) >> 8)); *Frequency0 = RegValue; if (RegValue > 6) { LinkType.HtPhyLinkFeatures.HtPhySL0Ht3 = 1; } else { LinkType.HtPhyLinkFeatures.HtPhySL0Ht1 = 1; } } else { LinkType.HtPhyLinkValue &= ~(HTPHY_LINKTYPE_SL0_ALL); } // Checks for Sublink 1 // Handle pending link power off, check End of Chain, Xmit Off. PciAddress = SubLink1Address; PciAddress.Address.Register = PciAddress.Address.Register + HT_LINK_CONTROL_REG_OFFSET; LibAmdPciReadBits (PciAddress, 7, 6, &RegValue, StdHeader); if (RegValue == 0) { // Check coherency (HTHOST_LINK_TYPE_REG = 0x18) PciAddress = SubLink1Address; PciAddress.Address.Register = PciAddress.Address.Register + HT_LINK_TYPE_REG_OFFSET; LibAmdPciRead (AccessWidth32, PciAddress, &RegValue, StdHeader); if ((RegValue & 0x1F) == 3) { LinkType.HtPhyLinkFeatures.HtPhySL1Coh = 1; } else if ((RegValue & 0x1F) == 7) { LinkType.HtPhyLinkFeatures.HtPhySL1NonCoh = 1; } } if ((LinkType.HtPhyLinkFeatures.HtPhySL1Coh) || (LinkType.HtPhyLinkFeatures.HtPhySL1NonCoh)) { // Check gen3 PciAddress = SubLink1Address; PciAddress.Address.Register = PciAddress.Address.Register + HT_LINK_EXTENDED_FREQ; LibAmdPciRead (AccessWidth32, PciAddress, &ExtendedFreq, StdHeader); PciAddress = SubLink1Address; PciAddress.Address.Register = PciAddress.Address.Register + HT_LINK_FREQ_OFFSET; LibAmdPciRead (AccessWidth32, PciAddress, &RegValue, StdHeader); RegValue = (((ExtendedFreq & 0x1) << 4) | ((RegValue & 0x00000F00) >> 8)); *Frequency1 = RegValue; if (RegValue > 6) { LinkType.HtPhyLinkFeatures.HtPhySL1Ht3 = 1; } else { LinkType.HtPhyLinkFeatures.HtPhySL1Ht1 = 1; } } else { LinkType.HtPhyLinkValue &= ~(HTPHY_LINKTYPE_SL1_ALL); } // For Deemphasis checking, indicate whether it was actually sublink 1 that matched. // If the link is ganged or only sublink 0 matched, or the link features didn't match, this is false. if ((LinkType.HtPhyLinkValue & HtPhyLinkType->HtPhyLinkValue) != 0) { if (IsReallyCheckingBoth && (((LinkType.HtPhyLinkValue & HtPhyLinkType->HtPhyLinkValue) & (HTPHY_LINKTYPE_SL1_ALL)) != 0)) { *MatchedSublink1 = TRUE; } Result = TRUE; // Link matches at least one of the desired characteristics IsFound = TRUE; } else { // Go to next link } } else { // No more links IsFound = TRUE; } } return Result; } /*---------------------------------------------------------------------------------------*/ /** * Applies an HT Phy read-modify-write based on an HT Phy register table entry. * * @CpuServiceMethod{::F_SET_HT_PHY_REGISTER}. * * This function performs the necessary sequence of PCI reads, writes, and waits * necessary to program an HT Phy register. * * @param[in] FamilySpecificServices The current Family Specific Services. * @param[in] HtPhyEntry HT Phy register table entry to apply * @param[in] CapabilitySet The link's HT Host base address. * @param[in] Link Zero based, node, link number (not package link). * @param[in] StdHeader Config handle for library and services * */ VOID F10SetHtPhyRegister ( IN CPU_SPECIFIC_SERVICES *FamilySpecificServices, IN HT_PHY_TYPE_ENTRY_DATA *HtPhyEntry, IN PCI_ADDR CapabilitySet, IN UINT32 Link, IN AMD_CONFIG_PARAMS *StdHeader ) { UINT32 Temp; UINT32 PhyReg; PCI_ADDR PhyBase; // Determine the PCI config address of the HT Phy portal PhyBase = CapabilitySet; PhyBase.Address.Function = FUNC_4; PhyBase.Address.Register = ((Link << 3) + REG_HT4_PHY_OFFSET_BASE_4X180); LibAmdPciRead (AccessWidth32, PhyBase, &PhyReg, StdHeader); // Handle direct map registers if needed PhyReg &= ~(HTPHY_DIRECT_OFFSET_MASK); if (HtPhyEntry->Address > 0x1FF) { PhyReg |= HTPHY_DIRECT_MAP; } PhyReg |= (HtPhyEntry->Address); // Ask the portal to read the HT Phy Register contents LibAmdPciWrite (AccessWidth32, PhyBase, &PhyReg, StdHeader); do { LibAmdPciRead (AccessWidth32, PhyBase, &Temp, StdHeader); } while (!(Temp & HTPHY_IS_COMPLETE_MASK)); // Get the current register contents and do the update requested by the table PhyBase.AddressValue += 4; LibAmdPciRead (AccessWidth32, PhyBase, &Temp, StdHeader); Temp &= ~(HtPhyEntry->Mask); Temp |= (HtPhyEntry->Data); LibAmdPciWrite (AccessWidth32, PhyBase, &Temp, StdHeader); PhyBase.AddressValue -= 4; // Ask the portal to write our updated value to the HT Phy PhyReg |= HTPHY_WRITE_CMD; LibAmdPciWrite (AccessWidth32, PhyBase, &PhyReg, StdHeader); do { LibAmdPciRead (AccessWidth32, PhyBase, &Temp, StdHeader); } while (!(Temp & HTPHY_IS_COMPLETE_MASK)); }
daweedchb/java-mirea
3rd-sem/prac6/src/test/java/SortTest.java
import org.junit.Before; import org.junit.Test; import java.util.Arrays; import static org.junit.Assert.*; public class SortTest { private Student[] iDNumber; private SortingStudentsByGPA[] GPASort; @Before public void setUp() { iDNumber = new Student[5]; GPASort = new SortingStudentsByGPA[5]; for (int i = 0; i < iDNumber.length; i++) { iDNumber[i] = new Student("Student" + i, (int) (Math.random() * 15 + 1), (int) (Math.random() * 200 + 1)); GPASort[i] = new SortingStudentsByGPA("Student" + i, (int) (Math.random() * 15 + 1), (int) (Math.random() * 200 + 1)); } } @Test public void insertionSortTest() { Student[] iDNumberTest; iDNumberTest = iDNumber; insertionSort(iDNumber); Arrays.sort(iDNumberTest); for (int i = 0; i < iDNumberTest.length; i++) { assertSame(iDNumberTest[i], iDNumber[i]); } } @Test public void quickSortByGPATest() { SortingStudentsByGPA[] GPASortTest; GPASortTest = GPASort; quickSort(GPASort, 0, GPASort.length - 1); Arrays.sort(GPASortTest); for (int i = 0; i < GPASort.length; i++) { assertSame(GPASortTest[i], GPASort[i]); } } @Test //сортировка слиянием по iD public void mergeSortTest() { Student[] iDNumberTest; iDNumberTest = iDNumber; iDNumber = mergeSort(iDNumber); Arrays.sort(iDNumberTest); for (int i = 0; i < iDNumberTest.length; i++) { assertEquals(0, iDNumber[i].compareTo(iDNumberTest[i])); //тут сравниваем конкретно // методом compareTo т.к. при сортировке слиянием даже объекты с одинаковым iD могут обменяться местами } } private static void insertionSort(Student[] arr) { int n = arr.length; for (int i = 1; i < n; i++) { Student key = arr[i]; int j = i - 1; while (j > -1 && arr[j].compareTo(key) > 0) { arr[j + 1] = arr[j]; j--; } arr[j + 1] = key; } } public static void quickSort(SortingStudentsByGPA[] array, int low, int high) { if (array.length == 0) return; if (low >= high) return; int middle = low + (high - low) / 2; SortingStudentsByGPA support = array[middle]; int i = low, j = high; while (i <= j) { while (array[i].compareTo(support) < 0) { i++; } if (i <= j) { SortingStudentsByGPA temp = array[i]; array[i] = array[j]; array[j] = temp; i++; j--; } } if (low < j) quickSort(array, low, j); if (high > i) quickSort(array, i, high); } public static Student[] mergeSort(Student[] array1) { Student[] buffer1 = Arrays.copyOf(array1, array1.length); Student[] buffer2 = new Student[array1.length]; return mergesortInner(buffer1, buffer2, 0, array1.length); } public static Student[] mergesortInner(Student[] buffer1, Student[] buffer2, int startIndex, int endIndex) { if (startIndex >= endIndex - 1) { return buffer1; } int middle = startIndex + (endIndex - startIndex) / 2; Student[] sorted1 = mergesortInner(buffer1, buffer2, startIndex, middle); Student[] sorted2 = mergesortInner(buffer1, buffer2, middle, endIndex); // Слияние int index1 = startIndex; int index2 = middle; int destIndex = startIndex; Student[] result = sorted1 == buffer1 ? buffer2 : buffer1; while (index1 < middle && index2 < endIndex) { result[destIndex++] = (sorted1[index1].compareTo(sorted2[index2]) < 0) ? sorted1[index1++] : sorted2[index2++]; } while (index1 < middle) { result[destIndex++] = sorted1[index1++]; } while (index2 < endIndex) { result[destIndex++] = sorted2[index2++]; } return result; } }
fergy/aplit_linux-5
arch/mips/include/asm/mach-loongson32/irq.h
/* * Copyright (c) 2011 <NAME> <<EMAIL>> * * IRQ mappings for Loongson 1 * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ #ifndef __ASM_MACH_LOONGSON32_IRQ_H #define __ASM_MACH_LOONGSON32_IRQ_H /* * CPU core Interrupt Numbers */ #define MIPS_CPU_IRQ_BASE 0 #define MIPS_CPU_IRQ(x) (MIPS_CPU_IRQ_BASE + (x)) #define SOFTINT0_IRQ MIPS_CPU_IRQ(0) #define SOFTINT1_IRQ MIPS_CPU_IRQ(1) #define INT0_IRQ MIPS_CPU_IRQ(2) #define INT1_IRQ MIPS_CPU_IRQ(3) #define INT2_IRQ MIPS_CPU_IRQ(4) #define INT3_IRQ MIPS_CPU_IRQ(5) #define INT4_IRQ MIPS_CPU_IRQ(6) #define TIMER_IRQ MIPS_CPU_IRQ(7) /* cpu timer */ #define MIPS_CPU_IRQS (MIPS_CPU_IRQ(7) + 1 - MIPS_CPU_IRQ_BASE) /* * INT0~3 Interrupt Numbers */ #define LS1X_IRQ_BASE MIPS_CPU_IRQS #define LS1X_IRQ(n, x) (LS1X_IRQ_BASE + (n << 5) + (x)) #define LS1X_UART0_IRQ LS1X_IRQ(0, 2) #if defined(CONFIG_LOONGSON1_LS1B) #define LS1X_UART1_IRQ LS1X_IRQ(0, 3) #define LS1X_UART2_IRQ LS1X_IRQ(0, 4) #define LS1X_UART3_IRQ LS1X_IRQ(0, 5) #elif defined(CONFIG_LOONGSON1_LS1C) #define LS1X_UART1_IRQ LS1X_IRQ(0, 4) #define LS1X_UART2_IRQ LS1X_IRQ(0, 5) #endif #define LS1X_CAN0_IRQ LS1X_IRQ(0, 6) #define LS1X_CAN1_IRQ LS1X_IRQ(0, 7) #define LS1X_SPI0_IRQ LS1X_IRQ(0, 8) #define LS1X_SPI1_IRQ LS1X_IRQ(0, 9) #define LS1X_AC97_IRQ LS1X_IRQ(0, 10) #define LS1X_DMA0_IRQ LS1X_IRQ(0, 13) #define LS1X_DMA1_IRQ LS1X_IRQ(0, 14) #define LS1X_DMA2_IRQ LS1X_IRQ(0, 15) #if defined(CONFIG_LOONGSON1_LS1C) #define LS1X_NAND_IRQ LS1X_IRQ(0, 16) #endif #define LS1X_PWM0_IRQ LS1X_IRQ(0, 17) #define LS1X_PWM1_IRQ LS1X_IRQ(0, 18) #define LS1X_PWM2_IRQ LS1X_IRQ(0, 19) #define LS1X_PWM3_IRQ LS1X_IRQ(0, 20) #define LS1X_RTC_INT0_IRQ LS1X_IRQ(0, 21) #define LS1X_RTC_INT1_IRQ LS1X_IRQ(0, 22) #define LS1X_RTC_INT2_IRQ LS1X_IRQ(0, 23) #if defined(CONFIG_LOONGSON1_LS1B) #define LS1X_TOY_INT0_IRQ LS1X_IRQ(0, 24) #define LS1X_TOY_INT1_IRQ LS1X_IRQ(0, 25) #define LS1X_TOY_INT2_IRQ LS1X_IRQ(0, 26) #define LS1X_RTC_TICK_IRQ LS1X_IRQ(0, 27) #define LS1X_TOY_TICK_IRQ LS1X_IRQ(0, 28) #define LS1X_UART4_IRQ LS1X_IRQ(0, 29) #define LS1X_UART5_IRQ LS1X_IRQ(0, 30) #elif defined(CONFIG_LOONGSON1_LS1C) #define LS1X_UART3_IRQ LS1X_IRQ(0, 29) #define LS1X_ADC_IRQ LS1X_IRQ(0, 30) #define LS1X_SDIO_IRQ LS1X_IRQ(0, 31) #endif #define LS1X_EHCI_IRQ LS1X_IRQ(1, 0) #define LS1X_OHCI_IRQ LS1X_IRQ(1, 1) #if defined(CONFIG_LOONGSON1_LS1B) #define LS1X_GMAC0_IRQ LS1X_IRQ(1, 2) #define LS1X_GMAC1_IRQ LS1X_IRQ(1, 3) #elif defined(CONFIG_LOONGSON1_LS1C) #define LS1X_OTG_IRQ LS1X_IRQ(1, 2) #define LS1X_GMAC0_IRQ LS1X_IRQ(1, 3) #define LS1X_CAM_IRQ LS1X_IRQ(1, 4) #define LS1X_UART4_IRQ LS1X_IRQ(1, 5) #define LS1X_UART5_IRQ LS1X_IRQ(1, 6) #define LS1X_UART6_IRQ LS1X_IRQ(1, 7) #define LS1X_UART7_IRQ LS1X_IRQ(1, 8) #define LS1X_UART8_IRQ LS1X_IRQ(1, 9) #define LS1X_UART9_IRQ LS1X_IRQ(1, 13) #define LS1X_UART10_IRQ LS1X_IRQ(1, 14) #define LS1X_UART11_IRQ LS1X_IRQ(1, 15) #define LS1X_I2C0_IRQ LS1X_IRQ(1, 17) #define LS1X_I2C1_IRQ LS1X_IRQ(1, 18) #define LS1X_I2C2_IRQ LS1X_IRQ(1, 19) #endif #if defined(CONFIG_LOONGSON1_LS1B) #define INTN 4 #elif defined(CONFIG_LOONGSON1_LS1C) #define INTN 5 #endif #define LS1X_IRQS (LS1X_IRQ(INTN, 31) + 1 - LS1X_IRQ_BASE) #define NR_IRQS (MIPS_CPU_IRQS + LS1X_IRQS) #endif /* __ASM_MACH_LOONGSON32_IRQ_H */
leyan95/pocket
src/main/java/org/hv/pocket/utils/sm4/Sm4Utils.java
package org.hv.pocket.utils.sm4; import java.util.Base64; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Sm4Utils { private static final Pattern PATTERN = Pattern.compile("\\s*|\t|\r|\n"); public void setSecretKey(String secretKey) { this.secretKey = secretKey; } public void setHexString(boolean hexString) { this.hexString = hexString; } private String secretKey = ""; public void setIv(String iv) { this.iv = iv; } private String iv = ""; private boolean hexString = false; public Sm4Utils() { } public String encryptDataEcb(String plainText) { try { Sm4Context ctx = new Sm4Context(); ctx.isPadding = true; ctx.mode = Sm4.SM4_ENCRYPT; byte[] keyBytes; if (hexString) { keyBytes = Util.hexStringToBytes(secretKey); } else { keyBytes = secretKey.getBytes(); } Sm4 sm4 = new Sm4(); sm4.sm4SetKeyEnc(ctx, keyBytes); byte[] encrypted = sm4.sm4CryptEcb(ctx, plainText.getBytes("GBK")); String cipherText = Base64.getEncoder().encodeToString(encrypted); if (cipherText != null && cipherText.trim().length() > 0) { Matcher m = PATTERN.matcher(cipherText); cipherText = m.replaceAll(""); } return cipherText; } catch (Exception e) { e.printStackTrace(); return null; } } public String decryptDataEbc(String cipherText) { try { Sm4Context ctx = new Sm4Context(); ctx.isPadding = true; ctx.mode = Sm4.SM4_DECRYPT; byte[] keyBytes; if (hexString) { keyBytes = Util.hexStringToBytes(secretKey); } else { keyBytes = secretKey.getBytes(); } Sm4 sm4 = new Sm4(); sm4.sm4SetKeyDec(ctx, keyBytes); byte[] decrypted = sm4.sm4CryptEcb(ctx, Base64.getDecoder().decode(cipherText.replaceAll(" +", "+").replace("\r\n", ""))); return new String(decrypted, "GBK"); } catch (Exception e) { e.printStackTrace(); return null; } } public String encryptDataCbc(String plainText) { try { Sm4Context ctx = new Sm4Context(); ctx.isPadding = true; ctx.mode = Sm4.SM4_ENCRYPT; byte[] keyBytes; byte[] ivBytes; if (hexString) { keyBytes = Util.hexStringToBytes(secretKey); ivBytes = Util.hexStringToBytes(iv); } else { keyBytes = secretKey.getBytes(); ivBytes = iv.getBytes(); } Sm4 sm4 = new Sm4(); sm4.sm4SetKeyEnc(ctx, keyBytes); byte[] encrypted = sm4.sm4CryptCbc(ctx, ivBytes, plainText.getBytes("GBK")); String cipherText = Base64.getEncoder().encodeToString(encrypted); if (cipherText != null && cipherText.trim().length() > 0) { Matcher m = PATTERN.matcher(cipherText); cipherText = m.replaceAll(""); } return cipherText; } catch (Exception e) { e.printStackTrace(); return null; } } public String decryptDataCbc(String cipherText) { try { Sm4Context ctx = new Sm4Context(); ctx.isPadding = true; ctx.mode = Sm4.SM4_DECRYPT; byte[] keyBytes; byte[] ivBytes; if (hexString) { keyBytes = Util.hexStringToBytes(secretKey); ivBytes = Util.hexStringToBytes(iv); } else { keyBytes = secretKey.getBytes(); ivBytes = iv.getBytes(); } Sm4 sm4 = new Sm4(); sm4.sm4SetKeyDec(ctx, keyBytes); byte[] decrypted = sm4.sm4CryptCbc(ctx, ivBytes, Base64.getDecoder().decode(cipherText.replaceAll(" +", "+").replace("\r\n", ""))); return new String(decrypted, "GBK"); } catch (Exception e) { e.printStackTrace(); return null; } } }
BlackWalker01/BlackLogic
DarkLogic/Operator/Boolean/equal.h
/*===--- equal.h - header for DarkLogic library --------------*- C++ -*-===* * * Part of the DarkLogic Project, under the CC0 license. * See https://creativecommons.org/publicdomain/zero/1.0/deed.fr for license information. * *===----------------------------------------------------------------------===* * * This file defines equal operator in DarkLogic Library * Author: BlackWalker * Date: april 12 2020 * *===----------------------------------------------------------------------===*/ #ifndef DARK_LOGIC_EQUAL_H #define DARK_LOGIC_EQUAL_H #include "Operator/operator.h" #include "Formula/Arithmetic/asubarithmeticrule.h" #include "Formula/Arithmetic/asubarithmetictheorem.h" namespace N_DarkLogic{ template<ArithmeticType ValueType> class ASubArithmeticTheorem; struct EqualToStr { static const std::string s_symbol; }; /** * Equal Function operator * return form1 + form2 * SubFormulaType1 and SubFormulaType2 are either ASubArithmeticTheorem two of them or ASubArithmeticRule two of them */ template<typename SubFormulaType1, typename SubFormulaType2> struct EqualFun; template<typename ValueType1, typename ValueType2> struct EqualFun<ASubArithmeticRule<ValueType1>, ASubArithmeticRule<ValueType2>> { using ValueType = bool; using SubFormulaType = ASubRule; EqualFun() = default; EqualFun(const ptr<ASubArithmeticRule<ValueType1>>& prop1, const ptr<ASubArithmeticRule<ValueType2>>& prop2); ValueType operator()() const; static constexpr Name name() { return Name::EQUAL; } constexpr Arity arity() const { return 2; } static constexpr unsigned short priority() { return 9; } static constexpr Associativity associativity() { return Associativity::LEFT; } static std::string symbol(); static constexpr NbArgBefore nbArgBefore() { return NbArgBefore::E_ONE; } std::string toString(unsigned short priorityParent=1000) const; template<typename SubFormulaType3, typename SubFormulaType4> bool operator==(const EqualFun<SubFormulaType3, SubFormulaType4>& ope) const; const ptr<IISubRuleFormula>& operator[](const size_t& k) const; ~EqualFun() = default; //Attributes std::tuple<const ptr<ASubArithmeticRule<ValueType1>>, const ptr<ASubArithmeticRule<ValueType2>>> m_sonProps; std::tuple<const ptr<IISubRuleFormula>, const ptr<IISubRuleFormula>> m_castSonProps; }; template<size_t N, typename ValueType1, typename ValueType2> typename std::tuple_element<N,std::tuple<const ptr<ASubArithmeticRule<ValueType1>>, const ptr<ASubArithmeticRule<ValueType2>>>>::type& get(const EqualFun<ASubArithmeticRule<ValueType1>, ASubArithmeticRule<ValueType2>>& fun); template<typename SubValueType> struct EqualFun<ASubArithmeticRule<SubValueType>, ASubArithmeticRule<SubValueType>> { using ValueType = bool; using SubFormulaType = ASubRule; EqualFun() = default; EqualFun(const ptr<ASubArithmeticRule<SubValueType>>& prop1, const ptr<ASubArithmeticRule<SubValueType>>& prop2); ValueType operator()() const; static constexpr Name name() { return Name::EQUAL; } constexpr Arity arity() const { return 2; } static constexpr unsigned short priority() { return 9; } static constexpr Associativity associativity() { return Associativity::LEFT; } static std::string symbol(); static constexpr NbArgBefore nbArgBefore() { return NbArgBefore::E_ONE; } std::string toString(unsigned short priorityParent=1000) const; template<typename SubFormulaType3, typename SubFormulaType4> bool operator==(const EqualFun<SubFormulaType3, SubFormulaType4>& ope) const; const ptr<IISubRuleFormula>& operator[](const size_t& k) const; ~EqualFun() = default; //Attributes std::tuple<const ptr<ASubArithmeticRule<SubValueType>>, const ptr<ASubArithmeticRule<SubValueType>>> m_sonProps; std::tuple<const ptr<IISubRuleFormula>, const ptr<IISubRuleFormula>> m_castSonProps; }; template<size_t N, typename ValueType> const ptr<ASubArithmeticRule<ValueType>>& get(const EqualFun<ASubArithmeticRule<ValueType>, ASubArithmeticRule<ValueType>>& fun); template<typename ValueType1, typename ValueType2> struct EqualFun<ASubArithmeticTheorem<ValueType1>, ASubArithmeticTheorem<ValueType2>> { using ValueType = bool; using SubFormulaType = ASubTheorem; EqualFun() = default; EqualFun(const ptr<ASubArithmeticTheorem<ValueType1>>& prop1, const ptr<ASubArithmeticTheorem<ValueType2>>& prop2); ValueType operator()() const; static constexpr Name name() { return Name::EQUAL; } constexpr Arity arity() const { return 2; } static constexpr unsigned short priority() { return 9; } static constexpr Associativity associativity() { return Associativity::LEFT; } static std::string symbol(); static constexpr NbArgBefore nbArgBefore() { return NbArgBefore::E_ONE; } void add(ASubArithmeticTheorem<ValueType1> &prop); void add(ASubArithmeticTheorem<ValueType2> &prop); std::string toString(unsigned short priorityParent=1000) const; template<typename SubFormulaType3, typename SubFormulaType4> bool operator==(const EqualFun<SubFormulaType3, SubFormulaType4>& ope) const; const ptr<IISubTheoremFormula>& operator[](const size_t& k) const; ~EqualFun() = default; //Attributes std::tuple<const ptr<ASubArithmeticTheorem<ValueType1>>, const ptr<ASubArithmeticTheorem<ValueType2>>> m_sonProps; std::tuple<const ptr<IISubTheoremFormula>, const ptr<IISubTheoremFormula>> m_castSonProps; }; template<size_t N, typename ValueType1, typename ValueType2> typename std::tuple_element<N,std::tuple<const ptr<ASubArithmeticTheorem<ValueType1>>, const ptr<ASubArithmeticTheorem<ValueType2>>>>::type& get(const EqualFun<ASubArithmeticTheorem<ValueType1>, ASubArithmeticTheorem<ValueType2>>& fun); template<typename SubValueType> struct EqualFun<ASubArithmeticTheorem<SubValueType>, ASubArithmeticTheorem<SubValueType>> { using ValueType = bool; using SubFormulaType = ASubTheorem; EqualFun() = default; EqualFun(const ptr<ASubArithmeticTheorem<SubValueType>>& prop1, const ptr<ASubArithmeticTheorem<SubValueType>>& prop2); ValueType operator()() const; static constexpr Name name() { return Name::EQUAL; } constexpr Arity arity() const { return 2; } static constexpr unsigned short priority() { return 9; } static constexpr Associativity associativity() { return Associativity::LEFT; } static std::string symbol(); static constexpr NbArgBefore nbArgBefore() { return NbArgBefore::E_ONE; } std::string toString(unsigned short priorityParent=1000) const; template<typename SubFormulaType3, typename SubFormulaType4> bool operator==(const EqualFun<SubFormulaType3, SubFormulaType4>& ope) const; const ptr<IISubTheoremFormula>& operator[](const size_t& k) const; ~EqualFun() = default; //Attributes std::tuple<const ptr<ASubArithmeticTheorem<SubValueType>>, const ptr<ASubArithmeticTheorem<SubValueType>>> m_sonProps; std::tuple<const ptr<IISubTheoremFormula>, const ptr<IISubTheoremFormula>> m_castSonProps; }; template<size_t N, typename ValueType> const ptr<ASubArithmeticTheorem<ValueType>>& get(const EqualFun<ASubArithmeticTheorem<ValueType>, ASubArithmeticTheorem<ValueType>>& fun); template<typename SubFormulaType1, typename SubFormulaType2> struct EqualTypeComputer; template<typename ValueType1, typename ValueType2> struct EqualTypeComputer<ASubArithmeticRule<ValueType1>,ASubArithmeticRule<ValueType2>> { using BracketType=IISubRuleFormula; }; template<typename ValueType1, typename ValueType2> struct EqualTypeComputer<ASubArithmeticTheorem<ValueType1>,ASubArithmeticTheorem<ValueType2>> { using BracketType=IISubTheoremFormula; }; template<typename SubFormulaType1, typename SubFormulaType2> class Equal : public Operator<EqualFun<SubFormulaType1,SubFormulaType2>> { public: typedef typename EqualTypeComputer<SubFormulaType1,SubFormulaType2>::BracketType BracketType; using RuleOpe = Equal<ToRule<SubFormulaType1>, ToRule<SubFormulaType2>>; using TheoremOpe = Equal<ToTheorem<SubFormulaType1>, ToTheorem<SubFormulaType2>>; Equal() = default; Equal(const ptr<SubFormulaType1> &prop1, const ptr<SubFormulaType2> &prop2); typedef typename EqualFun<SubFormulaType1,SubFormulaType2>::ValueType ValueType; template<typename SubFormulaType3, typename SubFormulaType4> bool operator==(const Equal<SubFormulaType3, SubFormulaType4>& ope) const; const ptr<BracketType>& operator[](const size_t& k) const; }; template<size_t N, typename SubFormulaType1, typename SubFormulaType2> typename std::tuple_element<N,std::tuple<const ptr<SubFormulaType1>,const ptr<SubFormulaType2>>>::type& get(const Equal<SubFormulaType1,SubFormulaType2>& fun); /** * Equal constructors */ template<typename SubFormulaType1, typename SubFormulaType2> Equal<SubFormulaType1,SubFormulaType2>::Equal(const ptr<SubFormulaType1> &prop1, const ptr<SubFormulaType2> &prop2): Operator<EqualFun<SubFormulaType1,SubFormulaType2>>(EQUAL,prop1,prop2) { /*static_assert (std::is_same<SubPropertyType,ASubTheorem>::value||std::is_same<SubPropertyType,ASubRule>::value, "SubPropertyType in Equal operator must be a subTheorem or a subRule" );*/ } template<typename SubFormulaType1, typename SubFormulaType2> const ptr<typename Equal<SubFormulaType1,SubFormulaType2>::BracketType>& Equal<SubFormulaType1,SubFormulaType2>::operator[](const size_t &k) const { return this->m_fun[k]; } /** * EqualFun constructors */ template<typename ValueType1, typename ValueType2> EqualFun<ASubArithmeticRule<ValueType1>,ASubArithmeticRule<ValueType2>>::EqualFun(const ptr<ASubArithmeticRule<ValueType1>> &prop1, const ptr<ASubArithmeticRule<ValueType2>> &prop2): m_sonProps(prop1,prop2), m_castSonProps(prop1,prop2) { } template<typename SubValueType> EqualFun<ASubArithmeticRule<SubValueType>,ASubArithmeticRule<SubValueType>>::EqualFun(const ptr<ASubArithmeticRule<SubValueType>> &prop1, const ptr<ASubArithmeticRule<SubValueType>> &prop2): m_sonProps(prop1,prop2), m_castSonProps(prop1,prop2) { } template<typename ValueType1, typename ValueType2> EqualFun<ASubArithmeticTheorem<ValueType1>,ASubArithmeticTheorem<ValueType2>>::EqualFun(const ptr<ASubArithmeticTheorem<ValueType1>> &prop1, const ptr<ASubArithmeticTheorem<ValueType2>> &prop2): m_sonProps(prop1,prop2), m_castSonProps(prop1,prop2) { } template<typename SubValueType> EqualFun<ASubArithmeticTheorem<SubValueType>,ASubArithmeticTheorem<SubValueType>>::EqualFun(const ptr<ASubArithmeticTheorem<SubValueType>> &prop1, const ptr<ASubArithmeticTheorem<SubValueType>> &prop2): m_sonProps(prop1,prop2), m_castSonProps(prop1,prop2) { } /** * Operator () */ template<typename ValueType1, typename ValueType2> bool EqualFun<ASubArithmeticRule<ValueType1>,ASubArithmeticRule<ValueType2>>::operator()() const { return static_cast<ValueType>(std::get<0>(m_sonProps)->evaluate()) == static_cast<ValueType>(std::get<1>(m_sonProps)->evaluate()); } template<typename ValueType> bool EqualFun<ASubArithmeticRule<ValueType>,ASubArithmeticRule<ValueType>>::operator()() const { return std::get<0>(m_sonProps)->evaluate() == std::get<1>(m_sonProps)->evaluate(); } template<typename ValueType1, typename ValueType2> bool EqualFun<ASubArithmeticTheorem<ValueType1>,ASubArithmeticTheorem<ValueType2>>::operator()() const { return static_cast<ValueType>(std::get<0>(m_sonProps)->evaluate()) == static_cast<ValueType>(std::get<1>(m_sonProps)->evaluate()); } template<typename ValueType> bool EqualFun<ASubArithmeticTheorem<ValueType>,ASubArithmeticTheorem<ValueType>>::operator()() const { return std::get<0>(m_sonProps)->evaluate() == std::get<1>(m_sonProps)->evaluate(); } /** * symbol methods */ template<typename ValueType1, typename ValueType2> std::string N_DarkLogic::EqualFun<ASubArithmeticTheorem<ValueType1>, ASubArithmeticTheorem<ValueType2> >::symbol() { return EqualToStr::s_symbol; } template<typename SubValueType> std::string N_DarkLogic::EqualFun<ASubArithmeticTheorem<SubValueType>, ASubArithmeticTheorem<SubValueType> >::symbol() { return EqualToStr::s_symbol; } template<typename ValueType1, typename ValueType2> std::string N_DarkLogic::EqualFun<ASubArithmeticRule<ValueType1>, ASubArithmeticRule<ValueType2> >::symbol() { return EqualToStr::s_symbol; } template<typename SubValueType> std::string N_DarkLogic::EqualFun<ASubArithmeticRule<SubValueType>, ASubArithmeticRule<SubValueType> >::symbol() { return EqualToStr::s_symbol; } /** * toString methods */ template<typename ValueType1, typename ValueType2> std::string EqualFun<ASubArithmeticRule<ValueType1>,ASubArithmeticRule<ValueType2>>::toString(unsigned short priorityParent) const { if(priorityParent<priority()) { return "("+std::get<0>(m_sonProps)->toString(priority())+symbol()+std::get<1>(m_sonProps)->toString(priority())+")"; } else { return std::get<0>(m_sonProps)->toString(priority())+symbol()+std::get<1>(m_sonProps)->toString(priority()); } } template<typename ValueType> std::string EqualFun<ASubArithmeticRule<ValueType>,ASubArithmeticRule<ValueType>>::toString(unsigned short priorityParent) const { if(priorityParent<priority()) { return "("+std::get<0>(m_sonProps)->toString(priority())+symbol()+std::get<1>(m_sonProps)->toString(priority())+")"; } else { return std::get<0>(m_sonProps)->toString(priority())+symbol()+std::get<1>(m_sonProps)->toString(priority()); } } template<typename ValueType1, typename ValueType2> std::string EqualFun<ASubArithmeticTheorem<ValueType1>,ASubArithmeticTheorem<ValueType2>>::toString(unsigned short priorityParent) const { if(priorityParent<priority()) { return "("+std::get<0>(m_sonProps)->toString(priority())+symbol()+std::get<1>(m_sonProps)->toString(priority())+")"; } else { return std::get<0>(m_sonProps)->toString(priority())+symbol()+std::get<1>(m_sonProps)->toString(priority()); } } template<typename ValueType> std::string EqualFun<ASubArithmeticTheorem<ValueType>,ASubArithmeticTheorem<ValueType>>::toString(unsigned short priorityParent) const { if(priorityParent<priority()) { return "("+std::get<0>(m_sonProps)->toString(priority())+symbol()+std::get<1>(m_sonProps)->toString(priority())+")"; } else { return std::get<0>(m_sonProps)->toString(priority())+symbol()+std::get<1>(m_sonProps)->toString(priority()); } } /** * operator == */ template<typename ValueType1, typename ValueType2> template<typename SubFormulaType3, typename SubFormulaType4> bool EqualFun<ASubArithmeticRule<ValueType1>,ASubArithmeticRule<ValueType2>>::operator==(const EqualFun<SubFormulaType3,SubFormulaType4> &ope) const { return ((*std::get<0>(m_sonProps))==(*std::get<0>(ope.m_sonProps)))&&((*std::get<1>(m_sonProps))==(*std::get<1>(ope.m_sonProps))); } template<typename ValueType> template<typename SubFormulaType3, typename SubFormulaType4> bool EqualFun<ASubArithmeticRule<ValueType>,ASubArithmeticRule<ValueType>>::operator==(const EqualFun<SubFormulaType3,SubFormulaType4> &ope) const { return ((*std::get<0>(m_sonProps))==(*std::get<0>(ope.m_sonProps)))&&((*std::get<1>(m_sonProps))==(*std::get<1>(ope.m_sonProps))); } template<typename ValueType1, typename ValueType2> template<typename SubFormulaType3, typename SubFormulaType4> bool EqualFun<ASubArithmeticTheorem<ValueType1>,ASubArithmeticTheorem<ValueType2>>::operator==(const EqualFun<SubFormulaType3,SubFormulaType4> &ope) const { return ((*std::get<0>(m_sonProps))==(*std::get<0>(ope.m_sonProps)))&&((*std::get<1>(m_sonProps))==(*std::get<1>(ope.m_sonProps))); } template<typename ValueType> template<typename SubFormulaType3, typename SubFormulaType4> bool EqualFun<ASubArithmeticTheorem<ValueType>,ASubArithmeticTheorem<ValueType>>::operator==(const EqualFun<SubFormulaType3,SubFormulaType4> &ope) const { return ((*std::get<0>(m_sonProps))==(*std::get<0>(ope.m_sonProps)))&&((*std::get<1>(m_sonProps))==(*std::get<1>(ope.m_sonProps))); } /** * get methods */ template<size_t N, typename ValueType1, typename ValueType2> typename std::tuple_element<N,std::tuple<const ptr<const ASubArithmeticRule<ValueType1>>, const ptr<const ASubArithmeticRule<ValueType2>>>>::type& get(const EqualFun<ASubArithmeticRule<ValueType1>, ASubArithmeticRule<ValueType2>>& fun) { return std::get<N>(fun.m_sonProps); } template<size_t N, typename ValueType> const ptr<const ASubArithmeticRule<ValueType>>& get(const EqualFun<ASubArithmeticRule<ValueType>, ASubArithmeticRule<ValueType>>& fun) { return std::get<N>(fun.m_sonProps); } template<size_t N, typename ValueType1, typename ValueType2> typename std::tuple_element<N,std::tuple<const ptr<const ASubArithmeticTheorem<ValueType1>>, const ptr<const ASubArithmeticTheorem<ValueType2>>>>::type& get(const EqualFun<ASubArithmeticTheorem<ValueType1>, ASubArithmeticTheorem<ValueType2>>& fun) { return std::get<N>(fun.m_sonProps); } template<size_t N, typename ValueType> const ptr<ASubArithmeticTheorem<ValueType>> &get(const EqualFun<ASubArithmeticTheorem<ValueType>, ASubArithmeticTheorem<ValueType>>& fun) { return std::get<N>(fun.m_sonProps); } template<size_t N, typename SubFormulaType1, typename SubFormulaType2> typename std::tuple_element<N,std::tuple<const ptr<const SubFormulaType1>,const ptr<const SubFormulaType2>>>::type& get(const Equal<SubFormulaType1,SubFormulaType2>& ope) { return get<N>(ope.m_fun); } template<typename ValueType1, typename ValueType2> const ptr<IISubRuleFormula> & N_DarkLogic::EqualFun<ASubArithmeticRule<ValueType1>, ASubArithmeticRule<ValueType2> >::operator[](const size_t &k) const { switch(k) { case 0: { return std::get<0>(m_castSonProps); } case 1: { return std::get<1>(m_castSonProps); } default: { throw std::runtime_error("Equal operator has only two arguments"); } } } template<typename SubValueType> const ptr<IISubRuleFormula > & N_DarkLogic::EqualFun<ASubArithmeticRule<SubValueType>, ASubArithmeticRule<SubValueType> >::operator[](const size_t &k) const { switch(k) { case 0: { return std::get<0>(m_castSonProps); } case 1: { return std::get<1>(m_castSonProps); } default: { throw std::runtime_error("Equal operator has only two arguments"); } } } template<typename SubValueType> const ptr<IISubTheoremFormula > &N_DarkLogic::EqualFun<ASubArithmeticTheorem<SubValueType>, ASubArithmeticTheorem<SubValueType> >::operator[](const size_t &k) const { switch(k) { case 0: { return std::get<0>(m_castSonProps); } case 1: { return std::get<1>(m_castSonProps); } default: { throw std::runtime_error("Equal operator has only two arguments"); } } } template<typename ValueType1, typename ValueType2> const ptr<IISubTheoremFormula> & EqualFun<ASubArithmeticTheorem<ValueType1>, ASubArithmeticTheorem<ValueType2> >::operator[](const size_t &k) const { switch(k) { case 0: { return std::get<0>(m_castSonProps); } case 1: { return std::get<1>(m_castSonProps); } default: { throw std::runtime_error("Equal operator has only two arguments"); } } } template<typename SubFormulaType, typename SubFormulaType2> template<typename SubFormulaType3, typename SubFormulaType4> bool Equal<SubFormulaType,SubFormulaType2>::operator==(const Equal<SubFormulaType3, SubFormulaType4> &ope) const { return this->m_fun==ope.m_fun; } //#include "equal.hxx" } #endif // DARK_LOGIC_EQUAL_H
13732226055/codeBackup
Ali/src/Wangyi/countWays.java
package Wangyi; import java.util.ArrayList; import java.util.List; import java.util.Scanner; import java.util.function.IntPredicate; import java.util.regex.Matcher; import java.util.regex.Pattern; /* * 有数组penny,penny中所有的值都为正数且不重复。每个值代表一种面值的货币,每种面值的货币可以使用任意张,再给定一个整数aim(小于等于1000)代表要找的钱数,求换钱有多少种方法。 给定数组penny及它的大小(小于等于50),同时给定一个整数aim,请返回有多少种方法可以凑成aim。 测试样例: [1,2,4],3,4 返回:2 */ public class countWays { public static void main(String[] args) { // TODO Auto-generated method stub String info; //Scanner input = new Scanner(System.in); //info = input.nextLine(); info = "[1,2,3],3,5"; //String[] strings = input.nextLine().split("\\[|\\]"); String regEx = "^\\[([0-9,]+)\\],([0-9]),([0-9])$"; // 编译正则表达式 Pattern pattern = Pattern.compile(regEx); Matcher matcher = pattern.matcher(info); if(matcher.find()){ int length = Integer.valueOf(matcher.group(2)); int aim = Integer.valueOf(matcher.group(3)); int penny[] = new int[length]; int i=0; pattern = Pattern.compile("\\d+"); matcher = pattern.matcher(matcher.group(1)); while(matcher.find()){ penny[i++] = Integer.valueOf(matcher.group()); } System.out.println(countWay(penny, aim)); //System.out.println(advancedCountWay(penny, aim)); //System.out.println(AcountWays(penny,penny.length,aim)); } //System.out.println(countWay(penny, aim)); } public static int countWay(int[] penny, int aim){ if(penny.length == 0) return 0; int[][] dp = new int[penny.length][aim+1]; int i=0,j=0; while(i<penny.length){ dp[i++][0] = 1; } for(i=1;i*penny[0]<=aim;i++){ dp[0][penny[0]*i] = 1; } breath(dp); for(i=1;i<penny.length;i++){ for(j=0;j<=aim;j++){ dp[i][j] = (j>=penny[i])? dp[i][j-penny[i]]+dp[i-1][j] : dp[i-1][j]; breath(dp); } } return dp[penny.length-1][aim]; } public static void breath(int[][] dp){ for(int i=0,j=0;i<dp.length;i++){ for(j=0;j<dp[i].length;j++) System.out.format("%2d ", dp[i][j]); System.out.println(); } System.out.println("---------------------------"); } public static void breath(int[] dp){ for(int i=0,j=0;i<dp.length;i++){ System.out.format("%2d ", dp[i]); //System.out.println(); } System.out.println(); } public static int advancedCountWay(int[] penny, int aim){ int[] dp = new int[aim+1]; int i=0,j=0; for(;i*penny[0]<=aim;i++){ dp[i*penny[0]] = 1; } breath(dp); for(i=0;i<penny.length;i++){ for(j=aim;j>=penny[i];j--){ dp[j] = dp[j-penny[i]]+dp[j]; breath(dp); //System.out.println("i:"+i+" j:"+j+" penny[i]:"+penny[i]+" dp[i]:"+dp[i]+" dp[j-penny[i]]:"+dp[j-penny[i]]); //dp[j]表示要凑足j的金额时最多的方法数量,dp[j-penny[i]]表示使用一次面值penny[i]时的最大方法数 } } return dp[aim]; } public static int AcountWays(int[] penny, int n, int aim) { // write code here if(n==0||penny==null||aim<0){ return 0; } int[][] pd = new int[n][aim+1]; for(int i=0;i<n;i++){ pd[i][0] = 1; } for(int i=1;penny[0]*i<=aim;i++){ pd[0][penny[0]*i] = 1; } for(int i=1;i<n;i++){ for(int j=0;j<=aim;j++){ if(j>=penny[i]){ pd[i][j] = pd[i-1][j]+pd[i][j-penny[i]]; }else{ pd[i][j] = pd[i-1][j]; } } } return pd[n-1][aim]; } public static void breath(boolean[][] dp) { // TODO Auto-generated method stub for(int i=0,j=0;i<dp.length;i++){ for(j=0;j<dp[i].length;j++) System.out.print((dp[i][j])? 1+" ":0+" "); System.out.println(); } System.out.println("---------------------------"); } }
GPUPeople/cuRE
source/CUDARaster/App.hpp
<filename>source/CUDARaster/App.hpp<gh_stars>10-100 /* * Copyright (c) 2009-2011, NVIDIA Corporation * 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 NVIDIA Corporation 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. */ #pragma once #include <CUDA/event.h> #include "Shaders.hpp" #include "CudaRaster.hpp" //#define CLIPSPACE_GEOM 0 //#define EYECANDY_GEOM 1 namespace FW { //------------------------------------------------------------------------ class App { public: App (CUmodule module); ~App (void); void setData (Buffer inputVertices, Buffer shadedVertices, Buffer materials, Buffer vertexIndices, Buffer vertexMaterialsIdx, Buffer triangleMaterialIdx, int numVertices, int numMaterials, int numTriangles); void setTargets (CUarray color, CUarray depth, int resX, int resY); void setGlobals(); double render(int from, int num); void setProjection (Mat4f& projection) { m_projection = projection; } void immediateClearColor(Vec4f color) { m_cudaRaster.immediateClearColor(color); } void immediateClearDepth(F32 depth) { m_cudaRaster.immediateClearDepth(depth); } void setPosToCam (Mat4f& pos_to_cam) { m_posToCamera = pos_to_cam; } void setClear(bool clear, const FW::Vec4f& color = (0.0F), F32 depth = (1.0F)) { m_cudaRaster.deferredClear(clear, color, depth); } void setLight (const FW::Vec3f& pos, const FW::Vec3f& color) { m_lightpos = pos; } void setModel (Mat4f& model) { m_model = model; } void setPipe (const char* postfix); private: void firstTimeInit (void); private: App (const App&); // forbidden App& operator= (const App&); // forbidden private: CudaRaster m_cudaRaster; // State. CUmodule m_module; // Mesh. Vec3f m_lightpos; S32 m_numVertices; S32 m_numMaterials; S32 m_numTriangles; Buffer m_inputVertices; Buffer m_shadedVertices; Buffer m_materials; Buffer m_vertexIndices; Buffer m_vertexMaterialIdx; Buffer m_triangleMaterialIdx; //TextureAtlas m_textureAtlas; // Pipe. Mat4f m_model; Mat4f m_posToCamera; Mat4f m_projection; CUfunction m_vertexShaderKernel; U32 m_resX; U32 m_resY; CUarray m_colorBuffer; CUarray m_depthBuffer; CU::unique_event m_drawBegin; CU::unique_event m_drawEnd; CU::unique_event m_vertexBegin; CU::unique_event m_vertexEnd; }; //------------------------------------------------------------------------ }
calocan/urbinsight
src/store.js
<reponame>calocan/urbinsight /** * Created by <NAME> on 2017.11.29 * Copyright (c) 2017 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ import thunk from 'redux-thunk'; import {createLogger} from 'redux-logger'; import {applyMiddleware, compose, createStore} from 'redux'; import rootReducer from 'reducers'; import initialStateCreator from 'data/initialState'; import {composeWithDevTools} from 'redux-devtools-extension'; import createDebounce from 'redux-debounced'; const loggerMiddleware = createLogger(); /** * Creates a store * @param {Object} config The config object to use for the initialState * @param {Object} [testEnhancers] Optional enhancers to override default enhancers for testing * @returns {Object} The redux store */ export default (config, testEnhancers = []) => { // compose enhancers unless supplied. // this prevents running Apollo's client.middleware() in node tests const composedEnhancers = testEnhancers.length ? compose(...testEnhancers) : composeWithDevTools(applyMiddleware(createDebounce(), thunk, loggerMiddleware)) return createStore( rootReducer(), initialStateCreator(config), composedEnhancers ); }
madeyoga/PortableAudioBot
src/main/java/guild/IGuildAudioManager.java
<reponame>madeyoga/PortableAudioBot package guild; import net.dv8tion.jda.api.entities.Guild; import java.util.Map; public interface IGuildAudioManager { GuildAudioState getAudioState(Guild guild); Map<String, GuildAudioState> getAudioStates(); void removeAudioState(Guild guild); }
woohoou/aws-sdk-cpp
aws-cpp-sdk-ecs/include/aws/ecs/model/PlacementStrategy.h
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ #pragma once #include <aws/ecs/ECS_EXPORTS.h> #include <aws/ecs/model/PlacementStrategyType.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <utility> namespace Aws { namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace ECS { namespace Model { /** * <p>The task placement strategy for a task or service. For more information, see * <a * href="http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html">Task * Placement Strategies</a> in the <i>Amazon Elastic Container Service Developer * Guide</i>.</p><p><h3>See Also:</h3> <a * href="http://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/PlacementStrategy">AWS * API Reference</a></p> */ class AWS_ECS_API PlacementStrategy { public: PlacementStrategy(); PlacementStrategy(const Aws::Utils::Json::JsonValue& jsonValue); PlacementStrategy& operator=(const Aws::Utils::Json::JsonValue& jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** * <p>The type of placement strategy. The <code>random</code> placement strategy * randomly places tasks on available candidates. The <code>spread</code> placement * strategy spreads placement across available candidates evenly based on the * <code>field</code> parameter. The <code>binpack</code> strategy places tasks on * available candidates that have the least available amount of the resource that * is specified with the <code>field</code> parameter. For example, if you binpack * on memory, a task is placed on the instance with the least amount of remaining * memory (but still enough to run the task).</p> */ inline const PlacementStrategyType& GetType() const{ return m_type; } /** * <p>The type of placement strategy. The <code>random</code> placement strategy * randomly places tasks on available candidates. The <code>spread</code> placement * strategy spreads placement across available candidates evenly based on the * <code>field</code> parameter. The <code>binpack</code> strategy places tasks on * available candidates that have the least available amount of the resource that * is specified with the <code>field</code> parameter. For example, if you binpack * on memory, a task is placed on the instance with the least amount of remaining * memory (but still enough to run the task).</p> */ inline void SetType(const PlacementStrategyType& value) { m_typeHasBeenSet = true; m_type = value; } /** * <p>The type of placement strategy. The <code>random</code> placement strategy * randomly places tasks on available candidates. The <code>spread</code> placement * strategy spreads placement across available candidates evenly based on the * <code>field</code> parameter. The <code>binpack</code> strategy places tasks on * available candidates that have the least available amount of the resource that * is specified with the <code>field</code> parameter. For example, if you binpack * on memory, a task is placed on the instance with the least amount of remaining * memory (but still enough to run the task).</p> */ inline void SetType(PlacementStrategyType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** * <p>The type of placement strategy. The <code>random</code> placement strategy * randomly places tasks on available candidates. The <code>spread</code> placement * strategy spreads placement across available candidates evenly based on the * <code>field</code> parameter. The <code>binpack</code> strategy places tasks on * available candidates that have the least available amount of the resource that * is specified with the <code>field</code> parameter. For example, if you binpack * on memory, a task is placed on the instance with the least amount of remaining * memory (but still enough to run the task).</p> */ inline PlacementStrategy& WithType(const PlacementStrategyType& value) { SetType(value); return *this;} /** * <p>The type of placement strategy. The <code>random</code> placement strategy * randomly places tasks on available candidates. The <code>spread</code> placement * strategy spreads placement across available candidates evenly based on the * <code>field</code> parameter. The <code>binpack</code> strategy places tasks on * available candidates that have the least available amount of the resource that * is specified with the <code>field</code> parameter. For example, if you binpack * on memory, a task is placed on the instance with the least amount of remaining * memory (but still enough to run the task).</p> */ inline PlacementStrategy& WithType(PlacementStrategyType&& value) { SetType(std::move(value)); return *this;} /** * <p>The field to apply the placement strategy against. For the * <code>spread</code> placement strategy, valid values are <code>instanceId</code> * (or <code>host</code>, which has the same effect), or any platform or custom * attribute that is applied to a container instance, such as * <code>attribute:ecs.availability-zone</code>. For the <code>binpack</code> * placement strategy, valid values are <code>cpu</code> and <code>memory</code>. * For the <code>random</code> placement strategy, this field is not used.</p> */ inline const Aws::String& GetField() const{ return m_field; } /** * <p>The field to apply the placement strategy against. For the * <code>spread</code> placement strategy, valid values are <code>instanceId</code> * (or <code>host</code>, which has the same effect), or any platform or custom * attribute that is applied to a container instance, such as * <code>attribute:ecs.availability-zone</code>. For the <code>binpack</code> * placement strategy, valid values are <code>cpu</code> and <code>memory</code>. * For the <code>random</code> placement strategy, this field is not used.</p> */ inline void SetField(const Aws::String& value) { m_fieldHasBeenSet = true; m_field = value; } /** * <p>The field to apply the placement strategy against. For the * <code>spread</code> placement strategy, valid values are <code>instanceId</code> * (or <code>host</code>, which has the same effect), or any platform or custom * attribute that is applied to a container instance, such as * <code>attribute:ecs.availability-zone</code>. For the <code>binpack</code> * placement strategy, valid values are <code>cpu</code> and <code>memory</code>. * For the <code>random</code> placement strategy, this field is not used.</p> */ inline void SetField(Aws::String&& value) { m_fieldHasBeenSet = true; m_field = std::move(value); } /** * <p>The field to apply the placement strategy against. For the * <code>spread</code> placement strategy, valid values are <code>instanceId</code> * (or <code>host</code>, which has the same effect), or any platform or custom * attribute that is applied to a container instance, such as * <code>attribute:ecs.availability-zone</code>. For the <code>binpack</code> * placement strategy, valid values are <code>cpu</code> and <code>memory</code>. * For the <code>random</code> placement strategy, this field is not used.</p> */ inline void SetField(const char* value) { m_fieldHasBeenSet = true; m_field.assign(value); } /** * <p>The field to apply the placement strategy against. For the * <code>spread</code> placement strategy, valid values are <code>instanceId</code> * (or <code>host</code>, which has the same effect), or any platform or custom * attribute that is applied to a container instance, such as * <code>attribute:ecs.availability-zone</code>. For the <code>binpack</code> * placement strategy, valid values are <code>cpu</code> and <code>memory</code>. * For the <code>random</code> placement strategy, this field is not used.</p> */ inline PlacementStrategy& WithField(const Aws::String& value) { SetField(value); return *this;} /** * <p>The field to apply the placement strategy against. For the * <code>spread</code> placement strategy, valid values are <code>instanceId</code> * (or <code>host</code>, which has the same effect), or any platform or custom * attribute that is applied to a container instance, such as * <code>attribute:ecs.availability-zone</code>. For the <code>binpack</code> * placement strategy, valid values are <code>cpu</code> and <code>memory</code>. * For the <code>random</code> placement strategy, this field is not used.</p> */ inline PlacementStrategy& WithField(Aws::String&& value) { SetField(std::move(value)); return *this;} /** * <p>The field to apply the placement strategy against. For the * <code>spread</code> placement strategy, valid values are <code>instanceId</code> * (or <code>host</code>, which has the same effect), or any platform or custom * attribute that is applied to a container instance, such as * <code>attribute:ecs.availability-zone</code>. For the <code>binpack</code> * placement strategy, valid values are <code>cpu</code> and <code>memory</code>. * For the <code>random</code> placement strategy, this field is not used.</p> */ inline PlacementStrategy& WithField(const char* value) { SetField(value); return *this;} private: PlacementStrategyType m_type; bool m_typeHasBeenSet; Aws::String m_field; bool m_fieldHasBeenSet; }; } // namespace Model } // namespace ECS } // namespace Aws