repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
totalamateurhour/oci-utils | tests/test_exec_utils-config-helper.py | <filename>tests/test_exec_utils-config-helper.py
# Copyright (c) 2018, 2021 Oracle and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.
import os
import sys
import subprocess
import unittest
from tools.oci_test_case import OciTestCase
os.environ['LC_ALL'] = 'en_US.UTF8'
class TestExecConfigHelper(OciTestCase):
""" oci-utils-config-helper tests.
"""
def setUp(self):
"""
Test initialisation.
Returns
-------
No return value.
Raises
------
unittest.Skiptest
If the OCI_UTILS_CONFIG_HELPER does not exist.
"""
super(TestExecConfigHelper, self).setUp()
self.oci_config_helper = self.properties.get_property('oci-utils-config-helper')
if not os.path.exists(self.oci_config_helper):
raise unittest.SkipTest("%s not present" % self.oci_config_helper)
def test_display_help(self):
"""
Test displaying help. Dummy test to check that the CLI at least runs.
Returns
-------
No return value.
"""
try:
_ = subprocess.check_output([sys.executable, self.oci_config_helper])
except subprocess.CalledProcessError as e:
if e.returncode != 1:
self.fail('Execution has failed: %s' % str(e))
if __name__ == '__main__':
suite = unittest.TestLoader().loadTestsFromTestCase(TestExecConfigHelper)
unittest.TextTestRunner().run(suite) |
mayankmetha/Notilizer2 | app/src/main/java/com/mayank/notilizer2/models/ApplicationDao.java | package com.mayank.notilizer2.models;
import com.j256.ormlite.dao.Dao;
import java.sql.SQLException;
import java.util.List;
public interface ApplicationDao extends Dao<Application, String> {
public List<Application> getIgnoredApps() throws SQLException;
}
|
dannyhx/artisynth_core | src/artisynth/core/femmodels/FrameNodeNodeAttachmentTest.java | <reponame>dannyhx/artisynth_core<filename>src/artisynth/core/femmodels/FrameNodeNodeAttachmentTest.java
package artisynth.core.femmodels;
import java.util.*;
import maspack.matrix.*;
import maspack.spatialmotion.*;
import maspack.geometry.*;
import maspack.util.*;
import artisynth.core.mechmodels.*;
import artisynth.core.modelbase.*;
public class FrameNodeNodeAttachmentTest
extends DynamicAttachmentTestBase<FrameNodeNodeAttachment> {
public void computeSlavePos (VectorNd pos, FrameNodeNodeAttachment at) {
Point3d slavePos = new Point3d();
slavePos.inverseTransform (at.myFrame.getPose(), at.myNode.getPosition());
pos.set (slavePos);
}
public void computeSlaveVel (VectorNd vel, FrameNodeNodeAttachment at) {
Twist frameVel = at.myFrame.getVelocity();
RotationMatrix3d R = at.myFrame.getPose().R;
Vector3d lw = new Vector3d(); // frameNode position rotated to world
lw.transform (R, at.myFrameNode.getPosition());
Vector3d svel = new Vector3d();
svel.cross (lw, frameVel.w);
svel.add (at.myNode.getVelocity());
svel.sub (frameVel.v);
svel.inverseTransform (R);
vel.set (svel);
}
public void computeMasterForce (
VectorNd force, int idx, FrameNodeNodeAttachment at) {
RotationMatrix3d R = at.myFrame.getPose().R;
Vector3d slaveForce = at.myFrameNode.getForce();
if (idx == 0) {
Wrench frameForce = new Wrench();
frameForce.f.set (slaveForce);
frameForce.m.cross (at.myFrameNode.getPosition(), slaveForce);
frameForce.negate();
frameForce.transform (R);
force.set (frameForce);
}
else if (idx == 1) {
Vector3d nodeForce = new Vector3d();
nodeForce.transform (R, slaveForce);
force.set (nodeForce);
}
else {
throw new IllegalArgumentException (
"attachment has two masters and so idx should be 0 or 1");
}
}
public FrameNodeNodeAttachment createTestAttachment(int idx) {
Frame frame = new Frame();
FemNode3d node = new FemNode3d();
FrameNode3d frameNode = new FrameNode3d (node, frame);
return new FrameNodeNodeAttachment (frameNode, node);
}
public static void main (String[] args) {
RandomGenerator.setSeed (0x1234);
FrameNodeNodeAttachmentTest tester = new FrameNodeNodeAttachmentTest();
tester.runtest();
}
}
|
lovemomia/MomiaAdmin | src/main/java/com/momia/action/TopicGoodsAction.java | <reponame>lovemomia/MomiaAdmin
package com.momia.action;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
//import com.momia.service.AssortGoodsService;
//import com.momia.service.CrowdService;
//import com.momia.service.GoodsAssortService;
import com.momia.service.GoodsService;
//import com.momia.service.TopicCrowdService;
//import com.momia.service.TopicGoodsAssortService;
import com.momia.service.TopicGoodsService;
import com.momia.service.TopicService;
import com.momia.service.UserService;
import com.momia.until.LoginUntil;
@Controller
@RequestMapping("/topicgoods")
public class TopicGoodsAction {
@Resource
private UserService userService;
@Resource
private TopicService topicService;
//@Resource
//private CrowdService crowdService;
//@Resource
//private AssortGoodsService assortService;
@Resource
private GoodsService goodsService;
//@Resource
//private GoodsAssortService goodsAssortService;
//@Resource
//private TopicCrowdService topicCrowdService;
@Resource
private TopicGoodsService topicGoodsService;
//@Resource
//private TopicGoodsAssortService topicGoodsAssortService;
@RequestMapping("/info")
public ModelAndView mangerinfo(@RequestParam("uid") int uid,HttpServletRequest req){
Map<String, Object> context = new HashMap<String, Object>();
context.put("user", userService.findUserById(uid));
context.put("topics", topicService.findTopics(LoginUntil.two));
return new ModelAndView("topicgoods",context);
}
@RequestMapping("/operation")
public ModelAndView operation(@RequestParam("uid") int uid,@RequestParam("flag") String flag,@RequestParam("id") int id,HttpServletRequest req){
String mavStr = "";
Map<String, Object> context = new HashMap<String, Object>();
if(flag.equals("add")){
mavStr = "topicgoodsadd";
//context.put("crowds", crowdService.findCrowds());
//context.put("assorts", assortService.findLevel(assortService.findAssortments()));
context.put("nowdate", (new SimpleDateFormat("MM/dd/yyyy")).format(new Date()));
}else{
mavStr = "topicgoodsupdate";
context.put("model", topicService.findTopicById(id));
//context.put("crowds", crowdService.findCrowds(crowdService.findCrowds(), topicCrowdService.findTopicCrowds(id)));
//context.put("assorts", assortService.findAssortgoods(assortService.findAssortments(), topicGoodsAssortService.findTopicGoodsAssorts(id)));
}
context.put("user", userService.findUserById(uid));
return new ModelAndView(mavStr,context);
}
@RequestMapping("/insert")
public ModelAndView insert(@RequestParam("submitType") int submitType,@RequestParam("uid") int uid,HttpServletRequest req){
String mavStr = "";
int intadd = topicService.insert(topicService.formTopic(req, LoginUntil.one, LoginUntil.two));
//topicCrowdService.insert(req.getParameterValues("person"), intadd, LoginUntil.one);
//topicGoodsAssortService.insert(req.getParameterValues("assort"), intadd, LoginUntil.one);
Map<String, Object> context = new HashMap<String, Object>();
if(intadd > 0){
mavStr = "topicgoods";
context.put("user", userService.findUserById(uid));
context.put("topics", topicService.findTopics(LoginUntil.two));
}else{
mavStr = "topicgoodsadd";
context.put("message", LoginUntil.adderror);
}
return new ModelAndView(mavStr,context);
}
@RequestMapping("/update")
public ModelAndView update(@RequestParam("submitType") int submitType,@RequestParam("uid") int uid,@RequestParam("id") int id,HttpServletRequest req){
String mavStr = "";
int intadd = topicService.update(topicService.formTopic(req, LoginUntil.zero, LoginUntil.two));
//topicCrowdService.insert(req.getParameterValues("person"), id, LoginUntil.zero);
//topicGoodsAssortService.insert(req.getParameterValues("assort"), id, LoginUntil.zero);
Map<String, Object> context = new HashMap<String, Object>();
if(intadd > 0){
mavStr = "topicgoods";
context.put("user", userService.findUserById(uid));
context.put("topics", topicService.findTopics(LoginUntil.two));
}else{
mavStr = "topicgoodsupdate";
context.put("message", LoginUntil.updateerror);
}
return new ModelAndView(mavStr,context);
}
@RequestMapping("/delete")
public ModelAndView delete(@RequestParam("uid") int uid,@RequestParam("id") int id,HttpServletRequest req){
int intdel = topicService.delete(id);
Map<String, Object> context = new HashMap<String, Object>();
context.put("user", userService.findUserById(uid));
context.put("topics", topicService.findTopics(LoginUntil.two));
if(intdel > 0){
context.put("message", LoginUntil.delsuccess);
}else{
context.put("message", LoginUntil.delerror);
}
return new ModelAndView("topicgoods",context);
}
@RequestMapping("/oparticles")
public ModelAndView oparticles(@RequestParam("uid") int uid,@RequestParam("id") int id,HttpServletRequest req){
Map<String, Object> context = new HashMap<String, Object>();
context.put("user", userService.findUserById(uid));
context.put("model", topicService.findTopicById(id));
context.put("goodslist", goodsService.findgoods(topicGoodsService.findTopicGoods(id)));
return new ModelAndView("topgoods",context);
}
@RequestMapping("/addtoparticles")
public ModelAndView addarticles(@RequestParam("uid") int uid,@RequestParam("id") int id,HttpServletRequest req){
topicGoodsService.insert(req.getParameterValues("goods"), id, LoginUntil.one);
Map<String, Object> context = new HashMap<String, Object>();
context.put("user", userService.findUserById(uid));
context.put("model", topicService.findTopicById(id));
context.put("goodslist", goodsService.findgoods(topicGoodsService.findTopicGoods(id)));
return new ModelAndView("topgoods",context);
}
@RequestMapping("/getgoods")
public ModelAndView backarticles(@RequestParam("uid") int uid,@RequestParam("id") int id,HttpServletRequest req){
Map<String, Object> context = new HashMap<String, Object>();
context.put("user", userService.findUserById(uid));
context.put("model", topicService.findTopicById(id));
context.put("goodslist", goodsService.findgoods(goodsService.findGoods(),topicGoodsService.findTopicGoods(id)));
return new ModelAndView("tgoods",context);
}
@RequestMapping("/deletegoods")
public ModelAndView deletearticle(@RequestParam("uid") int uid,@RequestParam("id") int id,@RequestParam("gid") int gid,HttpServletRequest req){
int intdel = topicGoodsService.deletegoods(id, gid);
Map<String, Object> context = new HashMap<String, Object>();
context.put("user", userService.findUserById(uid));
context.put("model", topicService.findTopicById(id));
context.put("goodslist", goodsService.findgoods(topicGoodsService.findTopicGoods(id)));
if(intdel > 0){
context.put("message", LoginUntil.delsuccess);
}else{
context.put("message", LoginUntil.delerror);
}
return new ModelAndView("topgoods",context);
}
}
|
gaol/wildfly-transaction-client | src/main/java/org/wildfly/transaction/client/XAImporter.java | <filename>src/main/java/org/wildfly/transaction/client/XAImporter.java
/*
* JBoss, Home of Professional Open Source.
* Copyright 2016 Red Hat, Inc., and individual contributors
* as indicated by the @author tags.
*
* 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.wildfly.transaction.client;
import javax.transaction.Transaction;
import javax.transaction.xa.XAException;
import javax.transaction.xa.XAResource;
import javax.transaction.xa.Xid;
import org.wildfly.common.annotation.NotNull;
/**
* The API which must be implemented by transaction providers that support transaction inflow.
*
* @author <a href="mailto:<EMAIL>"><NAME></a>
*/
public interface XAImporter extends XARecoverable {
/**
* Import a transaction. If the transaction already exists, it should be returned, otherwise a new transaction
* should be initiated with the given timeout (in seconds).
*
* @param xid the transaction ID (must not be {@code null})
* @param timeout the remaining transaction timeout, or 0 if the default should be used
* @param doNotImport {@code true} to indicate that a non-existing transaction should not be imported, {@code false} otherwise
* @return the transaction import result, or {@code null} if (and only if) {@code doNotImport} is {@code true} and the transaction didn't exist locally
* @throws XAException if the import failed for some reason
*/
ImportResult<?> findOrImportTransaction(Xid xid, int timeout, final boolean doNotImport) throws XAException;
/**
* Find an existing transaction on this system. If no such transaction exists, {@code null} is returned. Normally
* the transaction is located only by global ID.
*
* @param xid the XID to search for (must not be {@code null})
* @return the transaction object, or {@code null} if the transaction is not known
* @throws XAException if the transaction manager failed for some reason
*/
Transaction findExistingTransaction(Xid xid) throws XAException;
/**
* Commit an imported (typically prepared) transaction.
*
* @param xid the transaction ID (must not be {@code null})
* @param onePhase {@code true} to perform prepare and commit in one operation, {@code false} otherwise
* @throws XAException if the operation fails for some reason
*/
void commit(Xid xid, boolean onePhase) throws XAException;
/**
* Forget an imported, prepared transaction.
*
* @param xid the transaction ID (must not be {@code null})
* @throws XAException if the operation fails for some reason
*/
void forget(Xid xid) throws XAException;
/**
* Initiate a recovery scan.
*
* @param flag one of {@link XAResource#TMSTARTRSCAN}, {@link XAResource#TMNOFLAGS}, or {@link XAResource#TMENDRSCAN}
* @param parentName the name of the node to recover on behalf of, or {@code null} for all
* @return the array of recovered XIDs (may be {@link SimpleXid#NO_XIDS}, must not be {@code null})
* @throws XAException if the operation fails for some reason
*/
@NotNull
Xid[] recover(int flag, String parentName) throws XAException;
}
|
alanktwong/slow-light | proxy/src/main/java/com/tacitknowledge/slowlight/proxyserver/handler/AbstractChannelHandler.java | <reponame>alanktwong/slow-light<gh_stars>1-10
package com.tacitknowledge.slowlight.proxyserver.handler;
import io.netty.buffer.Unpooled;
import io.netty.channel.Channel;
import io.netty.channel.ChannelDuplexHandler;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.util.HashedWheelTimer;
import io.netty.util.Timeout;
import io.netty.util.Timer;
import io.netty.util.TimerTask;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.apache.commons.configuration.AbstractConfiguration;
import org.apache.commons.configuration.MapConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.tacitknowledge.slowlight.proxyserver.config.BehaviorFunctionConfig;
import com.tacitknowledge.slowlight.proxyserver.config.HandlerConfig;
import com.tacitknowledge.slowlight.proxyserver.handler.behavior.BehaviorFunction;
/**
* Implementation of slow-light abstract handler.
* Use this abstract handler as extension point for all existing and future handlers.
*
* @author <NAME> (<EMAIL>)
*/
@ChannelHandler.Sharable
public abstract class AbstractChannelHandler extends ChannelDuplexHandler
{
public static final String TIME_FRAME = "timeFrame";
public static final int ZERO_TIME_FRAME = 0;
private static final Logger LOG = LoggerFactory.getLogger(AbstractChannelHandler.class);
protected AbstractConfiguration handlerParams = new MapConfiguration(new HashMap<String, Object>());
protected HandlerConfig handlerConfig;
protected Map<String, BehaviorFunction> behaviorFunctions = new HashMap<String, BehaviorFunction>();
public AbstractChannelHandler(final HandlerConfig handlerConfig)
{
this.handlerConfig = handlerConfig;
initBehaviorFunctions();
initTimeFrameTask();
registerHandlerConfig();
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception
{
LOG.error("Error occurred while executing channel handler", cause);
closeOnFlush(ctx.channel());
}
/**
* Flush all pending messages and then close the channel.
*
* @param channel the channel to be actioned
*/
public void closeOnFlush(Channel channel)
{
if (channel != null && channel.isActive())
{
channel.writeAndFlush(Unpooled.EMPTY_BUFFER).addListener(ChannelFutureListener.CLOSE);
}
}
/**
* Gets the current handler time frame configuration.
*
* @return time frame configuration (in seconds)
*/
protected long getTimeFrame()
{
final String timeFrameProp = handlerConfig.getParam(TIME_FRAME, false);
return timeFrameProp == null ? ZERO_TIME_FRAME : Long.parseLong(timeFrameProp);
}
/**
* This callback method gets invoked per each time frame.
* Use it to do any handler time dependent changes (e.g. update handler parameters, expose metrics, etc.)
*/
protected void timerCallback()
{
// EMPTY
}
/**
* Override this method in a concrete handler to lookup, transform and populate all required parameters.
*/
protected void populateHandlerParams()
{
// EMPTY
}
/**
* Cycles through all defined behaviour function {@link com.tacitknowledge.slowlight.proxyserver.handler.behavior.IntervalBehaviorFunction}
* and evaluates handler parameters based on function result.
*/
protected void evaluateBehaviorFunctions()
{
for (final BehaviorFunctionConfig behaviorFunctionConfig : handlerConfig.getBehaviorFunctions())
{
final BehaviorFunction behaviorFunction = behaviorFunctions.get(behaviorFunctionConfig.getId());
if (behaviorFunction.shouldEvaluate(behaviorFunctionConfig)) {
handlerParams.setProperty(
behaviorFunctionConfig.getParamName(), behaviorFunction
.evaluate(behaviorFunctionConfig.getParams()));
}
}
}
private void initTimeFrameTask()
{
new TimeFrameTask().start();
}
private void registerHandlerConfig()
{
populateHandlerParams();
if (!handlerParams.isEmpty())
{
HandlerConfigManager.registerConfigMBean(handlerConfig, handlerParams);
}
}
private void initBehaviorFunctions()
{
for (final BehaviorFunctionConfig behaviorFunctionConfig : handlerConfig.getBehaviorFunctions())
{
if (!handlerConfig.getParams().containsKey(behaviorFunctionConfig.getParamName()))
{
throw new IllegalArgumentException("Cannot map behavior function to specified handler param ["
+ behaviorFunctionConfig.getParamName() + "] because it doesn't exists ");
}
behaviorFunctions.put(behaviorFunctionConfig.getId(), createBehaviorFunction(behaviorFunctionConfig));
}
}
private BehaviorFunction createBehaviorFunction(final BehaviorFunctionConfig config)
{
try
{
final Class<?> behaviorFunctionClass = Class.forName(config.getType());
return (BehaviorFunction) behaviorFunctionClass.getConstructor()
.newInstance();
}
catch (Exception e)
{
throw new IllegalArgumentException("Cannot create behavior function by specified name [" + config.getType() + "]", e);
}
}
public HandlerConfig getHandlerConfig()
{
return handlerConfig;
}
/**
* This class drives the handler time frame functionality.
*/
protected class TimeFrameTask implements TimerTask
{
protected Timer timer;
public void start()
{
if (getTimeFrame() > ZERO_TIME_FRAME)
{
if (timer == null)
{
timer = new HashedWheelTimer(1, TimeUnit.SECONDS);
}
schedule();
}
}
@Override
public void run(Timeout timeout) throws Exception
{
evaluateBehaviorFunctions();
timerCallback();
schedule();
}
protected void schedule()
{
timer.newTimeout(this, getTimeFrame(), TimeUnit.SECONDS);
}
}
}
|
TANGKUO/joice | joice-web/src/main/java/org/joice/mvc/dao/SysRolesPermissionsMapper.java | package org.joice.mvc.dao;
import org.apache.ibatis.annotations.Param;
import org.joice.mvc.dao.domain.SysRolesPermissions;
public interface SysRolesPermissionsMapper {
int deleteByPrimaryKey(@Param("roleId") Long roleId, @Param("permissionId") Long permissionId);
int insert(SysRolesPermissions record);
int insertSelective(SysRolesPermissions record);
} |
samuelyuan/OpenBiohazard2 | render/surface2d.go | package render
import (
"github.com/go-gl/gl/v4.1-core/gl"
"github.com/samuelyuan/openbiohazard2/geometry"
)
const (
IMAGE_SURFACE_WIDTH = 320
IMAGE_SURFACE_HEIGHT = 240
)
var (
screenImage = NewImage16Bit(0, 0, IMAGE_SURFACE_WIDTH, IMAGE_SURFACE_HEIGHT)
)
type Surface2D struct {
TextureId uint32 // texture id in OpenGL
VertexBuffer []float32 // 3 elements for x,y,z and 2 elements for texture u,v
VertexArrayObject uint32
VertexBufferObject uint32
}
func NewSurface2D() *Surface2D {
var vao uint32
gl.GenVertexArrays(1, &vao)
var vbo uint32
gl.GenBuffers(1, &vbo)
imagePixels := make([]uint16, IMAGE_SURFACE_WIDTH*IMAGE_SURFACE_HEIGHT)
return &Surface2D{
TextureId: BuildTexture(imagePixels, IMAGE_SURFACE_WIDTH, IMAGE_SURFACE_HEIGHT),
VertexBuffer: buildSurface2DVertexBuffer(),
VertexArrayObject: vao,
VertexBufferObject: vbo,
}
}
func (renderDef *RenderDef) RenderSolidVideoBuffer() {
gl.Clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT)
programShader := renderDef.ProgramShader
// Activate shader
gl.UseProgram(programShader)
renderGameStateUniform := gl.GetUniformLocation(programShader, gl.Str("gameState\x00"))
gl.Uniform1i(renderGameStateUniform, RENDER_GAME_STATE_BACKGROUND_SOLID)
renderDef.RenderSurface2D(renderDef.VideoBuffer)
}
func (renderDef *RenderDef) RenderTransparentVideoBuffer() {
gl.Clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT)
programShader := renderDef.ProgramShader
// Activate shader
gl.UseProgram(programShader)
renderGameStateUniform := gl.GetUniformLocation(programShader, gl.Str("gameState\x00"))
gl.Uniform1i(renderGameStateUniform, RENDER_GAME_STATE_BACKGROUND_TRANSPARENT)
renderDef.RenderSurface2D(renderDef.VideoBuffer)
}
func (r *RenderDef) RenderSurface2D(surface *Surface2D) {
// Skip
if surface == nil {
return
}
vertexBuffer := surface.VertexBuffer
if len(vertexBuffer) == 0 {
return
}
programShader := r.ProgramShader
floatSize := 4
// 3 floats for vertex, 2 floats for texture UV
stride := int32(5 * floatSize)
vao := surface.VertexArrayObject
gl.BindVertexArray(vao)
vbo := surface.VertexBufferObject
gl.BindBuffer(gl.ARRAY_BUFFER, vbo)
gl.BufferData(gl.ARRAY_BUFFER, len(vertexBuffer)*floatSize, gl.Ptr(vertexBuffer), gl.STATIC_DRAW)
// Position attribute
gl.VertexAttribPointer(0, 3, gl.FLOAT, false, stride, gl.PtrOffset(0))
gl.EnableVertexAttribArray(0)
// Texture
gl.VertexAttribPointer(1, 2, gl.FLOAT, false, stride, gl.PtrOffset(3*floatSize))
gl.EnableVertexAttribArray(1)
diffuseUniform := gl.GetUniformLocation(programShader, gl.Str("diffuse\x00"))
gl.Uniform1i(diffuseUniform, 0)
gl.ActiveTexture(gl.TEXTURE0)
gl.BindTexture(gl.TEXTURE_2D, surface.TextureId)
gl.DrawArrays(gl.TRIANGLES, 0, int32(len(vertexBuffer)/5))
// Cleanup
gl.DisableVertexAttribArray(0)
gl.DisableVertexAttribArray(1)
}
func (surface *Surface2D) UpdateSurface(newImage *Image16Bit) {
UpdateTexture(surface.TextureId, newImage.GetPixelsForRendering(), int32(newImage.GetWidth()), int32(newImage.GetHeight()))
}
func buildSurface2DVertexBuffer() []float32 {
z := float32(0.999)
vertices := [4][]float32{
{-1.0, 1.0, z},
{-1.0, -1.0, z},
{1.0, -1.0, z},
{1.0, 1.0, z},
}
uvs := [4][]float32{
{0.0, 0.0},
{0.0, 1.0},
{1.0, 1.0},
{1.0, 0.0},
}
return geometry.NewTexturedRectangle(vertices, uvs).VertexBuffer
}
|
hpi-schul-cloud/klassi-js | page-objects/pages/coursePages/CRSSViewTopicPage.js | <filename>page-objects/pages/coursePages/CRSSViewTopicPage.js
/*[url/courses]/[courseId]/topics/[topicId]]*/ |
nyinyiz/The-Houzz | TheHouzz/app/src/main/java/com/nyinyi/nw/thehouzz/activities/ViewProductActivity.java | <gh_stars>0
package com.nyinyi.nw.thehouzz.activities;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import com.nyinyi.nw.thehouzz.R;
import butterknife.BindView;
/**
* Created by User on 12/16/2017.
*/
public class ViewProductActivity extends BaseActivity {
@BindView(R.id.toolbar)
Toolbar toolbar;
public static Intent newIntent(Context context) {
Intent intent = new Intent(context, ViewProductActivity.class);
return intent;
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_view_product);
setSupportActionBar(toolbar);
if (getSupportActionBar() != null) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_share_and_add_to_cart, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
onBackPressed();
break;
case R.id.action_share:
return true;
case R.id.action_add_to_cart:
return true;
}
return super.onOptionsItemSelected(item);
}
}
|
lastweek/source-freebsd | src/sys/dev/veriexec/verified_exec.c | <gh_stars>0
/*
* $FreeBSD$
*
* Copyright (c) 2011-2013, 2015, 2019 Juniper Networks, 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:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/buf.h>
#include <sys/conf.h>
#include <sys/errno.h>
#include <sys/fcntl.h>
#include <sys/file.h>
#include <sys/filedesc.h>
#include <sys/ioccom.h>
#include <sys/jail.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mdioctl.h>
#include <sys/mount.h>
#include <sys/mutex.h>
#include <sys/namei.h>
#include <sys/priv.h>
#include <sys/proc.h>
#include <sys/queue.h>
#include <sys/vnode.h>
#include <security/mac_veriexec/mac_veriexec.h>
#include <security/mac_veriexec/mac_veriexec_internal.h>
#include "veriexec_ioctl.h"
/*
* We need a mutex while updating lists etc.
*/
extern struct mtx ve_mutex;
/*
* Handle the ioctl for the device
*/
static int
verifiedexecioctl(struct cdev *dev __unused, u_long cmd, caddr_t data,
int flags, struct thread *td)
{
struct nameidata nid;
struct vattr vattr;
struct verified_exec_label_params *lparams;
struct verified_exec_params *params;
int error = 0;
/*
* These commands are considered safe requests for anyone who has
* permission to access to device node.
*/
switch (cmd) {
case VERIEXEC_GETSTATE:
{
int *ip = (int *)data;
if (ip)
*ip = mac_veriexec_get_state();
else
error = EINVAL;
return (error);
}
break;
default:
break;
}
/*
* Anything beyond this point is considered dangerous, so we need to
* only allow processes that have kmem write privs to do them.
*
* MAC/veriexec will grant kmem write privs to "trusted" processes.
*/
error = priv_check(td, PRIV_KMEM_WRITE);
if (error)
return (error);
lparams = (struct verified_exec_label_params *)data;
if (cmd == VERIEXEC_LABEL_LOAD)
params = &lparams->params;
else
params = (struct verified_exec_params *)data;
switch (cmd) {
case VERIEXEC_ACTIVE:
mtx_lock(&ve_mutex);
if (mac_veriexec_in_state(VERIEXEC_STATE_LOADED))
mac_veriexec_set_state(VERIEXEC_STATE_ACTIVE);
else
error = EINVAL;
mtx_unlock(&ve_mutex);
break;
case VERIEXEC_DEBUG_ON:
mtx_lock(&ve_mutex);
{
int *ip = (int *)data;
mac_veriexec_debug++;
if (ip) {
if (*ip > 0)
mac_veriexec_debug = *ip;
*ip = mac_veriexec_debug;
}
}
mtx_unlock(&ve_mutex);
break;
case VERIEXEC_DEBUG_OFF:
mac_veriexec_debug = 0;
break;
case VERIEXEC_ENFORCE:
mtx_lock(&ve_mutex);
if (mac_veriexec_in_state(VERIEXEC_STATE_LOADED))
mac_veriexec_set_state(VERIEXEC_STATE_ACTIVE |
VERIEXEC_STATE_ENFORCE);
else
error = EINVAL;
mtx_unlock(&ve_mutex);
break;
case VERIEXEC_GETVERSION:
{
int *ip = (int *)data;
if (ip)
*ip = MAC_VERIEXEC_VERSION;
else
error = EINVAL;
}
break;
case VERIEXEC_LOCK:
mtx_lock(&ve_mutex);
mac_veriexec_set_state(VERIEXEC_STATE_LOCKED);
mtx_unlock(&ve_mutex);
break;
case VERIEXEC_LOAD:
if (prison0.pr_securelevel > 0)
return (EPERM); /* no updates when secure */
/* FALLTHROUGH */
case VERIEXEC_LABEL_LOAD:
case VERIEXEC_SIGNED_LOAD:
/*
* If we use a loader that will only use a
* digitally signed hash list - which it verifies.
* We can load fingerprints provided veriexec is not locked.
*/
if (prison0.pr_securelevel > 0 &&
!mac_veriexec_in_state(VERIEXEC_STATE_LOADED)) {
/*
* If securelevel has been raised and we
* do not have any fingerprints loaded,
* it would dangerous to do so now.
*/
return (EPERM);
}
if (mac_veriexec_in_state(VERIEXEC_STATE_LOCKED))
error = EPERM;
else {
size_t labellen = 0;
int flags = FREAD;
int override = (cmd != VERIEXEC_LOAD);
/*
* Get the attributes for the file name passed
* stash the file's device id and inode number
* along with it's fingerprint in a list for
* exec to use later.
*/
/*
* FreeBSD seems to copy the args to kernel space
*/
NDINIT(&nid, LOOKUP, FOLLOW, UIO_SYSSPACE,
params->file, td);
if ((error = vn_open(&nid, &flags, 0, NULL)) != 0)
return (error);
error = VOP_GETATTR(nid.ni_vp, &vattr, td->td_ucred);
if (error != 0) {
mac_veriexec_set_fingerprint_status(nid.ni_vp,
FINGERPRINT_INVALID);
VOP_UNLOCK(nid.ni_vp);
(void) vn_close(nid.ni_vp, FREAD, td->td_ucred,
td);
return (error);
}
if (override) {
/*
* If the file is on a "verified" filesystem
* someone may be playing games.
*/
if ((nid.ni_vp->v_mount->mnt_flag &
MNT_VERIFIED) != 0)
override = 0;
}
/*
* invalidate the node fingerprint status
* which will have been set in the vn_open
* and would always be FINGERPRINT_NOTFOUND
*/
mac_veriexec_set_fingerprint_status(nid.ni_vp,
FINGERPRINT_INVALID);
VOP_UNLOCK(nid.ni_vp);
(void) vn_close(nid.ni_vp, FREAD, td->td_ucred, td);
if (params->flags & VERIEXEC_LABEL)
labellen = strnlen(lparams->label,
sizeof(lparams->label) - 1) + 1;
mtx_lock(&ve_mutex);
error = mac_veriexec_metadata_add_file(
((params->flags & VERIEXEC_FILE) != 0),
vattr.va_fsid, vattr.va_fileid, vattr.va_gen,
params->fingerprint,
(params->flags & VERIEXEC_LABEL) ?
lparams->label : NULL, labellen,
params->flags, params->fp_type, override);
mac_veriexec_set_state(VERIEXEC_STATE_LOADED);
mtx_unlock(&ve_mutex);
}
break;
default:
error = ENODEV;
}
return (error);
}
struct cdevsw veriexec_cdevsw = {
.d_version = D_VERSION,
.d_ioctl = verifiedexecioctl,
.d_name = "veriexec",
};
static void
veriexec_drvinit(void *unused __unused)
{
make_dev(&veriexec_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "veriexec");
}
SYSINIT(veriexec, SI_SUB_PSEUDO, SI_ORDER_ANY, veriexec_drvinit, NULL);
MODULE_DEPEND(veriexec, mac_veriexec, 1, 1, 1);
|
IGalat/libnine | src/main/java/io/github/phantamanta44/libnine/block/state/VirtualState.java | package io.github.phantamanta44.libnine.block.state;
import com.google.common.collect.Lists;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import javax.annotation.Nullable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@SuppressWarnings("rawtypes")
public class VirtualState {
private final Map<IProperty<?>, Comparable<?>> props;
@Nullable
private Integer hashCode = null;
private VirtualState() {
this.props = new HashMap<>();
}
@SuppressWarnings("unchecked")
public Map<String, String> getSerializedProperties() {
Map<String, String> result = new HashMap<>();
props.forEach((p, v) -> result.put(p.getName(), ((IProperty)p).getName(v)));
return result;
}
@SuppressWarnings("unchecked")
public <T extends Comparable<T>> T get(IProperty<T> prop) {
return (T)props.get(prop);
}
@SuppressWarnings("EqualsBetweenInconvertibleTypes")
public boolean matches(IBlockState state) {
for (Map.Entry<IProperty<?>, Comparable<?>> prop : props.entrySet()) {
if (!state.getValue(prop.getKey()).equals(prop.getValue())) return false;
}
return true;
}
@Override
public int hashCode() {
return hashCode == null ? (hashCode = props.hashCode()) : hashCode;
}
@Override
public boolean equals(Object obj) {
return obj instanceof VirtualState && props.equals(((VirtualState)obj).props);
}
@SuppressWarnings({ "unchecked", "RedundantCast" })
public IBlockState synthesize(BlockStateContainer container) {
IBlockState state = container.getBaseState();
for (Map.Entry<IProperty<?>, Comparable<?>> prop : props.entrySet()) {
state = state.withProperty((IProperty)prop.getKey(), (Comparable)prop.getValue());
}
return state;
}
private Stream<VirtualState> cartesian(IProperty<?> prop) {
return prop.getAllowedValues().stream().map(v -> compose(prop, v));
}
private VirtualState compose(IProperty<?> prop, Comparable value) {
VirtualState result = new VirtualState();
result.props.putAll(props);
result.props.put(prop, value);
return result;
}
private VirtualState compose(VirtualState other) {
VirtualState result = new VirtualState();
result.props.putAll(props);
result.props.putAll(other.props);
return result;
}
public static List<VirtualState> cartesian(List<IProperty<?>> props) {
return props.stream().<List<VirtualState>>reduce(Lists.newArrayList(new VirtualState()),
(l, p) -> l.stream().flatMap(s -> s.cartesian(p)).collect(Collectors.toList()),
(a, b) -> a.stream().flatMap(s -> b.stream().map(s::compose)).collect(Collectors.toList()));
}
}
|
phatblat/macOSPrivateFrameworks | PrivateFrameworks/HomeKitDaemon/AWDHomeKitEventTriggerEvent.h | //
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.
//
#import "PBCodable.h"
#import "NSCopying.h"
@class AWDHomeKitCalendarEvent, AWDHomeKitCharacteristicEvent, AWDHomeKitCharacteristicThresholdEvent, AWDHomeKitDurationEvent, AWDHomeKitLocationEvent, AWDHomeKitPresenceEvent, AWDHomeKitSignificantTimeEvent;
@interface AWDHomeKitEventTriggerEvent : PBCodable <NSCopying>
{
AWDHomeKitCalendarEvent *_calendarEvent;
AWDHomeKitCharacteristicEvent *_charEvent;
AWDHomeKitCharacteristicThresholdEvent *_charThresholdEvent;
AWDHomeKitDurationEvent *_durationEvent;
AWDHomeKitLocationEvent *_locationEvent;
AWDHomeKitPresenceEvent *_presenceEvent;
AWDHomeKitSignificantTimeEvent *_significantTimeEvent;
AWDHomeKitCharacteristicThresholdEvent *_thresholdEvent;
BOOL _endEvent;
struct {
unsigned int endEvent:1;
} _has;
}
@property(retain, nonatomic) AWDHomeKitDurationEvent *durationEvent; // @synthesize durationEvent=_durationEvent;
@property(retain, nonatomic) AWDHomeKitPresenceEvent *presenceEvent; // @synthesize presenceEvent=_presenceEvent;
@property(retain, nonatomic) AWDHomeKitCharacteristicThresholdEvent *thresholdEvent; // @synthesize thresholdEvent=_thresholdEvent;
@property(retain, nonatomic) AWDHomeKitSignificantTimeEvent *significantTimeEvent; // @synthesize significantTimeEvent=_significantTimeEvent;
@property(retain, nonatomic) AWDHomeKitCalendarEvent *calendarEvent; // @synthesize calendarEvent=_calendarEvent;
@property(retain, nonatomic) AWDHomeKitCharacteristicThresholdEvent *charThresholdEvent; // @synthesize charThresholdEvent=_charThresholdEvent;
@property(retain, nonatomic) AWDHomeKitLocationEvent *locationEvent; // @synthesize locationEvent=_locationEvent;
@property(retain, nonatomic) AWDHomeKitCharacteristicEvent *charEvent; // @synthesize charEvent=_charEvent;
@property(nonatomic) BOOL endEvent; // @synthesize endEvent=_endEvent;
- (void).cxx_destruct;
- (void)mergeFrom:(id)arg1;
- (unsigned long long)hash;
- (BOOL)isEqual:(id)arg1;
- (id)copyWithZone:(struct _NSZone *)arg1;
- (void)copyTo:(id)arg1;
- (void)writeTo:(id)arg1;
- (BOOL)readFrom:(id)arg1;
- (id)dictionaryRepresentation;
- (id)description;
@property(readonly, nonatomic) BOOL hasDurationEvent;
@property(readonly, nonatomic) BOOL hasPresenceEvent;
@property(readonly, nonatomic) BOOL hasThresholdEvent;
@property(readonly, nonatomic) BOOL hasSignificantTimeEvent;
@property(readonly, nonatomic) BOOL hasCalendarEvent;
@property(readonly, nonatomic) BOOL hasCharThresholdEvent;
@property(readonly, nonatomic) BOOL hasLocationEvent;
@property(readonly, nonatomic) BOOL hasCharEvent;
@property(nonatomic) BOOL hasEndEvent;
@end
|
alpano-unibz/ontop | client/protege/src/main/java/it/unibz/inf/ontop/protege/gui/component/PropertyMappingPanel.java | package it.unibz.inf.ontop.protege.gui.component;
/*
* #%L
* ontop-protege
* %%
* Copyright (C) 2009 - 2013 KRDB Research Centre. Free University of Bozen Bolzano.
* %%
* 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.
* #L%
*/
import it.unibz.inf.ontop.model.term.functionsymbol.FunctionSymbol;
import it.unibz.inf.ontop.spec.mapping.PrefixManager;
import it.unibz.inf.ontop.protege.core.OBDAModel;
import it.unibz.inf.ontop.protege.gui.IconLoader;
import it.unibz.inf.ontop.protege.gui.MapItem;
import it.unibz.inf.ontop.protege.gui.PredicateItem;
import it.unibz.inf.ontop.protege.gui.action.EditableCellFocusAction;
import org.apache.commons.rdf.api.IRI;
import javax.swing.*;
import javax.swing.border.Border;
import javax.swing.plaf.metal.MetalComboBoxButton;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableCellEditor;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.EventObject;
import java.util.List;
import java.util.Vector;
public class PropertyMappingPanel extends javax.swing.JPanel {
private static final long serialVersionUID = 1L;
private final OBDAModel obdaModel;
private PrefixManager prefixManager;
private boolean isPredicatePropertyValid = false;
private static final Color SELECTION_BACKGROUND = UIManager.getDefaults().getColor("Table.selectionBackground");
private static final Color NORMAL_BACKGROUND = new Color(240, 245, 240);
private static final Border EDIT_BORDER = BorderFactory.createCompoundBorder(
BorderFactory.createCompoundBorder(
BorderFactory.createEmptyBorder(1, 3, 1, 3),
BorderFactory.createLineBorder(new Color(0, 0, 0), 2)),
BorderFactory.createEmptyBorder(4, 4, 4, 4));
private static final Border NORMAL_BORDER = BorderFactory.createCompoundBorder(
BorderFactory.createCompoundBorder(
BorderFactory.createEmptyBorder(1, 3, 1, 3),
BorderFactory.createLineBorder(new Color(192, 192, 192), 1)),
BorderFactory.createEmptyBorder(5, 5, 5, 5));
private static final Font DEFAULT_FONT = new Font("Dialog", Font.PLAIN, 14);
private static Color DEFAULT_TEXTFIELD_BACKGROUND = UIManager.getDefaults().getColor("TextField.background");
private static Color ERROR_TEXTFIELD_BACKGROUND = new Color(255, 143, 143);
public PropertyMappingPanel(OBDAModel obdaModel) {
this.obdaModel = obdaModel;
prefixManager = obdaModel.getMutablePrefixManager();
initComponents();
}
public List<MapItem> getPredicateObjectMapsList() {
DefaultTableModel propertyListModel = (DefaultTableModel) lstProperties.getModel();
int column = 0; // it's a single column table
int totalRow = propertyListModel.getRowCount();
ArrayList<MapItem> predicateObjectMapList = new ArrayList<MapItem>();
for (int row = 0; row < totalRow; row++) {
predicateObjectMapList.add((MapItem) propertyListModel.getValueAt(row, column));
}
return predicateObjectMapList;
}
public boolean isEmpty() {
return getPredicateObjectMapsList().isEmpty();
}
public boolean isEditing() {
return lstProperties.isEditing();
}
public boolean stopCellEditing() {
return lstProperties.getCellEditor().stopCellEditing();
}
public void clear() {
cboPropertyAutoSuggest.setSelectedIndex(-1);
((DefaultTableModel) lstProperties.getModel()).setRowCount(0);
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed"
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
popMenu = new javax.swing.JPopupMenu();
menuDelete = new javax.swing.JMenuItem();
pnlAddProperty = new javax.swing.JPanel();
cmdAdd = new javax.swing.JButton();
pnlPropertyMapping = new javax.swing.JPanel();
scrPropertyList = new javax.swing.JScrollPane();
lstProperties = new javax.swing.JTable();
lblCurrentPropertyMapping = new javax.swing.JLabel();
menuDelete.setText("Delete mapping");
menuDelete.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuDeleteActionPerformed(evt);
}
});
popMenu.add(menuDelete);
setAlignmentX(5.0F);
setAlignmentY(5.0F);
setFont(new java.awt.Font("Arial", 0, 18)); // NOI18N
setMinimumSize(new java.awt.Dimension(280, 500));
setPreferredSize(new java.awt.Dimension(280, 500));
setLayout(new java.awt.BorderLayout());
pnlAddProperty.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 3, 0));
pnlAddProperty.setLayout(new java.awt.BorderLayout(3, 0));
Vector<Object> v = new Vector<Object>();
for (IRI dp : obdaModel.getCurrentVocabulary().dataProperties()) {
v.addElement(new PredicateItem(dp, PredicateItem.PredicateType.DATA_PROPERTY, prefixManager));
}
for (IRI op : obdaModel.getCurrentVocabulary().objectProperties()) {
v.addElement(new PredicateItem(op, PredicateItem.PredicateType.OBJECT_PROPERTY, prefixManager));
}
cboPropertyAutoSuggest = new AutoSuggestComboBox(v);
cboPropertyAutoSuggest.setRenderer(new PropertyListCellRenderer());
cboPropertyAutoSuggest.setMinimumSize(new java.awt.Dimension(195, 23));
cboPropertyAutoSuggest.setPreferredSize(new java.awt.Dimension(195, 23));
JTextField txtComboBoxEditor = (JTextField) cboPropertyAutoSuggest.getEditor().getEditorComponent();
txtComboBoxEditor.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
cboPropertyAutoSuggestKeyPressed(evt);
}
});
pnlAddProperty.add(cboPropertyAutoSuggest);
cmdAdd.setBorder(javax.swing.BorderFactory.createEtchedBorder());
cmdAdd.setContentAreaFilled(false);
cmdAdd.setFocusable(false);
cmdAdd.setMaximumSize(new java.awt.Dimension(23, 23));
cmdAdd.setMinimumSize(new java.awt.Dimension(23, 23));
cmdAdd.setPreferredSize(new java.awt.Dimension(23, 23));
cmdAdd.setIcon(IconLoader.getImageIcon("images/plus.png"));
cmdAdd.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdAddActionPerformed(evt);
}
});
pnlAddProperty.add(cmdAdd, java.awt.BorderLayout.EAST);
add(pnlAddProperty, java.awt.BorderLayout.PAGE_START);
pnlPropertyMapping.setLayout(new java.awt.BorderLayout());
lstProperties.setModel(new DefaultTableModel(0, 1));
lstProperties.setCellSelectionEnabled(true);
lstProperties.setRowHeight(65);
lstProperties.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
lstProperties.setTableHeader(null);
lstProperties.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
lstPropertiesMousePressed(evt);
}
public void mouseReleased(java.awt.event.MouseEvent evt) {
lstPropertiesMouseReleased(evt);
}
});
lstProperties.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
lstPropertiesKeyPressed(evt);
}
});
new EditableCellFocusAction(lstProperties, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0));
new EditableCellFocusAction(lstProperties, KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0));
scrPropertyList.setViewportView(lstProperties);
pnlPropertyMapping.add(scrPropertyList, java.awt.BorderLayout.CENTER);
lblCurrentPropertyMapping.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
lblCurrentPropertyMapping.setForeground(new java.awt.Color(53, 113, 163));
lblCurrentPropertyMapping.setText("Current property mappings:");
lblCurrentPropertyMapping.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 2, 2, 2));
pnlPropertyMapping.add(lblCurrentPropertyMapping, java.awt.BorderLayout.NORTH);
add(pnlPropertyMapping, java.awt.BorderLayout.CENTER);
}// </editor-fold>//GEN-END:initComponents
private void menuDeleteActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_menuDeleteActionPerformed
deleteMappingItem();
}// GEN-LAST:event_menuDeleteActionPerformed
private void lstPropertiesMousePressed(java.awt.event.MouseEvent evt) {// GEN-FIRST:event_lstPropertiesMousePressed
showPopup(evt);
}// GEN-LAST:event_lstPropertiesMousePressed
private void lstPropertiesMouseReleased(java.awt.event.MouseEvent evt) {// GEN-FIRST:event_lstPropertiesMouseReleased
showPopup(evt);
}// GEN-LAST:event_lstPropertiesMouseReleased
private void lstPropertiesKeyPressed(java.awt.event.KeyEvent evt) {// GEN-FIRST:event_lstPropertiesKeyPressed
int code = evt.getKeyCode();
if (code == KeyEvent.VK_DELETE) {
deleteMappingItem();
}
}// GEN-LAST:event_lstPropertiesKeyPressed
private void cmdAddActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_cmdAddActionPerformed
Object item = cboPropertyAutoSuggest.getSelectedItem();
addPredicateProperty(item);
validatePredicateProperty();
}// GEN-LAST:event_cmdAddActionPerformed
private void showPopup(MouseEvent evt) {
if (evt.isPopupTrigger()) {
popMenu.show(evt.getComponent(), evt.getX(), evt.getY());
}
}
private void deleteMappingItem() {
TableCellEditor editor = lstProperties.getCellEditor();
if (editor != null) {
editor.stopCellEditing();
}
int index = lstProperties.getSelectedRow();
if (index != -1) {
((DefaultTableModel) lstProperties.getModel()).removeRow(index);
}
}
private void cboPropertyAutoSuggestKeyPressed(KeyEvent evt) {
int code = evt.getKeyCode();
if (code == KeyEvent.VK_ESCAPE) {
cboPropertyAutoSuggest.setSelectedIndex(-1);
} else if (code == KeyEvent.VK_ENTER) {
Object item = cboPropertyAutoSuggest.getSelectedItem();
addPredicateProperty(item);
validatePredicateProperty();
}
}
private void addPredicateProperty(Object item) {
if (item instanceof PredicateItem) {
PredicateItem selectedItem = (PredicateItem) item;
addRow(selectedItem);
isPredicatePropertyValid = true;
} else {
isPredicatePropertyValid = false;
}
}
private void addRow(PredicateItem selectedItem) {
MapItem predicateObjectMap = new MapItem(selectedItem);
if (selectedItem.isObjectPropertyPredicate()) {
predicateObjectMap.setTargetMapping(defaultUriTemplate());
}
// Insert the selected item from the combo box to the table as a new table cell
MapItem[] row = new MapItem[1];
row[0] = predicateObjectMap;
((DefaultTableModel) lstProperties.getModel()).addRow(row);
// Define for each added table cell a custom renderer and editor
TableColumn col = lstProperties.getColumnModel().getColumn(0);
// Add custom cell renderer
col.setCellRenderer(new PropertyItemRenderer());
// Add custom cell editor
PropertyItemEditor editor = new PropertyItemEditor();
editor.addCellEditorListener(lstProperties);
col.setCellEditor(editor);
}
private String defaultUriTemplate() {
return String.format("%s", getDefaultNamespace());
}
private String getDefaultNamespace() {
String defaultNamespace = prefixManager.getDefaultPrefix();
return prefixManager.getShortForm(defaultNamespace, false);
}
//
// Methods for validation
//
private void validatePredicateProperty() {
if (isPredicatePropertyValid) {
setNormalBackground(cboPropertyAutoSuggest);
} else {
setErrorBackground(cboPropertyAutoSuggest);
}
}
//
// Methods for GUI changes
//
private void setNormalBackground(JComboBox comboBox) {
JTextField text = ((JTextField) comboBox.getEditor().getEditorComponent());
text.setBackground(DEFAULT_TEXTFIELD_BACKGROUND);
}
private void setErrorBackground(JComboBox comboBox) {
JTextField text = ((JTextField) comboBox.getEditor().getEditorComponent());
text.setBackground(ERROR_TEXTFIELD_BACKGROUND);
Component[] comp = comboBox.getComponents();
for (int i = 0; i < comp.length; i++) {// hack valid only for Metal L&F
if (comp[i] instanceof MetalComboBoxButton) {
MetalComboBoxButton coloredArrowsButton = (MetalComboBoxButton) comp[i];
coloredArrowsButton.setBackground(null);
break;
}
}
comboBox.requestFocus();
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton cmdAdd;
private javax.swing.JLabel lblCurrentPropertyMapping;
private javax.swing.JTable lstProperties;
private javax.swing.JMenuItem menuDelete;
private javax.swing.JPanel pnlAddProperty;
private AutoSuggestComboBox cboPropertyAutoSuggest;
private javax.swing.JPanel pnlPropertyMapping;
private javax.swing.JPopupMenu popMenu;
private javax.swing.JScrollPane scrPropertyList;
// End of variables declaration//GEN-END:variables
/**
* A renderer class to draw the property mapping item in the GUI panel.
*/
class PropertyItemRenderer extends JPanel implements TableCellRenderer {
private static final long serialVersionUID = 1L;
private JPanel pnlPropertyName;
private JPanel pnlPropertyUriTemplate;
private JLabel lblPropertyName;
private DataTypeComboBox cboDataTypes;
private JLabel lblMapIcon;
private JTextField txtPropertyTargetMap;
public PropertyItemRenderer() {
initComponents();
}
private void initComponents() {
setBackground(NORMAL_BACKGROUND);
setLayout(new BorderLayout(0, 2));
setBorder(NORMAL_BORDER);
setFocusable(false);
pnlPropertyName = new JPanel();
pnlPropertyUriTemplate = new JPanel();
lblPropertyName = new JLabel();
cboDataTypes = new DataTypeComboBox();
lblMapIcon = new JLabel();
txtPropertyTargetMap = new JTextField();
lblPropertyName.setFont(DEFAULT_FONT);
cboDataTypes.setBackground(Color.WHITE);
cboDataTypes.setSelectedIndex(-1);
pnlPropertyName.setLayout(new BorderLayout(5, 0));
pnlPropertyName.setOpaque(false);
pnlPropertyName.setFocusable(false);
pnlPropertyName.add(lblPropertyName, BorderLayout.WEST);
pnlPropertyName.add(cboDataTypes, BorderLayout.EAST);
lblMapIcon.setIcon(IconLoader.getImageIcon("images/link.png"));
txtPropertyTargetMap.setFont(DEFAULT_FONT);
pnlPropertyUriTemplate.setLayout(new BorderLayout(5, 0));
pnlPropertyUriTemplate.setOpaque(false);
pnlPropertyUriTemplate.setFocusable(false);
pnlPropertyUriTemplate.add(lblMapIcon, BorderLayout.WEST);
pnlPropertyUriTemplate.add(txtPropertyTargetMap, BorderLayout.CENTER);
add(pnlPropertyName, BorderLayout.NORTH);
add(pnlPropertyUriTemplate, BorderLayout.SOUTH);
}
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
if (isSelected) {
setBackground(SELECTION_BACKGROUND);
// Due to the behavioral override, hasFocus means NORMAL_MODE and !hasFocus means EDIT_MODE
if (hasFocus) {
setBorder(NORMAL_BORDER);
} else {
setBorder(EDIT_BORDER);
}
} else {
if (hasFocus) {
setBackground(SELECTION_BACKGROUND);
} else {
setBackground(NORMAL_BACKGROUND);
}
setBorder(NORMAL_BORDER);
}
if (value instanceof MapItem) {
MapItem entry = (MapItem) value;
lblPropertyName.setText(entry.toString());
if (entry.isObjectMap()) {
cboDataTypes.setVisible(true);
cboDataTypes.setSelectedItem(entry.getDataType());
lblPropertyName.setIcon(IconLoader.getImageIcon("images/data_property.png"));
txtPropertyTargetMap.setText(entry.getTargetMapping());
} else if (entry.isRefObjectMap()) {
cboDataTypes.setVisible(false);
lblPropertyName.setIcon(IconLoader.getImageIcon("images/object_property.png"));
txtPropertyTargetMap.setText(entry.getTargetMapping());
}
}
return this;
}
}
/**
* An editor renderer class to draw the property mapping item when users enter the editing mode.
*/
public class PropertyItemEditor extends AbstractCellEditor implements TableCellEditor {
private static final long serialVersionUID = 1L;
private JPanel pnlPropertyMapCell;
private JPanel pnlPropertyName;
private JPanel pnlPropertyUriTemplate;
private JLabel lblPropertyName;
private DataTypeComboBox cboDataTypes;
private JLabel lblMapIcon;
private JTextField txtPropertyTargetMap;
private MapItem editedItem;
public PropertyItemEditor() {
initComponents();
}
private void setCaretToTextField() {
txtPropertyTargetMap.requestFocusInWindow();
txtPropertyTargetMap.setCaretPosition(txtPropertyTargetMap.getText().length());
}
private void initComponents() {
pnlPropertyMapCell = new JPanel() {
@Override
public void addNotify() {
super.addNotify();
// This code overrides the behavior of table item such that the item immediately
// enters the EDIT_MODE when users make a single click to the item panel.
setCaretToTextField();
}
};
pnlPropertyMapCell.setRequestFocusEnabled(true);
pnlPropertyName = new JPanel();
pnlPropertyUriTemplate = new JPanel();
lblPropertyName = new JLabel();
cboDataTypes = new DataTypeComboBox();
lblMapIcon = new JLabel();
txtPropertyTargetMap = new JTextField();
pnlPropertyMapCell.setLayout(new BorderLayout(0, 2));
pnlPropertyMapCell.setBorder(NORMAL_BORDER);
pnlPropertyMapCell.setRequestFocusEnabled(true);
lblPropertyName.setFont(DEFAULT_FONT);
cboDataTypes.setBackground(Color.WHITE);
cboDataTypes.setSelectedIndex(-1);
pnlPropertyName.setLayout(new BorderLayout(5, 0));
pnlPropertyName.setOpaque(false);
pnlPropertyName.add(lblPropertyName, BorderLayout.WEST);
pnlPropertyName.add(cboDataTypes, BorderLayout.EAST);
lblMapIcon.setIcon(IconLoader.getImageIcon("images/link.png"));
txtPropertyTargetMap.setFont(DEFAULT_FONT);
pnlPropertyUriTemplate.setLayout(new BorderLayout(5, 0));
pnlPropertyUriTemplate.setOpaque(false);
pnlPropertyUriTemplate.add(lblMapIcon, BorderLayout.WEST);
pnlPropertyUriTemplate.add(txtPropertyTargetMap, BorderLayout.CENTER);
pnlPropertyMapCell.add(pnlPropertyName, BorderLayout.NORTH);
pnlPropertyMapCell.add(pnlPropertyUriTemplate, BorderLayout.SOUTH);
}
@Override
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
pnlPropertyMapCell.setBackground(SELECTION_BACKGROUND);
if (!isSelected) {
// Due to the behavioral override, isSelected means NORMAL_MODE and !isSelected means EDIT_MODE
pnlPropertyMapCell.setBorder(EDIT_BORDER);
}
if (value instanceof MapItem) {
MapItem entry = (MapItem) value;
lblPropertyName.setText(entry.toString());
editedItem = entry;
if (entry.isObjectMap()) {
cboDataTypes.setVisible(true);
cboDataTypes.setSelectedItem(entry.getDataType());
lblPropertyName.setIcon(IconLoader.getImageIcon("images/data_property.png"));
txtPropertyTargetMap.setText(entry.getTargetMapping());
} else if (entry.isRefObjectMap()) {
cboDataTypes.setVisible(false);
lblPropertyName.setIcon(IconLoader.getImageIcon("images/object_property.png"));
txtPropertyTargetMap.setText(entry.getTargetMapping());
}
}
return pnlPropertyMapCell;
}
@Override
public Object getCellEditorValue() {
if (editedItem != null) {
editedItem.setTargetMapping(txtPropertyTargetMap.getText());
editedItem.setDataType((FunctionSymbol) cboDataTypes.getSelectedItem());
}
return editedItem;
}
@Override
public boolean isCellEditable(EventObject anEvent) {
if (anEvent instanceof MouseEvent) {
MouseEvent mouseEvent = (MouseEvent) anEvent;
if (mouseEvent.getClickCount() == 1) {
return true;
}
} else if (anEvent instanceof ActionEvent) {
return true;
}
return false;
}
@Override
public boolean stopCellEditing() {
try { // handling unknown array out of bound exception (?)
editedItem.setTargetMapping(txtPropertyTargetMap.getText());
editedItem.setDataType((FunctionSymbol) cboDataTypes.getSelectedItem());
if (editedItem.isValid()) { // Validate the entry
setNormalBackground(txtPropertyTargetMap);
} else {
setErrorBackground(txtPropertyTargetMap);
return false;
}
return super.stopCellEditing();
} catch (Exception e) {
return super.stopCellEditing();
}
}
//
// Methods for GUI changes
//
private void setNormalBackground(JTextField textField) {
textField.setBackground(DEFAULT_TEXTFIELD_BACKGROUND);
}
private void setErrorBackground(JTextField textField) {
textField.setBackground(ERROR_TEXTFIELD_BACKGROUND);
}
}
/**
* Renderer class to present the property list.
*/
private class PropertyListCellRenderer extends DefaultListCellRenderer {
private static final long serialVersionUID = 1L;
@Override
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if (value instanceof PredicateItem) {
PredicateItem property = (PredicateItem) value;
if (property.isDataPropertyPredicate()) {
ImageIcon icon = IconLoader.getImageIcon("images/data_property.png");
label.setIcon(icon);
label.setText(property.getQualifiedName());
} else if (property.isObjectPropertyPredicate()) {
ImageIcon icon = IconLoader.getImageIcon("images/object_property.png");
label.setIcon(icon);
label.setText(property.getQualifiedName());
}
}
return label;
}
}
}
|
kshithijiyer/isis | core/applib/src/main/java/org/apache/isis/applib/services/wrapper/WrapperFactory.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.isis.applib.services.wrapper;
import java.util.Collections;
import java.util.List;
import org.apache.isis.applib.annotation.Hidden;
import org.apache.isis.applib.annotation.Programmatic;
import org.apache.isis.applib.events.InteractionEvent;
import org.apache.isis.applib.services.wrapper.listeners.InteractionListener;
/**
* Provides the ability to "wrap" of a domain object such that it can
* be interacted with while enforcing the hide/disable/validate rules implies by
* the Isis programming model.
*
* <p>
* The "wrap" is a CGLib proxy that wraps the underlying domain
* object. The wrapper can then be interacted with as follows:
* <ul>
* <li>a <tt>get</tt> method for properties or collections</li>
* <li>a <tt>set</tt> method for properties</li>
* <li>an <tt>addTo</tt> or <tt>removeFrom</tt> method for collections</li>
* <li>any action</li>
* </ul>
*
* <p>
* Calling any of the above methods may result in a (subclass of)
* {@link InteractionException} if the object disallows it. For example, if a
* property is annotated with {@link Hidden} then a {@link HiddenException} will
* be thrown. Similarly if an action has a <tt>validate</tt> method and the
* supplied arguments are invalid then a {@link InvalidException} will be
* thrown.
*
* <p>
* In addition, the following methods may also be called:
* <ul>
* <li>the <tt>title</tt> method</li>
* <li>any <tt>defaultXxx</tt> or <tt>choicesXxx</tt> method</li>
* </ul>
*
* <p>
* An exception will be thrown if any other methods are thrown.
*
* <p>
* An implementation of this service (<tt>WrapperFactoryDefault</tt>) can be registered by including
* <tt>o.a.i.core:isis-core-wrapper</tt> on the classpath; no further configuration is required.
* </p>
*/
public interface WrapperFactory {
/**
* Whether interactions with the wrapper are actually passed onto the
* underlying domain object.
*
* @see WrapperFactory#wrap(Object, ExecutionMode)
*/
public static enum ExecutionMode {
/**
* Validate all business rules and then execute.
*/
EXECUTE(true,true,true),
/**
* Validate all business rules and then execute, but don't throw exception if fails.
*/
TRY(true,true,false),
/**
* Skip all business rules and then execute.
*/
SKIP_RULES(false, true, false),
/**
* Validate all business rules but do not execute.
*/
NO_EXECUTE(true, false, true);
private final boolean enforceRules;
private final boolean execute;
private final boolean failFast;
private ExecutionMode(final boolean enforceRules, final boolean execute, final boolean failFast) {
this.enforceRules = enforceRules;
this.execute = execute;
this.failFast = failFast;
}
public boolean shouldEnforceRules() {
return enforceRules;
}
public boolean shouldExecute() {
return execute;
}
public boolean shouldFailFast() {
return failFast;
}
}
WrapperFactory NOOP = new WrapperFactory(){
@Override
public <T> T wrap(T domainObject) {
return domainObject;
}
@Override
public <T> T wrapTry(T domainObject) {
return domainObject;
}
@Override
public <T> T wrapNoExecute(T domainObject) {
return domainObject;
}
@Override
public <T> T wrapSkipRules(T domainObject) {
return domainObject;
}
@Override
public <T> T wrap(T domainObject, ExecutionMode mode) {
return domainObject;
}
@Override
public <T> T unwrap(T possibleWrappedDomainObject) {
return possibleWrappedDomainObject;
}
@Override
public <T> boolean isWrapper(T possibleWrappedDomainObject) {
return false;
}
@Override
public List<InteractionListener> getListeners() {
return Collections.emptyList();
}
@Override
public boolean addInteractionListener(InteractionListener listener) {
return false;
}
@Override
public boolean removeInteractionListener(InteractionListener listener) {
return false;
}
@Override
public void notifyListeners(InteractionEvent ev) {
}
};
/**
* Provides the "wrapper" of the underlying domain object.
*
* <p>
* If the object has (see {@link #isWrapper(Object)} already been wrapped),
* then should just return the object back unchanged.
*/
@Programmatic
<T> T wrap(T domainObject);
/**
* Convenience method for {@link #wrap(Object, ExecutionMode)} with {@link ExecutionMode#TRY},
* to make this feature more discoverable.
*/
@Programmatic
<T> T wrapTry(T domainObject);
/**
* Convenience method for {@link #wrap(Object, ExecutionMode)} with {@link ExecutionMode#NO_EXECUTE},
* to make this feature more discoverable.
*/
@Programmatic
<T> T wrapNoExecute(T domainObject);
/**
* Convenience method for {@link #wrap(Object, ExecutionMode)} with {@link ExecutionMode#SKIP_RULES},
* to make this feature more discoverable.
*/
@Programmatic
<T> T wrapSkipRules(T domainObject);
/**
* Same as {@link #wrap(Object)}, except the actual execution occurs only if
* the <tt>execute</tt> parameter indicates.
*
* <p>
* Otherwise, will do all the validations (raise exceptions as required
* etc.), but doesn't modify the model.
*/
@Programmatic
<T> T wrap(T domainObject, ExecutionMode mode);
/**
* Obtains the underlying domain object, if wrapped.
*
* <p>
* If the object {@link #isWrapper(Object) is not wrapped}, then
* should just return the object back unchanged.
*/
@Programmatic
<T> T unwrap(T possibleWrappedDomainObject);
/**
* Whether the supplied object has been wrapped.
*
* @param <T>
* @param possibleWrappedDomainObject
* - object that might or might not be a wrapper.
* @return
*/
@Programmatic
<T> boolean isWrapper(T possibleWrappedDomainObject);
/**
* All {@link InteractionListener}s that have been registered using
* {@link #addInteractionListener(InteractionListener)}.
*/
@Programmatic
List<InteractionListener> getListeners();
/**
* Registers an {@link InteractionListener}, to be notified of interactions
* on all wrappers.
*
* <p>
* This is retrospective: the listener will be notified of interactions even
* on wrappers created before the listener was installed. (From an
* implementation perspective this is because the wrappers delegate back to
* the container to fire the events).
*
* @param listener
* @return
*/
@Programmatic
public boolean addInteractionListener(InteractionListener listener);
/**
* Remove an {@link InteractionListener}, to no longer be notified of
* interactions on wrappers.
*
* <p>
* This is retrospective: the listener will no longer be notified of any
* interactions created on any wrappers, not just on those wrappers created
* subsequently. (From an implementation perspective this is because the
* wrappers delegate back to the container to fire the events).
*
* @param listener
* @return
*/
@Programmatic
public boolean removeInteractionListener(InteractionListener listener);
@Programmatic
public void notifyListeners(InteractionEvent ev);
}
|
htdvisser/exp | natsconfig/natsconfig_test.go | package natsconfig
import (
"fmt"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/spf13/pflag"
)
func TestConfigFlags(t *testing.T) {
var config Config
flags := config.Flags("test.", nil)
var flagNamesAndValues []string
flags.VisitAll(func(f *pflag.Flag) {
flagNamesAndValues = append(flagNamesAndValues, fmt.Sprintf("%s=%s", f.Name, f.DefValue))
})
if diff := cmp.Diff(flagNamesAndValues, []string{
"test.servers=[nats://127.0.0.1:4222]",
"test.name=",
"test.auth.username=",
"test.auth.password=",
"test.auth.passwordFile=",
"test.auth.credentialsFile=",
"test.auth.jwtFile=",
"test.auth.seedFile=",
}); diff != "" {
t.Errorf("Flags not as expected: %v", diff)
}
}
|
rajkovukovic/tfux | utils/engines/jspm/jspm.js | <filename>utils/engines/jspm/jspm.js
'use strict';
const fs = require('fs');
const path = require('path');
const { AbstractEngine } = require('../abstract-engine/abstract-engine.js');
const { transformAndCopyModules } = require('./transform/transform-and-copy-modules.js');
const { transformJsFile } = require('./transform/transform-js-file.js');
const { installDependenciesWithPeer } = require('./install/install-dependencies-with-peer.js');
const { returnPomXml } = require('../../versions/pom.js');
const { zipAndCopyToRepo } = require('../utils/generate-repo.js');
const { logger } = require('../../logger/logger.js');
class JspmEngine extends AbstractEngine {
constructor(...args) {
super(...args);
this._installedModulesRootPath = this._installedModulesPath;
this._installedModulesPath = path.join(this._installedModulesPath, 'jspm_packages');
this.transformAndCopyModules = transformAndCopyModules.bind(this);
this.transformJsFile = transformJsFile.bind(this);
}
async installDependencies(dependencies, installTransitiveDependencies = true) {
installDependenciesWithPeer(this, dependencies, installTransitiveDependencies, new Set());
// make dependencies firex compatible and copy them to the global firex lib
return await this.transformAndCopyModules();
}
reloadJspmJSON() {
const jspmJSONPath = path.join(this._installedModulesRootPath, 'jspm.json');
if (!fs.existsSync(jspmJSONPath)) {
throw new Error(`can not find "jspm.json" on path "${this.installedModulesPath}"`);
}
this._jspmJSON = require(jspmJSONPath);
return this._jspmJSON;
}
get jspmJSON() {
if (!this._jspmJSON) this.reloadJspmJSON();
return this._jspmJSON;
}
get jspmCoreVersion() {
return this.jspmJSON.resolve['@jspm/core'].split('@').pop();
}
saveJspmJSON() {
const jspmJSONPath = path.join(this._installedModulesRootPath, 'jspm.json');
fs.writeFileSync(jspmJSONPath, JSON.stringify(this.jspmJSON, null, 2), 'utf8');
}
addPomXml(moduleInfo) {
const pom = returnPomXml({
[moduleInfo.fullName]: this.jspmJSON.dependencies[moduleInfo.fullName],
});
logger.info({
pom,
deps: {
[moduleInfo.fullName]: this.jspmJSON.dependencies[moduleInfo.fullName],
},
});
if (pom) {
fs.writeFileSync(
path.join(this.destinationPath, moduleInfo.relativeDestinationPath, 'pom.xml'),
pom,
'utf8'
);
logger.info('Finished writing pom.xml File for ' + moduleInfo.relativeDestinationPath);
} else {
logger.info(`Pom file can not be generated for ${moduleInfo.fullName} !!!`);
}
}
copyToRepo(moduleInfo) {
zipAndCopyToRepo(moduleInfo.fullName, this._options);
}
}
exports.JspmEngine = JspmEngine;
|
he5050/hframe | src/middleware/base_component.js | <filename>src/middleware/base_component.js<gh_stars>0
import { Component } from "react";
import { fromJS, is } from "immutable";
function trackLog(componentName) {
return function (target, name, descriptor) {
const fn = descriptor.value;
descriptor.value = function () {
let result = fn.apply(this, arguments);
if (result) {
console.log(`注意:组件[${componentName}]出现更新`);
}
return result;
};
};
}
export default (name = "未知") => class extends Component {
@trackLog(name)
shouldComponentUpdate(nextProps, nextState) {
return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState));
}
};
|
trombik/rotas | lib/rotas/project.rb | <filename>lib/rotas/project.rb
# frozen_string_literal: true
require "sem_version"
require "rotas/project/arch"
module Rotas
# Rotas::Project represents a project
class Project
attr_reader :name, :stable_version, :arch
def initialize(arg)
@name = arg[:name]
@path = arg[:path].is_a?(Pathname) ? arg[:path] : Pathname.new(arg[:path])
@stable_version = arg[:stable_version]
@arch = {}
arg[:arch].each do |a|
@arch[a.to_sym] = Rotas::Project::Arch.new(
arch: a, path: @path.realpath + a, project: @name,
stable_version: @stable_version
)
end
end
def path
@path.realpath
end
end
end
|
helmasur/bitwig-extensions | src/main/java/com/bitwig/extensions/framework/InternalLightStateBinding.java | <filename>src/main/java/com/bitwig/extensions/framework/InternalLightStateBinding.java
package com.bitwig.extensions.framework;
import java.util.function.Supplier;
import com.bitwig.extension.controller.api.InternalHardwareLightState;
import com.bitwig.extension.controller.api.MultiStateHardwareLight;
public class InternalLightStateBinding extends Binding<Supplier<InternalHardwareLightState>, MultiStateHardwareLight>
{
protected InternalLightStateBinding(
final Supplier<InternalHardwareLightState> source, final MultiStateHardwareLight target)
{
super(target, source, target);
}
@Override
protected void deactivate()
{
getTarget().state().setValueSupplier(null);
}
@Override
protected void activate()
{
getTarget().state().setValueSupplier(getSource());
}
}
|
DXYyang/SDP | sourcedata/poi-REL_3_0/src/scratchpad/src/org/apache/poi/hwpf/model/types/TCAbstractType.java | <reponame>DXYyang/SDP<gh_stars>1-10
/* ====================================================================
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.poi.hwpf.model.types;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.LittleEndian;
import org.apache.poi.util.StringUtil;
import org.apache.poi.util.HexDump;
import org.apache.poi.hdf.model.hdftypes.HDFType;
import org.apache.poi.hwpf.usermodel.*;
/**
* Table Cell Descriptor.
* NOTE: This source is automatically generated please do not modify this file. Either subclass or
* remove the record in src/records/definitions.
* @author <NAME>
*/
public abstract class TCAbstractType
implements HDFType
{
protected short field_1_rgf;
private static BitField fFirstMerged = BitFieldFactory.getInstance(0x0001);
private static BitField fMerged = BitFieldFactory.getInstance(0x0002);
private static BitField fVertical = BitFieldFactory.getInstance(0x0004);
private static BitField fBackward = BitFieldFactory.getInstance(0x0008);
private static BitField fRotateFont = BitFieldFactory.getInstance(0x0010);
private static BitField fVertMerge = BitFieldFactory.getInstance(0x0020);
private static BitField fVertRestart = BitFieldFactory.getInstance(0x0040);
private static BitField vertAlign = BitFieldFactory.getInstance(0x0180);
protected short field_2_unused;
protected BorderCode field_3_brcTop;
protected BorderCode field_4_brcLeft;
protected BorderCode field_5_brcBottom;
protected BorderCode field_6_brcRight;
public TCAbstractType()
{
}
protected void fillFields(byte [] data, int offset)
{
field_1_rgf = LittleEndian.getShort(data, 0x0 + offset);
field_2_unused = LittleEndian.getShort(data, 0x2 + offset);
field_3_brcTop = new BorderCode(data, 0x4 + offset);
field_4_brcLeft = new BorderCode(data, 0x8 + offset);
field_5_brcBottom = new BorderCode(data, 0xc + offset);
field_6_brcRight = new BorderCode(data, 0x10 + offset);
}
public void serialize(byte[] data, int offset)
{
LittleEndian.putShort(data, 0x0 + offset, (short)field_1_rgf);;
LittleEndian.putShort(data, 0x2 + offset, (short)field_2_unused);;
field_3_brcTop.serialize(data, 0x4 + offset);;
field_4_brcLeft.serialize(data, 0x8 + offset);;
field_5_brcBottom.serialize(data, 0xc + offset);;
field_6_brcRight.serialize(data, 0x10 + offset);;
}
public String toString()
{
StringBuffer buffer = new StringBuffer();
buffer.append("[TC]\n");
buffer.append(" .rgf = ");
buffer.append(" (").append(getRgf()).append(" )\n");
buffer.append(" .fFirstMerged = ").append(isFFirstMerged()).append('\n');
buffer.append(" .fMerged = ").append(isFMerged()).append('\n');
buffer.append(" .fVertical = ").append(isFVertical()).append('\n');
buffer.append(" .fBackward = ").append(isFBackward()).append('\n');
buffer.append(" .fRotateFont = ").append(isFRotateFont()).append('\n');
buffer.append(" .fVertMerge = ").append(isFVertMerge()).append('\n');
buffer.append(" .fVertRestart = ").append(isFVertRestart()).append('\n');
buffer.append(" .vertAlign = ").append(getVertAlign()).append('\n');
buffer.append(" .unused = ");
buffer.append(" (").append(getUnused()).append(" )\n");
buffer.append(" .brcTop = ");
buffer.append(" (").append(getBrcTop()).append(" )\n");
buffer.append(" .brcLeft = ");
buffer.append(" (").append(getBrcLeft()).append(" )\n");
buffer.append(" .brcBottom = ");
buffer.append(" (").append(getBrcBottom()).append(" )\n");
buffer.append(" .brcRight = ");
buffer.append(" (").append(getBrcRight()).append(" )\n");
buffer.append("[/TC]\n");
return buffer.toString();
}
/**
* Size of record (exluding 4 byte header)
*/
public int getSize()
{
return 4 + + 2 + 2 + 4 + 4 + 4 + 4;
}
/**
* Get the rgf field for the TC record.
*/
public short getRgf()
{
return field_1_rgf;
}
/**
* Set the rgf field for the TC record.
*/
public void setRgf(short field_1_rgf)
{
this.field_1_rgf = field_1_rgf;
}
/**
* Get the unused field for the TC record.
*/
public short getUnused()
{
return field_2_unused;
}
/**
* Set the unused field for the TC record.
*/
public void setUnused(short field_2_unused)
{
this.field_2_unused = field_2_unused;
}
/**
* Get the brcTop field for the TC record.
*/
public BorderCode getBrcTop()
{
return field_3_brcTop;
}
/**
* Set the brcTop field for the TC record.
*/
public void setBrcTop(BorderCode field_3_brcTop)
{
this.field_3_brcTop = field_3_brcTop;
}
/**
* Get the brcLeft field for the TC record.
*/
public BorderCode getBrcLeft()
{
return field_4_brcLeft;
}
/**
* Set the brcLeft field for the TC record.
*/
public void setBrcLeft(BorderCode field_4_brcLeft)
{
this.field_4_brcLeft = field_4_brcLeft;
}
/**
* Get the brcBottom field for the TC record.
*/
public BorderCode getBrcBottom()
{
return field_5_brcBottom;
}
/**
* Set the brcBottom field for the TC record.
*/
public void setBrcBottom(BorderCode field_5_brcBottom)
{
this.field_5_brcBottom = field_5_brcBottom;
}
/**
* Get the brcRight field for the TC record.
*/
public BorderCode getBrcRight()
{
return field_6_brcRight;
}
/**
* Set the brcRight field for the TC record.
*/
public void setBrcRight(BorderCode field_6_brcRight)
{
this.field_6_brcRight = field_6_brcRight;
}
/**
* Sets the fFirstMerged field value.
*
*/
public void setFFirstMerged(boolean value)
{
field_1_rgf = (short)fFirstMerged.setBoolean(field_1_rgf, value);
}
/**
*
* @return the fFirstMerged field value.
*/
public boolean isFFirstMerged()
{
return fFirstMerged.isSet(field_1_rgf);
}
/**
* Sets the fMerged field value.
*
*/
public void setFMerged(boolean value)
{
field_1_rgf = (short)fMerged.setBoolean(field_1_rgf, value);
}
/**
*
* @return the fMerged field value.
*/
public boolean isFMerged()
{
return fMerged.isSet(field_1_rgf);
}
/**
* Sets the fVertical field value.
*
*/
public void setFVertical(boolean value)
{
field_1_rgf = (short)fVertical.setBoolean(field_1_rgf, value);
}
/**
*
* @return the fVertical field value.
*/
public boolean isFVertical()
{
return fVertical.isSet(field_1_rgf);
}
/**
* Sets the fBackward field value.
*
*/
public void setFBackward(boolean value)
{
field_1_rgf = (short)fBackward.setBoolean(field_1_rgf, value);
}
/**
*
* @return the fBackward field value.
*/
public boolean isFBackward()
{
return fBackward.isSet(field_1_rgf);
}
/**
* Sets the fRotateFont field value.
*
*/
public void setFRotateFont(boolean value)
{
field_1_rgf = (short)fRotateFont.setBoolean(field_1_rgf, value);
}
/**
*
* @return the fRotateFont field value.
*/
public boolean isFRotateFont()
{
return fRotateFont.isSet(field_1_rgf);
}
/**
* Sets the fVertMerge field value.
*
*/
public void setFVertMerge(boolean value)
{
field_1_rgf = (short)fVertMerge.setBoolean(field_1_rgf, value);
}
/**
*
* @return the fVertMerge field value.
*/
public boolean isFVertMerge()
{
return fVertMerge.isSet(field_1_rgf);
}
/**
* Sets the fVertRestart field value.
*
*/
public void setFVertRestart(boolean value)
{
field_1_rgf = (short)fVertRestart.setBoolean(field_1_rgf, value);
}
/**
*
* @return the fVertRestart field value.
*/
public boolean isFVertRestart()
{
return fVertRestart.isSet(field_1_rgf);
}
/**
* Sets the vertAlign field value.
*
*/
public void setVertAlign(byte value)
{
field_1_rgf = (short)vertAlign.setValue(field_1_rgf, value);
}
/**
*
* @return the vertAlign field value.
*/
public byte getVertAlign()
{
return ( byte )vertAlign.getValue(field_1_rgf);
}
} // END OF CLASS
|
kenjili/morelove | morelove-api/common/src/main/java/wujiuye/morelove/common/utils/showapi/ShowApiRequest.java | package wujiuye.morelove.common.utils.showapi;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
/**
* 基于REST的客户端。
*/
public class ShowApiRequest extends NormalRequest {
private String appSecret;
public ShowApiRequest(String url, String appid, String appSecret) {
super(url);
this.appSecret = appSecret;
this.addTextPara("showapi_appid", appid);
this.addHeadPara("User-Agent", "showapi-sdk-java");//设置默认头
}
public String getAppSecret() {
return appSecret;
}
public void setAppSecret(String appSecret) {
this.appSecret = appSecret;
}
public String post() {
String res = null;
try {
byte b[] = postAsByte();
res = new String(b, "utf-8");
} catch (Exception e) {
if (printException) e.printStackTrace();
}
return res;
}
public byte[] postAsByte() {
byte res[] = null;
try {
String signResult = addSign();
if (signResult != null) return signResult.getBytes("utf-8");
res = WebUtils.doPostAsByte(this);
} catch (Exception e) {
e.printStackTrace();
try {
res = ("{showapi_res_code:-1,showapi_res_error:\"" + e.toString() + "\"}").getBytes("utf-8");
} catch (UnsupportedEncodingException e1) {
e1.printStackTrace();
}
}
return res;
}
private String addSign() throws IOException {
if (textMap.get(Constants.SHOWAPI_APPID) == null) return errorMsg(Constants.SHOWAPI_APPID + "不得为空!");
textMap.put(Constants.SHOWAPI_SIGN, ShowApiUtils.signRequest(textMap, appSecret));
return null;
}
public String get() {
String res = null;
try {
byte b[] = getAsByte();
res = new String(b, "utf-8");
} catch (Exception e) {
e.printStackTrace();
res = "{showapi_res_code:-1,showapi_res_error:\"" + e.toString() + "\"}";
}
return res;
}
public byte[] getAsByte() {
byte[] res = null;
try {
String signResult = addSign();
if (signResult != null) return signResult.getBytes("utf-8");
res = WebUtils.doGetAsByte(this);
} catch (Exception e) {
e.printStackTrace();
try {
res = ("{showapi_res_code:-1,showapi_res_error:\"" + e.toString() + "\"}").getBytes("utf-8");
} catch (UnsupportedEncodingException e1) {
e1.printStackTrace();
}
}
return res;
}
private String errorMsg(String msg) {
String str = "{" + Constants.SHOWAPI_RES_CODE + ":-1," + Constants.SHOWAPI_RES_ERROR + ":\"" + msg + "\"," + Constants.SHOWAPI_RES_BODY + ":{}}";
return str;
}
}
|
mattrpav/org.ops4j.pax.logging | pax-logging-samples/perfs/src/main/java/org/ops4j/pax/logging/example/Activator.java | /*
* Copyright 2005 <NAME>.
*
* 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.ops4j.pax.logging.example;
import java.util.concurrent.CountDownLatch;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class Activator implements BundleActivator {
@Override
public void start(BundleContext context) throws Exception {
System.out.println("Warming up");
final Logger logger = LoggerFactory.getLogger(getClass());
for (int i = 0; i < 10000; i++) {
if (logger.isInfoEnabled()) {
logger.info("Hello {} !", "world");
}
}
int[] threads = { 1, 2, 4, 8, 16, 32, 64 };
for (int nbThreads : threads) {
System.out.println("Running perfs for " + nbThreads + " threads");
long t0 = System.currentTimeMillis();
final CountDownLatch latch = new CountDownLatch(nbThreads);
for (int i = 0; i < nbThreads; i++) {
new Thread() {
@Override
public void run() {
for (int i = 0; i < 10000; i++) {
if (logger.isInfoEnabled()) {
logger.info("Hello {} !", "world");
}
}
latch.countDown();
}
}.start();
}
latch.await();
long t1 = System.currentTimeMillis();
System.out.println("Result: " + (t1 - t0) + " ms");
}
}
@Override
public void stop(BundleContext context) throws Exception {
}
}
|
helgifr/comeon-javascript-test | src/components/user-route/index.js | <reponame>helgifr/comeon-javascript-test<filename>src/components/user-route/index.js
import UserRoute from './UserRoute';
export default UserRoute; |
DucPhamTV/Bank | v1/confirmation_blocks/models/confirmation_block.py | from uuid import uuid4
from django.db import models
from thenewboston.constants.network import BLOCK_IDENTIFIER_LENGTH
from thenewboston.models.created_modified import CreatedModified
from v1.blocks.models.block import Block
from v1.validators.models.validator import Validator
class ConfirmationBlock(CreatedModified):
id = models.UUIDField(default=uuid4, editable=False, primary_key=True) # noqa: A003
block = models.ForeignKey(Block, on_delete=models.CASCADE)
validator = models.ForeignKey(Validator, on_delete=models.CASCADE)
block_identifier = models.CharField(max_length=BLOCK_IDENTIFIER_LENGTH)
class Meta:
default_related_name = 'confirmation_blocks'
constraints = [
models.UniqueConstraint(
fields=['block', 'validator'],
name='unique_block_validator'
)
]
def __str__(self):
return (
f'ID: {self.id} | '
f'Block: {self.block_id} | '
f'Validator: {self.validator_id}'
)
|
upane/qqbot | src/main/java/com/handcraft/controller/LocalSaveJPGController.java | <reponame>upane/qqbot<gh_stars>1-10
package com.handcraft.controller;
import com.handcraft.service.LocalPicService;
import com.handcraft.util.StringUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
@Controller
public class LocalSaveJPGController {
@Resource
StringUtil stringUtil;
@Resource
LocalPicService localPicService;
@GetMapping(value = "/insert")
@ResponseBody
public String insertpic(@RequestParam String filename, Integer ftype) {
return localPicService.batchadd(filename, ftype);
}
}
|
andrii/hew | spec/hew/attributes/text_attribute_spec.rb | require 'spec_helper'
describe Hew::Attributes::TextAttribute do
let(:attribute) { Hew::Attributes::TextAttribute.new('apartment', 'description') }
it 'returns a create value' do
_(attribute.create_value).must_equal 'MyText'
end
it 'returns an update value' do
_(attribute.update_value).must_equal 'Updated MyText'
end
it 'returns the Capybara action for entering the attribute create value' do
_(attribute.create_action).must_equal "fill_in 'Description', with: 'MyText'"
end
it 'returns the Capybara actions for entering the attribute update value' do
_(attribute.update_action).must_equal "fill_in 'Description', with: 'Updated MyText'"
end
end
|
LetsCloud/hw-gae | hw-gae-client_fro/src/main/java/hu/hw/cloud/client/fro/config/AbstractConfigPresenter.java | /**
*
*/
package hu.hw.cloud.client.fro.config;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
import com.google.gwt.event.shared.GwtEvent;
import com.google.web.bindery.event.shared.EventBus;
import com.gwtplatform.mvp.client.HasUiHandlers;
import com.gwtplatform.mvp.client.Presenter;
import com.gwtplatform.mvp.client.PresenterWidget;
import com.gwtplatform.mvp.client.View;
import com.gwtplatform.mvp.client.presenter.slots.SingleSlot;
import com.gwtplatform.mvp.client.proxy.PlaceManager;
import com.gwtplatform.mvp.client.proxy.Proxy;
import com.gwtplatform.mvp.client.proxy.RevealContentHandler;
import com.gwtplatform.mvp.shared.proxy.PlaceRequest;
import hu.hw.cloud.client.core.event.ContentPushEvent;
import hu.hw.cloud.client.core.event.SetPageTitleEvent;
import hu.hw.cloud.shared.cnst.MenuItemType;
/**
* @author robi
*
*/
public abstract class AbstractConfigPresenter<V extends AbstractConfigPresenter.MyView, P extends Proxy<?>>
extends Presenter<V, P> implements AbstractConfigUiHandlers, ContentPushEvent.ContentPushHandler {
private static Logger logger = Logger.getLogger(AbstractConfigPresenter.class.getName());
public interface MyView extends View, HasUiHandlers<AbstractConfigUiHandlers> {
void buildMenu(List<String> captions);
void setMobileView(Boolean show);
void setDesktopMenu(Integer index);
void setMobileButtonText(String text);
}
private String caption;
private String description;
private String placeToken;
protected List<String> captions = new ArrayList<String>();
protected List<String> placeParams = new ArrayList<String>();
protected List<PresenterWidget<?>> browsers = new ArrayList<PresenterWidget<?>>();
private final PlaceManager placeManager;
public static final SingleSlot<PresenterWidget<?>> SLOT_CONTENT = new SingleSlot<>();
public final static String PLACE_PARAM = "placeParam";
public AbstractConfigPresenter(EventBus eventBus, PlaceManager placeManager, V view, P proxy, GwtEvent.Type<RevealContentHandler<?>> slot) {
super(eventBus, view, proxy, null, slot);
logger.info("AbstractConfigPresenter()");
this.placeManager = placeManager;
addRegisteredHandler(ContentPushEvent.TYPE, this);
}
@Override
protected void onBind() {
super.onBind();
getView().buildMenu(captions);
}
@Override
public void prepareFromRequest(PlaceRequest request) {
logger.info("AbstractConfigPresenter().prepareFromRequest()");
Integer index = placeParams.indexOf(request.getParameter(PLACE_PARAM, null));
if (index == -1) index = 0;
getView().setDesktopMenu(index);
getView().setMobileButtonText(captions.get(index));
setInSlot(SLOT_CONTENT, beforeShowContent(browsers.get(index)));
}
@Override
protected void onReveal() {
super.onReveal();
SetPageTitleEvent.fire(caption, description, MenuItemType.MENU_ITEM, this);
}
@Override
public void onContentPush(ContentPushEvent event) {
/*
* if ((event.getMenuState().equals(MenuState.OPEN)) && (Window.getClientWidth()
* <= 1150)) { getView().setMobileView(true); return; } if
* ((event.getMenuState().equals(MenuState.CLOSE)) && (Window.getClientWidth()
* <= 995)) { getView().setMobileView(true); return; }
* getView().setMobileView(false);
*/
}
protected PresenterWidget<?> beforeShowContent(PresenterWidget<?> widget) {
return widget;
}
@Override
public void showContent(Integer index) {
logger.info("AbstractConfigPresenter().showContent(" + index + ")");
PlaceRequest placeRequest = new PlaceRequest.Builder()
.nameToken(placeToken)
.with(PLACE_PARAM, placeParams.get(index))
.build();
placeManager.revealPlace(placeRequest);
}
public void addContent(String caption, PresenterWidget<?> widget, String placeParam) {
captions.add(caption);
browsers.add(widget);
placeParams.add(placeParam);
}
public String getCaption() {
return caption;
}
public void setCaption(String caption) {
this.caption = caption;
}
public void setDescription(String description) {
this.description = description;
}
public String getPlaceToken() {
return placeToken;
}
public void setPlaceToken(String placeToken) {
this.placeToken = placeToken;
}
}
|
agardiner/ess4r | lib/ess4r/cube/loads.rb | <reponame>agardiner/ess4r
require_relative 'load_errors'
class Essbase
# Define methods for loading data and building dimensions.
module Loads
include_package 'com.essbase.api.datasource'
# @!macro [new] load_notes
#
# If records are rejected during the load, they can be written to the
# specified +error_file+ and/or yielded to a supplied block for further
# processing.
#
# If no +rules_file+ parameter is specified, the load will be attempted
# without using a rules file. Essbase has fairly strict requirements for
# loading data without a rules file; in short, all dimensions must be
# identified before the first data value.
#
# Additionally, if no load rule is used, the +abort_on_error+ param
# is ignored, and acts as though it were set to +true+, i.e. the load
# will terminate on the first error, and an exception will be thrown.
#
# @param rules_file [String] The name of a local or server Essbase load
# rule file. A server rule file object should be specified without any
# file extension, while a local file should include the extension.
# If no +rules_file+ value is specified, the data load will be attempted
# without using a load rule.
# @param error_file [String] The name or path to a local file in which
# errors should be recorded. The file will only be created if there
# are rejected records.
# @param abort_on_error [Boolean] Whether the load should be terminated
# on the first error, or continue until the end.
#
# @yield [msg, mbr, line] If a block is supplied, it will be called once
# for each rejected record.
# @yieldparam msg [String] The error message indicating the reason why
# the record was rejected.
# @yieldparam mbr [String] The name of the member that caused the problem.
# @yieldparam line [String] The line of input data that was rejected.
#
# @return [Integer] a count of the number of rejected records.
# @!group Data Load Methods
# Loads data from a local or server +data_file+.
#
# @param data_file [String] The name of a local or server data file. A
# server data file should be specified without any file extension,
# while a local data file should include the extension and path.
#
# @macro load_notes
def load_data(data_file, rules_file = nil, error_file = nil, abort_on_error = false, &block)
reject_count = 0
instrument "load_data", :data_file => data_file,
:rules_file => rules_file, :error_file => error_file,
:abort_on_error => abort_on_error do |payload|
rejects = try { @cube.load_data(IEssOlapFileObject.TYPE_RULES, rules_file,
IEssOlapFileObject.TYPE_TEXT, data_file, abort_on_error) }
reject_count = payload[:rejects] = process_rejects(rejects, error_file, &block)
end
reject_count
end
# Loads data from a SQL query, details of which are defined in the
# +rules_file+.
#
# @param sql_user [String] SQL user id with which to connect to the SQL
# datasource.
# @param sql_pwd [String] SQL password with which to connect to the SQL
# datasource.
#
# @macro load_notes
def load_sql(sql_user, sql_pwd, rules_file, error_file = nil, abort_on_error = false, &block)
reject_count = 0
instrument "load_data", :sql_user => sql_user,
:rules_file => rules_file, :error_file => error_file,
:abort_on_error => abort_on_error do |payload|
rejects = try { @cube.load_data(IEssOlapFileObject.TYPE_RULES, rules_file,
# IEssOlapFileObject does not define a constant for TYPE_SQL (16384)
16384, "", abort_on_error, sql_user, sql_pwd) }
reject_count = payload[:rejects] = process_rejects(rejects, error_file, &block)
end
reject_count
end
# Streams data to the cube from +data+ using the optional +rules_file+.
#
# @param [Enumerable] data The object that will yield up lines of data
# to send to Essbase. This can be any object on which #each can be
# called, e.g. an Array or File.
#
# @macro load_notes
def load_enumerable(data, rules_file = nil, error_file = nil, abort_on_error = false, &block)
reject_count = 0
instrument "data_load",
:rules_file => rules_file, :error_file => error_file,
:abort_on_error => abort_on_error do |payload|
try{ @cube.begin_dataload(true, false, abort_on_error, rules_file,
IEssOlapFileObject.TYPE_RULES) }
data.each do |line|
line = line.join("\t") + "\n" if line.is_a?(Array)
try{ @cube.send_string(line) }
end
rejects = try{ @cube.end_dataload() }
reject_count = payload[:rejects] = process_rejects(rejects, error_file, &block)
end
reject_count
end
# Processes the reject results from {#load_data}, #load_sql, or
# #load_enumerable.
#
# @param rejects [Array<Array<String>>] An array of rejected records,
# where each record consists of an Array of +message+, +member+, and
# +source_line+.
# @param error_file [String] Optional path to a local file to receive
# the rejected records.
#
# @yield If supplied, the block will be called for each rejection.
# @yieldparam message [String] An error message indicating the reason
# the record was rejected.
# @yieldparam member [String] The member that led to the rejection.
# @yieldparam source_line [String] The data record that was rejected.
#
# @return [Integer] A count of the number of rejected records. Note that
# this may be less than the total number of records actually rejected
# by the load if the number of rejections exceeds the DATAERRORLIMIT
# value configured on the Essbase server.
def process_rejects(rejects, error_file)
reject_count = (rejects && rejects.length) || 0
if rejects && (error_file || block_given?)
err_file = File.new(error_file, "w") if error_file
begin
rejects.each do |message, member, source_line|
err_num = message.match(/(\d+)$/)[1].to_i
message = (DATA_LOAD_ERROR_CODES[err_num] || message) % member
yield message, member, source_line if block_given?
if err_file
err_file.puts "\\\\ #{message}"
err_file.puts source_line
err_file.puts
end
end
ensure
err_file.close if err_file
end
end
log.warning "There were #{reject_count} rejected records" if reject_count > 0
reject_count
end
# @!endgroup
# @!group Dimension Build Methods
# Perform a dimension build using the specified +rules_file+ and
# +build_file+.
#
# @param rules_file [String] The name of a local or server Essbase load
# rule file. A server rule file object should be specified without any
# file extension, while a local file should include the extension.
# @param error_file [String] The name or path to a local file in which
# errors should be recorded. The file will only be created if there
# are rejected records.
# @yield [msg, mbr, line] If a block is supplied, it will be called once
# for each rejected record.
# @yieldparam msg [String] The error message indicating the reason why
# the record was rejected.
# @yieldparam mbr [String] The name of the member that caused the problem.
# @yieldparam line [String] The line of input data that was rejected.
#
# @return [Integer] a count of the number of rejected records.
def build_dimension(rules_file, build_file, error_file = nil)
error_count = 0
instrument "dimension_build", :rules_file => rules_file,
:build_file => build_file, :error_file => error_file do |payload|
errors = try{ @cube.build_dimension(rules_file, IEssOlapFileObject.TYPE_RULES,
build_file, IEssOlapFileObject.TYPE_TEXT,
error_file) }
# Process errors
error_count = payload[:errors] = process_build_errors(errors, build_file, &block)
end
error_count
end
# Performs an incremental outline build for each pair of data file/rule
# combinations in +arr_pairs+.
#
# @param arr_pairs [Array<Array<String>>] An Array of 2-item Arrays,
# where the first item in inner arrays is the data file name, and the
# second item in the inner array is the name of the dimension build
# rule to use with that file.
# @param err_file [String] The name or path to a local file in which
# errors should be recorded. The file will only be created if there
# are rejected records.
# @param restruct_opt [:all_data, :no_data, :level0, :input] The cube
# restructure option for data retention.
#
# @yield [msg, mbr, line] If a block is supplied, it will be called once
# for each rejected record.
# @yieldparam msg [String] The error message indicating the reason why
# the record was rejected.
# @yieldparam mbr [String] The name of the member that caused the problem.
# @yieldparam line [String] The line of input data that was rejected.
#
# @return [Integer] a count of the number of rejected records.
def incremental_build(arr_pairs, err_file, restruct_opt = :all_data, &block)
restruct_opt = case restruct_opt
when :all_data then IEssCube.ESS_DOR_ALLDATA
when :no_data then IEssCube.ESS_DOR_NODATA
when :level0 then IEssCube.ESS_DOR_LOWDATA
when :input then IEssCube.ESS_DOR_INDATA
else raise "Unrecognised restructure option #{restruct_opt}; use :all_data, :no_data, :level0, or :input"
end
tmp_otl = 'tmpotl'
error_count = 0
log.fine "Commencing incremental outline build"
try { @cube.begin_incremental_build_dim }
arr_pairs.each do |file, rule|
log.fine "Loading dimension file #{file} using #{rule}"
instrument "incremental_build_dim", :rules_file => rule,
:build_file => file, :error_file => err_file do |payload|
errors = try{ @cube.incremental_build_dim(rule, IEssOlapFileObject.TYPE_RULES,
file, IEssOlapFileObject.TYPE_TEXT,
nil, nil,
IEssCube.ESS_INCDIMBUILD_BUILD, tmp_otl, err_file) }
# Process errors
error_count += payload[:errors] = process_build_errors(errors, file, &block)
end
end
log.fine "Saving outline..."
instrument "restructure" do |payload|
errors = try{ @cube.end_incremental_build_dim(restruct_opt, tmp_otl, err_file, false) }
error_count += payload[:errors] = process_build_errors(errors, tmp_otl, &block)
end
error_count
end
# Process the errors from dimension_build or incremental_dimension_build.
# The JAPI dimension build methods return a Java StringBuffer containing
# details of the errors, so we need to parse the contents of this to
# determine the details of the errors.
# Processes the reject results from #dimension_build or
# #incremental_dimension_build
#
# @param errors [Array<StringBuffer>] An array of rejected record
# errors, where each record consists of an error message or source
# record.
# @param error_file [String] Optional path to a local file to receive
# the rejected records.
#
# @yield If supplied, the block will be called for each rejection.
# @yieldparam message [String] An error message indicating the reason
# the record was rejected.
# @yieldparam member [String] The member that led to the rejection.
# @yieldparam source_line [String] The data record that was rejected.
#
# @return [Integer] A count of the number of rejected records. Note that
# this may be less than the total number of records actually rejected
# by the load if the number of rejections exceeds the DATAERRORLIMIT
# value configured on the Essbase server.
def process_build_errors(errors, error_file)
error_count = 0
if errors && errors.length > 0
err_file = File.new(error_file, "w") if error_file
begin
msg, msg_num, source_line, mbr = nil, nil, nil, nil
errors.to_s.each_line do |line|
err_file.puts(line) if err_file
if line =~ /^\\\\(?:Record #\d+ - )?(.+) \((\d+)\)/
yield msg, mbr, source_line if msg && block_given?
msg = $1
msg_num = $2.to_i
msg_template = DATA_LOAD_ERROR_CODES[msg_num]
if msg_template
re = Regexp.new(msg_template.gsub('%s', '(.+)'), Regexp::IGNORECASE)
mbr = re.match(msg)[1]
end
error_count += 1
else
source_line = line
yield msg, mbr, source_line if block_given?
msg, msg_num, source_line, mbr = nil, nil, nil, nil
end
end
yield msg, mbr, source_line if msg && block_given?
ensure
err_file.close if err_file
end
end
log.warning "There were #{error_count} build errors" if error_count > 0
error_count
end
# @!endgroup
end
end
|
zhasm/onecloud | pkg/image/models/quotas.go | // Copyright 2019 Yunion
//
// 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 models
import (
"context"
"yunion.io/x/jsonutils"
"yunion.io/x/pkg/tristate"
identityapi "yunion.io/x/onecloud/pkg/apis/identity"
"yunion.io/x/onecloud/pkg/cloudcommon/db/quotas"
"yunion.io/x/onecloud/pkg/image/options"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/util/rbacutils"
)
type SQuotaManager struct {
quotas.SQuotaBaseManager
}
var QuotaManager *SQuotaManager
var QuotaUsageManager *SQuotaManager
func init() {
pendingStore := quotas.NewMemoryQuotaStore()
QuotaUsageManager = &SQuotaManager{
SQuotaBaseManager: quotas.NewQuotaUsageManager(SQuota{}, "quota_usage_tbl"),
}
QuotaManager = &SQuotaManager{
SQuotaBaseManager: quotas.NewQuotaBaseManager(SQuota{}, "quota_tbl", pendingStore, QuotaUsageManager),
}
}
type SQuota struct {
quotas.SQuotaBase
Image int
}
func (self *SQuota) FetchSystemQuota(scope rbacutils.TRbacScope, ownerId mcclient.IIdentityProvider) {
base := 0
if scope == rbacutils.ScopeDomain {
base = 10
} else if ownerId.GetProjectDomainId() == identityapi.DEFAULT_DOMAIN_ID && ownerId.GetProjectName() == identityapi.SystemAdminProject {
base = 1
}
self.Image = options.Options.DefaultImageQuota * base
}
func (self *SQuota) FetchUsage(ctx context.Context, scope rbacutils.TRbacScope, ownerId mcclient.IIdentityProvider, platform []string) error {
count := ImageManager.count(scope, ownerId, "", tristate.None, false)
self.Image = int(count["total"].Count)
return nil
}
func (self *SQuota) IsEmpty() bool {
if self.Image > 0 {
return false
}
return true
}
func (self *SQuota) Add(quota quotas.IQuota) {
squota := quota.(*SQuota)
self.Image = self.Image + squota.Image
}
func (self *SQuota) Sub(quota quotas.IQuota) {
squota := quota.(*SQuota)
self.Image = quotas.NonNegative(self.Image - squota.Image)
}
func (self *SQuota) Update(quota quotas.IQuota) {
squota := quota.(*SQuota)
if squota.Image > 0 {
self.Image = squota.Image
}
}
func (self *SQuota) Exceed(request quotas.IQuota, quota quotas.IQuota) error {
err := quotas.NewOutOfQuotaError()
sreq := request.(*SQuota)
squota := quota.(*SQuota)
if sreq.Image > 0 && self.Image > squota.Image {
err.Add("image", squota.Image, self.Image)
}
if err.IsError() {
return err
} else {
return nil
}
}
func (self *SQuota) ToJSON(prefix string) jsonutils.JSONObject {
ret := jsonutils.NewDict()
// if self.Image > 0 {
ret.Add(jsonutils.NewInt(int64(self.Image)), quotas.KeyName(prefix, "image"))
// }
return ret
}
|
markmuetz/cosmic | ctrl/UM_N1280/MASS/u-al508_ap9_precip.py | <filename>ctrl/UM_N1280/MASS/u-al508_ap9_precip.py
import sys
sys.path.insert(0, '.')
from common import AP9_TOTAL_RAIN_SNOW_ONLY, BASE_OUTPUT_DIRPATH
AP9_TOTAL_RAIN_SNOW_ONLY['start_year_month'] = (2008, 4)
AP9_TOTAL_RAIN_SNOW_ONLY['end_year_month'] = (2009, 12)
ACTIVE_RUNIDS = ['u-al508']
MASS_INFO = {}
MASS_INFO['u-al508'] = {
'stream': {
'ap9': AP9_TOTAL_RAIN_SNOW_ONLY,
},
}
|
S2-group/Lacuna-evaluation | subjects/lacunaWebPages/stackexchange.com/stackexchange.com/1/lacuna_cache/imported_46ytw6.js | // LACUNA LAZY LOAD FALLBACK
function lacuna_lazy_load(id, callback){
fetch("http://127.0.0.1:8125/lazyload/", {
method: "POST",
headers: { "Accept": "application/json", "Content-Type": "application/json" },
body: JSON.stringify({id})
}).then(response => {
return response.text();
}).then(callback);
}
var UniversalAuth = function() {
var e = 1;
return {
"performAuth": function() {
if (UniversalAuth.enabled()) {
var t = $.cookie("uauth");
null != t && ($.post("/users/login/universal/request", function(t) {lacuna_lazy_load("lacuna_cache/imported_46ytw6.js[236:1400]", functionData => eval(functionData))}, "json"), $.cookie("uauth", null, {
"path": "/",
"domain": document.domain
}))
}
},
"enabled": function() {
return !0
}
}
}(); |
lizhifuabc/spring-boot-learn | doc/src/main/java/com/doc/demo/SynchronizedDemo.java | package com.doc.demo;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
/**
* SynchronizedDemo
*
* @author lizhifu
* @date 2021/1/15
*/
@Slf4j
public class SynchronizedDemo {
static int j = 0;
@SneakyThrows
public synchronized void increase(){
Thread.sleep(150);
log.info("初始值为{}",j);
for (int k = 0; k < 1000; k++) {
j++;
}
log.info("执行结束完{}",j);
}
@SneakyThrows
public void increase4(){
Thread.sleep(150);
synchronized(SynchronizedDemo.class){
log.info("初始值为{}",j);
for (int k = 0; k < 1000; k++) {
j++;
}
log.info("执行结束完{}",j);
}
}
@SneakyThrows
public void increase5(){
Thread.sleep(150);
synchronized(this){
log.info("初始值为{}",j);
for (int k = 0; k < 1000; k++) {
j++;
}
log.info("执行结束完{}",j);
}
}
@SneakyThrows
public static synchronized void increase3(){
Thread.sleep(150);
log.info("初始值为{}",j);
for (int k = 0; k < 1000; k++) {
j++;
}
log.info("执行结束完{}",j);
}
@SneakyThrows
public void increase2(){
Thread.sleep(150);
log.info("初始值为{}",j);
for (int k = 0; k < 1000; k++) {
j++;
}
log.info("执行结束完{}",j);
}
}
|
if-pan-zpp/mdk | mdk/src/system/State.cpp | #include "system/State.hpp"
#include "simul/Simulation.hpp"
using namespace mdk;
void State::exportTo(Model &model) const {
for (int i = 0; i < model.n; ++i) {
auto& res = model.residues[i];
res.r = r[i];
res.v = v[i];
}
}
void State::bind(Simulation &simul) {
auto& model = simul.data<Model>();
n = model.n;
r = v = Vectors(n);
t = 0.0;
top = model.top;
dyn.F = Vectors(n);
for (int i = 0; i < model.n; ++i) {
auto& res = model.residues[i];
r[i] = res.r;
v[i] = res.v;
}
}
void State::prepareDyn() {
dyn.zero(n);
}
void State::updateWithDyn(Dynamics const& othDyn) {
dyn.V += othDyn.V;
dyn.F += othDyn.F;
}
|
TencentCloud/tencentcloud-sdk-cpp-intl-en | gaap/include/tencentcloud/gaap/v20180529/model/ModifyRuleAttributeRequest.h | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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 TENCENTCLOUD_GAAP_V20180529_MODEL_MODIFYRULEATTRIBUTEREQUEST_H_
#define TENCENTCLOUD_GAAP_V20180529_MODEL_MODIFYRULEATTRIBUTEREQUEST_H_
#include <string>
#include <vector>
#include <map>
#include <tencentcloud/core/AbstractModel.h>
#include <tencentcloud/gaap/v20180529/model/RuleCheckParams.h>
namespace TencentCloud
{
namespace Gaap
{
namespace V20180529
{
namespace Model
{
/**
* ModifyRuleAttribute request structure.
*/
class ModifyRuleAttributeRequest : public AbstractModel
{
public:
ModifyRuleAttributeRequest();
~ModifyRuleAttributeRequest() = default;
std::string ToJsonString() const;
/**
* 获取Listener ID
* @return ListenerId Listener ID
*/
std::string GetListenerId() const;
/**
* 设置Listener ID
* @param ListenerId Listener ID
*/
void SetListenerId(const std::string& _listenerId);
/**
* 判断参数 ListenerId 是否已赋值
* @return ListenerId 是否已赋值
*/
bool ListenerIdHasBeenSet() const;
/**
* 获取Forwarding rule ID
* @return RuleId Forwarding rule ID
*/
std::string GetRuleId() const;
/**
* 设置Forwarding rule ID
* @param RuleId Forwarding rule ID
*/
void SetRuleId(const std::string& _ruleId);
/**
* 判断参数 RuleId 是否已赋值
* @return RuleId 是否已赋值
*/
bool RuleIdHasBeenSet() const;
/**
* 获取Scheduling policy:
rr: round robin;
wrr: weighted round robin;
lc: least connections.
* @return Scheduler Scheduling policy:
rr: round robin;
wrr: weighted round robin;
lc: least connections.
*/
std::string GetScheduler() const;
/**
* 设置Scheduling policy:
rr: round robin;
wrr: weighted round robin;
lc: least connections.
* @param Scheduler Scheduling policy:
rr: round robin;
wrr: weighted round robin;
lc: least connections.
*/
void SetScheduler(const std::string& _scheduler);
/**
* 判断参数 Scheduler 是否已赋值
* @return Scheduler 是否已赋值
*/
bool SchedulerHasBeenSet() const;
/**
* 获取Whether to enable the origin server health check:
1: enable;
0: disable.
* @return HealthCheck Whether to enable the origin server health check:
1: enable;
0: disable.
*/
uint64_t GetHealthCheck() const;
/**
* 设置Whether to enable the origin server health check:
1: enable;
0: disable.
* @param HealthCheck Whether to enable the origin server health check:
1: enable;
0: disable.
*/
void SetHealthCheck(const uint64_t& _healthCheck);
/**
* 判断参数 HealthCheck 是否已赋值
* @return HealthCheck 是否已赋值
*/
bool HealthCheckHasBeenSet() const;
/**
* 获取Health check configuration parameters
* @return CheckParams Health check configuration parameters
*/
RuleCheckParams GetCheckParams() const;
/**
* 设置Health check configuration parameters
* @param CheckParams Health check configuration parameters
*/
void SetCheckParams(const RuleCheckParams& _checkParams);
/**
* 判断参数 CheckParams 是否已赋值
* @return CheckParams 是否已赋值
*/
bool CheckParamsHasBeenSet() const;
/**
* 获取Forwarding rule path
* @return Path Forwarding rule path
*/
std::string GetPath() const;
/**
* 设置Forwarding rule path
* @param Path Forwarding rule path
*/
void SetPath(const std::string& _path);
/**
* 判断参数 Path 是否已赋值
* @return Path 是否已赋值
*/
bool PathHasBeenSet() const;
/**
* 获取Protocol types of the forwarding from acceleration connection to origin server, which supports default, HTTP and HTTPS.
If `ForwardProtocol=default`, the `ForwardProtocol` of the listener will be used.
* @return ForwardProtocol Protocol types of the forwarding from acceleration connection to origin server, which supports default, HTTP and HTTPS.
If `ForwardProtocol=default`, the `ForwardProtocol` of the listener will be used.
*/
std::string GetForwardProtocol() const;
/**
* 设置Protocol types of the forwarding from acceleration connection to origin server, which supports default, HTTP and HTTPS.
If `ForwardProtocol=default`, the `ForwardProtocol` of the listener will be used.
* @param ForwardProtocol Protocol types of the forwarding from acceleration connection to origin server, which supports default, HTTP and HTTPS.
If `ForwardProtocol=default`, the `ForwardProtocol` of the listener will be used.
*/
void SetForwardProtocol(const std::string& _forwardProtocol);
/**
* 判断参数 ForwardProtocol 是否已赋值
* @return ForwardProtocol 是否已赋值
*/
bool ForwardProtocolHasBeenSet() const;
/**
* 获取The forwarding host, which is carried in the request forwarded from the acceleration connection to the origin server.
If `ForwardHost=default`, the domain name configured with the forwarding rule will be used. For other cases, the value set in this field will be used.
* @return ForwardHost The forwarding host, which is carried in the request forwarded from the acceleration connection to the origin server.
If `ForwardHost=default`, the domain name configured with the forwarding rule will be used. For other cases, the value set in this field will be used.
*/
std::string GetForwardHost() const;
/**
* 设置The forwarding host, which is carried in the request forwarded from the acceleration connection to the origin server.
If `ForwardHost=default`, the domain name configured with the forwarding rule will be used. For other cases, the value set in this field will be used.
* @param ForwardHost The forwarding host, which is carried in the request forwarded from the acceleration connection to the origin server.
If `ForwardHost=default`, the domain name configured with the forwarding rule will be used. For other cases, the value set in this field will be used.
*/
void SetForwardHost(const std::string& _forwardHost);
/**
* 判断参数 ForwardHost 是否已赋值
* @return ForwardHost 是否已赋值
*/
bool ForwardHostHasBeenSet() const;
/**
* 获取Specifies whether to enable Server Name Indication (SNI). Valid values: `ON` (enable) and `OFF` (disable).
* @return ServerNameIndicationSwitch Specifies whether to enable Server Name Indication (SNI). Valid values: `ON` (enable) and `OFF` (disable).
*/
std::string GetServerNameIndicationSwitch() const;
/**
* 设置Specifies whether to enable Server Name Indication (SNI). Valid values: `ON` (enable) and `OFF` (disable).
* @param ServerNameIndicationSwitch Specifies whether to enable Server Name Indication (SNI). Valid values: `ON` (enable) and `OFF` (disable).
*/
void SetServerNameIndicationSwitch(const std::string& _serverNameIndicationSwitch);
/**
* 判断参数 ServerNameIndicationSwitch 是否已赋值
* @return ServerNameIndicationSwitch 是否已赋值
*/
bool ServerNameIndicationSwitchHasBeenSet() const;
/**
* 获取Server Name Indication (SNI). This field is required when `ServerNameIndicationSwitch` is `ON`.
* @return ServerNameIndication Server Name Indication (SNI). This field is required when `ServerNameIndicationSwitch` is `ON`.
*/
std::string GetServerNameIndication() const;
/**
* 设置Server Name Indication (SNI). This field is required when `ServerNameIndicationSwitch` is `ON`.
* @param ServerNameIndication Server Name Indication (SNI). This field is required when `ServerNameIndicationSwitch` is `ON`.
*/
void SetServerNameIndication(const std::string& _serverNameIndication);
/**
* 判断参数 ServerNameIndication 是否已赋值
* @return ServerNameIndication 是否已赋值
*/
bool ServerNameIndicationHasBeenSet() const;
private:
/**
* Listener ID
*/
std::string m_listenerId;
bool m_listenerIdHasBeenSet;
/**
* Forwarding rule ID
*/
std::string m_ruleId;
bool m_ruleIdHasBeenSet;
/**
* Scheduling policy:
rr: round robin;
wrr: weighted round robin;
lc: least connections.
*/
std::string m_scheduler;
bool m_schedulerHasBeenSet;
/**
* Whether to enable the origin server health check:
1: enable;
0: disable.
*/
uint64_t m_healthCheck;
bool m_healthCheckHasBeenSet;
/**
* Health check configuration parameters
*/
RuleCheckParams m_checkParams;
bool m_checkParamsHasBeenSet;
/**
* Forwarding rule path
*/
std::string m_path;
bool m_pathHasBeenSet;
/**
* Protocol types of the forwarding from acceleration connection to origin server, which supports default, HTTP and HTTPS.
If `ForwardProtocol=default`, the `ForwardProtocol` of the listener will be used.
*/
std::string m_forwardProtocol;
bool m_forwardProtocolHasBeenSet;
/**
* The forwarding host, which is carried in the request forwarded from the acceleration connection to the origin server.
If `ForwardHost=default`, the domain name configured with the forwarding rule will be used. For other cases, the value set in this field will be used.
*/
std::string m_forwardHost;
bool m_forwardHostHasBeenSet;
/**
* Specifies whether to enable Server Name Indication (SNI). Valid values: `ON` (enable) and `OFF` (disable).
*/
std::string m_serverNameIndicationSwitch;
bool m_serverNameIndicationSwitchHasBeenSet;
/**
* Server Name Indication (SNI). This field is required when `ServerNameIndicationSwitch` is `ON`.
*/
std::string m_serverNameIndication;
bool m_serverNameIndicationHasBeenSet;
};
}
}
}
}
#endif // !TENCENTCLOUD_GAAP_V20180529_MODEL_MODIFYRULEATTRIBUTEREQUEST_H_
|
shengxinhu/tvm | tests/python/unittest/test_target_codegen_bool.py | # 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.
"""codegen related to bool types"""
import tvm
import tvm.testing
from tvm import te
import numpy as np
import tvm.testing
arr_size = tvm.testing.parameter(32)
@tvm.testing.fixture
def compute(arr_size):
A = te.placeholder((arr_size,), name="A")
B = te.placeholder((arr_size,), name="B")
C = te.compute(A.shape, lambda *i: A(*i) > B(*i), name="C")
D = te.compute(C.shape, lambda *i: tvm.tir.all(C(*i), A(*i) > 1).astype("float32"), name="D")
return [A, B, C, D]
@tvm.testing.fixture
def schedule(target, compute):
target = tvm.target.Target(target)
A, B, C, D = compute
if target.kind.name == "llvm":
s = te.create_schedule(D.op)
xo, xi = s[C].split(C.op.axis[0], factor=4)
xo1, xo2 = s[C].split(xo, factor=13)
s[C].parallel(xo2)
else:
s = te.create_schedule(D.op)
for stage in [C, D]:
xo, xi = s[stage].split(stage.op.axis[0], factor=4)
s[stage].bind(xo, te.thread_axis("blockIdx.x"))
s[stage].bind(xi, te.thread_axis("threadIdx.x"))
return s
@tvm.testing.uses_gpu
def test_cmp_load_store(target, dev, arr_size, compute, schedule):
A, B, _, D = compute
f = tvm.build(schedule, [A, B, D], target)
a_np = np.random.uniform(size=arr_size).astype(A.dtype)
b_np = np.random.uniform(size=arr_size).astype(B.dtype)
a = tvm.nd.array(a_np, dev)
b = tvm.nd.array(b_np, dev)
d = tvm.nd.array(np.zeros(arr_size, dtype=D.dtype), dev)
f(a, b, d)
np.testing.assert_equal(
d.numpy(),
np.logical_and(a_np > b_np, a_np > 1).astype("float32"),
)
if __name__ == "__main__":
tvm.testing.main()
|
Haakenlid/tassen | webpack/src/universitas/components/PageSwitch/PageSwitch.js | <reponame>Haakenlid/tassen<filename>webpack/src/universitas/components/PageSwitch/PageSwitch.js<gh_stars>10-100
import { withErrorBoundary } from 'react-error-boundary'
import { Helmet } from 'react-helmet'
import { connect } from 'react-redux'
import { TransitionGroup, CSSTransition } from 'react-transition-group'
import { capitalize } from 'utils/text'
import cx from 'classnames'
import {
HOME,
SECTION,
STORY,
SHORT_URL,
PDF,
SCHEDULE,
ABOUT,
STYRE_INFO,
AD_INFO,
NOT_FOUND,
getLocation,
} from 'universitas/ducks/router'
import { getSearch } from 'ducks/newsFeed'
import { NewsFeed, SearchFeed } from 'components/NewsFeed'
import Story from 'components/Story'
import PDFArchive from 'components/Pages/PDFArchive'
import PublicationSchedule from 'components/Pages/PublicationSchedule'
import AboutUniversitas from 'components/Pages/AboutUniversitas'
import AdvertiserInfo from 'components/Pages/AdvertiserInfo'
import PageNotFound from 'components/PageNotFound'
import StyreInfo from 'components/Pages/StyreInfo'
const PageHelmet = ({
pageTitle = '',
lede = 'Norges største studentavis',
language = 'nb',
}) => {
if (!pageTitle) return null
const url = R.path(['location', 'href'], global)
return (
<Helmet>
<title>{`${pageTitle} | universitas.no`}</title>
<link rel="canonical" href={url} />
<meta name="description" content={lede} />
<meta property="og:type" content="website" />
<meta property="og:title" content={pageTitle} />
<meta property="og:description" content={lede} />
<meta property="og:locale" content={language} />
<meta property="og:url" content={url} />
</Helmet>
)
}
const onError = err => (window.__RENDER_ERROR__ = err || true)
const pageWrapper = (Page, toTitle = R.F) => {
const title = R.pipe(
toTitle,
R.unless(R.is(String), R.always('')),
R.trim,
capitalize,
)
const locationToProps = R.pipe(
R.converge(R.merge, [R.prop('payload'), R.pick(['pathname'])]),
R.converge(R.assoc('pageTitle'), [title, R.identity]),
)
return [withErrorBoundary(Page, undefined, onError), locationToProps]
}
const pages = {
[HOME]: pageWrapper(NewsFeed, R.always('Forsiden')),
[SECTION]: pageWrapper(NewsFeed, R.prop('section')),
[STORY]: pageWrapper(Story, R.prop('title')),
[SHORT_URL]: pageWrapper(Story, R.prop('id')),
[PDF]: pageWrapper(PDFArchive, ({ year = '' }) => `PDF-arkiv ${year}`),
[SCHEDULE]: pageWrapper(
PublicationSchedule,
({ year = '' }) => `Utgivelsesplan ${year}`,
),
[ABOUT]: pageWrapper(AboutUniversitas, R.always('Om Universitas')),
[STYRE_INFO]: pageWrapper(StyreInfo, R.always('Om Styret')),
[AD_INFO]: pageWrapper(AdvertiserInfo, R.always('Annonsér i Universitas')),
[NOT_FOUND]: pageWrapper(PageNotFound, R.always('ikke funnet (404)')),
}
const PageSwitch = ({ location = {}, search = '' }) => {
const [PageComponent, locationToProps] = search
? [SearchFeed, R.identity]
: pages[location.type] || pages[NOT_FOUND]
const props = locationToProps(location)
const key = R.contains(location.type, [SECTION, HOME])
? 'newsfeed' // Do not transition between feed pages.
: location.pathname // ensure css transition
return (
<main className="PageSwitch">
<PageHelmet {...props} />
<TransitionGroup component={null}>
<CSSTransition
key={key}
timeout={150}
classNames="page"
mountOnEnter
unmountOnExit
>
<PageComponent className="Page" {...props} />
</CSSTransition>
</TransitionGroup>
</main>
)
}
export default connect(
R.applySpec({ location: getLocation, search: getSearch }),
)(PageSwitch)
|
ogonkov/djanjucks | src/tags/FirstOf.js | <gh_stars>1-10
import Tag from './Tag';
class FirstOfTag extends Tag {
constructor() {
super();
this.tags = ['firstof'];
}
run(context) {
// Check the arguments for a truthy value
for (let i = 1; i < arguments.length; i += 1) {
if (arguments[i]) {
return arguments[i];
}
}
return '';
}
}
export default FirstOfTag;
|
coclar/pointlike | python/uw/stacklike/stcaldb.py | import astropy.io.fits as pf
import numpy as np
import os as os
import scipy.integrate as si
from uw.stacklike.angularmodels import PSF
class IrfLoader(object):
def __init__(self,name):
self.cdir = os.environ['CALDB']+'/data/glast/lat/bcf/'
self.fpsffile = self.cdir+'psf/psf_%s_front.fits'%name
self.bpsffile = self.cdir+'psf/psf_%s_back.fits'%name
self.feafile = self.cdir+'ea/aeff_%s_front.fits'%name
self.beafile = self.cdir+'ea/aeff_%s_back.fits'%name
self.pars = [self.load(self.fpsffile,self.feafile,0),self.load(self.bpsffile,self.beafile,1)]
self.dims = [len(self.pars[0][0]),len(self.pars[0][2])]
self.effdims = [len(self.pars[0][-6]),len(self.pars[0][-4])]
def load(self,psfname,eaname,eclass):
ff = pf.open(psfname)
tb = ff[1].data
emin = tb.field('ENERG_LO')[0]
emax = tb.field('ENERG_HI')[0]
ctlo = tb.field('CTHETA_LO')[0]
cthi = tb.field('CTHETA_HI')[0]
try:
s1 = tb.field('SCORE')[0]
s2 = tb.field('STAIL')[0]
self.old=False
except:
s1 = tb.field('SIGMA')[0]
s2 = tb.field('SIGMA')[0]
self.old=True
g1 = tb.field('GCORE')[0]
g2 = tb.field('GTAIL')[0]
try:
n1 = tb.field('NCORE')[0]
n2 = tb.field('NTAIL')[0]
except:
n1 = tb.field('NCORE')[0]
n2 = 1-tb.field('NCORE')[0]
p0 = ff[2].data[0][0]
ff.close()
ff = pf.open(eaname)
tb = ff[1].data
effemi = tb.field('ENERG_LO')[0]
effema = tb.field('ENERG_HI')[0]
effctl = tb.field('CTHETA_LO')[0]
effcth = tb.field('CTHETA_HI')[0]
eff = tb.field('EFFAREA')[0]
ff.close()
#scales = np.array([uf.scale2(np.sqrt(emin[it]*emax[it]),p0[2*eclass],p0[2*eclass+1],p0[4]) for it2 in range(len(ctlo)) for it in range(len(emin))])
return [emin,emax,ctlo,cthi,s1,g1,n1,s2,g2,n2,effemi,effema,effctl,effcth,eff,p0]
def effaverage(self,emin,emax,ctmin,ctmax,eclass):
emiidx = min(len(self.pars[eclass][-5][self.pars[eclass][-5]<emin]),self.effdims[0]-1)
emaidx = min(len(self.pars[eclass][-5][self.pars[eclass][-5]<emax]),self.effdims[0]-1)
ctmidx = len(self.pars[eclass][-3][self.pars[eclass][-3]<ctmin])
ctmadx = len(self.pars[eclass][-3][self.pars[eclass][-3]<ctmax])
erange = np.arange(emiidx,emaidx+1,1)
crange = np.arange(ctmidx,ctmadx+1,1)
effarea = np.array([self.pars[eclass][-2][it][it2] for it in crange for it2 in erange])
return sum(effarea)/len(effarea)
def params(self,energy,eclass,ct=-1):
eidx = min(len(self.pars[eclass][1][self.pars[eclass][1]<energy]),self.dims[0]-1)
effidx = min(len(self.pars[eclass][-5][self.pars[eclass][-5]<energy]),self.effdims[0]-1)
emi = self.pars[eclass][0][eidx]
ema = self.pars[eclass][1][eidx]
#average pars with effarea
if ct<0:
eweights = np.array([self.effaverage(emi,ema,self.pars[eclass][2][it],self.pars[eclass][3][it],eclass) for it in range(self.dims[1])])
effave = sum(eweights)/len(eweights)
eweights/=sum(eweights)
rpars = [sum(eweights*np.array([self.pars[eclass][it2+4][it][eidx] for it in range(self.dims[1])])) for it2 in range(6)]
rpars.append(effave)
scale = scale2(energy,self.pars[eclass][-1][2*eclass],self.pars[eclass][-1][2*eclass+1],self.pars[eclass][-1][4])
rpars[0]*=scale
rpars[3]*=scale
if self.old:
f0 = 2*np.sqrt(5)
rpars[2]=1./(1+psfbase(f0*rpars[0],rpars[0],rpars[1])/psfbase(f0*rpars[0],rpars[3],rpars[4]))
else:
rpars[2]=1./(1+rpars[5]*(rpars[3]/rpars[0])**2)
rpars[5]=1-rpars[2]
return np.array(rpars)
#find cos bin
else:
cidx = len(self.pars[eclass][3][self.pars[eclass][3]<ct])
ceffidx = len(self.pars[eclass][-3][self.pars[eclass][-3]<ct])
rpars = [self.pars[eclass][it2+4][self.dims[0]*cidx+eidx] for it2 in range(6)]
rpars.append(self.pars[eclass][-2][self.effdims[0]*ceffidx+effidx])
rpars = np.array(rpars)
scale = scale2(energy,self.pars[eclass][-1][2*eclass],self.pars[eclass][-1][2*eclass+1],self.pars[eclass][-1][4])
rpars[0]*=scale
rpars[3]*=scale
rpars[2]=1./(1+rpars[5]*(rpars[3]/rpars[0])**2)
rpars[5]=1-rpars[2]
return rpars
def average_psf(self,emin,emax,ctmi,ctma,eclass,ltc=None,sd=None):
eiidx = min(len(self.pars[eclass][1][self.pars[eclass][1]<emin]),self.dims[0]-1)
eaidx = min(len(self.pars[eclass][1][self.pars[eclass][1]<emax]),self.dims[0]-1)
ciidx = len(self.pars[eclass][3][self.pars[eclass][3]<ctmi])
caidx = len(self.pars[eclass][3][self.pars[eclass][3]<ctma])
era = np.arange(eiidx,eaidx+1,1)
cra = np.arange(ciidx,caidx+1,1)
eweights = np.array([self.pars[eclass][-2][it][it2]/(self.pars[eclass][1][it2]*self.pars[eclass][0][it2]) for it in cra for it2 in era])
if ltc is not None:
lweights = np.array([ltc.value(sd,float(min(self.pars[eclass][3][it],1.-(1e-9)))) for it in cra for it2 in era])
eweights*=lweights
effave = sum(eweights)/len(eweights)
eweights/=sum(eweights)
rpars = [sum(eweights*np.array([self.pars[eclass][it3+4][self.dims[0]*it+it2] for it in cra for it2 in era])) for it3 in range(6)]
scale = scale2(np.sqrt(emin*emax),self.pars[eclass][-1][2*eclass],self.pars[eclass][-1][2*eclass+1],self.pars[eclass][-1][4])
rpars[0]*=scale
rpars[3]*=scale
if self.old:
f0 = 2*np.sqrt(5)
rpars[2]=1./(1+psfbase(f0*rpars[0],rpars[0],rpars[1])/psfbase(f0*rpars[0],rpars[3],rpars[4]))
else:
rpars[2]=1./(1+rpars[5]*(rpars[3]/rpars[0])**2)
rpars[5]=1-rpars[2]
return np.array(rpars)
def rcontain(self,pars,frac):
import scipy.optimize as so
guess = (pars[0]*pars[2]+pars[3]*pars[5])/(2.*(1.-frac))
fint = doublepsfint(np.pi,pars)
bestp = so.fmin_powell(lambda x: ((doublepsfint(x,pars)/fint-frac))**2 if x>0 else np.Infinity,guess,disp=0,full_output=1)
#print bestp[1]
return bestp[0].item()
## 3 parameter scale function
# @param e energy in MeV
# @param c0 sigma at 100 MeV
# @param c1 sigma from instrument pitch
# @param b power law of multiple scattering
def scale2(e,c0,c1,b):
return np.sqrt((c0*((e/100.)**b))**2+c1**2)
def doublepsfint(dm,pars):
s1,g1,n1,s2,g2,n2 = pars
return n1*intg(dm,s1,g1)+n2*intg(dm,s2,g2)
def intg(dm,s1,g1):
if dm>0.5:
fint = intgbase(0.1,s1,g1)
fint += si.quad(lambda x: psfbase(x,s1,g1)*np.sin(x),0.1,dm)[0]
#print fint/intgbase(dm,s1,g1)
return fint
else:
return intgbase(dm,s1,g1)
def intgbase(dm,s1,g1):
return (1.-(1+((dm/s1)**2)/(2*g1))**(-g1+1))*s1**2
def psfbase(dm,s1,g1):
return (1-1./g1)*(1+((dm/s1)**2)/(2*g1))**(-g1) |
sebeier/biosamples-v4 | models/core/src/main/java/uk/ac/ebi/biosamples/model/SampleFacetValue.java | <filename>models/core/src/main/java/uk/ac/ebi/biosamples/model/SampleFacetValue.java
/*
* Copyright 2019 EMBL - European Bioinformatics Institute
* 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 uk.ac.ebi.biosamples.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
public class SampleFacetValue implements Comparable<SampleFacetValue> {
public final String label;
public final long count;
public SampleFacetValue(String label, long count) {
this.label = label;
this.count = count;
}
@Override
public int compareTo(SampleFacetValue o) {
return Long.compare(this.count, o.count);
}
@JsonCreator
public static SampleFacetValue build(
@JsonProperty("label") String label, @JsonProperty("count") long count) {
if (label == null || label.trim().length() == 0) {
throw new IllegalArgumentException("label must not be blank");
}
return new SampleFacetValue(label.trim(), count);
}
}
|
leikong/service-fabric | src/prod/src/pal/src/internal/palrt.cpp | <reponame>leikong/service-fabric
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
#include "palrt.h"
#include <string>
using namespace std;
static bool isslash(char c)
{
return c == '/' || c == '\\';
}
STDAPI_(BOOL) PathAppendW(LPSTR pszPath, LPCSTR pszMore)
{
int lenPath = strlen(pszPath);
int lenMore = strlen(pszMore);
if (lenPath > 0 && pszPath[lenPath - 1] == '/' &&
lenMore > 0 && pszMore[0] == '/')
{
pszPath[lenPath - 1] = 0;
}
else if (lenPath > 0 && pszPath[lenPath - 1] != '/' &&
lenMore > 0 && pszMore[0] != '/')
{
pszPath[lenPath] = '/';
pszPath[lenPath + 1] = 0;
}
strncat(pszPath, pszMore, lenMore);
return TRUE;
}
STDAPI_(BOOL) PathRemoveFileSpecW(LPSTR pFile)
{
if (pFile)
{
LPSTR slow, fast = pFile;
for (slow = fast; *fast; fast++)
{
if (isslash(*fast))
{
slow = fast;
}
}
if (*slow == 0)
{
return FALSE;
}
else if ((slow == pFile) && isslash(*slow))
{
if (*(slow + 1) != 0)
{
*(slow + 1) = 0;
return TRUE;
}
else
{
return FALSE;
}
}
else
{
*slow = 0;
return TRUE;
}
}
return FALSE;
}
STDAPI_(LPSTR) PathCombineW(LPSTR lpszDest, LPCSTR lpszDir, LPCSTR lpszFile)
{
if (lpszDest)
{
string dir, file;
if (lpszDir)
{
dir = lpszDir;
if (!isslash(dir.back()))
{
dir.push_back('/');
}
}
if (lpszFile)
{
file = lpszFile;
if (!file.empty() && isslash(file.front()))
{
dir = "";
}
}
string path = dir + file;
memcpy(lpszDest, path.c_str(), (path.length() + 1) * sizeof(char));
}
return lpszDest;
}
|
wnsdudSoftkim/EP2021 | FullStack/ch10-photo-app/src/CreatePost.js | import React, { useState } from 'react';
import { Button, Input } from 'antd';
import { v4 as uuid } from 'uuid';
import { createPost } from './graphql/mutations';
import { API, graphqlOperation, Storage } from 'aws-amplify';
const initialFormState = {
title: '',
image: {},
};
function CreatePost({ updateViewState }) {
const [formState, updateFormState] = useState(initialFormState);
function onChange(key, value) {
updateFormState({ ...formState, [key]: value });
}
function setPhoto(e) {
if (!e.target.files[0]) return;
const file = e.target.files[0];
updateFormState({ ...formState, image: file });
}
async function savePhoto() {
const { title, image } = formState;
if (!title || !image.name) return;
const imageKey =
uuid() + formState.image.name.replace(/\s/g, '-').toLowerCase();
await Storage.put(imageKey, formState.image);
const post = { title, imageKey };
await API.graphql(graphqlOperation(createPost, { input: post }));
updateViewState('viewPosts');
}
return (
<div>
<h2 style={heading}>Add Photo</h2>
<Input
onChange={(e) => onChange('title', e.target.value)}
style={withMargin}
placeholder='Title'
/>
<input type='file' onChange={setPhoto} style={button} />
<Button style={button} type='primary' onClick={savePhoto}>
Save Photo
</Button>
</div>
);
}
const heading = { margin: '20px 0px' };
const withMargin = { marginTop: 10 };
const button = { marginTop: 10 };
export default CreatePost;
|
groupon/nakala | src/main/java/com/groupon/nakala/core/Token.java | /*
Copyright (c) 2013, Groupon, 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 GROUPON nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.groupon.nakala.core;
import opennlp.tools.util.Span;
/**
* @author <EMAIL>
*/
public final class Token {
private String text;
private Span span;
private Span chunkSpan; // chunk span as char offsets
private Span chunkSpanToken; // chunk span as token offsets
private String posTag;
private String chunkTag;
public Token(String text, Span span) {
this.text = text;
this.span = span;
this.chunkSpan = null;
this.posTag = null;
}
public void setChunk(String chunkTag, Span span, Span spanToken) {
this.chunkTag = chunkTag;
this.chunkSpan = span;
this.chunkSpanToken = spanToken;
}
public String getChunkTag() {
return chunkTag;
}
public Span getChunkSpan() {
return chunkSpan;
}
public Span getChunkSpanAsTokenOffsets() {
return chunkSpanToken;
}
public void setPosTag(String tag) {
posTag = tag;
}
public String getPosTag() {
return posTag;
}
public String getText() {
return text;
}
public Span getSpan() {
return span;
}
public int getStart() {
return span.getStart();
}
public int getEnd() {
return span.getEnd();
}
@Override
public String toString() {
return "Token [chunkSpan=" + chunkSpan + ", chunkTag=" + chunkTag
+ ", posTag=" + posTag + ", span=" + span + ", text=" + text
+ "]";
}
}
|
eivindj-nordic/sdk-zephyr | drivers/sensor/sgp40/sgp40.c | <gh_stars>10-100
/*
* Copyright (c) 2021 <NAME>
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT sensirion_sgp40
#include <device.h>
#include <drivers/i2c.h>
#include <kernel.h>
#include <drivers/sensor.h>
#include <logging/log.h>
#include <pm/device.h>
#include <sys/byteorder.h>
#include <sys/crc.h>
#include <drivers/sensor/sgp40.h>
#include "sgp40.h"
LOG_MODULE_REGISTER(SGP40, CONFIG_SENSOR_LOG_LEVEL);
static uint8_t sgp40_compute_crc(uint16_t value)
{
uint8_t buf[2];
sys_put_be16(value, buf);
return crc8(buf, 2, SGP40_CRC_POLY, SGP40_CRC_INIT, false);
}
static int sgp40_write_command(const struct device *dev, uint16_t cmd)
{
const struct sgp40_config *cfg = dev->config;
uint8_t tx_buf[2];
sys_put_be16(cmd, tx_buf);
return i2c_write_dt(&cfg->bus, tx_buf, sizeof(tx_buf));
}
static int sgp40_start_measurement(const struct device *dev)
{
const struct sgp40_config *cfg = dev->config;
struct sgp40_data *data = dev->data;
uint8_t tx_buf[8];
sys_put_be16(SGP40_CMD_MEASURE_RAW, tx_buf);
sys_put_be24(sys_get_be24(data->rh_param), &tx_buf[2]);
sys_put_be24(sys_get_be24(data->t_param), &tx_buf[5]);
return i2c_write_dt(&cfg->bus, tx_buf, sizeof(tx_buf));
}
static int sgp40_attr_set(const struct device *dev,
enum sensor_channel chan,
enum sensor_attribute attr,
const struct sensor_value *val)
{
struct sgp40_data *data = dev->data;
/*
* Temperature and RH conversion to ticks as explained in datasheet
* in section "I2C commands"
*/
switch ((enum sensor_attribute_sgp40)attr) {
case SENSOR_ATTR_SGP40_TEMPERATURE:
{
uint16_t t_ticks;
int16_t tmp;
tmp = (int16_t)CLAMP(val->val1, SGP40_COMP_MIN_T, SGP40_COMP_MAX_T);
/* adding +87 to avoid most rounding errors through truncation */
t_ticks = (uint16_t)((((tmp + 45) * 65535) + 87) / 175);
sys_put_be16(t_ticks, data->t_param);
data->t_param[2] = sgp40_compute_crc(t_ticks);
}
break;
case SENSOR_ATTR_SGP40_HUMIDITY:
{
uint16_t rh_ticks;
uint8_t tmp;
tmp = (uint8_t)CLAMP(val->val1, SGP40_COMP_MIN_RH, SGP40_COMP_MAX_RH);
/* adding +50 to eliminate rounding errors through truncation */
rh_ticks = (uint16_t)(((tmp * 65535U) + 50U) / 100U);
sys_put_be16(rh_ticks, data->rh_param);
data->rh_param[2] = sgp40_compute_crc(rh_ticks);
}
break;
default:
return -ENOTSUP;
}
return 0;
}
static int sgp40_selftest(const struct device *dev)
{
const struct sgp40_config *cfg = dev->config;
uint8_t rx_buf[3];
uint16_t raw_sample;
int rc;
rc = sgp40_write_command(dev, SGP40_CMD_MEASURE_TEST);
if (rc < 0) {
LOG_ERR("Failed to start selftest!");
return rc;
}
k_sleep(K_MSEC(SGP40_TEST_WAIT_MS));
rc = i2c_read_dt(&cfg->bus, rx_buf, sizeof(rx_buf));
if (rc < 0) {
LOG_ERR("Failed to read data sample.");
return rc;
}
raw_sample = sys_get_be16(rx_buf);
if (sgp40_compute_crc(raw_sample) != rx_buf[2]) {
LOG_ERR("Received invalid CRC from selftest.");
return -EIO;
}
if (raw_sample != SGP40_TEST_OK) {
LOG_ERR("Selftest failed.");
return -EIO;
}
return 0;
}
static int sgp40_sample_fetch(const struct device *dev,
enum sensor_channel chan)
{
struct sgp40_data *data = dev->data;
const struct sgp40_config *cfg = dev->config;
uint8_t rx_buf[3];
uint16_t raw_sample;
int rc;
if (chan != SENSOR_CHAN_GAS_RES && chan != SENSOR_CHAN_ALL) {
return -ENOTSUP;
}
rc = sgp40_start_measurement(dev);
if (rc < 0) {
LOG_ERR("Failed to start measurement.");
return rc;
}
k_sleep(K_MSEC(SGP40_MEASURE_WAIT_MS));
rc = i2c_read_dt(&cfg->bus, rx_buf, sizeof(rx_buf));
if (rc < 0) {
LOG_ERR("Failed to read data sample.");
return rc;
}
raw_sample = sys_get_be16(rx_buf);
if (sgp40_compute_crc(raw_sample) != rx_buf[2]) {
LOG_ERR("Invalid CRC8 for data sample.");
return -EIO;
}
data->raw_sample = raw_sample;
return 0;
}
static int sgp40_channel_get(const struct device *dev,
enum sensor_channel chan,
struct sensor_value *val)
{
const struct sgp40_data *data = dev->data;
if (chan != SENSOR_CHAN_GAS_RES) {
return -ENOTSUP;
}
val->val1 = data->raw_sample;
val->val2 = 0;
return 0;
}
#ifdef CONFIG_PM_DEVICE
static int sgp40_pm_action(const struct device *dev,
enum pm_device_action action)
{
uint16_t cmd;
switch (action) {
case PM_DEVICE_ACTION_RESUME:
/* activate the hotplate by sending a measure command */
cmd = SGP40_CMD_MEASURE_RAW;
break;
case PM_DEVICE_ACTION_SUSPEND:
cmd = SGP40_CMD_HEATER_OFF;
break;
default:
return -ENOTSUP;
}
return sgp40_write_command(dev, cmd);
}
#endif /* CONFIG_PM_DEVICE */
static int sgp40_init(const struct device *dev)
{
const struct sgp40_config *cfg = dev->config;
struct sensor_value comp_data;
if (!device_is_ready(cfg->bus.bus)) {
LOG_ERR("Device not ready.");
return -ENODEV;
}
if (cfg->selftest) {
int rc = sgp40_selftest(dev);
if (rc < 0) {
LOG_ERR("Selftest failed!");
return rc;
}
LOG_DBG("Selftest succeded!");
}
comp_data.val1 = SGP40_COMP_DEFAULT_T;
sensor_attr_set(dev,
SENSOR_CHAN_GAS_RES,
(enum sensor_attribute) SENSOR_ATTR_SGP40_TEMPERATURE,
&comp_data);
comp_data.val1 = SGP40_COMP_DEFAULT_RH;
sensor_attr_set(dev,
SENSOR_CHAN_GAS_RES,
(enum sensor_attribute) SENSOR_ATTR_SGP40_HUMIDITY,
&comp_data);
return 0;
}
static const struct sensor_driver_api sgp40_api = {
.sample_fetch = sgp40_sample_fetch,
.channel_get = sgp40_channel_get,
.attr_set = sgp40_attr_set,
};
#define SGP40_INIT(n) \
static struct sgp40_data sgp40_data_##n; \
\
static const struct sgp40_config sgp40_config_##n = { \
.bus = I2C_DT_SPEC_INST_GET(n), \
.selftest = DT_INST_PROP(n, enable_selftest), \
}; \
\
PM_DEVICE_DT_INST_DEFINE(n, sgp40_pm_action); \
\
DEVICE_DT_INST_DEFINE(n, \
sgp40_init, \
PM_DEVICE_DT_INST_GET(n), \
&sgp40_data_##n, \
&sgp40_config_##n, \
POST_KERNEL, \
CONFIG_SENSOR_INIT_PRIORITY, \
&sgp40_api);
DT_INST_FOREACH_STATUS_OKAY(SGP40_INIT)
|
terasoluna-batch/terasoluna-batch | terasoluna-batch/src/main/java/jp/terasoluna/fw/batch/exception/BatchException.java | <gh_stars>10-100
/*
* Copyright (c) 2011 NTT DATA Corporation
*
* 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 jp.terasoluna.fw.batch.exception;
import jp.terasoluna.fw.batch.util.BatchUtil;
import jp.terasoluna.fw.batch.util.MessageUtil;
/**
* バッチ例外。<br>
* <br>
* バッチ実行時に発生した例外情報を保持する。
*/
@SuppressWarnings("deprecation")
public class BatchException extends RuntimeException {
/**
* シリアルバージョンID
*/
private static final long serialVersionUID = 7677068837918514733L;
/**
* メッセージID
* @deprecated 例外生成時にメッセージIDを指定するメソッドをバージョン3.6から非推奨とするため、関連する本フィールドも非推奨とする。
*/
@Deprecated
private String messageId = null;
/**
* 例外情報特定のためのパラメータ
* @deprecated 例外生成時にメッセージIDを指定するメソッドをバージョン3.6から非推奨とするため、関連する本フィールドも非推奨とする。
*/
@Deprecated
private Object[] params = null;
/**
* BatchExceptionを生成する
*/
public BatchException() {
super();
}
/**
* BatchExceptionを生成する
* @param message 例外メッセージ
*/
public BatchException(String message) {
super(message);
}
/**
* BatchExceptionを生成する
* @param message 例外メッセージ
* @param cause 原因例外
*/
public BatchException(String message, Throwable cause) {
super(message, cause);
}
/**
* BatchExceptionを生成する
* @param cause 原因例外
*/
public BatchException(Throwable cause) {
super(cause);
}
/**
* BatchExceptionを生成する
* @param messageId エラーコード
* @param message エラーメッセージ
* @deprecated 例外生成時にメッセージIDを指定する本メソッドをバージョン3.6から非推奨とする。
* コンストラクタ引数でエラーメッセージを直接指定すること。{@link #BatchException(String)}
*/
@Deprecated
public BatchException(String messageId, String message) {
super(message);
this.messageId = messageId;
}
/**
* BatchExceptionを生成する
* @param messageId メッセージID
* @param message エラーメッセージ
* @param cause 原因となった例外
* @deprecated 例外生成時にメッセージIDを指定する本メソッドをバージョン3.6から非推奨とする。
* コンストラクタ引数でエラーメッセージを直接指定すること。{@link #BatchException(String, Throwable)}
*/
@Deprecated
public BatchException(String messageId, String message, Throwable cause) {
super(message, cause);
this.messageId = messageId;
}
/**
* BatchExceptionを生成する
* @param messageId メッセージID
* @param message エラーメッセージ
* @param params 例外情報特定のためのパラメータ
* @deprecated 例外生成時にメッセージIDを指定する本メソッドをバージョン3.6から非推奨とする。
* コンストラクタ引数でエラーメッセージを直接指定すること。{@link #BatchException(String)}
*/
@Deprecated
public BatchException(String messageId, String message, Object... params) {
super(message);
this.messageId = messageId;
this.params = params;
}
/**
* BatchExceptionを生成する
* @param messageId メッセージID
* @param message エラーメッセージ
* @param cause 原因となった例外
* @param params 例外情報特定のためのパラメータ
* @deprecated 例外生成時にメッセージIDを指定する本メソッドをバージョン3.6から非推奨とする。
* コンストラクタ引数でエラーメッセージを直接指定すること。{@link #BatchException(String, Throwable)}
*/
@Deprecated
public BatchException(String messageId, String message, Throwable cause,
Object... params) {
super(message, cause);
this.messageId = messageId;
this.params = params;
}
/**
* BatchExceptionのファクトリメソッド
* @param messageId メッセージID
* @return 引数の内容で作成されたBatchExceptionインスタンス
* @deprecated 例外生成時にメッセージIDを指定する本メソッドをバージョン3.6から非推奨とする。
* コンストラクタ引数でエラーメッセージを直接指定すること。{@link #BatchException(String)}
*/
@Deprecated
public static BatchException createException(String messageId) {
return new BatchException(messageId, MessageUtil.getMessage(messageId));
}
/**
* BatchExceptionのファクトリメソッド
* @param messageId メッセージID
* @param params 例外情報特定のためのパラメータ
* @return 引数の内容で作成されたBatchExceptionインスタンス
* @deprecated 例外生成時にメッセージIDを指定する本メソッドをバージョン3.6から非推奨とする。
* コンストラクタ引数でエラーメッセージを直接指定すること。{@link #BatchException(String)}
*/
@Deprecated
public static BatchException createException(String messageId,
Object... params) {
return new BatchException(messageId, MessageUtil.getMessage(messageId,
params), params);
}
/**
* BatchExceptionのファクトリメソッド
* @param messageId メッセージID
* @param cause 原因となった例外
* @return 引数の内容で作成されたBatchExceptionインスタンス
* @deprecated 例外生成時にメッセージIDを指定する本メソッドをバージョン3.6から非推奨とする。
* コンストラクタ引数でエラーメッセージを直接指定すること。{@link #BatchException(String, Throwable)}
*/
@Deprecated
public static BatchException createException(String messageId,
Throwable cause) {
return new BatchException(messageId, MessageUtil.getMessage(messageId),
cause);
}
/**
* BatchExceptionのファクトリメソッド
* @param messageId メッセージID
* @param cause 原因となった例外
* @param params 例外情報特定のためのパラメータ
* @return 引数の内容で作成されたBatchExceptionインスタンス
* @deprecated 例外生成時にメッセージIDを指定する本メソッドをバージョン3.6から非推奨とする。
* コンストラクタ引数でエラーメッセージを直接指定すること。{@link #BatchException(String, Throwable)}
*/
@Deprecated
public static BatchException createException(String messageId,
Throwable cause, Object... params) {
return new BatchException(messageId, MessageUtil.getMessage(messageId,
params), cause, params);
}
/**
* ログ出力用文字列作成
* @return ログ出力用文字列
* @deprecated 例外生成時にメッセージIDを指定するメソッドをバージョン3.6から非推奨とするため、関連する本メソッドも非推奨とする。
*/
@Deprecated
public String getLogMessage() {
StringBuilder logMsg = new StringBuilder();
logMsg.append(BatchUtil.cat("[", messageId, "] ", getMessage()));
if (params != null) {
logMsg.append(" (\n");
for (Object option : params) {
logMsg.append(BatchUtil.cat("\t", option, "\n"));
}
logMsg.append(")");
}
return logMsg.toString();
}
/**
* メッセージIDを取得.
* @return the messageId
* @deprecated 例外生成時にメッセージIDを指定するメソッドをバージョン3.6から非推奨とするため、関連する本メソッドも非推奨とする。
*/
@Deprecated
public String getMessageId() {
return messageId;
}
}
|
woohoou/ember-paper | tests/dummy/app/controllers/demo/tabs.js | <reponame>woohoou/ember-paper<filename>tests/dummy/app/controllers/demo/tabs.js<gh_stars>100-1000
import { inject as service } from '@ember/service';
import { readOnly, reads } from '@ember/object/computed';
import Controller from '@ember/controller';
import { computed } from '@ember/object';
import { A } from '@ember/array';
const LOREM = `
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Nulla venenatis ante augue. Phasellus volutpat neque ac dui mattis
vulputate. Etiam consequat aliquam cursus. In sodales pretium ultrices.
Maecenas lectus est, sollicitudin consectetur felis nec, feugiat ultricies mi.\n
`;
export default Controller.extend({
borderBottom: true,
selectedBasicTab: 0,
router: service(),
currentRouteName: readOnly('router.currentRouteName'),
chapters: computed(function() {
let tabs = A();
for (let i = 1; i < 5; i++) {
tabs.push({
index: i,
title: `Chapter ${i}`,
body: LOREM.repeat(i)
});
}
return tabs;
}),
selectedChapter: reads('chapters.firstObject'),
actions: {
toggle(propName) {
this.toggleProperty(propName);
},
addChapter() {
let index = Math.max(...this.get('chapters').mapBy('index')) + 1;
let chapter = {
index,
title: this.get('newTitle'),
body: this.get('newContent')
};
this.get('chapters').pushObject(chapter);
this.set('selectedChapter', chapter);
this.setProperties({
newTitle: '',
newContent: ''
});
},
removeChapter(t) {
if (this.get('selectedChapter') === t) {
let chapters = this.get('chapters');
let index = chapters.indexOf(t);
let newSelection = chapters.objectAt(index + 1) || chapters.objectAt(index - 1);
this.set('selectedChapter', newSelection);
}
this.get('chapters').removeObject(t);
},
noop() {}
}
});
|
Sticksword/nypr-design-system | addon/components/nypr-o-article-footer.js | // BEGIN-SNIPPET nypr-o-article-footer.js
import Component from '@ember/component';
import { debounce, bind } from '@ember/runloop';
import layout from '../templates/components/nypr-o-article-footer';
/**
Article Footer layout
Usage:
```hbs
<NyprOArticleFooter as |footer|>
<footer.tags @tags={{array 'foo' 'bar'}} as |Tag tag|>
<Tag @url='http://example.com/tags/{{tag}}'/>
</footer.tags>
<footer.contact>
Contact us because you've got something to say
</footer.contact>
<footer.donate @linkText='Click' @linkUrl='https://example.com/pledge' @message='Donate because you like us'/>
<footer.comments>
comments go here
</footer.comments>
</NyprOArticleFooter>
```
@class nypr-o-article-footer
@yield {Hash} hash
@yield {Component} hash.tags `nypr-m-tags`
@yield {Component} hash.contact `nypr-o-contact`
@yield {Component} hash.donate `nypr-o-donate`
@yield {Block} hash.comments `blank-template`
*/
export default Component.extend({
layout,
classNames: ['c-article__footer', 'u-section-spacing'],
didInsertElement() {
this._super(...arguments);
this._boundListener = bind(this, '_watchForTout');
window.addEventListener('scroll', this._boundListener);
},
willDestroyElement() {
this._super(...arguments);
window.removeEventListener('scroll', this._boundListener);
},
/**
Indicates whether or not this element is in the viewport
@field inViewport
@type {Boolean}
*/
inViewport: false,
/**
Measures whether the footer is scrolled into view, and shows donate tout if so.
@method _watchForTout
@param {EventObject} event
@return {void}
*/
_watchForTout(/* e */) {
debounce(this, () => {
if (this.isDestroyed || this.isDestroying) {
return; // JIC
}
let toutInDom = this.element.querySelector('.c-donate-tout');
let windowCenter = document.documentElement.clientHeight / 2;
let footerTopEdge = this.element.getBoundingClientRect().top;
if (toutInDom && footerTopEdge - windowCenter < 0) {
this.set('inViewport', true);
window.removeEventListener('scroll', this._watchForTout);
}
}, 150);
}
});
// END-SNIPPET
|
jezze/alfi | src/resource.h | <gh_stars>10-100
#define RESOURCE_PAGESIZE 0x1000
struct resource
{
struct list_item item;
char url[URL_SIZE];
void *data;
unsigned int size;
unsigned int count;
unsigned int refcount;
int index;
int w;
int h;
int n;
};
void resource_load(struct resource *resource, unsigned int count, void *data);
void resource_unload(struct resource *resource);
unsigned int resource_iref(struct resource *resource);
unsigned int resource_dref(struct resource *resource);
void resource_init(struct resource *resource, char *url);
void resource_destroy(struct resource *resource);
|
LukasHabring/api | c/github.com/TheThingsNetwork/api/broker/broker.pb-c.h | <reponame>LukasHabring/api
/* Generated by the protocol buffer compiler. DO NOT EDIT! */
/* Generated from: github.com/TheThingsNetwork/api/broker/broker.proto */
#ifndef PROTOBUF_C_github_2ecom_2fTheThingsNetwork_2fapi_2fbroker_2fbroker_2eproto__INCLUDED
#define PROTOBUF_C_github_2ecom_2fTheThingsNetwork_2fapi_2fbroker_2fbroker_2eproto__INCLUDED
#include <protobuf-c/protobuf-c.h>
PROTOBUF_C__BEGIN_DECLS
#if PROTOBUF_C_VERSION_NUMBER < 1003000
# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
#elif 1003003 < PROTOBUF_C_MIN_COMPILER_VERSION
# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
#endif
#include "google/protobuf/empty.pb-c.h"
#include "github.com/gogo/protobuf/gogoproto/gogo.pb-c.h"
#include "github.com/TheThingsNetwork/api/api.pb-c.h"
#include "github.com/TheThingsNetwork/api/protocol/protocol.pb-c.h"
#include "github.com/TheThingsNetwork/api/gateway/gateway.pb-c.h"
#include "github.com/TheThingsNetwork/api/trace/trace.pb-c.h"
typedef struct _Broker__DownlinkOption Broker__DownlinkOption;
typedef struct _Broker__UplinkMessage Broker__UplinkMessage;
typedef struct _Broker__DownlinkMessage Broker__DownlinkMessage;
typedef struct _Broker__DeviceActivationResponse Broker__DeviceActivationResponse;
typedef struct _Broker__DeduplicatedUplinkMessage Broker__DeduplicatedUplinkMessage;
typedef struct _Broker__DeviceActivationRequest Broker__DeviceActivationRequest;
typedef struct _Broker__DeduplicatedDeviceActivationRequest Broker__DeduplicatedDeviceActivationRequest;
typedef struct _Broker__ActivationChallengeRequest Broker__ActivationChallengeRequest;
typedef struct _Broker__ActivationChallengeResponse Broker__ActivationChallengeResponse;
typedef struct _Broker__SubscribeRequest Broker__SubscribeRequest;
typedef struct _Broker__StatusRequest Broker__StatusRequest;
typedef struct _Broker__Status Broker__Status;
typedef struct _Broker__ApplicationHandlerRegistration Broker__ApplicationHandlerRegistration;
/* --- enums --- */
/* --- messages --- */
struct _Broker__DownlinkOption
{
ProtobufCMessage base;
/*
* String that identifies this downlink option in the Router
*/
char *identifier;
/*
* ID of the gateway where this downlink should be sent
*/
char *gateway_id;
/*
* Score of this downlink option. Lower is better.
*/
uint32_t score;
/*
* deadline time at server represented as Unix nanoseconds
*/
int64_t deadline;
Protocol__TxConfiguration *protocol_configuration;
Gateway__TxConfiguration *gateway_configuration;
};
#define BROKER__DOWNLINK_OPTION__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&broker__downlink_option__descriptor) \
, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, 0, 0, NULL, NULL }
/*
* received from the Router
*/
struct _Broker__UplinkMessage
{
ProtobufCMessage base;
ProtobufCBinaryData payload;
Protocol__Message *message;
ProtobufCBinaryData dev_eui;
ProtobufCBinaryData app_eui;
char *app_id;
char *dev_id;
Protocol__RxMetadata *protocol_metadata;
Gateway__RxMetadata *gateway_metadata;
size_t n_downlink_options;
Broker__DownlinkOption **downlink_options;
Trace__Trace *trace;
};
#define BROKER__UPLINK_MESSAGE__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&broker__uplink_message__descriptor) \
, {0,NULL}, NULL, {0,NULL}, {0,NULL}, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, NULL, NULL, 0,NULL, NULL }
/*
* received from the Handler, sent to the Router, used as Template
*/
struct _Broker__DownlinkMessage
{
ProtobufCMessage base;
ProtobufCBinaryData payload;
Protocol__Message *message;
ProtobufCBinaryData dev_eui;
ProtobufCBinaryData app_eui;
char *app_id;
char *dev_id;
Broker__DownlinkOption *downlink_option;
Trace__Trace *trace;
};
#define BROKER__DOWNLINK_MESSAGE__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&broker__downlink_message__descriptor) \
, {0,NULL}, NULL, {0,NULL}, {0,NULL}, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, NULL, NULL }
/*
* sent to the Router, used as Template
*/
struct _Broker__DeviceActivationResponse
{
ProtobufCMessage base;
ProtobufCBinaryData payload;
Protocol__Message *message;
Broker__DownlinkOption *downlink_option;
Trace__Trace *trace;
};
#define BROKER__DEVICE_ACTIVATION_RESPONSE__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&broker__device_activation_response__descriptor) \
, {0,NULL}, NULL, NULL, NULL }
/*
* sent to the Handler
*/
struct _Broker__DeduplicatedUplinkMessage
{
ProtobufCMessage base;
ProtobufCBinaryData payload;
Protocol__Message *message;
ProtobufCBinaryData dev_eui;
ProtobufCBinaryData app_eui;
char *app_id;
char *dev_id;
Protocol__RxMetadata *protocol_metadata;
size_t n_gateway_metadata;
Gateway__RxMetadata **gateway_metadata;
int64_t server_time;
Broker__DownlinkMessage *response_template;
Trace__Trace *trace;
};
#define BROKER__DEDUPLICATED_UPLINK_MESSAGE__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&broker__deduplicated_uplink_message__descriptor) \
, {0,NULL}, NULL, {0,NULL}, {0,NULL}, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, NULL, 0,NULL, 0, NULL, NULL }
/*
* received from the Router
*/
struct _Broker__DeviceActivationRequest
{
ProtobufCMessage base;
ProtobufCBinaryData payload;
Protocol__Message *message;
ProtobufCBinaryData dev_eui;
ProtobufCBinaryData app_eui;
Protocol__RxMetadata *protocol_metadata;
Gateway__RxMetadata *gateway_metadata;
Protocol__ActivationMetadata *activation_metadata;
size_t n_downlink_options;
Broker__DownlinkOption **downlink_options;
Trace__Trace *trace;
};
#define BROKER__DEVICE_ACTIVATION_REQUEST__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&broker__device_activation_request__descriptor) \
, {0,NULL}, NULL, {0,NULL}, {0,NULL}, NULL, NULL, NULL, 0,NULL, NULL }
/*
* sent to the Handler
*/
struct _Broker__DeduplicatedDeviceActivationRequest
{
ProtobufCMessage base;
ProtobufCBinaryData payload;
Protocol__Message *message;
ProtobufCBinaryData dev_eui;
ProtobufCBinaryData app_eui;
char *app_id;
char *dev_id;
Protocol__RxMetadata *protocol_metadata;
size_t n_gateway_metadata;
Gateway__RxMetadata **gateway_metadata;
Protocol__ActivationMetadata *activation_metadata;
int64_t server_time;
Broker__DeviceActivationResponse *response_template;
Trace__Trace *trace;
};
#define BROKER__DEDUPLICATED_DEVICE_ACTIVATION_REQUEST__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&broker__deduplicated_device_activation_request__descriptor) \
, {0,NULL}, NULL, {0,NULL}, {0,NULL}, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, NULL, 0,NULL, NULL, 0, NULL, NULL }
struct _Broker__ActivationChallengeRequest
{
ProtobufCMessage base;
ProtobufCBinaryData payload;
Protocol__Message *message;
ProtobufCBinaryData dev_eui;
ProtobufCBinaryData app_eui;
char *app_id;
char *dev_id;
};
#define BROKER__ACTIVATION_CHALLENGE_REQUEST__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&broker__activation_challenge_request__descriptor) \
, {0,NULL}, NULL, {0,NULL}, {0,NULL}, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string }
struct _Broker__ActivationChallengeResponse
{
ProtobufCMessage base;
ProtobufCBinaryData payload;
Protocol__Message *message;
};
#define BROKER__ACTIVATION_CHALLENGE_RESPONSE__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&broker__activation_challenge_response__descriptor) \
, {0,NULL}, NULL }
/*
* message SubscribeRequest is used by a Handler to subscribe to uplink messages
*/
struct _Broker__SubscribeRequest
{
ProtobufCMessage base;
};
#define BROKER__SUBSCRIBE_REQUEST__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&broker__subscribe_request__descriptor) \
}
/*
* message StatusRequest is used to request the status of this Broker
*/
struct _Broker__StatusRequest
{
ProtobufCMessage base;
};
#define BROKER__STATUS_REQUEST__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&broker__status_request__descriptor) \
}
struct _Broker__Status
{
ProtobufCMessage base;
Api__SystemStats *system;
Api__ComponentStats *component;
Api__Rates *uplink;
Api__Rates *uplink_unique;
Api__Rates *downlink;
Api__Rates *activations;
Api__Rates *activations_unique;
Api__Percentiles *deduplication;
/*
* Connections
*/
uint32_t connected_routers;
uint32_t connected_handlers;
};
#define BROKER__STATUS__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&broker__status__descriptor) \
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0 }
struct _Broker__ApplicationHandlerRegistration
{
ProtobufCMessage base;
char *app_id;
char *handler_id;
};
#define BROKER__APPLICATION_HANDLER_REGISTRATION__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&broker__application_handler_registration__descriptor) \
, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string }
/* Broker__DownlinkOption methods */
void broker__downlink_option__init
(Broker__DownlinkOption *message);
size_t broker__downlink_option__get_packed_size
(const Broker__DownlinkOption *message);
size_t broker__downlink_option__pack
(const Broker__DownlinkOption *message,
uint8_t *out);
size_t broker__downlink_option__pack_to_buffer
(const Broker__DownlinkOption *message,
ProtobufCBuffer *buffer);
Broker__DownlinkOption *
broker__downlink_option__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void broker__downlink_option__free_unpacked
(Broker__DownlinkOption *message,
ProtobufCAllocator *allocator);
/* Broker__UplinkMessage methods */
void broker__uplink_message__init
(Broker__UplinkMessage *message);
size_t broker__uplink_message__get_packed_size
(const Broker__UplinkMessage *message);
size_t broker__uplink_message__pack
(const Broker__UplinkMessage *message,
uint8_t *out);
size_t broker__uplink_message__pack_to_buffer
(const Broker__UplinkMessage *message,
ProtobufCBuffer *buffer);
Broker__UplinkMessage *
broker__uplink_message__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void broker__uplink_message__free_unpacked
(Broker__UplinkMessage *message,
ProtobufCAllocator *allocator);
/* Broker__DownlinkMessage methods */
void broker__downlink_message__init
(Broker__DownlinkMessage *message);
size_t broker__downlink_message__get_packed_size
(const Broker__DownlinkMessage *message);
size_t broker__downlink_message__pack
(const Broker__DownlinkMessage *message,
uint8_t *out);
size_t broker__downlink_message__pack_to_buffer
(const Broker__DownlinkMessage *message,
ProtobufCBuffer *buffer);
Broker__DownlinkMessage *
broker__downlink_message__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void broker__downlink_message__free_unpacked
(Broker__DownlinkMessage *message,
ProtobufCAllocator *allocator);
/* Broker__DeviceActivationResponse methods */
void broker__device_activation_response__init
(Broker__DeviceActivationResponse *message);
size_t broker__device_activation_response__get_packed_size
(const Broker__DeviceActivationResponse *message);
size_t broker__device_activation_response__pack
(const Broker__DeviceActivationResponse *message,
uint8_t *out);
size_t broker__device_activation_response__pack_to_buffer
(const Broker__DeviceActivationResponse *message,
ProtobufCBuffer *buffer);
Broker__DeviceActivationResponse *
broker__device_activation_response__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void broker__device_activation_response__free_unpacked
(Broker__DeviceActivationResponse *message,
ProtobufCAllocator *allocator);
/* Broker__DeduplicatedUplinkMessage methods */
void broker__deduplicated_uplink_message__init
(Broker__DeduplicatedUplinkMessage *message);
size_t broker__deduplicated_uplink_message__get_packed_size
(const Broker__DeduplicatedUplinkMessage *message);
size_t broker__deduplicated_uplink_message__pack
(const Broker__DeduplicatedUplinkMessage *message,
uint8_t *out);
size_t broker__deduplicated_uplink_message__pack_to_buffer
(const Broker__DeduplicatedUplinkMessage *message,
ProtobufCBuffer *buffer);
Broker__DeduplicatedUplinkMessage *
broker__deduplicated_uplink_message__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void broker__deduplicated_uplink_message__free_unpacked
(Broker__DeduplicatedUplinkMessage *message,
ProtobufCAllocator *allocator);
/* Broker__DeviceActivationRequest methods */
void broker__device_activation_request__init
(Broker__DeviceActivationRequest *message);
size_t broker__device_activation_request__get_packed_size
(const Broker__DeviceActivationRequest *message);
size_t broker__device_activation_request__pack
(const Broker__DeviceActivationRequest *message,
uint8_t *out);
size_t broker__device_activation_request__pack_to_buffer
(const Broker__DeviceActivationRequest *message,
ProtobufCBuffer *buffer);
Broker__DeviceActivationRequest *
broker__device_activation_request__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void broker__device_activation_request__free_unpacked
(Broker__DeviceActivationRequest *message,
ProtobufCAllocator *allocator);
/* Broker__DeduplicatedDeviceActivationRequest methods */
void broker__deduplicated_device_activation_request__init
(Broker__DeduplicatedDeviceActivationRequest *message);
size_t broker__deduplicated_device_activation_request__get_packed_size
(const Broker__DeduplicatedDeviceActivationRequest *message);
size_t broker__deduplicated_device_activation_request__pack
(const Broker__DeduplicatedDeviceActivationRequest *message,
uint8_t *out);
size_t broker__deduplicated_device_activation_request__pack_to_buffer
(const Broker__DeduplicatedDeviceActivationRequest *message,
ProtobufCBuffer *buffer);
Broker__DeduplicatedDeviceActivationRequest *
broker__deduplicated_device_activation_request__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void broker__deduplicated_device_activation_request__free_unpacked
(Broker__DeduplicatedDeviceActivationRequest *message,
ProtobufCAllocator *allocator);
/* Broker__ActivationChallengeRequest methods */
void broker__activation_challenge_request__init
(Broker__ActivationChallengeRequest *message);
size_t broker__activation_challenge_request__get_packed_size
(const Broker__ActivationChallengeRequest *message);
size_t broker__activation_challenge_request__pack
(const Broker__ActivationChallengeRequest *message,
uint8_t *out);
size_t broker__activation_challenge_request__pack_to_buffer
(const Broker__ActivationChallengeRequest *message,
ProtobufCBuffer *buffer);
Broker__ActivationChallengeRequest *
broker__activation_challenge_request__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void broker__activation_challenge_request__free_unpacked
(Broker__ActivationChallengeRequest *message,
ProtobufCAllocator *allocator);
/* Broker__ActivationChallengeResponse methods */
void broker__activation_challenge_response__init
(Broker__ActivationChallengeResponse *message);
size_t broker__activation_challenge_response__get_packed_size
(const Broker__ActivationChallengeResponse *message);
size_t broker__activation_challenge_response__pack
(const Broker__ActivationChallengeResponse *message,
uint8_t *out);
size_t broker__activation_challenge_response__pack_to_buffer
(const Broker__ActivationChallengeResponse *message,
ProtobufCBuffer *buffer);
Broker__ActivationChallengeResponse *
broker__activation_challenge_response__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void broker__activation_challenge_response__free_unpacked
(Broker__ActivationChallengeResponse *message,
ProtobufCAllocator *allocator);
/* Broker__SubscribeRequest methods */
void broker__subscribe_request__init
(Broker__SubscribeRequest *message);
size_t broker__subscribe_request__get_packed_size
(const Broker__SubscribeRequest *message);
size_t broker__subscribe_request__pack
(const Broker__SubscribeRequest *message,
uint8_t *out);
size_t broker__subscribe_request__pack_to_buffer
(const Broker__SubscribeRequest *message,
ProtobufCBuffer *buffer);
Broker__SubscribeRequest *
broker__subscribe_request__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void broker__subscribe_request__free_unpacked
(Broker__SubscribeRequest *message,
ProtobufCAllocator *allocator);
/* Broker__StatusRequest methods */
void broker__status_request__init
(Broker__StatusRequest *message);
size_t broker__status_request__get_packed_size
(const Broker__StatusRequest *message);
size_t broker__status_request__pack
(const Broker__StatusRequest *message,
uint8_t *out);
size_t broker__status_request__pack_to_buffer
(const Broker__StatusRequest *message,
ProtobufCBuffer *buffer);
Broker__StatusRequest *
broker__status_request__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void broker__status_request__free_unpacked
(Broker__StatusRequest *message,
ProtobufCAllocator *allocator);
/* Broker__Status methods */
void broker__status__init
(Broker__Status *message);
size_t broker__status__get_packed_size
(const Broker__Status *message);
size_t broker__status__pack
(const Broker__Status *message,
uint8_t *out);
size_t broker__status__pack_to_buffer
(const Broker__Status *message,
ProtobufCBuffer *buffer);
Broker__Status *
broker__status__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void broker__status__free_unpacked
(Broker__Status *message,
ProtobufCAllocator *allocator);
/* Broker__ApplicationHandlerRegistration methods */
void broker__application_handler_registration__init
(Broker__ApplicationHandlerRegistration *message);
size_t broker__application_handler_registration__get_packed_size
(const Broker__ApplicationHandlerRegistration *message);
size_t broker__application_handler_registration__pack
(const Broker__ApplicationHandlerRegistration *message,
uint8_t *out);
size_t broker__application_handler_registration__pack_to_buffer
(const Broker__ApplicationHandlerRegistration *message,
ProtobufCBuffer *buffer);
Broker__ApplicationHandlerRegistration *
broker__application_handler_registration__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void broker__application_handler_registration__free_unpacked
(Broker__ApplicationHandlerRegistration *message,
ProtobufCAllocator *allocator);
/* --- per-message closures --- */
typedef void (*Broker__DownlinkOption_Closure)
(const Broker__DownlinkOption *message,
void *closure_data);
typedef void (*Broker__UplinkMessage_Closure)
(const Broker__UplinkMessage *message,
void *closure_data);
typedef void (*Broker__DownlinkMessage_Closure)
(const Broker__DownlinkMessage *message,
void *closure_data);
typedef void (*Broker__DeviceActivationResponse_Closure)
(const Broker__DeviceActivationResponse *message,
void *closure_data);
typedef void (*Broker__DeduplicatedUplinkMessage_Closure)
(const Broker__DeduplicatedUplinkMessage *message,
void *closure_data);
typedef void (*Broker__DeviceActivationRequest_Closure)
(const Broker__DeviceActivationRequest *message,
void *closure_data);
typedef void (*Broker__DeduplicatedDeviceActivationRequest_Closure)
(const Broker__DeduplicatedDeviceActivationRequest *message,
void *closure_data);
typedef void (*Broker__ActivationChallengeRequest_Closure)
(const Broker__ActivationChallengeRequest *message,
void *closure_data);
typedef void (*Broker__ActivationChallengeResponse_Closure)
(const Broker__ActivationChallengeResponse *message,
void *closure_data);
typedef void (*Broker__SubscribeRequest_Closure)
(const Broker__SubscribeRequest *message,
void *closure_data);
typedef void (*Broker__StatusRequest_Closure)
(const Broker__StatusRequest *message,
void *closure_data);
typedef void (*Broker__Status_Closure)
(const Broker__Status *message,
void *closure_data);
typedef void (*Broker__ApplicationHandlerRegistration_Closure)
(const Broker__ApplicationHandlerRegistration *message,
void *closure_data);
/* --- services --- */
typedef struct _Broker__Broker_Service Broker__Broker_Service;
struct _Broker__Broker_Service
{
ProtobufCService base;
void (*associate)(Broker__Broker_Service *service,
const Broker__UplinkMessage *input,
Broker__DownlinkMessage_Closure closure,
void *closure_data);
void (*subscribe)(Broker__Broker_Service *service,
const Broker__SubscribeRequest *input,
Broker__DeduplicatedUplinkMessage_Closure closure,
void *closure_data);
void (*publish)(Broker__Broker_Service *service,
const Broker__DownlinkMessage *input,
Google__Protobuf__Empty_Closure closure,
void *closure_data);
void (*activate)(Broker__Broker_Service *service,
const Broker__DeviceActivationRequest *input,
Broker__DeviceActivationResponse_Closure closure,
void *closure_data);
};
typedef void (*Broker__Broker_ServiceDestroy)(Broker__Broker_Service *);
void broker__broker__init (Broker__Broker_Service *service,
Broker__Broker_ServiceDestroy destroy);
#define BROKER__BROKER__BASE_INIT \
{ &broker__broker__descriptor, protobuf_c_service_invoke_internal, NULL }
#define BROKER__BROKER__INIT(function_prefix__) \
{ BROKER__BROKER__BASE_INIT,\
function_prefix__ ## associate,\
function_prefix__ ## subscribe,\
function_prefix__ ## publish,\
function_prefix__ ## activate }
void broker__broker__associate(ProtobufCService *service,
const Broker__UplinkMessage *input,
Broker__DownlinkMessage_Closure closure,
void *closure_data);
void broker__broker__subscribe(ProtobufCService *service,
const Broker__SubscribeRequest *input,
Broker__DeduplicatedUplinkMessage_Closure closure,
void *closure_data);
void broker__broker__publish(ProtobufCService *service,
const Broker__DownlinkMessage *input,
Google__Protobuf__Empty_Closure closure,
void *closure_data);
void broker__broker__activate(ProtobufCService *service,
const Broker__DeviceActivationRequest *input,
Broker__DeviceActivationResponse_Closure closure,
void *closure_data);
typedef struct _Broker__BrokerManager_Service Broker__BrokerManager_Service;
struct _Broker__BrokerManager_Service
{
ProtobufCService base;
void (*register_application_handler)(Broker__BrokerManager_Service *service,
const Broker__ApplicationHandlerRegistration *input,
Google__Protobuf__Empty_Closure closure,
void *closure_data);
void (*get_status)(Broker__BrokerManager_Service *service,
const Broker__StatusRequest *input,
Broker__Status_Closure closure,
void *closure_data);
};
typedef void (*Broker__BrokerManager_ServiceDestroy)(Broker__BrokerManager_Service *);
void broker__broker_manager__init (Broker__BrokerManager_Service *service,
Broker__BrokerManager_ServiceDestroy destroy);
#define BROKER__BROKER_MANAGER__BASE_INIT \
{ &broker__broker_manager__descriptor, protobuf_c_service_invoke_internal, NULL }
#define BROKER__BROKER_MANAGER__INIT(function_prefix__) \
{ BROKER__BROKER_MANAGER__BASE_INIT,\
function_prefix__ ## register_application_handler,\
function_prefix__ ## get_status }
void broker__broker_manager__register_application_handler(ProtobufCService *service,
const Broker__ApplicationHandlerRegistration *input,
Google__Protobuf__Empty_Closure closure,
void *closure_data);
void broker__broker_manager__get_status(ProtobufCService *service,
const Broker__StatusRequest *input,
Broker__Status_Closure closure,
void *closure_data);
/* --- descriptors --- */
extern const ProtobufCMessageDescriptor broker__downlink_option__descriptor;
extern const ProtobufCMessageDescriptor broker__uplink_message__descriptor;
extern const ProtobufCMessageDescriptor broker__downlink_message__descriptor;
extern const ProtobufCMessageDescriptor broker__device_activation_response__descriptor;
extern const ProtobufCMessageDescriptor broker__deduplicated_uplink_message__descriptor;
extern const ProtobufCMessageDescriptor broker__device_activation_request__descriptor;
extern const ProtobufCMessageDescriptor broker__deduplicated_device_activation_request__descriptor;
extern const ProtobufCMessageDescriptor broker__activation_challenge_request__descriptor;
extern const ProtobufCMessageDescriptor broker__activation_challenge_response__descriptor;
extern const ProtobufCMessageDescriptor broker__subscribe_request__descriptor;
extern const ProtobufCMessageDescriptor broker__status_request__descriptor;
extern const ProtobufCMessageDescriptor broker__status__descriptor;
extern const ProtobufCMessageDescriptor broker__application_handler_registration__descriptor;
extern const ProtobufCServiceDescriptor broker__broker__descriptor;
extern const ProtobufCServiceDescriptor broker__broker_manager__descriptor;
PROTOBUF_C__END_DECLS
#endif /* PROTOBUF_C_github_2ecom_2fTheThingsNetwork_2fapi_2fbroker_2fbroker_2eproto__INCLUDED */
|
djandrewd/photogramm | photo-service/images-data-module/src/main/java/ua/danit/photogramm/imgs/model/HistoryAction.java | <gh_stars>0
package ua.danit.photogramm.imgs.model;
import java.time.Instant;
/**
* History social action made by user: like, comment, share etc.
*
* @author <NAME>
*/
public interface HistoryAction {
/**
* Gets user id as author of event.
*
* @return the user nickname, author of action.
*/
String getUserId();
/**
* Gets source image of the action.
*
* @return the source image of the action.
*/
Image getImage();
/**
* Gets create time of the action.
*
* @return the create time of the action
*/
Instant getCreateTime();
/**
* Gets social event action type.
*
* @return the type of the social activity.
*/
SocialActionType getType();
}
|
flowmemo/leetcode-in-js | test/solution/575.js | // 575. Distribute Candies
const data = [
{
input: [[1, 1, 2, 2, 3, 3]],
ans: 3
},
{
input: [[1, 1, 2, 3]],
ans: 2
},
{
input: [[1, 2, 3, 4, 5, 6]],
ans: 3
}
]
module.exports = {
data,
checker: require('../checkers.js').normalChecker
}
|
ScalablyTyped/SlinkyTyped | p/powerapps-component-framework/src/main/scala/typingsSlinky/powerappsComponentFramework/ComponentFramework/DeviceApi.scala | package typingsSlinky.powerappsComponentFramework.ComponentFramework
import typingsSlinky.powerappsComponentFramework.anon.Accuracy
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
/**
* Helper of Device API interface
*/
object DeviceApi {
/**
* Interface of input argument 'options' in context.device.captureImage
*/
@js.native
trait CaptureImageOptions extends StObject {
/**
* Indicates whether to edit the image before saving.
*/
var allowEdit: Boolean = js.native
/**
* Height of the image to capture.
*/
var height: Double = js.native
/**
* Indicates whether to capture image using the front camera of the device.
*/
var preferFrontCamera: Boolean = js.native
/**
* Quality of the image file in percentage.
*/
var quality: Double = js.native
/**
* Width of the image to capture.
*/
var width: Double = js.native
}
object CaptureImageOptions {
@scala.inline
def apply(allowEdit: Boolean, height: Double, preferFrontCamera: Boolean, quality: Double, width: Double): CaptureImageOptions = {
val __obj = js.Dynamic.literal(allowEdit = allowEdit.asInstanceOf[js.Any], height = height.asInstanceOf[js.Any], preferFrontCamera = preferFrontCamera.asInstanceOf[js.Any], quality = quality.asInstanceOf[js.Any], width = width.asInstanceOf[js.Any])
__obj.asInstanceOf[CaptureImageOptions]
}
@scala.inline
implicit class CaptureImageOptionsMutableBuilder[Self <: CaptureImageOptions] (val x: Self) extends AnyVal {
@scala.inline
def setAllowEdit(value: Boolean): Self = StObject.set(x, "allowEdit", value.asInstanceOf[js.Any])
@scala.inline
def setHeight(value: Double): Self = StObject.set(x, "height", value.asInstanceOf[js.Any])
@scala.inline
def setPreferFrontCamera(value: Boolean): Self = StObject.set(x, "preferFrontCamera", value.asInstanceOf[js.Any])
@scala.inline
def setQuality(value: Double): Self = StObject.set(x, "quality", value.asInstanceOf[js.Any])
@scala.inline
def setWidth(value: Double): Self = StObject.set(x, "width", value.asInstanceOf[js.Any])
}
}
/**
* Interface of input argument 'pickupFileOption' in context.device.pickupFile
*/
@js.native
trait PickFileOptions extends StObject {
/**
* Image file types to select. Valid values are "audio", "video", or "image".
*/
var accept: String = js.native
/**
* Indicates whether to allow selecting multiple files.
*/
var allowMultipleFiles: Boolean = js.native
/**
* Maximum size of the files(s) to be selected.
*/
var maximumAllowedFileSize: Double = js.native
}
object PickFileOptions {
@scala.inline
def apply(accept: String, allowMultipleFiles: Boolean, maximumAllowedFileSize: Double): PickFileOptions = {
val __obj = js.Dynamic.literal(accept = accept.asInstanceOf[js.Any], allowMultipleFiles = allowMultipleFiles.asInstanceOf[js.Any], maximumAllowedFileSize = maximumAllowedFileSize.asInstanceOf[js.Any])
__obj.asInstanceOf[PickFileOptions]
}
@scala.inline
implicit class PickFileOptionsMutableBuilder[Self <: PickFileOptions] (val x: Self) extends AnyVal {
@scala.inline
def setAccept(value: String): Self = StObject.set(x, "accept", value.asInstanceOf[js.Any])
@scala.inline
def setAllowMultipleFiles(value: Boolean): Self = StObject.set(x, "allowMultipleFiles", value.asInstanceOf[js.Any])
@scala.inline
def setMaximumAllowedFileSize(value: Double): Self = StObject.set(x, "maximumAllowedFileSize", value.asInstanceOf[js.Any])
}
}
/**
* Interface of return geological information in context.device.getCurrentPosition
*/
@js.native
trait Position extends StObject {
/**
* Contains a set of geographic coordinates along with associated accuracy as well as a set of other optional attributes such as altitude and speed.
*/
var coords: Accuracy = js.native
/**
* Represents the time when the object was acquired and is represented as DOMTimeStamp.
*/
var timestamp: js.Date = js.native
}
object Position {
@scala.inline
def apply(coords: Accuracy, timestamp: js.Date): Position = {
val __obj = js.Dynamic.literal(coords = coords.asInstanceOf[js.Any], timestamp = timestamp.asInstanceOf[js.Any])
__obj.asInstanceOf[Position]
}
@scala.inline
implicit class PositionMutableBuilder[Self <: Position] (val x: Self) extends AnyVal {
@scala.inline
def setCoords(value: Accuracy): Self = StObject.set(x, "coords", value.asInstanceOf[js.Any])
@scala.inline
def setTimestamp(value: js.Date): Self = StObject.set(x, "timestamp", value.asInstanceOf[js.Any])
}
}
}
|
darkness463/Leetcode-in-Java | src/com/darkness463/leetcode/array/ContainsDuplicate.java | <reponame>darkness463/Leetcode-in-Java<filename>src/com/darkness463/leetcode/array/ContainsDuplicate.java<gh_stars>0
package com.darkness463.leetcode.array;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
/**
* 217. 存在重复元素
* 给定一个整数数组,判断是否存在重复元素。
* <p>
* 如果任何值在数组中出现至少两次,函数返回 true。如果数组中每个元素都不相同,则返回 false。
* <p>
* 示例 1:
* <p>
* 输入: [1,2,3,1]
* 输出: true
* 示例 2:
* <p>
* 输入: [1,2,3,4]
* 输出: false
* 示例 3:
* <p>
* 输入: [1,1,1,3,3,4,3,2,4,2]
* 输出: true
* <p>
* https://leetcode-cn.com/problems/contains-duplicate/
*
* @author <a href="mailto:<EMAIL>">Darkness463</a>
*/
public class ContainsDuplicate {
public boolean containsDuplicate(int[] nums) {
if (nums.length <= 1) {
return false;
}
Arrays.sort(nums);
for (int i = 1; i < nums.length; i++) {
if (nums[i - 1] == nums[i]) {
return true;
}
}
return false;
}
public boolean containsDuplicate2(int[] nums) {
Set<Integer> set = new HashSet<>();
for (int num : nums) {
set.add(num);
}
return set.size() != nums.length;
}
}
|
foss4/pontoon | pontoon/in_context/urls.py | <gh_stars>1000+
from django.urls import path
from django.views.generic import RedirectView
from . import views
urlpatterns = [
# In-context demo
path(
"in-context/",
views.in_context,
name="pontoon.in_context",
),
# Legacy: Redirect to /in-context
path(
"intro/",
RedirectView.as_view(pattern_name="pontoon.in_context", permanent=True),
),
]
|
rrehbein/Ariente | src/main/java/mcjty/ariente/blocks/generators/PowerCombinerTile.java | <reponame>rrehbein/Ariente<filename>src/main/java/mcjty/ariente/blocks/generators/PowerCombinerTile.java
package mcjty.ariente.blocks.generators;
import mcjty.ariente.Ariente;
import mcjty.ariente.cables.CableColor;
import mcjty.ariente.cables.ConnectorTileEntity;
import mcjty.ariente.gui.HelpBuilder;
import mcjty.ariente.gui.HoloGuiTools;
import mcjty.ariente.power.*;
import mcjty.ariente.setup.Registration;
import mcjty.hologui.api.IGuiComponent;
import mcjty.hologui.api.IGuiComponentRegistry;
import mcjty.hologui.api.IGuiTile;
import mcjty.hologui.api.StyledColor;
import mcjty.lib.blocks.BaseBlock;
import mcjty.lib.builder.BlockBuilder;
import mcjty.lib.tileentity.TickingTileEntity;
import mcjty.lib.varia.OrientationTools;
import net.minecraft.core.Direction;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.entity.player.Player;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.InteractionHand;
import net.minecraft.core.BlockPos;
import net.minecraft.world.phys.BlockHitResult;
import static mcjty.ariente.compat.ArienteTOPDriver.DRIVER;
import static mcjty.hologui.api.Icons.*;
import static mcjty.lib.builder.TooltipBuilder.header;
import static mcjty.lib.builder.TooltipBuilder.key;
public class PowerCombinerTile extends TickingTileEntity implements IPowerReceiver, IGuiTile, IPowerUser {
private long usingPower = 0;
private int powerTransfer = 100;
public PowerCombinerTile(BlockPos pos, BlockState state) {
super(Registration.POWER_COMBINER_TILE.get(), pos, state);
}
public static BaseBlock createBlock() {
return new BaseBlock(new BlockBuilder()
.info(key("message.ariente.shiftmessage"))
.infoShift(header())
.topDriver(DRIVER)
.tileEntitySupplier(PowerCombinerTile::new)
);
// powerCombinerBlock = builderFactory.<PowerCombinerTile> builder("power_combiner")
// .tileEntityClass(PowerCombinerTile.class)
// .rotationType(BaseBlock.RotationType.ROTATION)
// .flags(RENDER_SOLID, RENDER_CUTOUT)
// .activateAction((world, pos, player, hand, side, hitX, hitY, hitZ) -> Ariente.guiHandler.openHoloGui(world, pos, player))
// .build();
}
@Override
public InteractionResult onBlockActivated(BlockState state, Player player, InteractionHand hand, BlockHitResult result) {
Ariente.guiHandler.openHoloGui(level, worldPosition, player);
return InteractionResult.SUCCESS;
}
@Override
public void tickServer() {
usingPower = 0;
if (PowerReceiverSupport.consumePower(level, worldPosition, powerTransfer, false)) {
usingPower += powerTransfer;
sendPower();
}
}
private int getPowerToTransfer() {
return (int) (powerTransfer * .98); // @todo configurable cost
}
private void sendPower() {
int power = getPowerToTransfer();
PowerSystem powerSystem = PowerSystem.getPowerSystem(level);
int cnt = 0;
for (Direction facing : OrientationTools.DIRECTION_VALUES) {
BlockPos p = worldPosition.relative(facing);
BlockEntity te = level.getBlockEntity(p);
if (te instanceof ConnectorTileEntity) {
ConnectorTileEntity connector = (ConnectorTileEntity) te;
if (connector.getCableColor() == CableColor.COMBINED) {
cnt++;
}
}
}
if (cnt > 0) {
long pPerConnector = power / cnt;
long p = pPerConnector + power % cnt;
for (Direction facing : OrientationTools.DIRECTION_VALUES) {
BlockEntity te = level.getBlockEntity(worldPosition.relative(facing));
if (te instanceof ConnectorTileEntity) {
ConnectorTileEntity connector = (ConnectorTileEntity) te;
if (connector.getCableColor() == CableColor.COMBINED) {
powerSystem.addPower(connector.getCableId(), p, PowerType.NEGARITE);
powerSystem.addPower(connector.getCableId(), p, PowerType.POSIRITE);
p = pPerConnector;
}
}
}
}
}
public int getPowerTransfer() {
return powerTransfer;
}
public void setPowerTransfer(int powerTransfer) {
this.powerTransfer = powerTransfer;
markDirtyClient();
}
private void changeTransfer(int dy) {
powerTransfer += dy;
if (powerTransfer < 0) {
powerTransfer = 0;
} else if (powerTransfer > 20000) { // @todo configurable
powerTransfer = 20000;
}
markDirtyClient();
}
@Override
public void load(CompoundTag tagCompound) {
super.load(tagCompound);
CompoundTag info = tagCompound.getCompound("Info");
if (info.contains("transfer")) {
powerTransfer = info.getInt("transfer");
}
}
@Override
public void saveAdditional(CompoundTag tagCompound) {
tagCompound = super.save(tagCompound);
getOrCreateInfo(tagCompound).putInt("transfer", powerTransfer);
}
@Override
public long getUsingPower() {
return usingPower;
}
@Override
public IGuiComponent<?> createGui(String tag, IGuiComponentRegistry registry) {
if (TAG_HELP.equals(tag)) {
return HoloGuiTools.createHelpGui(registry,
HelpBuilder.create()
.line("This block can combine negarite")
.line("and posirite power and send it")
.line("out through a combined cable")
.line("Note that there is a small loss")
.line("associated with this operation")
.nl()
.line("Use the controls to change the")
.line("maximum transfer rate")
);
} else {
return createMainGui(registry);
}
}
private IGuiComponent<?> createMainGui(IGuiComponentRegistry registry) {
return HoloGuiTools.createPanelWithHelp(registry)
.add(registry.text(0, 1, 1, 1).text("Transfer").color(registry.color(StyledColor.LABEL)))
.add(registry.text(0, 2.7, 1, 1).text("In").color(registry.color(StyledColor.LABEL)).scale(.7f))
.add(registry.number(2, 2.5, 1, 1).color(registry.color(StyledColor.INFORMATION)).getter((p,h) -> getPowerTransfer()))
.add(registry.text(0, 3.7, 1, 1).text("Out").color(registry.color(StyledColor.LABEL)).scale(.7f))
.add(registry.number(2, 3.5, 1, 1).color(registry.color(StyledColor.INFORMATION)).getter((p,h) -> getPowerToTransfer()))
.add(registry.iconButton(1, 6, 1, 1).icon(registry.image(GRAY_DOUBLE_ARROW_LEFT)).hover(registry.image(WHITE_DOUBLE_ARROW_LEFT))
.hitEvent((component, player, entity1, x, y) -> changeTransfer(-50)))
.add(registry.iconButton(2, 6, 1, 1).icon(registry.image(GRAY_ARROW_LEFT)).hover(registry.image(WHITE_ARROW_LEFT))
.hitEvent((component, player, entity1, x, y) -> changeTransfer(-1)))
.add(registry.iconButton(5, 6, 1, 1).icon(registry.image(GRAY_ARROW_RIGHT)).hover(registry.image(WHITE_ARROW_RIGHT))
.hitEvent((component, player, entity1, x, y) -> changeTransfer(1)))
.add(registry.iconButton(6, 6, 1, 1).icon(registry.image(GRAY_DOUBLE_ARROW_RIGHT)).hover(registry.image(WHITE_DOUBLE_ARROW_RIGHT))
.hitEvent((component, player, entity1, x, y) -> changeTransfer(50)))
;
}
@Override
public void syncToClient() {
}
}
|
pacey/aws-sdk-java | aws-java-sdk-transfer/src/main/java/com/amazonaws/services/transfer/model/UpdateServerRequest.java | <filename>aws-java-sdk-transfer/src/main/java/com/amazonaws/services/transfer/model/UpdateServerRequest.java
/*
* Copyright 2014-2019 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.
*/
package com.amazonaws.services.transfer.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateServer" target="_top">AWS API
* Documentation</a>
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UpdateServerRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
* <p>
* The virtual private cloud (VPC) endpoint settings that are configured for your SFTP server. With a VPC endpoint,
* your SFTP server isn't accessible over the public internet.
* </p>
*/
private EndpointDetails endpointDetails;
/**
* <p>
* The type of endpoint that you want your SFTP server to connect to. You can choose to connect to the public
* internet or a virtual private cloud (VPC) endpoint. With a VPC endpoint, your SFTP server isn't accessible over
* the public internet.
* </p>
*/
private String endpointType;
/**
* <p>
* The RSA private key as generated by <code>ssh-keygen -N "" -f my-new-server-key</code>.
* </p>
* <important>
* <p>
* If you aren't planning to migrate existing users from an existing SFTP server to a new AWS SFTP server, don't
* update the host key. Accidentally changing a server's host key can be disruptive.
* </p>
* </important>
* <p>
* For more information, see
* "https://docs.aws.amazon.com/transfer/latest/userguide/configuring-servers.html#change-host-key" in the <i>AWS
* SFTP User Guide.</i>
* </p>
*/
private String hostKey;
/**
* <p>
* This response parameter is an array containing all of the information required to call a customer's
* authentication API method.
* </p>
*/
private IdentityProviderDetails identityProviderDetails;
/**
* <p>
* A value that changes the AWS Identity and Access Management (IAM) role that allows Amazon S3 events to be logged
* in Amazon CloudWatch, turning logging on or off.
* </p>
*/
private String loggingRole;
/**
* <p>
* A system-assigned unique identifier for an SFTP server instance that the user account is assigned to.
* </p>
*/
private String serverId;
/**
* <p>
* The virtual private cloud (VPC) endpoint settings that are configured for your SFTP server. With a VPC endpoint,
* your SFTP server isn't accessible over the public internet.
* </p>
*
* @param endpointDetails
* The virtual private cloud (VPC) endpoint settings that are configured for your SFTP server. With a VPC
* endpoint, your SFTP server isn't accessible over the public internet.
*/
public void setEndpointDetails(EndpointDetails endpointDetails) {
this.endpointDetails = endpointDetails;
}
/**
* <p>
* The virtual private cloud (VPC) endpoint settings that are configured for your SFTP server. With a VPC endpoint,
* your SFTP server isn't accessible over the public internet.
* </p>
*
* @return The virtual private cloud (VPC) endpoint settings that are configured for your SFTP server. With a VPC
* endpoint, your SFTP server isn't accessible over the public internet.
*/
public EndpointDetails getEndpointDetails() {
return this.endpointDetails;
}
/**
* <p>
* The virtual private cloud (VPC) endpoint settings that are configured for your SFTP server. With a VPC endpoint,
* your SFTP server isn't accessible over the public internet.
* </p>
*
* @param endpointDetails
* The virtual private cloud (VPC) endpoint settings that are configured for your SFTP server. With a VPC
* endpoint, your SFTP server isn't accessible over the public internet.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateServerRequest withEndpointDetails(EndpointDetails endpointDetails) {
setEndpointDetails(endpointDetails);
return this;
}
/**
* <p>
* The type of endpoint that you want your SFTP server to connect to. You can choose to connect to the public
* internet or a virtual private cloud (VPC) endpoint. With a VPC endpoint, your SFTP server isn't accessible over
* the public internet.
* </p>
*
* @param endpointType
* The type of endpoint that you want your SFTP server to connect to. You can choose to connect to the public
* internet or a virtual private cloud (VPC) endpoint. With a VPC endpoint, your SFTP server isn't accessible
* over the public internet.
* @see EndpointType
*/
public void setEndpointType(String endpointType) {
this.endpointType = endpointType;
}
/**
* <p>
* The type of endpoint that you want your SFTP server to connect to. You can choose to connect to the public
* internet or a virtual private cloud (VPC) endpoint. With a VPC endpoint, your SFTP server isn't accessible over
* the public internet.
* </p>
*
* @return The type of endpoint that you want your SFTP server to connect to. You can choose to connect to the
* public internet or a virtual private cloud (VPC) endpoint. With a VPC endpoint, your SFTP server isn't
* accessible over the public internet.
* @see EndpointType
*/
public String getEndpointType() {
return this.endpointType;
}
/**
* <p>
* The type of endpoint that you want your SFTP server to connect to. You can choose to connect to the public
* internet or a virtual private cloud (VPC) endpoint. With a VPC endpoint, your SFTP server isn't accessible over
* the public internet.
* </p>
*
* @param endpointType
* The type of endpoint that you want your SFTP server to connect to. You can choose to connect to the public
* internet or a virtual private cloud (VPC) endpoint. With a VPC endpoint, your SFTP server isn't accessible
* over the public internet.
* @return Returns a reference to this object so that method calls can be chained together.
* @see EndpointType
*/
public UpdateServerRequest withEndpointType(String endpointType) {
setEndpointType(endpointType);
return this;
}
/**
* <p>
* The type of endpoint that you want your SFTP server to connect to. You can choose to connect to the public
* internet or a virtual private cloud (VPC) endpoint. With a VPC endpoint, your SFTP server isn't accessible over
* the public internet.
* </p>
*
* @param endpointType
* The type of endpoint that you want your SFTP server to connect to. You can choose to connect to the public
* internet or a virtual private cloud (VPC) endpoint. With a VPC endpoint, your SFTP server isn't accessible
* over the public internet.
* @return Returns a reference to this object so that method calls can be chained together.
* @see EndpointType
*/
public UpdateServerRequest withEndpointType(EndpointType endpointType) {
this.endpointType = endpointType.toString();
return this;
}
/**
* <p>
* The RSA private key as generated by <code>ssh-keygen -N "" -f my-new-server-key</code>.
* </p>
* <important>
* <p>
* If you aren't planning to migrate existing users from an existing SFTP server to a new AWS SFTP server, don't
* update the host key. Accidentally changing a server's host key can be disruptive.
* </p>
* </important>
* <p>
* For more information, see
* "https://docs.aws.amazon.com/transfer/latest/userguide/configuring-servers.html#change-host-key" in the <i>AWS
* SFTP User Guide.</i>
* </p>
*
* @param hostKey
* The RSA private key as generated by <code>ssh-keygen -N "" -f my-new-server-key</code>.</p> <important>
* <p>
* If you aren't planning to migrate existing users from an existing SFTP server to a new AWS SFTP server,
* don't update the host key. Accidentally changing a server's host key can be disruptive.
* </p>
* </important>
* <p>
* For more information, see
* "https://docs.aws.amazon.com/transfer/latest/userguide/configuring-servers.html#change-host-key" in the
* <i>AWS SFTP User Guide.</i>
*/
public void setHostKey(String hostKey) {
this.hostKey = hostKey;
}
/**
* <p>
* The RSA private key as generated by <code>ssh-keygen -N "" -f my-new-server-key</code>.
* </p>
* <important>
* <p>
* If you aren't planning to migrate existing users from an existing SFTP server to a new AWS SFTP server, don't
* update the host key. Accidentally changing a server's host key can be disruptive.
* </p>
* </important>
* <p>
* For more information, see
* "https://docs.aws.amazon.com/transfer/latest/userguide/configuring-servers.html#change-host-key" in the <i>AWS
* SFTP User Guide.</i>
* </p>
*
* @return The RSA private key as generated by <code>ssh-keygen -N "" -f my-new-server-key</code>.</p> <important>
* <p>
* If you aren't planning to migrate existing users from an existing SFTP server to a new AWS SFTP server,
* don't update the host key. Accidentally changing a server's host key can be disruptive.
* </p>
* </important>
* <p>
* For more information, see
* "https://docs.aws.amazon.com/transfer/latest/userguide/configuring-servers.html#change-host-key" in the
* <i>AWS SFTP User Guide.</i>
*/
public String getHostKey() {
return this.hostKey;
}
/**
* <p>
* The RSA private key as generated by <code>ssh-keygen -N "" -f my-new-server-key</code>.
* </p>
* <important>
* <p>
* If you aren't planning to migrate existing users from an existing SFTP server to a new AWS SFTP server, don't
* update the host key. Accidentally changing a server's host key can be disruptive.
* </p>
* </important>
* <p>
* For more information, see
* "https://docs.aws.amazon.com/transfer/latest/userguide/configuring-servers.html#change-host-key" in the <i>AWS
* SFTP User Guide.</i>
* </p>
*
* @param hostKey
* The RSA private key as generated by <code>ssh-keygen -N "" -f my-new-server-key</code>.</p> <important>
* <p>
* If you aren't planning to migrate existing users from an existing SFTP server to a new AWS SFTP server,
* don't update the host key. Accidentally changing a server's host key can be disruptive.
* </p>
* </important>
* <p>
* For more information, see
* "https://docs.aws.amazon.com/transfer/latest/userguide/configuring-servers.html#change-host-key" in the
* <i>AWS SFTP User Guide.</i>
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateServerRequest withHostKey(String hostKey) {
setHostKey(hostKey);
return this;
}
/**
* <p>
* This response parameter is an array containing all of the information required to call a customer's
* authentication API method.
* </p>
*
* @param identityProviderDetails
* This response parameter is an array containing all of the information required to call a customer's
* authentication API method.
*/
public void setIdentityProviderDetails(IdentityProviderDetails identityProviderDetails) {
this.identityProviderDetails = identityProviderDetails;
}
/**
* <p>
* This response parameter is an array containing all of the information required to call a customer's
* authentication API method.
* </p>
*
* @return This response parameter is an array containing all of the information required to call a customer's
* authentication API method.
*/
public IdentityProviderDetails getIdentityProviderDetails() {
return this.identityProviderDetails;
}
/**
* <p>
* This response parameter is an array containing all of the information required to call a customer's
* authentication API method.
* </p>
*
* @param identityProviderDetails
* This response parameter is an array containing all of the information required to call a customer's
* authentication API method.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateServerRequest withIdentityProviderDetails(IdentityProviderDetails identityProviderDetails) {
setIdentityProviderDetails(identityProviderDetails);
return this;
}
/**
* <p>
* A value that changes the AWS Identity and Access Management (IAM) role that allows Amazon S3 events to be logged
* in Amazon CloudWatch, turning logging on or off.
* </p>
*
* @param loggingRole
* A value that changes the AWS Identity and Access Management (IAM) role that allows Amazon S3 events to be
* logged in Amazon CloudWatch, turning logging on or off.
*/
public void setLoggingRole(String loggingRole) {
this.loggingRole = loggingRole;
}
/**
* <p>
* A value that changes the AWS Identity and Access Management (IAM) role that allows Amazon S3 events to be logged
* in Amazon CloudWatch, turning logging on or off.
* </p>
*
* @return A value that changes the AWS Identity and Access Management (IAM) role that allows Amazon S3 events to be
* logged in Amazon CloudWatch, turning logging on or off.
*/
public String getLoggingRole() {
return this.loggingRole;
}
/**
* <p>
* A value that changes the AWS Identity and Access Management (IAM) role that allows Amazon S3 events to be logged
* in Amazon CloudWatch, turning logging on or off.
* </p>
*
* @param loggingRole
* A value that changes the AWS Identity and Access Management (IAM) role that allows Amazon S3 events to be
* logged in Amazon CloudWatch, turning logging on or off.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateServerRequest withLoggingRole(String loggingRole) {
setLoggingRole(loggingRole);
return this;
}
/**
* <p>
* A system-assigned unique identifier for an SFTP server instance that the user account is assigned to.
* </p>
*
* @param serverId
* A system-assigned unique identifier for an SFTP server instance that the user account is assigned to.
*/
public void setServerId(String serverId) {
this.serverId = serverId;
}
/**
* <p>
* A system-assigned unique identifier for an SFTP server instance that the user account is assigned to.
* </p>
*
* @return A system-assigned unique identifier for an SFTP server instance that the user account is assigned to.
*/
public String getServerId() {
return this.serverId;
}
/**
* <p>
* A system-assigned unique identifier for an SFTP server instance that the user account is assigned to.
* </p>
*
* @param serverId
* A system-assigned unique identifier for an SFTP server instance that the user account is assigned to.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateServerRequest withServerId(String serverId) {
setServerId(serverId);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getEndpointDetails() != null)
sb.append("EndpointDetails: ").append(getEndpointDetails()).append(",");
if (getEndpointType() != null)
sb.append("EndpointType: ").append(getEndpointType()).append(",");
if (getHostKey() != null)
sb.append("HostKey: ").append("***Sensitive Data Redacted***").append(",");
if (getIdentityProviderDetails() != null)
sb.append("IdentityProviderDetails: ").append(getIdentityProviderDetails()).append(",");
if (getLoggingRole() != null)
sb.append("LoggingRole: ").append(getLoggingRole()).append(",");
if (getServerId() != null)
sb.append("ServerId: ").append(getServerId());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateServerRequest == false)
return false;
UpdateServerRequest other = (UpdateServerRequest) obj;
if (other.getEndpointDetails() == null ^ this.getEndpointDetails() == null)
return false;
if (other.getEndpointDetails() != null && other.getEndpointDetails().equals(this.getEndpointDetails()) == false)
return false;
if (other.getEndpointType() == null ^ this.getEndpointType() == null)
return false;
if (other.getEndpointType() != null && other.getEndpointType().equals(this.getEndpointType()) == false)
return false;
if (other.getHostKey() == null ^ this.getHostKey() == null)
return false;
if (other.getHostKey() != null && other.getHostKey().equals(this.getHostKey()) == false)
return false;
if (other.getIdentityProviderDetails() == null ^ this.getIdentityProviderDetails() == null)
return false;
if (other.getIdentityProviderDetails() != null && other.getIdentityProviderDetails().equals(this.getIdentityProviderDetails()) == false)
return false;
if (other.getLoggingRole() == null ^ this.getLoggingRole() == null)
return false;
if (other.getLoggingRole() != null && other.getLoggingRole().equals(this.getLoggingRole()) == false)
return false;
if (other.getServerId() == null ^ this.getServerId() == null)
return false;
if (other.getServerId() != null && other.getServerId().equals(this.getServerId()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEndpointDetails() == null) ? 0 : getEndpointDetails().hashCode());
hashCode = prime * hashCode + ((getEndpointType() == null) ? 0 : getEndpointType().hashCode());
hashCode = prime * hashCode + ((getHostKey() == null) ? 0 : getHostKey().hashCode());
hashCode = prime * hashCode + ((getIdentityProviderDetails() == null) ? 0 : getIdentityProviderDetails().hashCode());
hashCode = prime * hashCode + ((getLoggingRole() == null) ? 0 : getLoggingRole().hashCode());
hashCode = prime * hashCode + ((getServerId() == null) ? 0 : getServerId().hashCode());
return hashCode;
}
@Override
public UpdateServerRequest clone() {
return (UpdateServerRequest) super.clone();
}
}
|
topillar/PuTTY-ng | library/base/algorithm/libjpeg_turbo/rrutil.h | /* Copyright (C)2004 Landmark Graphics Corporation
* Copyright (C)2005 Sun Microsystems, Inc.
* Copyright (C)2010 <NAME>
*
* This library is free software and may be redistributed and/or modified under
* the terms of the wxWindows Library License, Version 3.1 or (at your option)
* any later version. The full license is in the LICENSE.txt file included
* with this distribution.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* wxWindows Library License for more details.
*/
#ifndef __RRUTIL_H__
#define __RRUTIL_H__
#ifdef _WIN32
#include <windows.h>
#define sleep(t) Sleep((t)*1000)
#define usleep(t) Sleep((t)/1000)
#else
#include <unistd.h>
#define stricmp strcasecmp
#define strnicmp strncasecmp
#endif
#ifndef min
#define min(a,b) ((a)<(b)?(a):(b))
#endif
#ifndef max
#define max(a,b) ((a)>(b)?(a):(b))
#endif
#define pow2(i) (1<<(i))
#define isPow2(x) (((x)&(x-1))==0)
#ifdef sgi
#define _SC_NPROCESSORS_CONF _SC_NPROC_CONF
#endif
#ifdef sun
#define __inline inline
#endif
static __inline int numprocs(void)
{
#ifdef _WIN32
DWORD_PTR ProcAff, SysAff, i; int count=0;
if(!GetProcessAffinityMask(GetCurrentProcess(), &ProcAff, &SysAff)) return(1);
for(i=0; i<sizeof(long*)*8; i++) if(ProcAff&(1LL<<i)) count++;
return(count);
#elif defined (__APPLE__)
return(1);
#else
long count=1;
if((count=sysconf(_SC_NPROCESSORS_CONF))!=-1) return((int)count);
else return(1);
#endif
}
#define byteswap(i) ( \
(((i) & 0xff000000) >> 24) | \
(((i) & 0x00ff0000) >> 8) | \
(((i) & 0x0000ff00) << 8) | \
(((i) & 0x000000ff) << 24) )
#define byteswap16(i) ( \
(((i) & 0xff00) >> 8) | \
(((i) & 0x00ff) << 8) )
static __inline int littleendian(void)
{
unsigned int value=1;
unsigned char *ptr=(unsigned char *)(&value);
if(ptr[0]==1 && ptr[3]==0) return 1;
else return 0;
}
#endif
|
ggwhsd/CPPStudy | Linux/13socket/udp_group_brodcast/udp_g_brodcast_recv.c | <filename>Linux/13socket/udp_group_brodcast/udp_g_brodcast_recv.c
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <netdb.h>
#include <errno.h>
#define BUFLEN 255
void print_exit(char* con)
{
printf("%s",con);
exit(EXIT_FAILURE);
}
int main(int argc, char* argv[])
{
struct sockaddr_in peeraddr;
struct in_addr ia;
int sockfd;
char recmsg[BUFLEN + 1];
unsigned int socklen, n;
struct hostent *group;
struct ip_mreq mreq;
//create udp socket
sockfd = socket(AF_INET, SOCK_DGRAM, 0);
if(sockfd <0)
{
print_exit("socket create failed");
}
bzero(&mreq, sizeof(struct ip_mreq));
if(argv[1])
{
if(( group = gethostbyname(argv[1])) == (struct hostent *)0)
{
print_exit("there is no group ip address in argv!");
}
}
else
{
print_exit("there is no group address , 192.168.3.11 - 192.168.127.12\n");
}
bcopy((void *) group->h_addr, (void*) &ia, group->h_length);
bcopy(&ia, &mreq.imr_multiaddr.s_addr, sizeof(struct in_addr));
// mreq.imr_interface.s_addr = htonl(INADDR_ANY);
if(argv[2])
{
if(inet_pton(AF_INET, argv[2], &mreq.imr_interface.s_addr) <= 0)
{
print_exit("wrong local ip address");
}
}
//set group ip address
if(setsockopt(sockfd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq,sizeof(struct ip_mreq))== -1)
{
print_exit("setsockopt wrong");
}
socklen = sizeof(struct sockaddr_in);
memset(&peeraddr, 0, socklen);
peeraddr.sin_family = AF_INET;
peeraddr.sin_port = htons(9999);
if(argv[1])
{
if(inet_pton(AF_INET, argv[1], &peeraddr.sin_addr) <= 0)
{
print_exit("wrong local ip address 2 !");
}
}
else
{
print_exit("no ip address");
}
if(bind(sockfd, (struct sockaddr*) &peeraddr, sizeof(struct sockaddr_in)) == -1)
{
print_exit("bind address error");
}
for(;;)
{
bzero(recmsg, BUFLEN + 1);
n = recvfrom(sockfd, recmsg, BUFLEN, 0, (struct sockaddr *) &peeraddr, &socklen);
if(n<0)
{
print_exit("recvfrom err in udptalk!\n");
}
else
{
recmsg[n] = 0;
printf("peer:%s", recmsg);
}
}
}
|
bangaman/netlifywebb | mungo/session.go |
package mungo
import (
"github.com/gorilla/sessions"
)
var (
Store = sessions.NewCookieStore([]byte("top-name"))
) |
qq1367159064/smilemall | smilemall-ware/src/main/java/cn/smile/smilemall/ware/feign/ProdcutFeignImpl.java | <reponame>qq1367159064/smilemall
package cn.smile.smilemall.ware.feign;
import cn.smile.common.utils.R;
import org.springframework.stereotype.Service;
/**
* @author Smile
* @Documents
* @date 2021-01-2021/1/28/028
*/
@Service
public class ProdcutFeignImpl implements ProdcutFeign {
@Override
public R info(Long skuId) {
return R.error();
}
}
|
EvanMorcom/Software | src/firmware_new/boards/frankie_v1/io/allegro_a3931_motor_driver.h | <gh_stars>0
#pragma once
/**
* This file is an abstraction around the Allegro A3931 Motor Driver
*/
#include "firmware_new/boards/frankie_v1/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal.h"
#include "firmware_new/boards/frankie_v1/io/gpio_pin.h"
#include "firmware_new/boards/frankie_v1/io/pwm_pin.h"
typedef enum
{
CLOCKWISE,
COUNTERCLOCKWISE
} AllegroA3931MotorDriverDriveDirection;
typedef struct AllegroA3931MotorDriver AllegroA3931MotorDriver_t;
/**
* Create a Motor Driver
* @param pwm_pin The PWM pin to the driver. Note that this must be configured to
* operate in the correct frequency range for the motor driver. Please
* talk to Elec. to determine this.
* @param reset_pin A GPIO pin connected to the "reset" pin on the motor driver.
* @param coast_pin A GPIO pin connected to the "coast" pin on the motor driver.
* @param mode_pin A GPIO pin connected to the "mode" pin on the motor driver.
* @param direction_pin A GPIO pin connected to the "direction" pin on the motor driver.
* @param brake_pin A GPIO pin connected to the "brake" pin on the motor driver.
* @param esf_pin A GPIO pin connected to the "ESF" pin on the motor driver.
* The "ESF" pin, when active, causes the motor driver to stop the
* motor if a short is detected.
*
* @return A motor driver with the pwm percentage set to zero.
*/
AllegroA3931MotorDriver_t* io_allegro_a3931_motor_driver_create(
PwmPin_t* pwm_pin, GpioPin_t* reset_pin, GpioPin_t* coast_pin, GpioPin_t* mode_pin,
GpioPin_t* direction_pin, GpioPin_t* brake_pin, GpioPin_t* esf_pin);
/**
* Destroy the given motor driver
* @param motor_driver The motor driver to destroy
*/
void io_allegro_a3931_motor_driver_destroy(AllegroA3931MotorDriver_t* motor_driver);
/**
* Set the rotation direction for the given motor driver
*
* Note that the rotation is from the perspective of rear of the motor, looking down
* the shaft starting from the motor body
*
* @param motor_driver
* @param direction
*/
void io_allegro_a3931_motor_driver_setDirection(
AllegroA3931MotorDriver_t* motor_driver,
AllegroA3931MotorDriverDriveDirection direction);
/**
* Set the PWM percentage for the given motor driver
* @param motor_driver
* @param pwm_percentage A value in [0,1] indicating the PWM percentage
*/
void io_allegro_a3931_motor_setPwmPercentage(AllegroA3931MotorDriver_t* motor_driver,
float pwm_percentage);
|
Microchip-MPLAB-Harmony/reference_apps | apps/sam_e51_cnano/same51n_mikroe_click/eink_bundle/firmware/src/click_routines/eink_bundle/eink_bundle_font.c | <filename>apps/sam_e51_cnano/same51n_mikroe_click/eink_bundle/firmware/src/click_routines/eink_bundle/eink_bundle_font.c
/**************************CHANGE LIST **************************************
*
* Date Software Version Initials Description
* 28/01/2020 1.0 MK Modified.
* 15/04/2021 2.0 ST Modified.
*****************************************************************************/
/****************************************************************************
* Note: In version 2.0, This file has been modified by ST to meet the custom
* application requirements. Should you need to contact the modifier write to
* Microchip Technology India Pvt Ltd
* Plot No. 1498, EPIP, 1st Phase Industrial Area, Whitefield, Bengaluru,
* Karnataka 560066
*******************************************************************************/
// DOM-IGNORE-BEGIN
/*******************************************************************************
* Copyright (C) 2020 Microchip Technology Inc. and its subsidiaries.
*
* Subject to your compliance with these terms, you may use Microchip software
* and any derivatives exclusively with Microchip products. It is your
* responsibility to comply with third party license terms applicable to your
* use of third party software (including open source software) that may
* accompany Microchip software.
*
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
* PARTICULAR PURPOSE.
*
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
*******************************************************************************/
// DOM-IGNORE-END
#include "eink_bundle_font.h"
#include <stdint.h>
#ifdef EINK_BUNDLE_GUIFONT_TAHOMA_14_REGULAR
const uint8_t guiFont_Tahoma_14_Regular[] = {
0x00,
0x00,
0x20,0x00,
0x7F,0x00,
0x17,
0x18,
0x03,0x88,0x01,0x00,
0x04,0x9F,0x01,0x00,
0x06,0xB6,0x01,0x00,
0x0C,0xCD,0x01,0x00,
0x09,0xFB,0x01,0x00,
0x12,0x29,0x02,0x00,
0x0D,0x6E,0x02,0x00,
0x03,0x9C,0x02,0x00,
0x07,0xB3,0x02,0x00,
0x06,0xCA,0x02,0x00,
0x0A,0xE1,0x02,0x00,
0x0D,0x0F,0x03,0x00,
0x05,0x3D,0x03,0x00,
0x06,0x54,0x03,0x00,
0x04,0x6B,0x03,0x00,
0x07,0x82,0x03,0x00,
0x09,0x99,0x03,0x00,
0x09,0xC7,0x03,0x00,
0x0A,0xF5,0x03,0x00,
0x09,0x23,0x04,0x00,
0x0A,0x51,0x04,0x00,
0x09,0x7F,0x04,0x00,
0x09,0xAD,0x04,0x00,
0x0A,0xDB,0x04,0x00,
0x09,0x09,0x05,0x00,
0x09,0x37,0x05,0x00,
0x04,0x65,0x05,0x00,
0x05,0x7C,0x05,0x00,
0x0C,0x93,0x05,0x00,
0x0C,0xC1,0x05,0x00,
0x0C,0xEF,0x05,0x00,
0x08,0x1D,0x06,0x00,
0x10,0x34,0x06,0x00,
0x0B,0x62,0x06,0x00,
0x0A,0x90,0x06,0x00,
0x0A,0xBE,0x06,0x00,
0x0C,0xEC,0x06,0x00,
0x0A,0x1A,0x07,0x00,
0x0A,0x48,0x07,0x00,
0x0C,0x76,0x07,0x00,
0x0B,0xA4,0x07,0x00,
0x06,0xD2,0x07,0x00,
0x07,0xE9,0x07,0x00,
0x0B,0x00,0x08,0x00,
0x09,0x2E,0x08,0x00,
0x0D,0x5C,0x08,0x00,
0x0B,0x8A,0x08,0x00,
0x0C,0xB8,0x08,0x00,
0x0A,0xE6,0x08,0x00,
0x0C,0x14,0x09,0x00,
0x0C,0x42,0x09,0x00,
0x0A,0x70,0x09,0x00,
0x0B,0x9E,0x09,0x00,
0x0B,0xCC,0x09,0x00,
0x0A,0xFA,0x09,0x00,
0x10,0x28,0x0A,0x00,
0x0A,0x56,0x0A,0x00,
0x0B,0x84,0x0A,0x00,
0x0A,0xB2,0x0A,0x00,
0x07,0xE0,0x0A,0x00,
0x07,0xF7,0x0A,0x00,
0x06,0x0E,0x0B,0x00,
0x0C,0x25,0x0B,0x00,
0x0A,0x53,0x0B,0x00,
0x06,0x81,0x0B,0x00,
0x08,0x98,0x0B,0x00,
0x0A,0xAF,0x0B,0x00,
0x08,0xDD,0x0B,0x00,
0x09,0xF4,0x0B,0x00,
0x09,0x22,0x0C,0x00,
0x06,0x50,0x0C,0x00,
0x09,0x67,0x0C,0x00,
0x09,0x95,0x0C,0x00,
0x03,0xC3,0x0C,0x00,
0x04,0xDA,0x0C,0x00,
0x09,0xF1,0x0C,0x00,
0x03,0x1F,0x0D,0x00,
0x0F,0x36,0x0D,0x00,
0x09,0x64,0x0D,0x00,
0x09,0x92,0x0D,0x00,
0x0A,0xC0,0x0D,0x00,
0x09,0xEE,0x0D,0x00,
0x07,0x1C,0x0E,0x00,
0x07,0x33,0x0E,0x00,
0x06,0x4A,0x0E,0x00,
0x09,0x61,0x0E,0x00,
0x08,0x8F,0x0E,0x00,
0x0D,0xA6,0x0E,0x00,
0x08,0xD4,0x0E,0x00,
0x08,0xEB,0x0E,0x00,
0x07,0x02,0x0F,0x00,
0x09,0x19,0x0F,0x00,
0x05,0x47,0x0F,0x00,
0x09,0x5E,0x0F,0x00,
0x0D,0x8C,0x0F,0x00,
0x05,0xBA,0x0F,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 32
0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x00,0x00,0x0C,0x0C,0x00,0x00,0x00,0x00, // Code for char num 33
0x00,0x00,0x00,0x00,0x36,0x36,0x36,0x36,0x36,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 34
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x04,0x20,0x04,0x10,0x02,0x10,0x02,0xFC,0x0F,0x10,0x02,0x10,0x02,0x08,0x01,0x08,0x01,0xFE,0x07,0x08,0x01,0x08,0x01,0x84,0x00,0x84,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 35
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0xF8,0x00,0xFC,0x01,0x26,0x01,0x26,0x00,0x2E,0x00,0xFC,0x00,0xF0,0x01,0xA0,0x01,0xA0,0x01,0xA2,0x01,0xFE,0x00,0x7C,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x00,0x00, // Code for char num 36
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x30,0x00,0x44,0x18,0x00,0xC6,0x18,0x00,0xC6,0x0C,0x00,0xC6,0x0C,0x00,0xC6,0x06,0x00,0x44,0xF6,0x01,0x7C,0x13,0x01,0x00,0x1B,0x03,0x80,0x19,0x03,0x80,0x19,0x03,0xC0,0x18,0x03,0xC0,0x10,0x01,0x60,0xF0,0x01,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 37
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0xFC,0x00,0xC6,0x00,0xC6,0x00,0xC6,0x00,0x7C,0x00,0x3C,0x06,0x76,0x06,0xE3,0x06,0xC3,0x03,0x83,0x03,0x07,0x07,0xFE,0x0E,0x7C,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 38
0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 39
0x00,0x00,0x00,0x00,0x70,0x30,0x18,0x0C,0x0C,0x0C,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x0C,0x0C,0x18,0x30,0x70, // Code for char num 40
0x00,0x00,0x00,0x00,0x07,0x06,0x0C,0x18,0x18,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0x18,0x18,0x0C,0x06,0x07, // Code for char num 41
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x22,0x02,0xAE,0x03,0xF8,0x00,0x20,0x00,0xF8,0x00,0xAE,0x03,0x22,0x02,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 42
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xFE,0x1F,0xFE,0x1F,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 43
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x0C,0x0C,0x04,0x06,0x06,0x00, // Code for char num 44
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 45
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00, // Code for char num 46
0x00,0x00,0x00,0x00,0x60,0x60,0x30,0x30,0x30,0x18,0x18,0x18,0x18,0x0C,0x0C,0x0C,0x0C,0x06,0x06,0x06,0x03,0x03,0x00, // Code for char num 47
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0xFE,0x00,0xC6,0x00,0x83,0x01,0x83,0x01,0x83,0x01,0x83,0x01,0x83,0x01,0x83,0x01,0x83,0x01,0x83,0x01,0xC6,0x00,0xFE,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 48
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x30,0x00,0x3E,0x00,0x3E,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0xFE,0x01,0xFE,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 49
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0xFE,0x00,0xC2,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xC0,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0x06,0x00,0xFE,0x03,0xFE,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 50
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0xFE,0x00,0xC2,0x01,0x80,0x01,0x80,0x01,0xC0,0x00,0x30,0x00,0xF0,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0xC2,0x01,0xFE,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 51
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0xE0,0x00,0xF0,0x00,0xD8,0x00,0xCC,0x00,0xC6,0x00,0xC3,0x00,0xFF,0x03,0xFF,0x03,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 52
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x01,0xFC,0x01,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x7C,0x00,0xFC,0x00,0xC0,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xC2,0x01,0xFE,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 53
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0xFC,0x00,0x0E,0x00,0x06,0x00,0x03,0x00,0x7B,0x00,0xFF,0x00,0xC3,0x01,0x83,0x01,0x83,0x01,0x83,0x01,0xC6,0x01,0xFE,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 54
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x03,0xFE,0x03,0x00,0x03,0x80,0x01,0x80,0x01,0xC0,0x00,0xC0,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x18,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 55
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0xFE,0x00,0xC7,0x01,0x83,0x01,0x83,0x01,0xCE,0x00,0x7C,0x00,0xE6,0x00,0xC3,0x01,0x83,0x01,0x83,0x01,0xC7,0x01,0xFE,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 56
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0xFE,0x00,0xC7,0x00,0x83,0x01,0x83,0x01,0x83,0x01,0x87,0x01,0xFE,0x01,0xBC,0x01,0x80,0x01,0xC0,0x00,0xE0,0x00,0x7E,0x00,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 57
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00, // Code for char num 58
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00,0x18,0x0C,0x0C,0x04,0x06,0x06,0x00, // Code for char num 59
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x0E,0xC0,0x07,0xF0,0x01,0x3C,0x00,0x0C,0x00,0x3C,0x00,0xF0,0x01,0xC0,0x07,0x00,0x0E,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 60
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x0F,0xFC,0x0F,0x00,0x00,0x00,0x00,0xFC,0x0F,0xFC,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 61
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x1C,0x00,0xF8,0x00,0xE0,0x03,0x00,0x0F,0x00,0x0C,0x00,0x0F,0xE0,0x03,0xF8,0x00,0x1C,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 62
0x00,0x00,0x00,0x00,0x00,0x3C,0x7E,0xE2,0xC0,0xC0,0xE0,0x70,0x38,0x18,0x18,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00, // Code for char num 63
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x0F,0x30,0x18,0x08,0x20,0x04,0x40,0xC4,0x4F,0x62,0x8C,0x32,0x8C,0x32,0x8C,0x32,0x8C,0x32,0x8C,0x32,0x8C,0x64,0x4E,0xC4,0x7D,0x08,0x00,0x30,0x00,0xC0,0x0F,0x00,0x00,0x00,0x00, // Code for char num 64
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0xD8,0x00,0xD8,0x00,0xD8,0x00,0x8C,0x01,0x8C,0x01,0xFC,0x01,0xFE,0x03,0x06,0x03,0x06,0x03,0x07,0x07,0x03,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 65
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0xFE,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0xC6,0x00,0x7E,0x00,0xFE,0x01,0x86,0x03,0x06,0x03,0x06,0x03,0x86,0x03,0xFE,0x01,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 66
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x02,0x06,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x06,0x00,0x0E,0x02,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 67
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0xFE,0x03,0x86,0x07,0x06,0x06,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x06,0x86,0x07,0xFE,0x03,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 68
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x03,0xFE,0x03,0x06,0x00,0x06,0x00,0x06,0x00,0xFE,0x03,0xFE,0x03,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xFE,0x03,0xFE,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 69
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x03,0xFE,0x03,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xFE,0x03,0xFE,0x03,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 70
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x03,0xFC,0x0F,0x1E,0x0C,0x06,0x00,0x07,0x00,0x03,0x00,0x03,0x00,0x83,0x0F,0x83,0x0F,0x07,0x0C,0x06,0x0C,0x1E,0x0C,0xFC,0x0F,0xF0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 71
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0xFE,0x07,0xFE,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 72
0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x3F,0x3F,0x00,0x00,0x00,0x00, // Code for char num 73
0x00,0x00,0x00,0x00,0x00,0x7C,0x7C,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x70,0x3F,0x1F,0x00,0x00,0x00,0x00, // Code for char num 74
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x07,0x86,0x03,0xC6,0x01,0xE6,0x00,0x76,0x00,0x3E,0x00,0x1E,0x00,0x3E,0x00,0x76,0x00,0xE6,0x00,0xC6,0x00,0x86,0x01,0x86,0x03,0x06,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 75
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xFE,0x01,0xFE,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 76
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x1C,0x0E,0x1C,0x1E,0x1E,0x16,0x1A,0x36,0x1B,0x26,0x19,0x66,0x19,0xE6,0x19,0xC6,0x18,0xC6,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 77
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x06,0x1E,0x06,0x1E,0x06,0x16,0x06,0x36,0x06,0x26,0x06,0x66,0x06,0x46,0x06,0xC6,0x06,0x86,0x06,0x86,0x07,0x06,0x07,0x06,0x07,0x06,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 78
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x07,0x06,0x06,0x03,0x0C,0x03,0x0C,0x03,0x0C,0x03,0x0C,0x03,0x0C,0x03,0x0C,0x06,0x06,0x0E,0x07,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 79
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0xFE,0x01,0x86,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x86,0x01,0xFE,0x01,0x7E,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 80
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x07,0x06,0x06,0x03,0x0C,0x03,0x0C,0x03,0x0C,0x03,0x0C,0x03,0x0C,0x03,0x0C,0x06,0x06,0x0E,0x07,0xFC,0x03,0xF8,0x00,0xC0,0x00,0xC0,0x01,0x80,0x0F,0x00,0x0F, // Code for char num 81
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0xFE,0x01,0x86,0x03,0x06,0x03,0x06,0x03,0x86,0x03,0xFE,0x01,0x7E,0x00,0xE6,0x00,0xC6,0x00,0x86,0x01,0x06,0x03,0x06,0x07,0x06,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 82
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x00,0xFE,0x01,0x07,0x01,0x03,0x00,0x03,0x00,0x07,0x00,0x7E,0x00,0xF8,0x01,0x80,0x03,0x00,0x03,0x00,0x03,0x81,0x03,0xFF,0x01,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 83
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x07,0xFF,0x07,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 84
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 85
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x87,0x03,0x86,0x01,0x86,0x01,0x86,0x01,0xCC,0x00,0xCC,0x00,0xCC,0x00,0x58,0x00,0x78,0x00,0x78,0x00,0x78,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 86
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0xC1,0x83,0xC1,0x86,0x63,0xC6,0x63,0xC6,0x63,0x46,0x62,0x4C,0x32,0x6C,0x36,0x6C,0x36,0x6C,0x36,0x28,0x34,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 87
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x86,0x01,0x86,0x01,0xCC,0x00,0x78,0x00,0x78,0x00,0x30,0x00,0x30,0x00,0x78,0x00,0x78,0x00,0xCC,0x00,0x86,0x01,0x86,0x01,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 88
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x07,0x03,0x03,0x86,0x01,0xCE,0x01,0xCC,0x00,0x7C,0x00,0x78,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 89
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x03,0xFE,0x03,0x00,0x03,0x80,0x01,0xC0,0x00,0xC0,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x18,0x00,0x0C,0x00,0x06,0x00,0xFE,0x03,0xFE,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 90
0x00,0x00,0x00,0x00,0x7C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x7C, // Code for char num 91
0x00,0x00,0x00,0x00,0x03,0x03,0x06,0x06,0x06,0x0C,0x0C,0x0C,0x0C,0x18,0x18,0x18,0x18,0x30,0x30,0x30,0x60,0x60,0x00, // Code for char num 92
0x00,0x00,0x00,0x00,0x3E,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3E, // Code for char num 93
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0xE0,0x00,0xB0,0x01,0xB8,0x03,0x18,0x03,0x0C,0x06,0x0E,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 94
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x03,0x00,0x00, // Code for char num 95
0x00,0x00,0x00,0x00,0x1C,0x18,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 96
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0xFE,0xC0,0xFC,0xFE,0xC7,0xC3,0xE3,0xFF,0xDE,0x00,0x00,0x00,0x00, // Code for char num 97
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xF6,0x00,0xFE,0x01,0x8E,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x86,0x01,0xFE,0x01,0xF6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 98
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0xFE,0x86,0x03,0x03,0x03,0x03,0x87,0xFE,0x7C,0x00,0x00,0x00,0x00, // Code for char num 99
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xFC,0x01,0xFE,0x01,0x86,0x01,0x83,0x01,0x83,0x01,0x83,0x01,0x83,0x01,0xC7,0x01,0xFE,0x01,0xBC,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 100
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0xFE,0x00,0xC7,0x01,0x83,0x01,0xFF,0x01,0xFF,0x01,0x03,0x00,0x07,0x01,0xFE,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 101
0x00,0x00,0x00,0x00,0x38,0x3C,0x06,0x06,0x06,0x1F,0x1F,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00, // Code for char num 102
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x01,0xFE,0x01,0x86,0x01,0x83,0x01,0x83,0x01,0x83,0x01,0x83,0x01,0x87,0x01,0xFE,0x01,0xBC,0x01,0x80,0x01,0xC0,0x01,0xFE,0x00,0x7E,0x00, // Code for char num 103
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xF6,0x00,0xFE,0x01,0x8E,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 104
0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00, // Code for char num 105
0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x00,0x00,0x0F,0x0F,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0F,0x03, // Code for char num 106
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xC6,0x00,0x66,0x00,0x36,0x00,0x1E,0x00,0x1E,0x00,0x3E,0x00,0x36,0x00,0x66,0x00,0xE6,0x00,0xC6,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 107
0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00, // Code for char num 108
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF6,0x3C,0xFE,0x7F,0x8E,0x63,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 109
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF6,0x00,0xFE,0x01,0x8E,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 110
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0xFE,0x00,0xC7,0x01,0x83,0x01,0x83,0x01,0x83,0x01,0x83,0x01,0xC7,0x01,0xFE,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 111
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF6,0x00,0xFE,0x01,0x8E,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x86,0x01,0xFE,0x01,0xFE,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00, // Code for char num 112
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x01,0xFE,0x01,0x86,0x01,0x83,0x01,0x83,0x01,0x83,0x01,0x83,0x01,0xC7,0x01,0xFE,0x01,0xBC,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01, // Code for char num 113
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x76,0x7E,0x0E,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00, // Code for char num 114
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x7F,0x43,0x03,0x1F,0x7E,0x60,0x61,0x7F,0x1E,0x00,0x00,0x00,0x00, // Code for char num 115
0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x3F,0x3F,0x06,0x06,0x06,0x06,0x06,0x06,0x3E,0x3C,0x00,0x00,0x00,0x00, // Code for char num 116
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0xC6,0x01,0xFE,0x01,0xBC,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 117
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC3,0xE7,0x66,0x66,0x66,0x3C,0x3C,0x3C,0x18,0x18,0x00,0x00,0x00,0x00, // Code for char num 118
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x43,0x18,0xE3,0x18,0xA6,0x08,0xA6,0x0C,0xB6,0x0D,0x16,0x0D,0x14,0x05,0x14,0x07,0x1C,0x07,0x0C,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 119
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC3,0x66,0x7E,0x3C,0x18,0x18,0x3C,0x7E,0x66,0xC3,0x00,0x00,0x00,0x00, // Code for char num 120
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC3,0x67,0x66,0x66,0x2E,0x3C,0x3C,0x1C,0x18,0x18,0x0C,0x0C,0x0C,0x06, // Code for char num 121
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x7F,0x30,0x30,0x18,0x0C,0x06,0x06,0x7F,0x7F,0x00,0x00,0x00,0x00, // Code for char num 122
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x01,0x60,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x06,0x00,0x18,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x60,0x00,0xC0,0x01, // Code for char num 123
0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, // Code for char num 124
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x00,0x18,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x60,0x00,0x80,0x01,0x60,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x0E,0x00, // Code for char num 125
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x18,0x7C,0x18,0xCE,0x1C,0x86,0x0F,0x06,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 126
0x00,0x00,0x00,0x00,0x00,0x1F,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x1F,0x00,0x00,0x00,0x00,0x00 // Code for char num 127
};
#endif
#ifdef EINK_BUNDLE_GUIFONT_TAHOMA_8_REGULAR
const uint8_t guiFont_Tahoma_8_Regular[] = {
0x00,
0x00,
0x20,0x00,
0x7F,0x00,
0x0D,
0x10,
0x03,0x88,0x01,0x00,
0x02,0x95,0x01,0x00,
0x03,0xA2,0x01,0x00,
0x07,0xAF,0x01,0x00,
0x05,0xBC,0x01,0x00,
0x0A,0xC9,0x01,0x00,
0x07,0xE3,0x01,0x00,
0x01,0xF0,0x01,0x00,
0x03,0xFD,0x01,0x00,
0x03,0x0A,0x02,0x00,
0x05,0x17,0x02,0x00,
0x07,0x24,0x02,0x00,
0x02,0x31,0x02,0x00,
0x03,0x3E,0x02,0x00,
0x02,0x4B,0x02,0x00,
0x03,0x58,0x02,0x00,
0x05,0x65,0x02,0x00,
0x04,0x72,0x02,0x00,
0x05,0x7F,0x02,0x00,
0x05,0x8C,0x02,0x00,
0x05,0x99,0x02,0x00,
0x05,0xA6,0x02,0x00,
0x05,0xB3,0x02,0x00,
0x05,0xC0,0x02,0x00,
0x05,0xCD,0x02,0x00,
0x05,0xDA,0x02,0x00,
0x02,0xE7,0x02,0x00,
0x02,0xF4,0x02,0x00,
0x07,0x01,0x03,0x00,
0x07,0x0E,0x03,0x00,
0x07,0x1B,0x03,0x00,
0x04,0x28,0x03,0x00,
0x09,0x35,0x03,0x00,
0x06,0x4F,0x03,0x00,
0x05,0x5C,0x03,0x00,
0x06,0x69,0x03,0x00,
0x06,0x76,0x03,0x00,
0x05,0x83,0x03,0x00,
0x05,0x90,0x03,0x00,
0x06,0x9D,0x03,0x00,
0x06,0xAA,0x03,0x00,
0x03,0xB7,0x03,0x00,
0x04,0xC4,0x03,0x00,
0x05,0xD1,0x03,0x00,
0x04,0xDE,0x03,0x00,
0x07,0xEB,0x03,0x00,
0x06,0xF8,0x03,0x00,
0x07,0x05,0x04,0x00,
0x05,0x12,0x04,0x00,
0x07,0x1F,0x04,0x00,
0x06,0x2C,0x04,0x00,
0x05,0x39,0x04,0x00,
0x05,0x46,0x04,0x00,
0x06,0x53,0x04,0x00,
0x05,0x60,0x04,0x00,
0x09,0x6D,0x04,0x00,
0x05,0x87,0x04,0x00,
0x05,0x94,0x04,0x00,
0x05,0xA1,0x04,0x00,
0x03,0xAE,0x04,0x00,
0x03,0xBB,0x04,0x00,
0x03,0xC8,0x04,0x00,
0x07,0xD5,0x04,0x00,
0x06,0xE2,0x04,0x00,
0x03,0xEF,0x04,0x00,
0x05,0xFC,0x04,0x00,
0x05,0x09,0x05,0x00,
0x04,0x16,0x05,0x00,
0x05,0x23,0x05,0x00,
0x05,0x30,0x05,0x00,
0x03,0x3D,0x05,0x00,
0x05,0x4A,0x05,0x00,
0x05,0x57,0x05,0x00,
0x01,0x64,0x05,0x00,
0x02,0x71,0x05,0x00,
0x05,0x7E,0x05,0x00,
0x01,0x8B,0x05,0x00,
0x07,0x98,0x05,0x00,
0x05,0xA5,0x05,0x00,
0x05,0xB2,0x05,0x00,
0x05,0xBF,0x05,0x00,
0x05,0xCC,0x05,0x00,
0x03,0xD9,0x05,0x00,
0x04,0xE6,0x05,0x00,
0x03,0xF3,0x05,0x00,
0x05,0x00,0x06,0x00,
0x05,0x0D,0x06,0x00,
0x07,0x1A,0x06,0x00,
0x05,0x27,0x06,0x00,
0x05,0x34,0x06,0x00,
0x04,0x41,0x06,0x00,
0x04,0x4E,0x06,0x00,
0x02,0x5B,0x06,0x00,
0x04,0x68,0x06,0x00,
0x07,0x75,0x06,0x00,
0x03,0x82,0x06,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 32
0x00,0x00,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x02,0x00,0x00, // Code for char num 33
0x00,0x00,0x05,0x05,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 34
0x00,0x00,0x00,0x28,0x28,0x7E,0x14,0x14,0x3F,0x0A,0x0A,0x00,0x00, // Code for char num 35
0x00,0x00,0x04,0x04,0x1E,0x05,0x05,0x0E,0x14,0x14,0x0F,0x04,0x04, // Code for char num 36
0x00,0x00,0x00,0x00,0x00,0x00,0x46,0x00,0x49,0x00,0x29,0x00,0x26,0x00,0x90,0x01,0x50,0x02,0x48,0x02,0x88,0x01,0x00,0x00,0x00,0x00, // Code for char num 37
0x00,0x00,0x00,0x06,0x09,0x09,0x26,0x29,0x11,0x31,0x4E,0x00,0x00, // Code for char num 38
0x00,0x00,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 39
0x00,0x00,0x04,0x02,0x02,0x01,0x01,0x01,0x01,0x01,0x02,0x02,0x04, // Code for char num 40
0x00,0x00,0x01,0x02,0x02,0x04,0x04,0x04,0x04,0x04,0x02,0x02,0x01, // Code for char num 41
0x00,0x00,0x04,0x15,0x0E,0x15,0x04,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 42
0x00,0x00,0x00,0x00,0x08,0x08,0x08,0x7F,0x08,0x08,0x08,0x00,0x00, // Code for char num 43
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x01, // Code for char num 44
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00, // Code for char num 45
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x00, // Code for char num 46
0x00,0x00,0x04,0x04,0x04,0x02,0x02,0x02,0x02,0x02,0x01,0x01,0x01, // Code for char num 47
0x00,0x00,0x00,0x0E,0x11,0x11,0x11,0x11,0x11,0x11,0x0E,0x00,0x00, // Code for char num 48
0x00,0x00,0x00,0x04,0x06,0x04,0x04,0x04,0x04,0x04,0x0E,0x00,0x00, // Code for char num 49
0x00,0x00,0x00,0x0E,0x11,0x10,0x08,0x04,0x02,0x01,0x1F,0x00,0x00, // Code for char num 50
0x00,0x00,0x00,0x0E,0x11,0x10,0x0C,0x10,0x10,0x11,0x0E,0x00,0x00, // Code for char num 51
0x00,0x00,0x00,0x08,0x0C,0x0A,0x09,0x1F,0x08,0x08,0x08,0x00,0x00, // Code for char num 52
0x00,0x00,0x00,0x1F,0x01,0x01,0x0F,0x10,0x10,0x11,0x0E,0x00,0x00, // Code for char num 53
0x00,0x00,0x00,0x0C,0x02,0x01,0x0F,0x11,0x11,0x11,0x0E,0x00,0x00, // Code for char num 54
0x00,0x00,0x00,0x1F,0x10,0x08,0x08,0x04,0x04,0x02,0x02,0x00,0x00, // Code for char num 55
0x00,0x00,0x00,0x0E,0x11,0x11,0x0E,0x11,0x11,0x11,0x0E,0x00,0x00, // Code for char num 56
0x00,0x00,0x00,0x0E,0x11,0x11,0x11,0x1E,0x10,0x08,0x06,0x00,0x00, // Code for char num 57
0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x00,0x02,0x02,0x00,0x00, // Code for char num 58
0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x00,0x02,0x02,0x02,0x01, // Code for char num 59
0x00,0x00,0x00,0x00,0x40,0x30,0x0C,0x02,0x0C,0x30,0x40,0x00,0x00, // Code for char num 60
0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x00,0x7F,0x00,0x00,0x00,0x00, // Code for char num 61
0x00,0x00,0x00,0x00,0x02,0x0C,0x30,0x40,0x30,0x0C,0x02,0x00,0x00, // Code for char num 62
0x00,0x00,0x00,0x07,0x08,0x08,0x04,0x02,0x02,0x00,0x02,0x00,0x00, // Code for char num 63
0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0x82,0x00,0x39,0x01,0x25,0x01,0x25,0x01,0x25,0x01,0xF9,0x00,0x02,0x00,0x3C,0x00,0x00,0x00, // Code for char num 64
0x00,0x00,0x00,0x0C,0x0C,0x12,0x12,0x12,0x3F,0x21,0x21,0x00,0x00, // Code for char num 65
0x00,0x00,0x00,0x0F,0x11,0x11,0x0F,0x11,0x11,0x11,0x0F,0x00,0x00, // Code for char num 66
0x00,0x00,0x00,0x3C,0x02,0x01,0x01,0x01,0x01,0x02,0x3C,0x00,0x00, // Code for char num 67
0x00,0x00,0x00,0x0F,0x11,0x21,0x21,0x21,0x21,0x11,0x0F,0x00,0x00, // Code for char num 68
0x00,0x00,0x00,0x1F,0x01,0x01,0x0F,0x01,0x01,0x01,0x1F,0x00,0x00, // Code for char num 69
0x00,0x00,0x00,0x1F,0x01,0x01,0x1F,0x01,0x01,0x01,0x01,0x00,0x00, // Code for char num 70
0x00,0x00,0x00,0x3C,0x02,0x01,0x01,0x39,0x21,0x22,0x3C,0x00,0x00, // Code for char num 71
0x00,0x00,0x00,0x21,0x21,0x21,0x3F,0x21,0x21,0x21,0x21,0x00,0x00, // Code for char num 72
0x00,0x00,0x00,0x07,0x02,0x02,0x02,0x02,0x02,0x02,0x07,0x00,0x00, // Code for char num 73
0x00,0x00,0x00,0x0E,0x08,0x08,0x08,0x08,0x08,0x08,0x07,0x00,0x00, // Code for char num 74
0x00,0x00,0x00,0x11,0x09,0x05,0x03,0x03,0x05,0x09,0x11,0x00,0x00, // Code for char num 75
0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0F,0x00,0x00, // Code for char num 76
0x00,0x00,0x00,0x63,0x63,0x55,0x55,0x49,0x49,0x41,0x41,0x00,0x00, // Code for char num 77
0x00,0x00,0x00,0x23,0x23,0x25,0x25,0x29,0x29,0x31,0x31,0x00,0x00, // Code for char num 78
0x00,0x00,0x00,0x1C,0x22,0x41,0x41,0x41,0x41,0x22,0x1C,0x00,0x00, // Code for char num 79
0x00,0x00,0x00,0x0F,0x11,0x11,0x11,0x0F,0x01,0x01,0x01,0x00,0x00, // Code for char num 80
0x00,0x00,0x00,0x1C,0x22,0x41,0x41,0x41,0x41,0x22,0x1C,0x10,0x60, // Code for char num 81
0x00,0x00,0x00,0x0F,0x11,0x11,0x11,0x0F,0x09,0x11,0x21,0x00,0x00, // Code for char num 82
0x00,0x00,0x00,0x1E,0x01,0x01,0x0E,0x10,0x10,0x10,0x0F,0x00,0x00, // Code for char num 83
0x00,0x00,0x00,0x1F,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00,0x00, // Code for char num 84
0x00,0x00,0x00,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x1E,0x00,0x00, // Code for char num 85
0x00,0x00,0x00,0x11,0x11,0x11,0x0A,0x0A,0x0A,0x04,0x04,0x00,0x00, // Code for char num 86
0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x01,0x11,0x01,0x11,0x01,0xAA,0x00,0xAA,0x00,0xAA,0x00,0x44,0x00,0x44,0x00,0x00,0x00,0x00,0x00, // Code for char num 87
0x00,0x00,0x00,0x11,0x11,0x0A,0x04,0x04,0x0A,0x11,0x11,0x00,0x00, // Code for char num 88
0x00,0x00,0x00,0x11,0x11,0x0A,0x0A,0x04,0x04,0x04,0x04,0x00,0x00, // Code for char num 89
0x00,0x00,0x00,0x1F,0x10,0x08,0x04,0x04,0x02,0x01,0x1F,0x00,0x00, // Code for char num 90
0x00,0x00,0x07,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x07, // Code for char num 91
0x00,0x00,0x01,0x01,0x01,0x02,0x02,0x02,0x02,0x02,0x04,0x04,0x04, // Code for char num 92
0x00,0x00,0x07,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x07, // Code for char num 93
0x00,0x00,0x00,0x08,0x14,0x22,0x41,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 94
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F, // Code for char num 95
0x00,0x00,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 96
0x00,0x00,0x00,0x00,0x00,0x0E,0x10,0x1E,0x11,0x11,0x1E,0x00,0x00, // Code for char num 97
0x00,0x00,0x01,0x01,0x01,0x0F,0x11,0x11,0x11,0x11,0x0F,0x00,0x00, // Code for char num 98
0x00,0x00,0x00,0x00,0x00,0x0E,0x01,0x01,0x01,0x01,0x0E,0x00,0x00, // Code for char num 99
0x00,0x00,0x10,0x10,0x10,0x1E,0x11,0x11,0x11,0x11,0x1E,0x00,0x00, // Code for char num 100
0x00,0x00,0x00,0x00,0x00,0x0E,0x11,0x1F,0x01,0x11,0x0E,0x00,0x00, // Code for char num 101
0x00,0x00,0x06,0x01,0x01,0x07,0x01,0x01,0x01,0x01,0x01,0x00,0x00, // Code for char num 102
0x00,0x00,0x00,0x00,0x00,0x1E,0x11,0x11,0x11,0x11,0x1E,0x10,0x0E, // Code for char num 103
0x00,0x00,0x01,0x01,0x01,0x0F,0x11,0x11,0x11,0x11,0x11,0x00,0x00, // Code for char num 104
0x00,0x00,0x00,0x01,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00, // Code for char num 105
0x00,0x00,0x00,0x02,0x00,0x03,0x02,0x02,0x02,0x02,0x02,0x02,0x01, // Code for char num 106
0x00,0x00,0x01,0x01,0x01,0x09,0x05,0x03,0x05,0x09,0x11,0x00,0x00, // Code for char num 107
0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00, // Code for char num 108
0x00,0x00,0x00,0x00,0x00,0x37,0x49,0x49,0x49,0x49,0x49,0x00,0x00, // Code for char num 109
0x00,0x00,0x00,0x00,0x00,0x0F,0x11,0x11,0x11,0x11,0x11,0x00,0x00, // Code for char num 110
0x00,0x00,0x00,0x00,0x00,0x0E,0x11,0x11,0x11,0x11,0x0E,0x00,0x00, // Code for char num 111
0x00,0x00,0x00,0x00,0x00,0x0F,0x11,0x11,0x11,0x11,0x0F,0x01,0x01, // Code for char num 112
0x00,0x00,0x00,0x00,0x00,0x1E,0x11,0x11,0x11,0x11,0x1E,0x10,0x10, // Code for char num 113
0x00,0x00,0x00,0x00,0x00,0x05,0x03,0x01,0x01,0x01,0x01,0x00,0x00, // Code for char num 114
0x00,0x00,0x00,0x00,0x00,0x0E,0x01,0x03,0x0C,0x08,0x07,0x00,0x00, // Code for char num 115
0x00,0x00,0x00,0x01,0x01,0x07,0x01,0x01,0x01,0x01,0x06,0x00,0x00, // Code for char num 116
0x00,0x00,0x00,0x00,0x00,0x11,0x11,0x11,0x11,0x11,0x1E,0x00,0x00, // Code for char num 117
0x00,0x00,0x00,0x00,0x00,0x11,0x11,0x0A,0x0A,0x04,0x04,0x00,0x00, // Code for char num 118
0x00,0x00,0x00,0x00,0x00,0x49,0x49,0x55,0x55,0x22,0x22,0x00,0x00, // Code for char num 119
0x00,0x00,0x00,0x00,0x00,0x11,0x0A,0x04,0x04,0x0A,0x11,0x00,0x00, // Code for char num 120
0x00,0x00,0x00,0x00,0x00,0x11,0x11,0x0A,0x0A,0x04,0x04,0x02,0x02, // Code for char num 121
0x00,0x00,0x00,0x00,0x00,0x0F,0x08,0x04,0x02,0x01,0x0F,0x00,0x00, // Code for char num 122
0x00,0x00,0x08,0x04,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x04,0x08, // Code for char num 123
0x00,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, // Code for char num 124
0x00,0x00,0x01,0x02,0x02,0x02,0x02,0x0C,0x02,0x02,0x02,0x02,0x01, // Code for char num 125
0x00,0x00,0x00,0x00,0x00,0x00,0x46,0x49,0x31,0x00,0x00,0x00,0x00, // Code for char num 126
0x00,0x00,0x00,0x07,0x05,0x05,0x05,0x05,0x05,0x05,0x07,0x00,0x00 // Code for char num 127
};
#endif
#ifdef EINK_BUNDLE_GUIFONT_TAHOMA_7_REGULAR
const uint8_t guiFont_Tahoma_7_Regular[] = {
0x00,
0x00,
0x20,0x00,
0x7F,0x00,
0x0B,
0x10,
0x03,0x88,0x01,0x00,
0x01,0x93,0x01,0x00,
0x03,0x9E,0x01,0x00,
0x07,0xA9,0x01,0x00,
0x05,0xB4,0x01,0x00,
0x09,0xBF,0x01,0x00,
0x06,0xD5,0x01,0x00,
0x01,0xE0,0x01,0x00,
0x03,0xEB,0x01,0x00,
0x02,0xF6,0x01,0x00,
0x05,0x01,0x02,0x00,
0x06,0x0C,0x02,0x00,
0x02,0x17,0x02,0x00,
0x02,0x22,0x02,0x00,
0x02,0x2D,0x02,0x00,
0x03,0x38,0x02,0x00,
0x04,0x43,0x02,0x00,
0x04,0x4E,0x02,0x00,
0x04,0x59,0x02,0x00,
0x04,0x64,0x02,0x00,
0x05,0x6F,0x02,0x00,
0x04,0x7A,0x02,0x00,
0x04,0x85,0x02,0x00,
0x04,0x90,0x02,0x00,
0x04,0x9B,0x02,0x00,
0x04,0xA6,0x02,0x00,
0x02,0xB1,0x02,0x00,
0x02,0xBC,0x02,0x00,
0x06,0xC7,0x02,0x00,
0x06,0xD2,0x02,0x00,
0x06,0xDD,0x02,0x00,
0x04,0xE8,0x02,0x00,
0x07,0xF3,0x02,0x00,
0x06,0xFE,0x02,0x00,
0x05,0x09,0x03,0x00,
0x06,0x14,0x03,0x00,
0x06,0x1F,0x03,0x00,
0x05,0x2A,0x03,0x00,
0x05,0x35,0x03,0x00,
0x06,0x40,0x03,0x00,
0x06,0x4B,0x03,0x00,
0x03,0x56,0x03,0x00,
0x03,0x61,0x03,0x00,
0x05,0x6C,0x03,0x00,
0x04,0x77,0x03,0x00,
0x07,0x82,0x03,0x00,
0x06,0x8D,0x03,0x00,
0x07,0x98,0x03,0x00,
0x05,0xA3,0x03,0x00,
0x07,0xAE,0x03,0x00,
0x05,0xB9,0x03,0x00,
0x05,0xC4,0x03,0x00,
0x05,0xCF,0x03,0x00,
0x06,0xDA,0x03,0x00,
0x06,0xE5,0x03,0x00,
0x07,0xF0,0x03,0x00,
0x04,0xFB,0x03,0x00,
0x05,0x06,0x04,0x00,
0x04,0x11,0x04,0x00,
0x02,0x1C,0x04,0x00,
0x03,0x27,0x04,0x00,
0x02,0x32,0x04,0x00,
0x05,0x3D,0x04,0x00,
0x05,0x48,0x04,0x00,
0x03,0x53,0x04,0x00,
0x04,0x5E,0x04,0x00,
0x04,0x69,0x04,0x00,
0x03,0x74,0x04,0x00,
0x04,0x7F,0x04,0x00,
0x04,0x8A,0x04,0x00,
0x03,0x95,0x04,0x00,
0x04,0xA0,0x04,0x00,
0x04,0xAB,0x04,0x00,
0x01,0xB6,0x04,0x00,
0x02,0xC1,0x04,0x00,
0x04,0xCC,0x04,0x00,
0x01,0xD7,0x04,0x00,
0x07,0xE2,0x04,0x00,
0x04,0xED,0x04,0x00,
0x04,0xF8,0x04,0x00,
0x04,0x03,0x05,0x00,
0x04,0x0E,0x05,0x00,
0x03,0x19,0x05,0x00,
0x03,0x24,0x05,0x00,
0x02,0x2F,0x05,0x00,
0x04,0x3A,0x05,0x00,
0x05,0x45,0x05,0x00,
0x07,0x50,0x05,0x00,
0x03,0x5B,0x05,0x00,
0x05,0x66,0x05,0x00,
0x03,0x71,0x05,0x00,
0x03,0x7C,0x05,0x00,
0x02,0x87,0x05,0x00,
0x03,0x92,0x05,0x00,
0x06,0x9D,0x05,0x00,
0x02,0xA8,0x05,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 32
0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x01,0x00,0x00, // Code for char num 33
0x00,0x05,0x05,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 34
0x00,0x00,0x24,0x24,0x7E,0x14,0x3F,0x12,0x12,0x00,0x00, // Code for char num 35
0x00,0x00,0x04,0x1E,0x05,0x06,0x0C,0x14,0x0F,0x04,0x04, // Code for char num 36
0x00,0x00,0x00,0x00,0x46,0x00,0x29,0x00,0x29,0x00,0xD6,0x00,0x28,0x01,0x28,0x01,0xC4,0x00,0x00,0x00,0x00,0x00, // Code for char num 37
0x00,0x00,0x06,0x09,0x09,0x16,0x09,0x19,0x26,0x00,0x00, // Code for char num 38
0x00,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 39
0x00,0x04,0x02,0x01,0x01,0x01,0x01,0x01,0x01,0x02,0x04, // Code for char num 40
0x00,0x00,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x00, // Code for char num 41
0x04,0x15,0x0E,0x15,0x04,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 42
0x00,0x00,0x00,0x08,0x08,0x3E,0x08,0x08,0x00,0x00,0x00, // Code for char num 43
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x01,0x00, // Code for char num 44
0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00, // Code for char num 45
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x00, // Code for char num 46
0x00,0x04,0x04,0x02,0x02,0x02,0x02,0x02,0x01,0x01,0x00, // Code for char num 47
0x00,0x00,0x06,0x09,0x09,0x09,0x09,0x09,0x06,0x00,0x00, // Code for char num 48
0x00,0x00,0x04,0x06,0x04,0x04,0x04,0x04,0x0E,0x00,0x00, // Code for char num 49
0x00,0x00,0x07,0x08,0x08,0x04,0x02,0x01,0x0F,0x00,0x00, // Code for char num 50
0x00,0x00,0x07,0x08,0x08,0x06,0x08,0x08,0x07,0x00,0x00, // Code for char num 51
0x00,0x00,0x08,0x0C,0x0A,0x09,0x1F,0x08,0x08,0x00,0x00, // Code for char num 52
0x00,0x00,0x0F,0x01,0x01,0x07,0x08,0x08,0x07,0x00,0x00, // Code for char num 53
0x00,0x00,0x06,0x01,0x01,0x07,0x09,0x09,0x06,0x00,0x00, // Code for char num 54
0x00,0x00,0x0F,0x08,0x04,0x04,0x02,0x02,0x01,0x00,0x00, // Code for char num 55
0x00,0x00,0x06,0x09,0x09,0x06,0x09,0x09,0x06,0x00,0x00, // Code for char num 56
0x00,0x00,0x06,0x09,0x09,0x0E,0x08,0x08,0x06,0x00,0x00, // Code for char num 57
0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x02,0x02,0x00,0x00, // Code for char num 58
0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x02,0x02,0x01,0x00, // Code for char num 59
0x00,0x00,0x00,0x00,0x20,0x1C,0x02,0x1C,0x20,0x00,0x00, // Code for char num 60
0x00,0x00,0x00,0x00,0x00,0x3F,0x00,0x3F,0x00,0x00,0x00, // Code for char num 61
0x00,0x00,0x00,0x00,0x02,0x1C,0x20,0x1C,0x02,0x00,0x00, // Code for char num 62
0x00,0x00,0x07,0x08,0x08,0x04,0x02,0x00,0x02,0x00,0x00, // Code for char num 63
0x00,0x00,0x1C,0x22,0x59,0x55,0x55,0x39,0x02,0x1C,0x00, // Code for char num 64
0x00,0x00,0x0C,0x0C,0x12,0x12,0x3F,0x21,0x21,0x00,0x00, // Code for char num 65
0x00,0x00,0x07,0x09,0x09,0x0F,0x11,0x11,0x0F,0x00,0x00, // Code for char num 66
0x00,0x00,0x1C,0x22,0x01,0x01,0x01,0x22,0x1C,0x00,0x00, // Code for char num 67
0x00,0x00,0x0F,0x11,0x21,0x21,0x21,0x11,0x0F,0x00,0x00, // Code for char num 68
0x00,0x00,0x1F,0x01,0x01,0x0F,0x01,0x01,0x1F,0x00,0x00, // Code for char num 69
0x00,0x00,0x1F,0x01,0x01,0x0F,0x01,0x01,0x01,0x00,0x00, // Code for char num 70
0x00,0x00,0x1C,0x22,0x01,0x39,0x21,0x22,0x3C,0x00,0x00, // Code for char num 71
0x00,0x00,0x21,0x21,0x21,0x3F,0x21,0x21,0x21,0x00,0x00, // Code for char num 72
0x00,0x00,0x07,0x02,0x02,0x02,0x02,0x02,0x07,0x00,0x00, // Code for char num 73
0x00,0x00,0x06,0x04,0x04,0x04,0x04,0x04,0x03,0x00,0x00, // Code for char num 74
0x00,0x00,0x11,0x09,0x05,0x03,0x05,0x09,0x11,0x00,0x00, // Code for char num 75
0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x0F,0x00,0x00, // Code for char num 76
0x00,0x00,0x63,0x63,0x55,0x55,0x49,0x49,0x41,0x00,0x00, // Code for char num 77
0x00,0x00,0x21,0x23,0x25,0x29,0x31,0x21,0x21,0x00,0x00, // Code for char num 78
0x00,0x00,0x1C,0x22,0x41,0x41,0x41,0x22,0x1C,0x00,0x00, // Code for char num 79
0x00,0x00,0x0F,0x11,0x11,0x11,0x0F,0x01,0x01,0x00,0x00, // Code for char num 80
0x00,0x00,0x1C,0x22,0x41,0x41,0x41,0x22,0x1C,0x10,0x60, // Code for char num 81
0x00,0x00,0x0F,0x11,0x11,0x0F,0x05,0x09,0x11,0x00,0x00, // Code for char num 82
0x00,0x00,0x1E,0x01,0x01,0x0E,0x10,0x10,0x0F,0x00,0x00, // Code for char num 83
0x00,0x00,0x1F,0x04,0x04,0x04,0x04,0x04,0x04,0x00,0x00, // Code for char num 84
0x00,0x00,0x21,0x21,0x21,0x21,0x21,0x21,0x1E,0x00,0x00, // Code for char num 85
0x00,0x00,0x21,0x21,0x21,0x12,0x12,0x0C,0x0C,0x00,0x00, // Code for char num 86
0x00,0x00,0x49,0x49,0x55,0x55,0x55,0x22,0x22,0x00,0x00, // Code for char num 87
0x00,0x00,0x09,0x09,0x06,0x06,0x06,0x09,0x09,0x00,0x00, // Code for char num 88
0x00,0x00,0x11,0x0A,0x0A,0x04,0x04,0x04,0x04,0x00,0x00, // Code for char num 89
0x00,0x00,0x0F,0x08,0x04,0x02,0x02,0x01,0x0F,0x00,0x00, // Code for char num 90
0x00,0x03,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x03, // Code for char num 91
0x00,0x01,0x01,0x02,0x02,0x02,0x02,0x02,0x04,0x04,0x00, // Code for char num 92
0x00,0x03,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x03, // Code for char num 93
0x00,0x00,0x04,0x0A,0x11,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 94
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F, // Code for char num 95
0x00,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 96
0x00,0x00,0x00,0x00,0x06,0x08,0x0E,0x09,0x0E,0x00,0x00, // Code for char num 97
0x00,0x01,0x01,0x01,0x07,0x09,0x09,0x09,0x07,0x00,0x00, // Code for char num 98
0x00,0x00,0x00,0x00,0x06,0x01,0x01,0x01,0x06,0x00,0x00, // Code for char num 99
0x00,0x08,0x08,0x08,0x0E,0x09,0x09,0x09,0x0E,0x00,0x00, // Code for char num 100
0x00,0x00,0x00,0x00,0x06,0x09,0x0F,0x01,0x0E,0x00,0x00, // Code for char num 101
0x00,0x06,0x01,0x01,0x07,0x01,0x01,0x01,0x01,0x00,0x00, // Code for char num 102
0x00,0x00,0x00,0x00,0x0E,0x09,0x09,0x09,0x0E,0x08,0x06, // Code for char num 103
0x00,0x01,0x01,0x01,0x07,0x09,0x09,0x09,0x09,0x00,0x00, // Code for char num 104
0x00,0x00,0x01,0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x00, // Code for char num 105
0x00,0x00,0x02,0x00,0x03,0x02,0x02,0x02,0x02,0x02,0x01, // Code for char num 106
0x00,0x01,0x01,0x01,0x09,0x05,0x03,0x05,0x09,0x00,0x00, // Code for char num 107
0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00, // Code for char num 108
0x00,0x00,0x00,0x00,0x37,0x49,0x49,0x49,0x49,0x00,0x00, // Code for char num 109
0x00,0x00,0x00,0x00,0x07,0x09,0x09,0x09,0x09,0x00,0x00, // Code for char num 110
0x00,0x00,0x00,0x00,0x06,0x09,0x09,0x09,0x06,0x00,0x00, // Code for char num 111
0x00,0x00,0x00,0x00,0x07,0x09,0x09,0x09,0x07,0x01,0x01, // Code for char num 112
0x00,0x00,0x00,0x00,0x0E,0x09,0x09,0x09,0x0E,0x08,0x08, // Code for char num 113
0x00,0x00,0x00,0x00,0x05,0x03,0x01,0x01,0x01,0x00,0x00, // Code for char num 114
0x00,0x00,0x00,0x00,0x07,0x01,0x02,0x04,0x07,0x00,0x00, // Code for char num 115
0x00,0x00,0x00,0x01,0x03,0x01,0x01,0x01,0x02,0x00,0x00, // Code for char num 116
0x00,0x00,0x00,0x00,0x09,0x09,0x09,0x09,0x0E,0x00,0x00, // Code for char num 117
0x00,0x00,0x00,0x00,0x11,0x0A,0x0A,0x0A,0x04,0x00,0x00, // Code for char num 118
0x00,0x00,0x00,0x00,0x49,0x49,0x55,0x36,0x22,0x00,0x00, // Code for char num 119
0x00,0x00,0x00,0x00,0x05,0x02,0x02,0x02,0x05,0x00,0x00, // Code for char num 120
0x00,0x00,0x00,0x00,0x11,0x0A,0x0A,0x0A,0x04,0x04,0x02, // Code for char num 121
0x00,0x00,0x00,0x00,0x07,0x04,0x02,0x01,0x07,0x00,0x00, // Code for char num 122
0x00,0x04,0x02,0x02,0x02,0x02,0x01,0x02,0x02,0x02,0x04, // Code for char num 123
0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, // Code for char num 124
0x00,0x01,0x02,0x02,0x02,0x02,0x04,0x02,0x02,0x02,0x01, // Code for char num 125
0x00,0x00,0x00,0x00,0x00,0x26,0x19,0x00,0x00,0x00,0x00, // Code for char num 126
0x00,0x00,0x00,0x03,0x03,0x03,0x03,0x03,0x00,0x00,0x00 // Code for char num 127
};
#endif
#ifdef EINK_BUNDLE_GUIFONT_TAHOMA_6_REGULAR
const uint8_t guiFont_Tahoma_6_Regular[] = {
0x00,
0x00,
0x20,0x00,
0x7F,0x00,
0x0A,
0x08,
0x03,0x88,0x01,0x00,
0x02,0x92,0x01,0x00,
0x03,0x9C,0x01,0x00,
0x05,0xA6,0x01,0x00,
0x04,0xB0,0x01,0x00,
0x07,0xBA,0x01,0x00,
0x05,0xC4,0x01,0x00,
0x01,0xCE,0x01,0x00,
0x03,0xD8,0x01,0x00,
0x03,0xE2,0x01,0x00,
0x04,0xEC,0x01,0x00,
0x05,0xF6,0x01,0x00,
0x02,0x00,0x02,0x00,
0x03,0x0A,0x02,0x00,
0x02,0x14,0x02,0x00,
0x03,0x1E,0x02,0x00,
0x04,0x28,0x02,0x00,
0x04,0x32,0x02,0x00,
0x04,0x3C,0x02,0x00,
0x04,0x46,0x02,0x00,
0x04,0x50,0x02,0x00,
0x04,0x5A,0x02,0x00,
0x04,0x64,0x02,0x00,
0x04,0x6E,0x02,0x00,
0x04,0x78,0x02,0x00,
0x04,0x82,0x02,0x00,
0x02,0x8C,0x02,0x00,
0x02,0x96,0x02,0x00,
0x05,0xA0,0x02,0x00,
0x05,0xAA,0x02,0x00,
0x05,0xB4,0x02,0x00,
0x04,0xBE,0x02,0x00,
0x07,0xC8,0x02,0x00,
0x05,0xD2,0x02,0x00,
0x05,0xDC,0x02,0x00,
0x05,0xE6,0x02,0x00,
0x05,0xF0,0x02,0x00,
0x04,0xFA,0x02,0x00,
0x04,0x04,0x03,0x00,
0x05,0x0E,0x03,0x00,
0x05,0x18,0x03,0x00,
0x03,0x22,0x03,0x00,
0x03,0x2C,0x03,0x00,
0x04,0x36,0x03,0x00,
0x04,0x40,0x03,0x00,
0x06,0x4A,0x03,0x00,
0x05,0x54,0x03,0x00,
0x05,0x5E,0x03,0x00,
0x04,0x68,0x03,0x00,
0x05,0x72,0x03,0x00,
0x05,0x7C,0x03,0x00,
0x04,0x86,0x03,0x00,
0x05,0x90,0x03,0x00,
0x05,0x9A,0x03,0x00,
0x05,0xA4,0x03,0x00,
0x07,0xAE,0x03,0x00,
0x04,0xB8,0x03,0x00,
0x05,0xC2,0x03,0x00,
0x04,0xCC,0x03,0x00,
0x03,0xD6,0x03,0x00,
0x03,0xE0,0x03,0x00,
0x02,0xEA,0x03,0x00,
0x05,0xF4,0x03,0x00,
0x04,0xFE,0x03,0x00,
0x03,0x08,0x04,0x00,
0x04,0x12,0x04,0x00,
0x04,0x1C,0x04,0x00,
0x04,0x26,0x04,0x00,
0x04,0x30,0x04,0x00,
0x04,0x3A,0x04,0x00,
0x03,0x44,0x04,0x00,
0x04,0x4E,0x04,0x00,
0x04,0x58,0x04,0x00,
0x01,0x62,0x04,0x00,
0x02,0x6C,0x04,0x00,
0x04,0x76,0x04,0x00,
0x02,0x80,0x04,0x00,
0x06,0x8A,0x04,0x00,
0x04,0x94,0x04,0x00,
0x04,0x9E,0x04,0x00,
0x04,0xA8,0x04,0x00,
0x04,0xB2,0x04,0x00,
0x02,0xBC,0x04,0x00,
0x03,0xC6,0x04,0x00,
0x03,0xD0,0x04,0x00,
0x04,0xDA,0x04,0x00,
0x04,0xE4,0x04,0x00,
0x06,0xEE,0x04,0x00,
0x04,0xF8,0x04,0x00,
0x04,0x02,0x05,0x00,
0x03,0x0C,0x05,0x00,
0x03,0x16,0x05,0x00,
0x02,0x20,0x05,0x00,
0x04,0x2A,0x05,0x00,
0x05,0x34,0x05,0x00,
0x02,0x3E,0x05,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 32
0x00,0x00,0x02,0x02,0x02,0x02,0x00,0x02,0x00,0x00, // Code for char num 33
0x00,0x00,0x05,0x04,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 34
0x00,0x00,0x10,0x14,0x0C,0x0C,0x0A,0x02,0x00,0x00, // Code for char num 35
0x00,0x00,0x00,0x0E,0x05,0x0E,0x0C,0x0F,0x00,0x00, // Code for char num 36
0x00,0x00,0x26,0x15,0x15,0x6A,0x68,0x64,0x00,0x00, // Code for char num 37
0x00,0x00,0x06,0x09,0x16,0x15,0x09,0x1E,0x00,0x00, // Code for char num 38
0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 39
0x00,0x00,0x02,0x02,0x01,0x01,0x01,0x02,0x02,0x04, // Code for char num 40
0x00,0x00,0x02,0x02,0x04,0x04,0x04,0x04,0x02,0x01, // Code for char num 41
0x00,0x00,0x08,0x06,0x0D,0x00,0x00,0x00,0x00,0x00, // Code for char num 42
0x00,0x00,0x00,0x00,0x04,0x1E,0x04,0x00,0x00,0x00, // Code for char num 43
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x00, // Code for char num 44
0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00, // Code for char num 45
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00, // Code for char num 46
0x00,0x00,0x04,0x04,0x02,0x02,0x02,0x01,0x01,0x00, // Code for char num 47
0x00,0x00,0x06,0x09,0x09,0x09,0x09,0x0E,0x00,0x00, // Code for char num 48
0x00,0x00,0x04,0x06,0x04,0x04,0x04,0x0E,0x00,0x00, // Code for char num 49
0x00,0x00,0x06,0x08,0x08,0x04,0x02,0x0F,0x00,0x00, // Code for char num 50
0x00,0x00,0x06,0x08,0x04,0x08,0x08,0x07,0x00,0x00, // Code for char num 51
0x00,0x00,0x04,0x04,0x0A,0x0F,0x08,0x00,0x00,0x00, // Code for char num 52
0x00,0x00,0x0E,0x02,0x06,0x08,0x08,0x07,0x00,0x00, // Code for char num 53
0x00,0x00,0x0E,0x02,0x07,0x09,0x09,0x0E,0x00,0x00, // Code for char num 54
0x00,0x00,0x0F,0x08,0x04,0x04,0x02,0x02,0x00,0x00, // Code for char num 55
0x00,0x00,0x0E,0x09,0x0A,0x0D,0x09,0x0E,0x00,0x00, // Code for char num 56
0x00,0x00,0x06,0x09,0x09,0x0E,0x08,0x06,0x00,0x00, // Code for char num 57
0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x02,0x00,0x00, // Code for char num 58
0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x02,0x02,0x00, // Code for char num 59
0x00,0x00,0x00,0x10,0x0C,0x02,0x0C,0x10,0x00,0x00, // Code for char num 60
0x00,0x00,0x00,0x00,0x1E,0x00,0x1E,0x00,0x00,0x00, // Code for char num 61
0x00,0x00,0x00,0x02,0x0C,0x10,0x0C,0x02,0x00,0x00, // Code for char num 62
0x00,0x00,0x07,0x08,0x04,0x02,0x00,0x02,0x00,0x00, // Code for char num 63
0x00,0x00,0x3C,0x4A,0x56,0x56,0x56,0x2A,0x1C,0x00, // Code for char num 64
0x00,0x00,0x04,0x06,0x0A,0x0A,0x0D,0x11,0x00,0x00, // Code for char num 65
0x00,0x00,0x0E,0x0A,0x0E,0x0A,0x12,0x0E,0x00,0x00, // Code for char num 66
0x00,0x00,0x1E,0x02,0x01,0x01,0x01,0x1E,0x00,0x00, // Code for char num 67
0x00,0x00,0x0E,0x12,0x12,0x12,0x12,0x0E,0x00,0x00, // Code for char num 68
0x00,0x00,0x0E,0x02,0x0E,0x02,0x02,0x0E,0x00,0x00, // Code for char num 69
0x00,0x00,0x0E,0x02,0x06,0x02,0x02,0x00,0x00,0x00, // Code for char num 70
0x00,0x00,0x1E,0x02,0x01,0x19,0x11,0x1E,0x00,0x00, // Code for char num 71
0x00,0x00,0x10,0x12,0x1E,0x12,0x12,0x10,0x00,0x00, // Code for char num 72
0x00,0x00,0x07,0x02,0x02,0x02,0x02,0x07,0x00,0x00, // Code for char num 73
0x00,0x00,0x06,0x04,0x04,0x04,0x04,0x03,0x00,0x00, // Code for char num 74
0x00,0x00,0x08,0x0A,0x06,0x06,0x0A,0x08,0x00,0x00, // Code for char num 75
0x00,0x00,0x00,0x02,0x02,0x02,0x02,0x0E,0x00,0x00, // Code for char num 76
0x00,0x00,0x32,0x32,0x2E,0x2E,0x22,0x20,0x00,0x00, // Code for char num 77
0x00,0x00,0x12,0x12,0x16,0x16,0x1A,0x10,0x00,0x00, // Code for char num 78
0x00,0x00,0x0E,0x11,0x11,0x11,0x11,0x1E,0x00,0x00, // Code for char num 79
0x00,0x00,0x0E,0x0A,0x0A,0x06,0x02,0x00,0x00,0x00, // Code for char num 80
0x00,0x00,0x0E,0x11,0x11,0x11,0x11,0x1E,0x08,0x10, // Code for char num 81
0x00,0x00,0x0E,0x0A,0x0A,0x06,0x0A,0x10,0x00,0x00, // Code for char num 82
0x00,0x00,0x0E,0x01,0x02,0x0C,0x08,0x0F,0x00,0x00, // Code for char num 83
0x00,0x00,0x1F,0x04,0x04,0x04,0x04,0x04,0x00,0x00, // Code for char num 84
0x00,0x00,0x10,0x12,0x12,0x12,0x12,0x0E,0x00,0x00, // Code for char num 85
0x00,0x00,0x11,0x09,0x0A,0x0A,0x06,0x04,0x00,0x00, // Code for char num 86
0x00,0x00,0x49,0x49,0x56,0x36,0x36,0x26,0x00,0x00, // Code for char num 87
0x00,0x00,0x09,0x0A,0x04,0x04,0x0A,0x09,0x00,0x00, // Code for char num 88
0x00,0x00,0x11,0x0A,0x06,0x04,0x04,0x04,0x00,0x00, // Code for char num 89
0x00,0x00,0x0F,0x08,0x04,0x02,0x02,0x0F,0x00,0x00, // Code for char num 90
0x00,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x06, // Code for char num 91
0x00,0x00,0x01,0x02,0x02,0x02,0x02,0x04,0x04,0x00, // Code for char num 92
0x00,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x03, // Code for char num 93
0x00,0x00,0x04,0x0C,0x12,0x00,0x00,0x00,0x00,0x00, // Code for char num 94
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x00, // Code for char num 95
0x00,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 96
0x00,0x00,0x00,0x00,0x0C,0x0E,0x09,0x0F,0x00,0x00, // Code for char num 97
0x00,0x00,0x00,0x06,0x0A,0x0A,0x0A,0x0E,0x00,0x00, // Code for char num 98
0x00,0x00,0x00,0x00,0x0F,0x01,0x01,0x0E,0x00,0x00, // Code for char num 99
0x00,0x00,0x08,0x0C,0x0B,0x09,0x09,0x0E,0x00,0x00, // Code for char num 100
0x00,0x00,0x00,0x00,0x0F,0x0F,0x01,0x0E,0x00,0x00, // Code for char num 101
0x00,0x00,0x06,0x03,0x01,0x01,0x01,0x00,0x00,0x00, // Code for char num 102
0x00,0x00,0x00,0x00,0x0F,0x09,0x09,0x0E,0x08,0x06, // Code for char num 103
0x00,0x00,0x00,0x06,0x0A,0x0A,0x0A,0x08,0x00,0x00, // Code for char num 104
0x00,0x00,0x01,0x00,0x00,0x01,0x01,0x00,0x00,0x00, // Code for char num 105
0x00,0x00,0x02,0x00,0x02,0x02,0x02,0x02,0x02,0x01, // Code for char num 106
0x00,0x00,0x00,0x02,0x06,0x02,0x06,0x08,0x00,0x00, // Code for char num 107
0x00,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00, // Code for char num 108
0x00,0x00,0x00,0x00,0x3E,0x2A,0x2A,0x28,0x00,0x00, // Code for char num 109
0x00,0x00,0x00,0x00,0x0E,0x0A,0x0A,0x08,0x00,0x00, // Code for char num 110
0x00,0x00,0x00,0x00,0x0F,0x09,0x09,0x0E,0x00,0x00, // Code for char num 111
0x00,0x00,0x00,0x00,0x0E,0x0A,0x0A,0x0E,0x02,0x00, // Code for char num 112
0x00,0x00,0x00,0x00,0x0F,0x09,0x09,0x0E,0x08,0x08, // Code for char num 113
0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x00,0x00,0x00, // Code for char num 114
0x00,0x00,0x00,0x00,0x07,0x03,0x04,0x07,0x00,0x00, // Code for char num 115
0x00,0x00,0x00,0x03,0x01,0x01,0x01,0x06,0x00,0x00, // Code for char num 116
0x00,0x00,0x00,0x00,0x09,0x09,0x09,0x0E,0x00,0x00, // Code for char num 117
0x00,0x00,0x00,0x00,0x09,0x06,0x06,0x06,0x00,0x00, // Code for char num 118
0x00,0x00,0x00,0x00,0x2D,0x2D,0x12,0x12,0x00,0x00, // Code for char num 119
0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x09,0x00,0x00, // Code for char num 120
0x00,0x00,0x00,0x00,0x09,0x06,0x06,0x02,0x02,0x02, // Code for char num 121
0x00,0x00,0x00,0x00,0x06,0x02,0x02,0x07,0x00,0x00, // Code for char num 122
0x00,0x00,0x04,0x02,0x02,0x03,0x02,0x02,0x02,0x04, // Code for char num 123
0x00,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, // Code for char num 124
0x00,0x00,0x02,0x02,0x04,0x0C,0x04,0x02,0x02,0x01, // Code for char num 125
0x00,0x00,0x00,0x00,0x02,0x1C,0x00,0x00,0x00,0x00, // Code for char num 126
0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x00,0x00 // Code for char num 127
};
#endif
#ifdef EINK_BUNDLE_GUIFONT_TAHOMA_18_REGULAR
const uint8_t guiFont_Tahoma_18_Regular[] = {
0x00,
0x00,
0x20,0x00,
0x7F,0x00,
0x1D,
0x18,
0x03,0x88,0x01,0x00,
0x05,0xA5,0x01,0x00,
0x07,0xC2,0x01,0x00,
0x10,0xDF,0x01,0x00,
0x0C,0x19,0x02,0x00,
0x16,0x53,0x02,0x00,
0x11,0xAA,0x02,0x00,
0x03,0x01,0x03,0x00,
0x08,0x1E,0x03,0x00,
0x08,0x3B,0x03,0x00,
0x0C,0x58,0x03,0x00,
0x10,0x92,0x03,0x00,
0x06,0xCC,0x03,0x00,
0x08,0xE9,0x03,0x00,
0x05,0x06,0x04,0x00,
0x09,0x23,0x04,0x00,
0x0C,0x5D,0x04,0x00,
0x0B,0x97,0x04,0x00,
0x0C,0xD1,0x04,0x00,
0x0C,0x0B,0x05,0x00,
0x0C,0x45,0x05,0x00,
0x0B,0x7F,0x05,0x00,
0x0C,0xB9,0x05,0x00,
0x0C,0xF3,0x05,0x00,
0x0C,0x2D,0x06,0x00,
0x0C,0x67,0x06,0x00,
0x06,0xA1,0x06,0x00,
0x07,0xBE,0x06,0x00,
0x0F,0xDB,0x06,0x00,
0x0F,0x15,0x07,0x00,
0x10,0x4F,0x07,0x00,
0x0A,0x89,0x07,0x00,
0x15,0xC3,0x07,0x00,
0x0E,0x1A,0x08,0x00,
0x0D,0x54,0x08,0x00,
0x0D,0x8E,0x08,0x00,
0x0F,0xC8,0x08,0x00,
0x0C,0x02,0x09,0x00,
0x0D,0x3C,0x09,0x00,
0x0F,0x76,0x09,0x00,
0x0E,0xB0,0x09,0x00,
0x07,0xEA,0x09,0x00,
0x08,0x07,0x0A,0x00,
0x0E,0x24,0x0A,0x00,
0x0C,0x5E,0x0A,0x00,
0x11,0x98,0x0A,0x00,
0x0E,0xEF,0x0A,0x00,
0x10,0x29,0x0B,0x00,
0x0D,0x63,0x0B,0x00,
0x10,0x9D,0x0B,0x00,
0x0F,0xD7,0x0B,0x00,
0x0C,0x11,0x0C,0x00,
0x0E,0x4B,0x0C,0x00,
0x0E,0x85,0x0C,0x00,
0x0E,0xBF,0x0C,0x00,
0x16,0xF9,0x0C,0x00,
0x0E,0x50,0x0D,0x00,
0x0E,0x8A,0x0D,0x00,
0x0C,0xC4,0x0D,0x00,
0x08,0xFE,0x0D,0x00,
0x0A,0x1B,0x0E,0x00,
0x07,0x55,0x0E,0x00,
0x10,0x72,0x0E,0x00,
0x0D,0xAC,0x0E,0x00,
0x08,0xE6,0x0E,0x00,
0x0B,0x03,0x0F,0x00,
0x0C,0x3D,0x0F,0x00,
0x0A,0x77,0x0F,0x00,
0x0B,0xB1,0x0F,0x00,
0x0C,0xEB,0x0F,0x00,
0x09,0x25,0x10,0x00,
0x0B,0x5F,0x10,0x00,
0x0B,0x99,0x10,0x00,
0x04,0xD3,0x10,0x00,
0x05,0xF0,0x10,0x00,
0x0D,0x0D,0x11,0x00,
0x04,0x47,0x11,0x00,
0x12,0x64,0x11,0x00,
0x0B,0xBB,0x11,0x00,
0x0C,0xF5,0x11,0x00,
0x0C,0x2F,0x12,0x00,
0x0B,0x69,0x12,0x00,
0x09,0xA3,0x12,0x00,
0x0B,0xDD,0x12,0x00,
0x08,0x17,0x13,0x00,
0x0B,0x34,0x13,0x00,
0x0C,0x6E,0x13,0x00,
0x12,0xA8,0x13,0x00,
0x0C,0xFF,0x13,0x00,
0x0C,0x39,0x14,0x00,
0x0A,0x73,0x14,0x00,
0x0B,0xAD,0x14,0x00,
0x06,0xE7,0x14,0x00,
0x0B,0x04,0x15,0x00,
0x0F,0x3E,0x15,0x00,
0x06,0x78,0x15,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 32
0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00, // Code for char num 33
0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 34
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x31,0x80,0x31,0xC0,0x19,0xC0,0x18,0xC0,0x18,0xF8,0xFF,0xF8,0xFF,0x60,0x0C,0x60,0x0C,0x60,0x0C,0x60,0x0C,0xFE,0x3F,0xFE,0x3F,0x30,0x06,0x30,0x06,0x30,0x07,0x18,0x03,0x18,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 35
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0xF0,0x03,0xFC,0x07,0x4E,0x04,0x46,0x00,0x46,0x00,0x4E,0x00,0x7C,0x00,0xF8,0x03,0xC0,0x07,0x40,0x0C,0x40,0x0C,0x40,0x0C,0x46,0x06,0xFE,0x07,0xFC,0x01,0x40,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x00,0x00,
// Code for char num 36
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x80,0x01,0xFC,0xC0,0x00,0xCE,0xC1,0x00,0x86,0x61,0x00,0x86,0x61,0x00,0x86,0x31,0x00,0x86,0x31,0x00,0xCE,0x19,0x00,0xFC,0x18,0x0F,0x78,0x8C,0x1F,0x00,0xCC,0x39,0x00,0xC6,0x30,0x00,0xC6,0x30,0x00,0xC3,
0x30,0x00,0xC3,0x30,0x80,0xC1,0x39,0x80,0x81,0x1F,0xC0,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 37
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0x00,0xF8,0x03,0x00,0x1C,0x07,0x00,0x0C,0x06,0x00,0x0C,0x06,0x00,0x0C,0x06,0x00,0x18,0x03,0x00,0xF0,0x31,0x00,0xF0,0x30,0x00,0xDC,0x31,0x00,0x8C,0x33,0x00,0x06,0x37,0x00,0x06,0x1E,0x00,0x06,0x1C,
0x00,0x06,0x38,0x00,0x1C,0x7E,0x00,0xFC,0xE7,0x00,0xF0,0xC1,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 38
0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 39
0x00,0x00,0x00,0x00,0x00,0xE0,0x70,0x30,0x18,0x18,0x0C,0x0C,0x0E,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x0C,0x0C,0x18,0x18,0x30,0x70,0xE0, // Code for char num 40
0x00,0x00,0x00,0x00,0x00,0x0E,0x1C,0x18,0x30,0x30,0x60,0x60,0xE0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xE0,0x60,0x60,0x30,0x30,0x18,0x1C,0x0E, // Code for char num 41
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0xC0,0x00,0xC4,0x08,0xDC,0x0E,0xF0,0x03,0xC0,0x00,0xF0,0x03,0xDC,0x0E,0xC4,0x08,0xC0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 42
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0xFC,0xFF,0xFC,0xFF,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 43
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x18,0x1C,0x1C,0x0C,0x0C,0x06,0x06, // Code for char num 44
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 45
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x1C,0x1C,0x00,0x00,0x00,0x00,0x00, // Code for char num 46
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x80,0x01,0xC0,0x00,0xC0,0x00,0xC0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x38,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x03,0x00,0x03,0x00,0x00,0x00,
// Code for char num 47
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0xF8,0x03,0x1C,0x07,0x0C,0x06,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x0C,0x06,0x1C,0x07,0xF8,0x03,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 48
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0xC0,0x00,0xF8,0x00,0xF8,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xF8,0x07,0xF8,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 49
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x00,0xFE,0x03,0x0E,0x03,0x02,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x07,0x00,0x03,0x80,0x01,0xC0,0x01,0xE0,0x00,0x70,0x00,0x38,0x00,0x1C,0x00,0x0E,0x00,0xFE,0x0F,0xFE,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 50
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFE,0x07,0x0E,0x0E,0x02,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x07,0xE0,0x03,0xE0,0x01,0x00,0x06,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x02,0x0E,0x0E,0x07,0xFE,0x03,0xF8,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 51
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x80,0x03,0xC0,0x03,0x60,0x03,0x30,0x03,0x18,0x03,0x1C,0x03,0x0C,0x03,0x06,0x03,0x03,0x03,0xFF,0x0F,0xFF,0x0F,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 52
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x07,0xFC,0x07,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x00,0xFC,0x03,0x00,0x03,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x07,0x86,0x03,0xFE,0x01,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 53
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x07,0xF0,0x07,0x38,0x00,0x1C,0x00,0x0C,0x00,0x0C,0x00,0x06,0x00,0xF6,0x01,0xFE,0x07,0x0E,0x06,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x0C,0x0C,0x1C,0x06,0xF8,0x03,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 54
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x0F,0xFE,0x0F,0x00,0x0C,0x00,0x0E,0x00,0x06,0x00,0x03,0x00,0x03,0x80,0x01,0x80,0x01,0xC0,0x00,0xC0,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x18,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 55
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0xFC,0x07,0x0C,0x0E,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x0E,0x06,0x3C,0x03,0xF0,0x01,0xCC,0x03,0x0C,0x06,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x0E,0x0C,0x1C,0x06,0xFC,0x03,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 56
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0xF8,0x03,0x0C,0x07,0x06,0x06,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x0C,0x0E,0xFC,0x0F,0xF0,0x0D,0x00,0x0C,0x00,0x06,0x00,0x06,0x00,0x07,0x80,0x03,0xF8,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 57
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x38,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x38,0x38,0x00,0x00,0x00,0x00,0x00, // Code for char num 58
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x38,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x30,0x38,0x38,0x18,0x18,0x0C,0x0C, // Code for char num 59
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x70,0x00,0x3E,0x80,0x0F,0xE0,0x01,0x78,0x00,0x1C,0x00,0x78,0x00,0xE0,0x01,0x80,0x0F,0x00,0x3E,0x00,0x70,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 60
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x7F,0xFC,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x7F,0xFC,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 61
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x38,0x00,0xF0,0x01,0xC0,0x07,0x00,0x1E,0x00,0x78,0x00,0xE0,0x00,0x78,0x00,0x1E,0xC0,0x07,0xF0,0x01,0x38,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 62
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x00,0xFE,0x01,0x82,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x80,0x01,0xC0,0x01,0xE0,0x00,0x70,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 63
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0x80,0xFF,0x01,0xE0,0x81,0x03,0x70,0x00,0x07,0x30,0x00,0x0E,0x18,0xFC,0x0C,0x18,0xFF,0x1C,0x0C,0xC3,0x18,0x8C,0xC1,0x18,0x8C,0xC1,0x18,0x8C,0xC1,0x18,0x8C,0xC1,0x18,0x8C,0xC1,0x18,0x8C,0xE3,
0x0C,0x18,0xFF,0x0F,0x18,0xDE,0x0F,0x30,0x00,0x00,0x70,0x00,0x00,0xE0,0x81,0x00,0x80,0xFF,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 64
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x01,0xE0,0x01,0xE0,0x01,0x20,0x01,0x30,0x03,0x30,0x03,0x30,0x03,0x18,0x06,0x18,0x06,0x18,0x06,0x0C,0x0C,0xFC,0x0F,0xFC,0x0F,0x06,0x18,0x06,0x18,0x06,0x18,0x07,0x38,0x03,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 65
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0xFC,0x07,0x0C,0x0E,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x06,0xFC,0x03,0xFC,0x07,0x0C,0x0C,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x1C,0x0C,0x0E,0xFC,0x07,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 66
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x07,0xF0,0x1F,0x38,0x18,0x1C,0x10,0x0C,0x00,0x0E,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x0E,0x00,0x0C,0x00,0x1C,0x10,0x38,0x18,0xF0,0x1F,0xE0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 67
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0xFC,0x0F,0x0C,0x1E,0x0C,0x38,0x0C,0x30,0x0C,0x70,0x0C,0x60,0x0C,0x60,0x0C,0x60,0x0C,0x60,0x0C,0x60,0x0C,0x60,0x0C,0x30,0x0C,0x30,0x0C,0x38,0x0C,0x1E,0xFC,0x0F,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 68
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x0F,0xFC,0x0F,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x07,0xFC,0x07,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x0F,0xFC,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 69
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x1F,0xFC,0x1F,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x1F,0xFC,0x1F,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 70
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x1F,0xF0,0x7F,0x38,0x70,0x1C,0x40,0x0C,0x00,0x0E,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x7E,0x06,0x7E,0x06,0x60,0x0E,0x60,0x0C,0x60,0x1C,0x60,0x78,0x60,0xF0,0x7F,0xC0,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 71
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0xFC,0x3F,0xFC,0x3F,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 72
0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x7E,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x7E,0x7E,0x00,0x00,0x00,0x00,0x00, // Code for char num 73
0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0xFC,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xE1,0x7F,0x3F,0x00,0x00,0x00,0x00,0x00, // Code for char num 74
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x38,0x0C,0x1C,0x0C,0x0E,0x0C,0x07,0x8C,0x03,0x8C,0x01,0xCC,0x00,0x6C,0x00,0x7C,0x00,0xFC,0x00,0xCC,0x01,0x8C,0x01,0x0C,0x03,0x0C,0x07,0x0C,0x06,0x0C,0x0C,0x0C,0x1C,0x0C,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 75
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x0F,0xFC,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 76
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0xC0,0x01,0x3C,0xE0,0x01,0x3C,0xE0,0x01,0x7C,0xF0,0x01,0x6C,0xB0,0x01,0xEC,0xB0,0x01,0xCC,0x98,0x01,0xCC,0x98,0x01,0x8C,0x8D,0x01,0x8C,0x8D,0x01,0x0C,0x87,0x01,0x0C,0x87,0x01,0x0C,0x82,0x01,0x0C,0x80,
0x01,0x0C,0x80,0x01,0x0C,0x80,0x01,0x0C,0x80,0x01,0x0C,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 77
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x30,0x3C,0x30,0x3C,0x30,0x7C,0x30,0x6C,0x30,0xEC,0x30,0xCC,0x30,0xCC,0x31,0x8C,0x31,0x8C,0x33,0x0C,0x33,0x0C,0x37,0x0C,0x36,0x0C,0x3E,0x0C,0x3C,0x0C,0x3C,0x0C,0x38,0x0C,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 78
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x07,0xF0,0x1F,0x38,0x38,0x1C,0x70,0x0C,0x60,0x0E,0xE0,0x06,0xC0,0x06,0xC0,0x06,0xC0,0x06,0xC0,0x06,0xC0,0x06,0xC0,0x0E,0xE0,0x0C,0x60,0x1C,0x70,0x38,0x38,0xF0,0x1F,0xC0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 79
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0xFC,0x07,0x0C,0x0E,0x0C,0x1C,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x1C,0x0C,0x0E,0xFC,0x07,0xFC,0x01,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 80
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x07,0xF0,0x1F,0x38,0x38,0x1C,0x70,0x0C,0x60,0x0E,0xE0,0x06,0xC0,0x06,0xC0,0x06,0xC0,0x06,0xC0,0x06,0xC0,0x06,0xC0,0x0E,0xE0,0x0C,0x60,0x1C,0x70,0x38,0x38,0xF0,0x1F,0xC0,0x07,0x00,0x06,0x00,0x06,0x00,0x0C,0x00,0xFC,0x00,0xF8,
// Code for char num 81
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0xFC,0x0F,0x0C,0x0C,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x0C,0x0C,0x0E,0xFC,0x07,0xFC,0x01,0x0C,0x03,0x0C,0x07,0x0C,0x06,0x0C,0x0C,0x0C,0x18,0x0C,0x38,0x0C,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 82
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x03,0xFC,0x07,0x0C,0x06,0x06,0x04,0x06,0x00,0x06,0x00,0x0E,0x00,0x3C,0x00,0xFC,0x01,0xF0,0x07,0x00,0x0F,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x02,0x0C,0x0E,0x06,0xFE,0x03,0xF8,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 83
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x3F,0xFF,0x3F,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 84
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x1C,0x38,0x38,0x1C,0xF0,0x0F,0xE0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 85
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x30,0x07,0x38,0x06,0x18,0x06,0x18,0x06,0x18,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x18,0x06,0x18,0x06,0x18,0x06,0x30,0x03,0x30,0x03,0x30,0x03,0xE0,0x01,0xE0,0x01,0xE0,0x01,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 86
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0C,0x30,0x03,0x1E,0x30,0x06,0x1E,0x18,0x06,0x1E,0x18,0x06,0x1E,0x18,0x06,0x33,0x18,0x0C,0x33,0x0C,0x0C,0x33,0x0C,0x0C,0x31,0x0C,0x0C,0x61,0x0C,0x98,0x61,0x06,0x98,0x61,0x06,0x98,0x40,0x06,0x90,0x40,
0x02,0xF0,0xC0,0x03,0xF0,0xC0,0x03,0x70,0x80,0x03,0x60,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 87
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x30,0x06,0x18,0x0C,0x0C,0x0C,0x0C,0x18,0x06,0x30,0x03,0x30,0x03,0xE0,0x01,0xC0,0x00,0xC0,0x00,0xE0,0x01,0x30,0x03,0x30,0x03,0x18,0x06,0x0C,0x0C,0x0C,0x0C,0x06,0x18,0x03,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 88
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x38,0x06,0x18,0x0E,0x1C,0x0C,0x0C,0x18,0x06,0x18,0x07,0x30,0x03,0xF0,0x03,0xE0,0x01,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 89
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x0F,0xFE,0x0F,0x00,0x0C,0x00,0x06,0x00,0x03,0x00,0x03,0x80,0x01,0xC0,0x00,0xC0,0x00,0x60,0x00,0x70,0x00,0x30,0x00,0x18,0x00,0x18,0x00,0x0C,0x00,0x06,0x00,0xFE,0x0F,0xFE,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 90
0x00,0x00,0x00,0x00,0x00,0xFC,0xFC,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0xFC,0xFC, // Code for char num 91
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x70,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x03,0x00,0x03,0x00,0x00,
// Code for char num 92
0x00,0x00,0x00,0x00,0x00,0x7E,0x7E,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x7E,0x7E, // Code for char num 93
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x80,0x07,0x80,0x07,0xC0,0x0C,0x60,0x18,0x30,0x30,0x30,0x30,0x18,0x60,0x0C,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 94
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x1F,0xFF,0x1F,0x00,0x00,
// Code for char num 95
0x00,0x00,0x00,0x00,0x00,0x38,0x70,0x60,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 96
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x04,0x07,0x00,0x06,0x00,0x06,0xF0,0x07,0xFC,0x07,0x1E,0x06,0x06,0x06,0x06,0x06,0x8E,0x07,0xFC,0x07,0x78,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 97
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xCC,0x03,0xFC,0x07,0x1C,0x06,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x06,0x0C,0x07,0xFC,0x03,0xEC,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 98
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0xF8,0x03,0x1C,0x02,0x0E,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x0E,0x02,0x1C,0x03,0xF8,0x03,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 99
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0xF0,0x06,0xF8,0x07,0x1C,0x06,0x0C,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x07,0xFC,0x07,0x78,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 100
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0xF8,0x07,0x1C,0x06,0x0C,0x0C,0x06,0x0C,0xFE,0x0F,0xFE,0x0F,0x06,0x00,0x06,0x00,0x0E,0x08,0x1C,0x0C,0xF8,0x0F,0xE0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 101
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0xF8,0x01,0x18,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFE,0x00,0xFE,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 102
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x06,0xF8,0x07,0x1C,0x06,0x0C,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x07,0xFC,0x07,0xF8,0x06,0x00,0x06,0x00,0x06,0x04,0x03,0xFC,0x03,0xFC,0x00,
// Code for char num 103
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xCC,0x01,0xFC,0x03,0x1C,0x07,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 104
0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00, // Code for char num 105
0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x1F,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1C,0x0F,0x07, // Code for char num 106
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x0E,0x0C,0x07,0x8C,0x03,0xCC,0x01,0xCC,0x00,0x6C,0x00,0x7C,0x00,0xCC,0x00,0x8C,0x01,0x8C,0x03,0x0C,0x07,0x0C,0x0E,0x0C,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 107
0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00, // Code for char num 108
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCC,0xE1,0x00,0xFC,0xFB,0x01,0x1C,0x8F,0x03,0x0C,0x06,0x03,0x0C,0x06,0x03,0x0C,0x06,0x03,0x0C,0x06,0x03,0x0C,0x06,0x03,0x0C,0x06,
0x03,0x0C,0x06,0x03,0x0C,0x06,0x03,0x0C,0x06,0x03,0x0C,0x06,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 109
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCC,0x01,0xFC,0x03,0x1C,0x07,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 110
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0xF8,0x03,0x1C,0x07,0x0E,0x0E,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x0E,0x0E,0x1C,0x07,0xF8,0x03,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 111
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCC,0x03,0xFC,0x07,0x1C,0x06,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x06,0x0C,0x07,0xFC,0x03,0xEC,0x01,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,
// Code for char num 112
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x06,0xF8,0x07,0x1C,0x06,0x0C,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x06,0x0C,0x07,0xFC,0x07,0xF8,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,
// Code for char num 113
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCC,0x01,0xEC,0x01,0x3C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 114
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x02,0x06,0x00,0x06,0x00,0x3C,0x00,0xF8,0x03,0xC0,0x07,0x00,0x06,0x02,0x06,0x0E,0x07,0xFE,0x03,0xF8,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 115
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x0C,0xFE,0xFE,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0xF8,0xF0,0x00,0x00,0x00,0x00,0x00, // Code for char num 116
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x1C,0x07,0xF8,0x07,0x70,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 117
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0C,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x03,0x0C,0x03,0x1C,0x01,0x98,0x01,0x98,0x01,0xF0,0x00,0xF0,0x00,0xF0,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 118
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x03,0x07,0x03,0x86,0x87,0x01,0x86,0x87,0x01,0x86,0x8C,0x01,0xCE,0x8C,0x01,0xCC,0xCC,0x00,0x4C,0xD8,0x00,0x6C,0xD8,
0x00,0x78,0x58,0x00,0x38,0x70,0x00,0x38,0x70,0x00,0x38,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 119
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0C,0x06,0x06,0x0C,0x03,0x98,0x01,0x98,0x01,0xF0,0x00,0x60,0x00,0xF0,0x00,0x98,0x01,0x98,0x01,0x0C,0x03,0x06,0x06,0x03,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 120
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0C,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x03,0x0C,0x03,0x98,0x01,0x98,0x01,0x98,0x01,0xF0,0x00,0xF0,0x00,0x70,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x18,0x00,
// Code for char num 121
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x03,0xFE,0x03,0x80,0x01,0x80,0x01,0xC0,0x00,0x60,0x00,0x70,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0x0C,0x00,0xFE,0x03,0xFE,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 122
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x07,0xC0,0x07,0xE0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x70,0x00,0x38,0x00,0x1E,0x00,0x1E,0x00,0x38,0x00,0x70,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xE0,0x00,0xC0,0x07,0x80,0x07,
// Code for char num 123
0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, // Code for char num 124
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x00,0x3E,0x00,0x70,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xE0,0x00,0xC0,0x01,0x80,0x07,0x80,0x07,0xC0,0x01,0xE0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x70,0x00,0x3E,0x00,0x1E,0x00,
// Code for char num 125
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x60,0xF8,0x60,0x98,0x61,0x0C,0x33,0x0C,0x3E,0x0C,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Code for char num 126
0x00,0x00,0x00,0x00,0x00,0x3E,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x3E,0x00,0x00,0x00,0x00,0x00,0x00 // Code for char num 127
};
#endif
#ifdef EINK_BUNDLE_GUIFONT_EXO_2_CONDENSED21X32_REGULAR
const uint8_t guiFont_Exo_2_Condensed21x32_Regular[] = {
0x00,
0x00,
0x20,0x00,
0x7F,0x00,
0x20,
0x18,
0x01,0x88,0x01,0x00,
0x04,0xA8,0x01,0x00,
0x07,0xC8,0x01,0x00,
0x0E,0xE8,0x01,0x00,
0x0B,0x28,0x02,0x00,
0x13,0x68,0x02,0x00,
0x10,0xC8,0x02,0x00,
0x03,0x08,0x03,0x00,
0x07,0x28,0x03,0x00,
0x07,0x48,0x03,0x00,
0x08,0x68,0x03,0x00,
0x0B,0x88,0x03,0x00,
0x04,0xC8,0x03,0x00,
0x08,0xE8,0x03,0x00,
0x04,0x08,0x04,0x00,
0x0B,0x28,0x04,0x00,
0x0C,0x68,0x04,0x00,
0x07,0xA8,0x04,0x00,
0x0A,0xC8,0x04,0x00,
0x0B,0x08,0x05,0x00,
0x0D,0x48,0x05,0x00,
0x0A,0x88,0x05,0x00,
0x0B,0xC8,0x05,0x00,
0x0A,0x08,0x06,0x00,
0x0C,0x48,0x06,0x00,
0x0B,0x88,0x06,0x00,
0x04,0xC8,0x06,0x00,
0x04,0xE8,0x06,0x00,
0x0A,0x08,0x07,0x00,
0x0B,0x48,0x07,0x00,
0x0A,0x88,0x07,0x00,
0x0A,0xC8,0x07,0x00,
0x0E,0x08,0x08,0x00,
0x0D,0x48,0x08,0x00,
0x0C,0x88,0x08,0x00,
0x0B,0xC8,0x08,0x00,
0x0E,0x08,0x09,0x00,
0x0B,0x48,0x09,0x00,
0x0B,0x88,0x09,0x00,
0x0C,0xC8,0x09,0x00,
0x0D,0x08,0x0A,0x00,
0x04,0x48,0x0A,0x00,
0x06,0x68,0x0A,0x00,
0x0D,0x88,0x0A,0x00,
0x0B,0xC8,0x0A,0x00,
0x11,0x08,0x0B,0x00,
0x0E,0x68,0x0B,0x00,
0x0D,0xA8,0x0B,0x00,
0x0C,0xE8,0x0B,0x00,
0x0D,0x28,0x0C,0x00,
0x0C,0x68,0x0C,0x00,
0x0B,0xA8,0x0C,0x00,
0x0C,0xE8,0x0C,0x00,
0x0D,0x28,0x0D,0x00,
0x0D,0x68,0x0D,0x00,
0x14,0xA8,0x0D,0x00,
0x0D,0x08,0x0E,0x00,
0x0C,0x48,0x0E,0x00,
0x0B,0x88,0x0E,0x00,
0x06,0xC8,0x0E,0x00,
0x0B,0xE8,0x0E,0x00,
0x05,0x28,0x0F,0x00,
0x09,0x48,0x0F,0x00,
0x0A,0x88,0x0F,0x00,
0x06,0xC8,0x0F,0x00,
0x0A,0xE8,0x0F,0x00,
0x0B,0x28,0x10,0x00,
0x09,0x68,0x10,0x00,
0x0B,0xA8,0x10,0x00,
0x0B,0xE8,0x10,0x00,
0x09,0x28,0x11,0x00,
0x0C,0x68,0x11,0x00,
0x0B,0xA8,0x11,0x00,
0x04,0xE8,0x11,0x00,
0x04,0x08,0x12,0x00,
0x0B,0x28,0x12,0x00,
0x06,0x68,0x12,0x00,
0x11,0x88,0x12,0x00,
0x0B,0xE8,0x12,0x00,
0x0B,0x28,0x13,0x00,
0x0B,0x68,0x13,0x00,
0x0B,0xA8,0x13,0x00,
0x08,0xE8,0x13,0x00,
0x0A,0x08,0x14,0x00,
0x08,0x48,0x14,0x00,
0x0B,0x68,0x14,0x00,
0x0B,0xA8,0x14,0x00,
0x12,0xE8,0x14,0x00,
0x0B,0x48,0x15,0x00,
0x0B,0x88,0x15,0x00,
0x0A,0xC8,0x15,0x00,
0x06,0x08,0x16,0x00,
0x04,0x28,0x16,0x00,
0x06,0x48,0x16,0x00,
0x0A,0x68,0x16,0x00,
0x07,0xA8,0x16,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 32
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00, // Code for char num 33
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 34
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x0C,0x60,0x0C,0x60,0x0C,0x60,0x0C,0x60,0x0C,0x20,0x0C,0xFC,0x3F,0x30,0x04,0x30,0x06,0x30,0x06,0x30,0x06,0x30,0x06,0xFE,0x1F,0x18,0x02,0x18,0x02,0x18,0x03,0x18,0x03,0x18,0x03,0x18,0x03,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 35
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xF8,0x03,0xFC,0x07,0x4E,0x00,0x46,0x00,0x46,0x00,0x46,0x00,0x46,0x00,0x4E,0x00,0x7C,0x00,0xF8,0x01,0xE0,0x03,0x20,0x07,0x20,0x06,0x20,0x06,0x20,0x06,0x20,0x06,0x20,0x07,0xFE,0x03,0xFC,0x01,0x20,0x00,0x20,0x00,0x20,
0x00,0x00,0x00,0x00,0x00, // Code for char num 36
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x60,0x00,0x64,0x60,0x00,0xC6,0x30,0x00,0xC6,0x30,0x00,0xC6,0x18,0x00,0xC6,0x08,0x00,0xC6,0x0C,0x00,0xC6,0x04,0x00,0xC6,0xE6,0x01,0x64,0x32,0x03,0x38,0x1B,0x06,0x00,0x19,
0x06,0x80,0x19,0x06,0x80,0x18,0x06,0xC0,0x18,0x06,0x40,0x18,0x06,0x60,0x18,0x06,0x20,0x30,0x03,0x30,0xE0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 37
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x07,0xF8,0x07,0x1C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x18,0x0C,0x18,0x1C,0x18,0xF8,0x7F,0xF8,0x7F,0x18,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x1C,0x1C,0x1E,0xF8,0xF3,0xF0,0xF1,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 38
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 39
0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x60,0x10,0x18,0x0C,0x0C,0x0C,0x04,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x04,0x0C,0x0C,0x0C,0x18,0x30,0x60,0x40, // Code for char num 40
0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x06,0x08,0x18,0x30,0x30,0x30,0x20,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x20,0x30,0x30,0x30,0x18,0x0C,0x06,0x02, // Code for char num 41
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x91,0xD7,0x3C,0x28,0x28,0x6C,0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 42
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xFE,0x07,0xFE,0x07,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 43
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x0C,0x0C,0x04,0x04,0x00, // Code for char num 44
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 45
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00, // Code for char num 46
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x02,0x00,0x03,0x00,0x03,0x80,0x01,0x80,0x01,0x80,0x00,0xC0,0x00,0xC0,0x00,0x60,0x00,0x60,0x00,0x20,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x18,0x00,0x08,0x00,0x0C,0x00,0x0C,0x00,0x06,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 47
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0xF8,0x03,0x1C,0x07,0x0C,0x06,0x04,0x04,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x04,0x04,0x0C,0x06,0x1C,0x07,0xF8,0x03,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 48
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x7E,0x6C,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00,0x00, // Code for char num 49
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x00,0xFE,0x01,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x80,0x01,0x80,0x01,0xC0,0x01,0xE0,0x00,0x60,0x00,0x70,0x00,0x38,0x00,0x38,0x00,0x1C,0x00,0x0E,0x00,0xFE,0x03,0xFE,0x03,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 50
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0xFE,0x01,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x80,0x03,0xF8,0x01,0xF8,0x03,0x00,0x03,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x03,0xFC,0x03,0xFC,0x01,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 51
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0x60,0x00,0x60,0x00,0x70,0x00,0x30,0x06,0x30,0x06,0x38,0x06,0x18,0x06,0x1C,0x06,0x0C,0x06,0x0C,0x06,0x0E,0x06,0xFE,0x1F,0xFC,0x1F,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 52
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0xFC,0x01,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x7C,0x00,0xFC,0x01,0x80,0x01,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x80,0x01,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 53
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x03,0xF8,0x03,0x1C,0x00,0x0C,0x00,0x04,0x00,0x06,0x00,0x06,0x00,0xE6,0x01,0xFE,0x03,0x0E,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x04,0x06,0x0C,0x03,0xFC,0x03,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 54
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x03,0xFF,0x03,0x80,0x03,0x80,0x01,0x80,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x00,0xC0,0x00,0xE0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x70,0x00,0x30,0x00,0x30,0x00,0x38,0x00,0x38,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 55
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0xF8,0x03,0x1C,0x07,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x08,0x06,0xF8,0x03,0xF8,0x07,0x0C,0x06,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x0E,0x0E,0xFC,0x07,0xF8,0x03,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 56
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0xFC,0x01,0x0C,0x03,0x06,0x02,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x07,0xFC,0x07,0x78,0x06,0x00,0x06,0x00,0x06,0x00,0x03,0x80,0x03,0xFC,0x01,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 57
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00, // Code for char num 58
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x08,0x08,0x04,0x08,0x00, // Code for char num 59
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x80,0x03,0xE0,0x01,0x78,0x00,0x1E,0x00,0x06,0x00,0x1E,0x00,0x78,0x00,0xE0,0x01,0x80,0x03,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 60
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 61
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x0E,0x00,0x3C,0x00,0xF0,0x00,0xC0,0x03,0x00,0x03,0xC0,0x03,0xF0,0x00,0x3C,0x00,0x0E,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 62
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0xFE,0x01,0x80,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x80,0x01,0x80,0x01,0xC0,0x00,0x60,0x00,0x60,0x00,0x20,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 63
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x0F,0xF8,0x1F,0x18,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0xCC,0x3F,0x6C,0x30,0x6C,0x30,0x6C,0x30,0x6C,0x3C,0xCC,0x37,0xCC,0x31,0x0C,0x00,0x0C,0x00,0x18,0x00,0xF8,0x3F,0xE0,0x3F,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 64
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0xF0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0x18,0x03,0x18,0x03,0x18,0x03,0x18,0x03,0x1C,0x07,0x0C,0x06,0xFC,0x07,0xFC,0x07,0x0E,0x0E,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x07,0x1C,0x07,0x18,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 65
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0xFC,0x07,0x0C,0x0E,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x06,0xFC,0x07,0xFC,0x07,0x0C,0x0E,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0E,0xFC,0x07,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 66
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x03,0xF8,0x07,0x1C,0x00,0x0C,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x0C,0x00,0x1C,0x00,0xF8,0x07,0xF0,0x03,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 67
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0xFC,0x0F,0x0C,0x1E,0x0C,0x1C,0x0C,0x18,0x0C,0x38,0x0C,0x38,0x0C,0x38,0x0C,0x38,0x0C,0x38,0x0C,0x38,0x0C,0x38,0x0C,0x38,0x0C,0x38,0x0C,0x18,0x0C,0x1C,0x0C,0x1E,0xFC,0x0F,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 68
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x07,0xF8,0x07,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x03,0xFC,0x03,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xF8,0x07,0xF8,0x07,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 69
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x07,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x03,0xFC,0x03,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 70
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x0F,0xF0,0x07,0x38,0x00,0x18,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x18,0x0C,0x18,0x0E,0xF0,0x0F,0xE0,0x08,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 71
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0xFC,0x1F,0xFC,0x1F,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 72
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00, // Code for char num 73
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x1E,0x1E,0x00,0x00,0x00,0x00,0x00, // Code for char num 74
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0E,0x0C,0x06,0x0C,0x07,0x0C,0x03,0x8C,0x03,0x8C,0x01,0xCC,0x01,0xCC,0x00,0x7C,0x00,0x7C,0x00,0xCC,0x00,0xCC,0x01,0x8C,0x01,0x8C,0x03,0x0C,0x03,0x0C,0x07,0x0C,0x06,0x0C,0x0E,0x0C,0x1C,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 75
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xF8,0x07,0xF8,0x07,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 76
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0xE0,0x00,0x7C,0xF0,0x01,0x6C,0xB0,0x01,0x6C,0xB0,0x01,0x6C,0xB0,0x01,0x6C,0xB0,0x01,0xEC,0x98,0x01,0xCC,0x98,0x01,0xCC,0x98,0x01,0xCC,0x98,0x01,0xCC,0x98,0x01,0x8C,0x8D,
0x01,0x8C,0x8D,0x01,0x8C,0x8D,0x01,0x8C,0x8D,0x01,0x8C,0x8F,0x01,0x0C,0x87,0x01,0x0C,0x80,0x01,0x0C,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 77
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x30,0x3C,0x30,0x7C,0x30,0x6C,0x30,0x6C,0x30,0xEC,0x30,0xCC,0x30,0xCC,0x30,0xCC,0x31,0x8C,0x31,0x8C,0x31,0x8C,0x33,0x0C,0x33,0x0C,0x37,0x0C,0x36,0x0C,0x36,0x0C,0x3E,0x0C,0x3C,0x0C,0x3C,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 78
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x03,0xF8,0x07,0x1C,0x0E,0x0C,0x0C,0x0E,0x1C,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x0E,0x1C,0x0C,0x0C,0x1C,0x0E,0xF8,0x07,0xF0,0x03,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 79
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0xFC,0x07,0x0C,0x06,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0E,0xFC,0x07,0xFC,0x03,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 80
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x03,0xF0,0x07,0x38,0x0E,0x18,0x0C,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x18,0x0C,0x38,0x0E,0xF0,0x07,0xE0,0x03,0x00,0x00,0xC0,0x00,0xC0,
0x0F,0x00,0x0F,0x00,0x0C, // Code for char num 81
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0xFC,0x07,0x0C,0x0E,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0E,0xFC,0x07,0xFC,0x03,0x0C,0x07,0x0C,0x06,0x0C,0x06,0x0C,0x0E,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 82
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x07,0x0E,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x0E,0x00,0x7C,0x00,0xF8,0x03,0xC0,0x03,0x00,0x07,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x07,0xFE,0x03,0xFE,0x01,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 83
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x0F,0xFF,0x0F,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 84
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x1C,0x1C,0x18,0x0C,0xF8,0x0F,0xE0,0x03,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 85
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x1C,0x07,0x1C,0x06,0x0C,0x06,0x0C,0x0E,0x0C,0x0E,0x0E,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x1C,0x07,0x18,0x03,0x18,0x03,0x18,0x03,0x18,0x03,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xF0,0x01,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 86
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x0E,0x0E,0x0E,0x1F,0x0E,0x0E,0x1B,0x0E,0x0C,0x1B,0x06,0x0C,0x1B,0x06,0x0C,0x1B,0x06,0x0C,0x1B,0x06,0x8C,0x13,0x06,0x9C,0x31,0x07,0x9C,0x31,0x07,0x98,0x31,0x03,0x98,0x31,
0x03,0x98,0x31,0x03,0x98,0x31,0x03,0xD8,0x31,0x03,0xD8,0xE0,0x03,0xF8,0xE0,0x03,0xF0,0xE0,0x01,0xF0,0xE0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 87
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x1C,0x0E,0x0E,0x0E,0x0E,0x0C,0x06,0x1C,0x07,0x18,0x03,0xB8,0x03,0xB0,0x01,0xF0,0x01,0xF0,0x01,0xB0,0x01,0xB8,0x03,0x18,0x03,0x1C,0x07,0x0C,0x06,0x0C,0x06,0x0E,0x0E,0x06,0x0C,0x07,0x1C,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 88
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x0E,0x06,0x06,0x0E,0x07,0x0C,0x03,0x0C,0x03,0x9C,0x03,0x98,0x01,0x98,0x01,0xF0,0x00,0xF0,0x00,0xF0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 89
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x07,0xFE,0x07,0x00,0x07,0x00,0x03,0x80,0x03,0x80,0x01,0xC0,0x01,0xC0,0x00,0xE0,0x00,0x60,0x00,0x70,0x00,0x30,0x00,0x38,0x00,0x18,0x00,0x1C,0x00,0x0C,0x00,0x0E,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 90
0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x3C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x3C,0x38, // Code for char num 91
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x04,0x00,0x0C,0x00,0x0C,0x00,0x18,0x00,0x18,0x00,0x10,0x00,0x30,0x00,0x30,0x00,0x60,0x00,0x60,0x00,0x40,0x00,0xC0,0x00,0xC0,0x00,0x80,0x01,0x80,0x01,0x00,0x01,0x00,0x03,0x00,0x03,0x00,0x06,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 92
0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x1E,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1E,0x0E, // Code for char num 93
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x78,0x00,0x58,0x00,0xCC,0x00,0x84,0x00,0x86,0x01,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 94
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x03,0xFF,0x03,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 95
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x0E,0x1C,0x38,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 96
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x00,0xFC,0x01,0x00,0x03,0x00,0x03,0x00,0x03,0xFC,0x03,0xFC,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0xC6,0x03,0x7C,0x03,0x3C,0x03,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 97
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xCC,0x01,0xEC,0x03,0x1C,0x03,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x03,0xFC,0x03,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 98
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x01,0x0C,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x0C,0x00,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 99
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0xF8,0x06,0xFC,0x07,0x0C,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x07,0xFC,0x07,0x78,0x06,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 100
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0xFC,0x03,0x0C,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0xFE,0x03,0xFE,0x03,0x06,0x00,0x06,0x00,0x0C,0x00,0xFC,0x07,0xF0,0x03,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 101
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0xF0,0x01,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0xFE,0x00,0xFE,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 102
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x0F,0xFC,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0xFC,0x03,0xFC,0x01,0x0C,0x00,0x0C,0x00,0xFC,0x00,0xFC,0x03,0x06,0x07,0x06,0x06,0x06,0x06,0x06,
0x06,0xFC,0x03,0xF8,0x01, // Code for char num 103
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x8C,0x03,0xEC,0x03,0x3C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 104
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00, // Code for char num 105
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x04,0x06, // Code for char num 106
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x07,0x8C,0x03,0x8C,0x01,0xCC,0x01,0xEC,0x00,0x7C,0x00,0x7C,0x00,0xEC,0x00,0xCC,0x00,0xCC,0x01,0x8C,0x03,0x0C,0x03,0x0C,0x07,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 107
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x3C,0x38,0x00,0x00,0x00,0x00,0x00, // Code for char num 108
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8C,0xE3,0x00,0xEC,0xF3,0x00,0x3C,0x8E,0x01,0x0C,0x86,0x01,0x0C,0x86,0x01,0x0C,0x86,
0x01,0x0C,0x86,0x01,0x0C,0x86,0x01,0x0C,0x86,0x01,0x0C,0x86,0x01,0x0C,0x86,0x01,0x0C,0x86,0x01,0x0C,0x86,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 109
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8C,0x03,0xEC,0x03,0x3C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 110
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0xFC,0x03,0x0C,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x03,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 111
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCC,0x01,0xEC,0x03,0x1C,0x03,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x1C,0x03,0xFC,0x03,0xEC,0x01,0x0C,0x00,0x0C,0x00,0x0C,
0x00,0x0C,0x00,0x0C,0x00, // Code for char num 112
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x07,0x0C,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x07,0xFC,0x07,0x78,0x06,0x00,0x06,0x00,0x06,0x00,
0x06,0x00,0x06,0x00,0x06, // Code for char num 113
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC4,0xEC,0x3C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00, // Code for char num 114
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0xFE,0x03,0x06,0x00,0x06,0x00,0x06,0x00,0x3C,0x00,0xF8,0x00,0xC0,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0xFE,0x01,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 115
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x18,0xFE,0xFE,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xF8,0xF0,0x00,0x00,0x00,0x00,0x00, // Code for char num 116
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x8C,0x07,0xFC,0x06,0x78,0x06,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 117
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x06,0x03,0x06,0x03,0x8E,0x03,0x8C,0x01,0x8C,0x01,0x8C,0x01,0xD8,0x00,0xD8,0x00,0xD8,0x00,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 118
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x07,0x03,0x8E,0x8D,0x03,0x8C,0x8D,0x01,0x8C,0x8D,0x01,0x8C,0x8D,0x01,0x8C,0x8D,
0x01,0x98,0xCD,0x00,0x98,0xC8,0x00,0xD8,0xD8,0x00,0xD8,0xD8,0x00,0xD8,0xD8,0x00,0xF0,0x78,0x00,0xF0,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 119
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x06,0x03,0x8C,0x01,0x8C,0x01,0xD8,0x00,0xF8,0x00,0xF8,0x00,0xD8,0x00,0xDC,0x01,0x8C,0x01,0x8E,0x03,0x06,0x03,0x07,0x07,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 120
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x06,0x03,0x06,0x03,0x8E,0x03,0x8C,0x01,0x8C,0x01,0x8C,0x01,0xD8,0x00,0xD8,0x00,0xD8,0x00,0xF8,0x00,0x70,0x00,0x60,0x00,0x30,0x00,0x30,
0x00,0x1C,0x00,0x0C,0x00, // Code for char num 121
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x03,0xFE,0x03,0x80,0x01,0xC0,0x01,0xC0,0x00,0x60,0x00,0x70,0x00,0x30,0x00,0x18,0x00,0x1C,0x00,0x0E,0x00,0xFE,0x03,0xFE,0x03,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 122
0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x06,0x06,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x38,0x00, // Code for char num 123
0x00,0x00,0x00,0x00,0x00,0x00,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, // Code for char num 124
0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x30,0x30,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x0E,0x00, // Code for char num 125
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x02,0xFC,0x03,0x84,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00, // Code for char num 126
0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x7E,0x00,0x00,0x00,0x00,0x00,0x00 // Code for char num 127
};
#endif
#ifdef EINK_BUNDLE_GUIFONT_EXO_2_CONDENSED10X16_REGULAR
const uint8_t guiFont_Exo_2_Condensed10x16_Regular[] = {
0x00,
0x00,
0x20,0x00,
0x7F,0x00,
0x10,
0x10,
0x01,0x88,0x01,0x00,
0x02,0x98,0x01,0x00,
0x04,0xA8,0x01,0x00,
0x07,0xB8,0x01,0x00,
0x05,0xC8,0x01,0x00,
0x09,0xD8,0x01,0x00,
0x07,0xF8,0x01,0x00,
0x02,0x08,0x02,0x00,
0x04,0x18,0x02,0x00,
0x03,0x28,0x02,0x00,
0x05,0x38,0x02,0x00,
0x05,0x48,0x02,0x00,
0x02,0x58,0x02,0x00,
0x04,0x68,0x02,0x00,
0x02,0x78,0x02,0x00,
0x05,0x88,0x02,0x00,
0x06,0x98,0x02,0x00,
0x03,0xA8,0x02,0x00,
0x05,0xB8,0x02,0x00,
0x05,0xC8,0x02,0x00,
0x06,0xD8,0x02,0x00,
0x05,0xE8,0x02,0x00,
0x05,0xF8,0x02,0x00,
0x05,0x08,0x03,0x00,
0x06,0x18,0x03,0x00,
0x05,0x28,0x03,0x00,
0x02,0x38,0x03,0x00,
0x02,0x48,0x03,0x00,
0x05,0x58,0x03,0x00,
0x06,0x68,0x03,0x00,
0x05,0x78,0x03,0x00,
0x05,0x88,0x03,0x00,
0x07,0x98,0x03,0x00,
0x06,0xA8,0x03,0x00,
0x06,0xB8,0x03,0x00,
0x06,0xC8,0x03,0x00,
0x06,0xD8,0x03,0x00,
0x05,0xE8,0x03,0x00,
0x05,0xF8,0x03,0x00,
0x06,0x08,0x04,0x00,
0x06,0x18,0x04,0x00,
0x02,0x28,0x04,0x00,
0x03,0x38,0x04,0x00,
0x06,0x48,0x04,0x00,
0x05,0x58,0x04,0x00,
0x08,0x68,0x04,0x00,
0x07,0x78,0x04,0x00,
0x06,0x88,0x04,0x00,
0x06,0x98,0x04,0x00,
0x06,0xA8,0x04,0x00,
0x06,0xB8,0x04,0x00,
0x05,0xC8,0x04,0x00,
0x06,0xD8,0x04,0x00,
0x06,0xE8,0x04,0x00,
0x06,0xF8,0x04,0x00,
0x0A,0x08,0x05,0x00,
0x06,0x28,0x05,0x00,
0x06,0x38,0x05,0x00,
0x05,0x48,0x05,0x00,
0x03,0x58,0x05,0x00,
0x05,0x68,0x05,0x00,
0x03,0x78,0x05,0x00,
0x04,0x88,0x05,0x00,
0x05,0x98,0x05,0x00,
0x02,0xA8,0x05,0x00,
0x05,0xB8,0x05,0x00,
0x05,0xC8,0x05,0x00,
0x05,0xD8,0x05,0x00,
0x05,0xE8,0x05,0x00,
0x05,0xF8,0x05,0x00,
0x04,0x08,0x06,0x00,
0x06,0x18,0x06,0x00,
0x05,0x28,0x06,0x00,
0x02,0x38,0x06,0x00,
0x02,0x48,0x06,0x00,
0x05,0x58,0x06,0x00,
0x03,0x68,0x06,0x00,
0x08,0x78,0x06,0x00,
0x05,0x88,0x06,0x00,
0x05,0x98,0x06,0x00,
0x06,0xA8,0x06,0x00,
0x05,0xB8,0x06,0x00,
0x04,0xC8,0x06,0x00,
0x05,0xD8,0x06,0x00,
0x03,0xE8,0x06,0x00,
0x05,0xF8,0x06,0x00,
0x05,0x08,0x07,0x00,
0x08,0x18,0x07,0x00,
0x05,0x28,0x07,0x00,
0x05,0x38,0x07,0x00,
0x05,0x48,0x07,0x00,
0x03,0x58,0x07,0x00,
0x02,0x68,0x07,0x00,
0x03,0x78,0x07,0x00,
0x05,0x88,0x07,0x00,
0x03,0x98,0x07,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 32
0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x02,0x00,0x00,0x00, // Code for char num 33
0x00,0x00,0x00,0x00,0x0A,0x0A,0x0A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 34
0x00,0x00,0x00,0x00,0x28,0x28,0x7E,0x24,0x24,0x7E,0x14,0x14,0x14,0x00,0x00,0x00, // Code for char num 35
0x00,0x00,0x00,0x08,0x1C,0x0A,0x0A,0x0A,0x0C,0x14,0x14,0x14,0x0E,0x04,0x00,0x00, // Code for char num 36
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x46,0x00,0x29,0x00,0x29,0x00,0x19,0x00,0xD6,0x00,0x28,0x01,0x28,0x01,0x24,0x01,0xC4,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 37
0x00,0x00,0x00,0x00,0x1C,0x02,0x22,0x22,0x7C,0x22,0x22,0x32,0x4C,0x00,0x00,0x00, // Code for char num 38
0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 39
0x00,0x00,0x00,0x08,0x04,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x04,0x08,0x00, // Code for char num 40
0x00,0x00,0x00,0x01,0x02,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x02,0x02,0x01,0x00, // Code for char num 41
0x00,0x00,0x00,0x00,0x04,0x15,0x04,0x0A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 42
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x1F,0x04,0x04,0x00,0x00,0x00,0x00, // Code for char num 43
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x02,0x00, // Code for char num 44
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 45
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00, // Code for char num 46
0x00,0x00,0x00,0x00,0x10,0x08,0x08,0x08,0x04,0x04,0x02,0x02,0x02,0x01,0x00,0x00, // Code for char num 47
0x00,0x00,0x00,0x00,0x1C,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x1C,0x00,0x00,0x00, // Code for char num 48
0x00,0x00,0x00,0x00,0x06,0x05,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00,0x00,0x00, // Code for char num 49
0x00,0x00,0x00,0x00,0x0E,0x10,0x10,0x10,0x08,0x08,0x04,0x02,0x1E,0x00,0x00,0x00, // Code for char num 50
0x00,0x00,0x00,0x00,0x0E,0x10,0x10,0x10,0x0C,0x10,0x10,0x10,0x0E,0x00,0x00,0x00, // Code for char num 51
0x00,0x00,0x00,0x00,0x04,0x04,0x12,0x12,0x11,0x11,0x3F,0x10,0x10,0x00,0x00,0x00, // Code for char num 52
0x00,0x00,0x00,0x00,0x1E,0x02,0x02,0x0E,0x10,0x10,0x10,0x10,0x0E,0x00,0x00,0x00, // Code for char num 53
0x00,0x00,0x00,0x00,0x1C,0x02,0x02,0x0E,0x12,0x12,0x12,0x12,0x0C,0x00,0x00,0x00, // Code for char num 54
0x00,0x00,0x00,0x00,0x1F,0x10,0x08,0x08,0x08,0x04,0x04,0x04,0x06,0x00,0x00,0x00, // Code for char num 55
0x00,0x00,0x00,0x00,0x1C,0x22,0x22,0x22,0x1C,0x22,0x22,0x22,0x1C,0x00,0x00,0x00, // Code for char num 56
0x00,0x00,0x00,0x00,0x0C,0x12,0x12,0x12,0x12,0x1C,0x10,0x10,0x0E,0x00,0x00,0x00, // Code for char num 57
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00, // Code for char num 58
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x02,0x02,0x02,0x02,0x00, // Code for char num 59
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x0C,0x02,0x0C,0x10,0x00,0x00,0x00,0x00, // Code for char num 60
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x00,0x00,0x3E,0x00,0x00,0x00,0x00,0x00, // Code for char num 61
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x0C,0x10,0x0C,0x02,0x00,0x00,0x00,0x00, // Code for char num 62
0x00,0x00,0x00,0x00,0x0F,0x10,0x10,0x10,0x08,0x04,0x04,0x00,0x04,0x00,0x00,0x00, // Code for char num 63
0x00,0x00,0x00,0x00,0x00,0x3C,0x42,0x42,0x72,0x4A,0x72,0x02,0x02,0x7C,0x00,0x00, // Code for char num 64
0x00,0x00,0x00,0x00,0x0C,0x0C,0x14,0x12,0x12,0x1E,0x12,0x21,0x21,0x00,0x00,0x00, // Code for char num 65
0x00,0x00,0x00,0x00,0x1E,0x22,0x22,0x22,0x1E,0x22,0x22,0x22,0x1E,0x00,0x00,0x00, // Code for char num 66
0x00,0x00,0x00,0x00,0x3C,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x3C,0x00,0x00,0x00, // Code for char num 67
0x00,0x00,0x00,0x00,0x1E,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x1E,0x00,0x00,0x00, // Code for char num 68
0x00,0x00,0x00,0x00,0x1C,0x02,0x02,0x02,0x1E,0x02,0x02,0x02,0x1C,0x00,0x00,0x00, // Code for char num 69
0x00,0x00,0x00,0x00,0x1C,0x02,0x02,0x02,0x1E,0x02,0x02,0x02,0x02,0x00,0x00,0x00, // Code for char num 70
0x00,0x00,0x00,0x00,0x3C,0x02,0x02,0x02,0x22,0x22,0x22,0x22,0x3C,0x00,0x00,0x00, // Code for char num 71
0x00,0x00,0x00,0x00,0x22,0x22,0x22,0x22,0x3E,0x22,0x22,0x22,0x22,0x00,0x00,0x00, // Code for char num 72
0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x00, // Code for char num 73
0x00,0x00,0x00,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x02,0x00,0x00,0x00, // Code for char num 74
0x00,0x00,0x00,0x00,0x22,0x12,0x12,0x0A,0x06,0x0A,0x12,0x12,0x22,0x00,0x00,0x00, // Code for char num 75
0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x1C,0x00,0x00,0x00, // Code for char num 76
0x00,0x00,0x00,0x00,0xC6,0xC6,0xAA,0xAA,0xAA,0xAA,0xAA,0x92,0x82,0x00,0x00,0x00, // Code for char num 77
0x00,0x00,0x00,0x00,0x46,0x46,0x4A,0x4A,0x4A,0x52,0x52,0x62,0x62,0x00,0x00,0x00, // Code for char num 78
0x00,0x00,0x00,0x00,0x1C,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x1C,0x00,0x00,0x00, // Code for char num 79
0x00,0x00,0x00,0x00,0x1E,0x22,0x22,0x22,0x22,0x1E,0x02,0x02,0x02,0x00,0x00,0x00, // Code for char num 80
0x00,0x00,0x00,0x00,0x1C,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x1C,0x00,0x38,0x00, // Code for char num 81
0x00,0x00,0x00,0x00,0x1E,0x22,0x22,0x22,0x1E,0x12,0x22,0x22,0x22,0x00,0x00,0x00, // Code for char num 82
0x00,0x00,0x00,0x00,0x1C,0x02,0x02,0x02,0x0C,0x10,0x10,0x10,0x0E,0x00,0x00,0x00, // Code for char num 83
0x00,0x00,0x00,0x00,0x3E,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x00,0x00,0x00, // Code for char num 84
0x00,0x00,0x00,0x00,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x1C,0x00,0x00,0x00, // Code for char num 85
0x00,0x00,0x00,0x00,0x21,0x21,0x12,0x12,0x12,0x12,0x14,0x0C,0x0C,0x00,0x00,0x00, // Code for char num 86
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x22,0x02,0x52,0x02,0x52,0x01,0x54,0x01,0x54,0x01,0x54,0x01,0x54,0x01,0x54,0x01,0x88,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 87
0x00,0x00,0x00,0x00,0x21,0x12,0x12,0x0C,0x0C,0x0C,0x12,0x12,0x21,0x00,0x00,0x00, // Code for char num 88
0x00,0x00,0x00,0x00,0x22,0x22,0x14,0x14,0x14,0x08,0x08,0x08,0x08,0x00,0x00,0x00, // Code for char num 89
0x00,0x00,0x00,0x00,0x1F,0x08,0x08,0x04,0x04,0x02,0x02,0x01,0x1F,0x00,0x00,0x00, // Code for char num 90
0x00,0x00,0x00,0x06,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x06,0x00, // Code for char num 91
0x00,0x00,0x00,0x00,0x01,0x02,0x02,0x02,0x04,0x04,0x08,0x08,0x08,0x10,0x00,0x00, // Code for char num 92
0x00,0x00,0x00,0x06,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x06,0x00, // Code for char num 93
0x00,0x00,0x00,0x00,0x00,0x04,0x06,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 94
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x00,0x00, // Code for char num 95
0x00,0x00,0x00,0x00,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 96
0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x10,0x10,0x1C,0x12,0x12,0x1C,0x00,0x00,0x00, // Code for char num 97
0x00,0x00,0x00,0x00,0x02,0x02,0x0E,0x12,0x12,0x12,0x12,0x12,0x0E,0x00,0x00,0x00, // Code for char num 98
0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x02,0x02,0x02,0x02,0x02,0x1C,0x00,0x00,0x00, // Code for char num 99
0x00,0x00,0x00,0x00,0x10,0x10,0x1C,0x12,0x12,0x12,0x12,0x12,0x1C,0x00,0x00,0x00, // Code for char num 100
0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x12,0x12,0x0E,0x02,0x02,0x1C,0x00,0x00,0x00, // Code for char num 101
0x00,0x00,0x00,0x00,0x0C,0x02,0x07,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x00, // Code for char num 102
0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x12,0x12,0x12,0x0C,0x02,0x0E,0x11,0x11,0x0E, // Code for char num 103
0x00,0x00,0x00,0x00,0x02,0x02,0x0A,0x16,0x12,0x12,0x12,0x12,0x12,0x00,0x00,0x00, // Code for char num 104
0x00,0x00,0x00,0x00,0x02,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x00, // Code for char num 105
0x00,0x00,0x00,0x00,0x02,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x00, // Code for char num 106
0x00,0x00,0x00,0x00,0x02,0x02,0x12,0x0A,0x0A,0x06,0x0A,0x0A,0x12,0x00,0x00,0x00, // Code for char num 107
0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x04,0x00,0x00,0x00, // Code for char num 108
0x00,0x00,0x00,0x00,0x00,0x00,0x4A,0xB6,0x92,0x92,0x92,0x92,0x92,0x00,0x00,0x00, // Code for char num 109
0x00,0x00,0x00,0x00,0x00,0x00,0x0A,0x16,0x12,0x12,0x12,0x12,0x12,0x00,0x00,0x00, // Code for char num 110
0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x12,0x12,0x12,0x12,0x12,0x0C,0x00,0x00,0x00, // Code for char num 111
0x00,0x00,0x00,0x00,0x00,0x00,0x1A,0x26,0x22,0x22,0x22,0x22,0x1E,0x02,0x02,0x00, // Code for char num 112
0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x12,0x12,0x12,0x12,0x12,0x1C,0x10,0x10,0x00, // Code for char num 113
0x00,0x00,0x00,0x00,0x00,0x00,0x0A,0x06,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x00, // Code for char num 114
0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x02,0x02,0x0C,0x10,0x10,0x0E,0x00,0x00,0x00, // Code for char num 115
0x00,0x00,0x00,0x00,0x02,0x02,0x07,0x02,0x02,0x02,0x02,0x02,0x04,0x00,0x00,0x00, // Code for char num 116
0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x12,0x12,0x12,0x12,0x1A,0x14,0x00,0x00,0x00, // Code for char num 117
0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x11,0x0A,0x0A,0x0A,0x0A,0x04,0x00,0x00,0x00, // Code for char num 118
0x00,0x00,0x00,0x00,0x00,0x00,0x99,0x99,0x5A,0x5A,0x5A,0x66,0x24,0x00,0x00,0x00, // Code for char num 119
0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x0A,0x0A,0x04,0x0A,0x0A,0x11,0x00,0x00,0x00, // Code for char num 120
0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x11,0x0A,0x0A,0x0A,0x0A,0x04,0x04,0x02,0x02, // Code for char num 121
0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x10,0x08,0x04,0x04,0x02,0x1E,0x00,0x00,0x00, // Code for char num 122
0x00,0x00,0x00,0x04,0x02,0x02,0x02,0x02,0x01,0x02,0x02,0x02,0x02,0x02,0x04,0x00, // Code for char num 123
0x00,0x00,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00, // Code for char num 124
0x00,0x00,0x00,0x01,0x02,0x02,0x02,0x02,0x04,0x02,0x02,0x02,0x02,0x02,0x01,0x00, // Code for char num 125
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 126
0x00,0x00,0x00,0x07,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x07,0x00,0x00,0x00 // Code for char num 127
};
#endif
#ifdef EINK_BUNDLE_GUIFONT_EXO_2_CONDENSED15X23_REGULAR
const uint8_t guiFont_Exo_2_Condensed15x23_Regular[] = {
0x00,
0x00,
0x20,0x00,
0x7F,0x00,
0x17,
0x10,
0x01,0x88,0x01,0x00,
0x03,0x9F,0x01,0x00,
0x04,0xB6,0x01,0x00,
0x0A,0xCD,0x01,0x00,
0x08,0xFB,0x01,0x00,
0x0D,0x12,0x02,0x00,
0x0B,0x40,0x02,0x00,
0x02,0x6E,0x02,0x00,
0x05,0x85,0x02,0x00,
0x05,0x9C,0x02,0x00,
0x06,0xB3,0x02,0x00,
0x08,0xCA,0x02,0x00,
0x03,0xE1,0x02,0x00,
0x06,0xF8,0x02,0x00,
0x02,0x0F,0x03,0x00,
0x08,0x26,0x03,0x00,
0x08,0x3D,0x03,0x00,
0x04,0x54,0x03,0x00,
0x07,0x6B,0x03,0x00,
0x07,0x82,0x03,0x00,
0x08,0x99,0x03,0x00,
0x07,0xB0,0x03,0x00,
0x08,0xC7,0x03,0x00,
0x07,0xDE,0x03,0x00,
0x08,0xF5,0x03,0x00,
0x08,0x0C,0x04,0x00,
0x02,0x23,0x04,0x00,
0x02,0x3A,0x04,0x00,
0x07,0x51,0x04,0x00,
0x08,0x68,0x04,0x00,
0x07,0x7F,0x04,0x00,
0x07,0x96,0x04,0x00,
0x0A,0xAD,0x04,0x00,
0x09,0xDB,0x04,0x00,
0x08,0x09,0x05,0x00,
0x08,0x20,0x05,0x00,
0x09,0x37,0x05,0x00,
0x08,0x65,0x05,0x00,
0x08,0x7C,0x05,0x00,
0x08,0x93,0x05,0x00,
0x09,0xAA,0x05,0x00,
0x03,0xD8,0x05,0x00,
0x04,0xEF,0x05,0x00,
0x09,0x06,0x06,0x00,
0x08,0x34,0x06,0x00,
0x0C,0x4B,0x06,0x00,
0x09,0x79,0x06,0x00,
0x09,0xA7,0x06,0x00,
0x08,0xD5,0x06,0x00,
0x09,0xEC,0x06,0x00,
0x08,0x1A,0x07,0x00,
0x08,0x31,0x07,0x00,
0x08,0x48,0x07,0x00,
0x09,0x5F,0x07,0x00,
0x09,0x8D,0x07,0x00,
0x0E,0xBB,0x07,0x00,
0x09,0xE9,0x07,0x00,
0x08,0x17,0x08,0x00,
0x08,0x2E,0x08,0x00,
0x05,0x45,0x08,0x00,
0x08,0x5C,0x08,0x00,
0x04,0x73,0x08,0x00,
0x06,0x8A,0x08,0x00,
0x07,0xA1,0x08,0x00,
0x04,0xB8,0x08,0x00,
0x07,0xCF,0x08,0x00,
0x08,0xE6,0x08,0x00,
0x06,0xFD,0x08,0x00,
0x07,0x14,0x09,0x00,
0x07,0x2B,0x09,0x00,
0x06,0x42,0x09,0x00,
0x08,0x59,0x09,0x00,
0x08,0x70,0x09,0x00,
0x02,0x87,0x09,0x00,
0x03,0x9E,0x09,0x00,
0x07,0xB5,0x09,0x00,
0x04,0xCC,0x09,0x00,
0x0C,0xE3,0x09,0x00,
0x08,0x11,0x0A,0x00,
0x08,0x28,0x0A,0x00,
0x08,0x3F,0x0A,0x00,
0x07,0x56,0x0A,0x00,
0x05,0x6D,0x0A,0x00,
0x07,0x84,0x0A,0x00,
0x05,0x9B,0x0A,0x00,
0x07,0xB2,0x0A,0x00,
0x08,0xC9,0x0A,0x00,
0x0C,0xE0,0x0A,0x00,
0x08,0x0E,0x0B,0x00,
0x08,0x25,0x0B,0x00,
0x07,0x3C,0x0B,0x00,
0x04,0x53,0x0B,0x00,
0x02,0x6A,0x0B,0x00,
0x04,0x81,0x0B,0x00,
0x07,0x98,0x0B,0x00,
0x05,0xAF,0x0B,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 32
0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00,0x00,0x04,0x04,0x00,0x00,0x00,0x00, // Code for char num 33
0x00,0x00,0x00,0x00,0x00,0x00,0x0A,0x0A,0x0A,0x0A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 34
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x01,0x90,0x01,0x90,0x00,0xFC,0x03,0x88,0x00,0x88,0x00,0x88,0x00,0x88,0x00,0xFE,0x01,0xC8,0x00,0x48,0x00,0x4C,0x00,0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 35
0x00,0x00,0x00,0x00,0x10,0x10,0x7C,0xFE,0x12,0x12,0x12,0x16,0x7C,0xD0,0x90,0x90,0x90,0xFE,0x7E,0x08,0x08,0x00,0x00, // Code for char num 36
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x06,0x22,0x02,0x22,0x03,0x22,0x01,0xA2,0x01,0xA2,0x0E,0xDC,0x11,0x40,0x11,0x60,0x11,0x20,0x11,0x30,0x11,0x10,0x11,0x18,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 37
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x00,0xFC,0x00,0x04,0x00,0x04,0x01,0x04,0x01,0xF8,0x07,0xFC,0x07,0x02,0x01,0x02,0x01,0x02,0x01,0x82,0x01,0x7E,0x07,0x3C,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 38
0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 39
0x00,0x00,0x00,0x00,0x10,0x08,0x04,0x04,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x04,0x04,0x08,0x10,0x00, // Code for char num 40
0x00,0x00,0x00,0x00,0x02,0x04,0x08,0x08,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x08,0x08,0x04,0x02,0x00, // Code for char num 41
0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x08,0x3F,0x08,0x14,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 42
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0xFE,0x10,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 43
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0x04,0x00,0x00, // Code for char num 44
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 45
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x00,0x00,0x00, // Code for char num 46
0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x40,0x60,0x20,0x20,0x10,0x10,0x18,0x08,0x08,0x04,0x04,0x06,0x00,0x00,0x00, // Code for char num 47
0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x7C,0x46,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x46,0x7C,0x38,0x00,0x00,0x00,0x00, // Code for char num 48
0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0F,0x0A,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x00,0x00,0x00,0x00, // Code for char num 49
0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x7E,0x40,0x40,0x40,0x60,0x20,0x30,0x18,0x0C,0x0C,0x7E,0x7E,0x00,0x00,0x00,0x00, // Code for char num 50
0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x7E,0x40,0x40,0x40,0x3C,0x3C,0x40,0x40,0x40,0x40,0x7E,0x3E,0x00,0x00,0x00,0x00, // Code for char num 51
0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x48,0x4C,0x44,0x44,0x42,0x42,0xFE,0xFE,0x40,0x40,0x40,0x00,0x00,0x00,0x00, // Code for char num 52
0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x7E,0x02,0x02,0x02,0x1E,0x3E,0x60,0x40,0x40,0x40,0x3E,0x1C,0x00,0x00,0x00,0x00, // Code for char num 53
0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0xFC,0x04,0x02,0x7A,0xFE,0x82,0x82,0x82,0x82,0x86,0x7C,0x38,0x00,0x00,0x00,0x00, // Code for char num 54
0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x7F,0x60,0x20,0x30,0x30,0x10,0x10,0x18,0x18,0x08,0x0C,0x0C,0x00,0x00,0x00,0x00, // Code for char num 55
0x00,0x00,0x00,0x00,0x00,0x00,0x38,0xFE,0x82,0x82,0x82,0x7C,0x7E,0x82,0x82,0x82,0x82,0xFE,0x3C,0x00,0x00,0x00,0x00, // Code for char num 56
0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x7C,0xC2,0x82,0x82,0x82,0xC2,0xFC,0xBC,0x80,0xC0,0x7E,0x3E,0x00,0x00,0x00,0x00, // Code for char num 57
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x00,0x00,0x00, // Code for char num 58
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x02,0x00,0x00, // Code for char num 59
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x70,0x18,0x06,0x06,0x18,0x70,0x40,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 60
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 61
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x0E,0x18,0x60,0x60,0x18,0x0E,0x02,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 62
0x00,0x00,0x00,0x00,0x00,0x3E,0x7E,0x60,0x40,0x40,0x20,0x20,0x10,0x08,0x08,0x00,0x00,0x08,0x08,0x00,0x00,0x00,0x00, // Code for char num 63
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x02,0x02,0xF2,0x03,0x12,0x02,0x12,0x02,0x12,0x03,0xF2,0x02,0x62,0x02,0x06,0x00,0xFC,0x03,0xF8,0x03,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 64
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x38,0x00,0x28,0x00,0x6C,0x00,0x6C,0x00,0x44,0x00,0x44,0x00,0xFE,0x00,0xFE,0x00,0x82,0x00,0x82,0x00,0x83,0x01,0x83,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 65
0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0xFC,0x84,0x84,0x84,0x7C,0xFC,0x84,0x84,0x84,0x84,0xFC,0x7C,0x00,0x00,0x00,0x00, // Code for char num 66
0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x7C,0x06,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x06,0x7C,0xF8,0x00,0x00,0x00,0x00, // Code for char num 67
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0xFC,0x00,0x84,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x84,0x01,0xFC,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 68
0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0xFC,0x04,0x04,0x04,0x7C,0x7C,0x04,0x04,0x04,0x04,0xFC,0xF8,0x00,0x00,0x00,0x00, // Code for char num 69
0x00,0x00,0x00,0x00,0x00,0x00,0x38,0xFC,0x04,0x04,0x04,0x7C,0x7C,0x04,0x04,0x04,0x04,0x04,0x04,0x00,0x00,0x00,0x00, // Code for char num 70
0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0xFC,0x04,0x02,0x02,0x02,0x82,0x82,0x82,0x82,0xC6,0xFC,0x98,0x00,0x00,0x00,0x00, // Code for char num 71
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0xFC,0x01,0xFC,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 72
0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00,0x00,0x00,0x00, // Code for char num 73
0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x0E,0x06,0x00,0x00,0x00,0x00, // Code for char num 74
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x84,0x01,0xC4,0x00,0x44,0x00,0x64,0x00,0x34,0x00,0x1C,0x00,0x1C,0x00,0x34,0x00,0x64,0x00,0x64,0x00,0xC4,0x00,0xC4,0x00,0x84,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 75
0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0xFC,0xF8,0x00,0x00,0x00,0x00, // Code for char num 76
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x0E,0x1C,0x0E,0x14,0x0A,0x14,0x0A,0x34,0x0B,0x34,0x0B,0x34,0x09,0x24,0x09,0xE4,0x09,0xE4,0x09,0xE4,0x09,0xC4,0x08,0x04,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 77
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x01,0x1C,0x01,0x1C,0x01,0x14,0x01,0x34,0x01,0x34,0x01,0x24,0x01,0x64,0x01,0x64,0x01,0x44,0x01,0xC4,0x01,0xC4,0x01,0x84,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 78
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0xFC,0x00,0x84,0x00,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x84,0x00,0xFC,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 79
0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0xFC,0x84,0x84,0x84,0x84,0xFC,0x7C,0x04,0x04,0x04,0x04,0x04,0x00,0x00,0x00,0x00, // Code for char num 80
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0xFC,0x00,0x84,0x00,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x84,0x00,0xFC,0x00,0x78,0x00,0x10,0x00,0xF0,0x00,0xC0,0x01,0x00,0x00, // Code for char num 81
0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0xFC,0x84,0x84,0x84,0x84,0x7C,0x7C,0x44,0x84,0x84,0x84,0x84,0x00,0x00,0x00,0x00, // Code for char num 82
0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0xFE,0x02,0x02,0x02,0x0E,0x7C,0xC0,0x80,0x80,0x80,0xFE,0x7E,0x00,0x00,0x00,0x00, // Code for char num 83
0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xFE,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x00,0x00, // Code for char num 84
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x8C,0x01,0xF8,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 85
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x01,0x83,0x01,0x82,0x00,0xC6,0x00,0xC6,0x00,0xC6,0x00,0x44,0x00,0x44,0x00,0x6C,0x00,0x6C,0x00,0x28,0x00,0x38,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 86
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE3,0x30,0xE3,0x31,0xE2,0x11,0x22,0x11,0x26,0x19,0x26,0x19,0x26,0x19,0x36,0x1B,0x36,0x1B,0x34,0x0B,0x14,0x0A,0x1C,0x0E,0x1C,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 87
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x01,0xC6,0x00,0xC6,0x00,0x6C,0x00,0x6C,0x00,0x38,0x00,0x38,0x00,0x6C,0x00,0x6C,0x00,0x44,0x00,0xC6,0x00,0x82,0x00,0x83,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 88
0x00,0x00,0x00,0x00,0x00,0x00,0x86,0xC6,0x44,0x6C,0x6C,0x28,0x28,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x00,0x00, // Code for char num 89
0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xFE,0x40,0x60,0x20,0x30,0x10,0x18,0x08,0x0C,0x06,0xFE,0xFE,0x00,0x00,0x00,0x00, // Code for char num 90
0x00,0x00,0x00,0x00,0x1C,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x1C,0x00, // Code for char num 91
0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x04,0x04,0x0C,0x08,0x08,0x10,0x10,0x30,0x20,0x20,0x40,0x40,0xC0,0x00,0x00,0x00, // Code for char num 92
0x00,0x00,0x00,0x00,0x0E,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x0E,0x00, // Code for char num 93
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x12,0x21,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 94
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x00, // Code for char num 95
0x00,0x00,0x00,0x00,0x00,0x02,0x03,0x04,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 96
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x7E,0x40,0x7E,0x42,0x42,0x62,0x7E,0x4C,0x00,0x00,0x00,0x00, // Code for char num 97
0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x02,0x72,0xFA,0x86,0x82,0x82,0x82,0x82,0x7E,0x3C,0x00,0x00,0x00,0x00, // Code for char num 98
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x3C,0x02,0x02,0x02,0x02,0x02,0x3C,0x1C,0x00,0x00,0x00,0x00, // Code for char num 99
0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x40,0x5C,0x7E,0x42,0x42,0x42,0x42,0x42,0x7E,0x4C,0x00,0x00,0x00,0x00, // Code for char num 100
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x7C,0x42,0x42,0x7E,0x02,0x02,0x7C,0x38,0x00,0x00,0x00,0x00, // Code for char num 101
0x00,0x00,0x00,0x00,0x00,0x38,0x3C,0x04,0x04,0x04,0x1E,0x1E,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00,0x00,0x00,0x00, // Code for char num 102
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x42,0x42,0x42,0x3C,0x02,0x06,0x7E,0x82,0x82,0x82,0xFE,0x7C, // Code for char num 103
0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x02,0x62,0xFA,0x86,0x82,0x82,0x82,0x82,0x82,0x82,0x00,0x00,0x00,0x00, // Code for char num 104
0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x00,0x00, // Code for char num 105
0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x00,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01, // Code for char num 106
0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x02,0x62,0x32,0x1A,0x0E,0x1A,0x1A,0x32,0x32,0x62,0x00,0x00,0x00,0x00, // Code for char num 107
0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x0E,0x0C,0x00,0x00,0x00,0x00, // Code for char num 108
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x32,0x06,0x7A,0x0F,0xC6,0x08,0x42,0x08,0x42,0x08,0x42,0x08,0x42,0x08,0x42,0x08,0x42,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 109
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x62,0xFA,0x86,0x82,0x82,0x82,0x82,0x82,0x82,0x00,0x00,0x00,0x00, // Code for char num 110
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x7C,0x82,0x82,0x82,0x82,0x82,0x7C,0x38,0x00,0x00,0x00,0x00, // Code for char num 111
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x72,0xFA,0x86,0x82,0x82,0x82,0x82,0x7E,0x7A,0x02,0x02,0x02,0x00, // Code for char num 112
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x7C,0x42,0x42,0x42,0x42,0x42,0x7E,0x4C,0x40,0x40,0x40,0x00, // Code for char num 113
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x1E,0x06,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x00,0x00, // Code for char num 114
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x7E,0x02,0x02,0x3C,0x40,0x40,0x7E,0x3E,0x00,0x00,0x00,0x00, // Code for char num 115
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0x1E,0x1E,0x04,0x04,0x04,0x04,0x04,0x1C,0x18,0x00,0x00,0x00,0x00, // Code for char num 116
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x42,0x42,0x42,0x42,0x42,0x42,0x62,0x7E,0x4C,0x00,0x00,0x00,0x00, // Code for char num 117
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC3,0x42,0x42,0x66,0x66,0x24,0x24,0x3C,0x18,0x00,0x00,0x00,0x00, // Code for char num 118
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x63,0x0C,0x63,0x0C,0xF2,0x04,0xF2,0x04,0x96,0x06,0x96,0x06,0x94,0x02,0x94,0x02,0x9C,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 119
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC3,0x66,0x24,0x3C,0x18,0x3C,0x66,0x66,0xC3,0x00,0x00,0x00,0x00, // Code for char num 120
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC3,0x42,0x42,0x66,0x66,0x24,0x2C,0x3C,0x18,0x18,0x08,0x0C,0x06, // Code for char num 121
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x7E,0x20,0x30,0x18,0x0C,0x04,0x7E,0x7E,0x00,0x00,0x00,0x00, // Code for char num 122
0x00,0x00,0x00,0x00,0x08,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x02,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x08,0x00, // Code for char num 123
0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00, // Code for char num 124
0x00,0x00,0x00,0x00,0x02,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x08,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x02,0x00, // Code for char num 125
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4E,0x72,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 126
0x00,0x00,0x00,0x00,0x00,0x1F,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x1F,0x00,0x00,0x00,0x00,0x00 // Code for char num 127
};
#endif
#ifdef EINK_BUNDLE_GUIFONT_TAHOMA_16_REGULAR
const uint8_t guiFont_Tahoma_16_Regular[] = {
0x00,
0x00,
0x20,0x00,
0x7F,0x00,
0x19,
0x18,
0x03,0x88,0x01,0x00,
0x04,0xA1,0x01,0x00,
0x07,0xBA,0x01,0x00,
0x0E,0xD3,0x01,0x00,
0x0A,0x05,0x02,0x00,
0x13,0x37,0x02,0x00,
0x0F,0x82,0x02,0x00,
0x03,0xB4,0x02,0x00,
0x07,0xCD,0x02,0x00,
0x07,0xE6,0x02,0x00,
0x0B,0xFF,0x02,0x00,
0x0E,0x31,0x03,0x00,
0x05,0x63,0x03,0x00,
0x07,0x7C,0x03,0x00,
0x04,0x95,0x03,0x00,
0x08,0xAE,0x03,0x00,
0x0A,0xC7,0x03,0x00,
0x0A,0xF9,0x03,0x00,
0x0A,0x2B,0x04,0x00,
0x0A,0x5D,0x04,0x00,
0x0B,0x8F,0x04,0x00,
0x0A,0xC1,0x04,0x00,
0x0A,0xF3,0x04,0x00,
0x0B,0x25,0x05,0x00,
0x0A,0x57,0x05,0x00,
0x0A,0x89,0x05,0x00,
0x04,0xBB,0x05,0x00,
0x05,0xD4,0x05,0x00,
0x0D,0xED,0x05,0x00,
0x0D,0x1F,0x06,0x00,
0x0D,0x51,0x06,0x00,
0x09,0x83,0x06,0x00,
0x12,0xB5,0x06,0x00,
0x0D,0x00,0x07,0x00,
0x0C,0x32,0x07,0x00,
0x0C,0x64,0x07,0x00,
0x0D,0x96,0x07,0x00,
0x0B,0xC8,0x07,0x00,
0x0B,0xFA,0x07,0x00,
0x0D,0x2C,0x08,0x00,
0x0C,0x5E,0x08,0x00,
0x07,0x90,0x08,0x00,
0x08,0xA9,0x08,0x00,
0x0C,0xC2,0x08,0x00,
0x0A,0xF4,0x08,0x00,
0x0E,0x26,0x09,0x00,
0x0C,0x58,0x09,0x00,
0x0E,0x8A,0x09,0x00,
0x0C,0xBC,0x09,0x00,
0x0E,0xEE,0x09,0x00,
0x0D,0x20,0x0A,0x00,
0x0B,0x52,0x0A,0x00,
0x0C,0x84,0x0A,0x00,
0x0D,0xB6,0x0A,0x00,
0x0D,0xE8,0x0A,0x00,
0x13,0x1A,0x0B,0x00,
0x0C,0x65,0x0B,0x00,
0x0C,0x97,0x0B,0x00,
0x0B,0xC9,0x0B,0x00,
0x07,0xFB,0x0B,0x00,
0x09,0x14,0x0C,0x00,
0x06,0x46,0x0C,0x00,
0x0E,0x5F,0x0C,0x00,
0x0B,0x91,0x0C,0x00,
0x07,0xC3,0x0C,0x00,
0x09,0xDC,0x0C,0x00,
0x0B,0x0E,0x0D,0x00,
0x09,0x40,0x0D,0x00,
0x0A,0x72,0x0D,0x00,
0x0A,0xA4,0x0D,0x00,
0x08,0xD6,0x0D,0x00,
0x0A,0xEF,0x0D,0x00,
0x0A,0x21,0x0E,0x00,
0x03,0x53,0x0E,0x00,
0x04,0x6C,0x0E,0x00,
0x0A,0x85,0x0E,0x00,
0x03,0xB7,0x0E,0x00,
0x11,0xD0,0x0E,0x00,
0x0A,0x1B,0x0F,0x00,
0x0A,0x4D,0x0F,0x00,
0x0B,0x7F,0x0F,0x00,
0x0A,0xB1,0x0F,0x00,
0x08,0xE3,0x0F,0x00,
0x08,0xFC,0x0F,0x00,
0x07,0x15,0x10,0x00,
0x0A,0x2E,0x10,0x00,
0x09,0x60,0x10,0x00,
0x0F,0x92,0x10,0x00,
0x09,0xC4,0x10,0x00,
0x09,0xF6,0x10,0x00,
0x08,0x28,0x11,0x00,
0x09,0x41,0x11,0x00,
0x05,0x73,0x11,0x00,
0x09,0x8C,0x11,0x00,
0x0E,0xBE,0x11,0x00,
0x06,0xF0,0x11,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 32
0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x00,0x00,0x0C,0x0C,0x00,0x00,0x00,0x00, // Code for char num 33
0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 34
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x0C,0xC0,0x0C,0xC0,0x0E,0x60,0x06,0x60,0x06,0xF8,0x3F,0xF8,0x3F,0x60,0x06,0x30,0x03,0x30,0x03,0xFE,0x0F,0xFE,0x0F,0x30,0x03,0xB8,0x01,0x98,0x01,0x98,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 35
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0xF8,0x01,0xFC,0x03,0x26,0x02,0x26,0x00,0x26,0x00,0x7C,0x00,0xF8,0x01,0xA0,0x03,0x20,0x03,0x20,0x03,0xA2,0x03,0xFE,0x01,0xFC,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00, // Code for char num 36
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x60,0x00,0x7C,0x30,0x00,0xC6,0x30,0x00,0xC6,0x18,0x00,0xC6,0x18,0x00,0xC6,0x0C,0x00,0xC6,0x0C,0x00,0x7C,0xC6,0x01,0x38,0xE6,0x03,0x00,0x33,0x06,0x00,0x33,0x06,0x80,0x31,0x06,0x80,0x31,0x06,0xC0,0x30,0x06,0xC0,0xE0,
0x03,0x60,0xC0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 37
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0xF8,0x01,0x9C,0x03,0x0C,0x03,0x0C,0x03,0x9C,0x01,0xF8,0x0C,0x78,0x0C,0xEC,0x0C,0xC6,0x0D,0x86,0x0F,0x06,0x0F,0x06,0x0E,0x0E,0x1E,0xFC,0x3B,0xF8,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 38
0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 39
0x00,0x00,0x00,0x00,0x70,0x30,0x18,0x18,0x0C,0x0C,0x0E,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x0C,0x0C,0x18,0x18,0x30,0x70, // Code for char num 40
0x00,0x00,0x00,0x00,0x0E,0x0C,0x18,0x18,0x30,0x30,0x70,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x70,0x30,0x30,0x18,0x18,0x0C,0x0E, // Code for char num 41
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x62,0x04,0x6E,0x07,0xF8,0x01,0x60,0x00,0xFC,0x03,0x66,0x06,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 42
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xFC,0x3F,0xFC,0x3F,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 43
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x0C,0x0C,0x0C,0x04,0x06,0x06, // Code for char num 44
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 45
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00, // Code for char num 46
0x00,0x00,0x00,0x00,0xC0,0xC0,0x60,0x60,0x60,0x30,0x30,0x30,0x18,0x18,0x18,0x18,0x0C,0x0C,0x0C,0x06,0x06,0x06,0x03,0x03,0x00, // Code for char num 47
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0xFC,0x00,0x86,0x01,0x86,0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x86,0x01,0x86,0x01,0xFC,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 48
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x7C,0x00,0x7C,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xFC,0x03,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 49
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0xFF,0x00,0xC1,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xC0,0x00,0x60,0x00,0x70,0x00,0x38,0x00,0x1C,0x00,0x0E,0x00,0x03,0x00,0xFF,0x03,0xFF,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 50
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x00,0xFE,0x01,0x82,0x03,0x00,0x03,0x00,0x03,0x80,0x01,0xF0,0x00,0xF0,0x00,0x80,0x01,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x82,0x01,0xFE,0x01,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 51
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0xC0,0x01,0xE0,0x01,0xB0,0x01,0x98,0x01,0x8C,0x01,0x86,0x01,0x83,0x01,0xFF,0x07,0xFF,0x07,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 52
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0xFC,0x03,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x00,0xFC,0x01,0x80,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x82,0x01,0xFE,0x01,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 53
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0xF8,0x01,0x1C,0x00,0x06,0x00,0x06,0x00,0x03,0x00,0xFB,0x00,0xFF,0x01,0x87,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x07,0x03,0x86,0x01,0xFC,0x01,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 54
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x07,0xFE,0x07,0x00,0x06,0x00,0x03,0x00,0x03,0x80,0x01,0x80,0x01,0xC0,0x00,0xC0,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x18,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 55
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x00,0xFE,0x01,0x87,0x03,0x03,0x03,0x03,0x03,0x07,0x03,0x9E,0x01,0x7C,0x00,0xE6,0x01,0x83,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x87,0x01,0xFE,0x01,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 56
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0xFE,0x00,0x86,0x01,0x83,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x87,0x03,0xFE,0x03,0x7C,0x03,0x00,0x03,0x80,0x01,0x80,0x01,0xE0,0x00,0x7E,0x00,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 57
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00, // Code for char num 58
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00,0x18,0x0C,0x0C,0x0C,0x04,0x06,0x06, // Code for char num 59
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x1E,0x80,0x0F,0xF0,0x01,0x7C,0x00,0x0C,0x00,0x7C,0x00,0xF0,0x01,0x80,0x0F,0x00,0x1E,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 60
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x1F,0xFC,0x1F,0x00,0x00,0x00,0x00,0xFC,0x1F,0xFC,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 61
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x3C,0x00,0xF8,0x00,0xC0,0x07,0x00,0x1F,0x00,0x18,0x00,0x1F,0xC0,0x07,0xF8,0x00,0x3C,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 62
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0xFE,0x00,0xC2,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xC0,0x00,0xE0,0x00,0x78,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 63
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x1F,0x00,0xE0,0x7F,0x00,0x70,0xE0,0x00,0x18,0xC0,0x01,0x8C,0x9F,0x01,0xCC,0x9F,0x03,0xE6,0x18,0x03,0x66,0x18,0x03,0x66,0x18,0x03,0x66,0x18,0x03,0x66,0x18,0x03,0xE6,0x1C,0x03,0xCC,0xFF,0x01,0x8C,0xFB,0x01,0x18,0x00,
0x00,0x78,0x00,0x00,0xE0,0x1F,0x00,0xC0,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 64
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0xE0,0x00,0xB0,0x01,0xB0,0x01,0xB0,0x01,0x18,0x03,0x18,0x03,0x18,0x03,0x0C,0x06,0x0C,0x06,0xFC,0x07,0xFE,0x0F,0x06,0x0C,0x06,0x0C,0x07,0x1C,0x03,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 65
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x01,0xFC,0x07,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x03,0xFC,0x01,0xFC,0x07,0x0C,0x06,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x06,0xFC,0x07,0xFC,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 66
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x03,0xF8,0x0F,0x38,0x0C,0x0C,0x08,0x0C,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x0E,0x00,0x0C,0x08,0x3C,0x0C,0xF8,0x0F,0xE0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 67
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x01,0xFC,0x03,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0xFC,0x03,0xFC,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 68
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x07,0xFC,0x07,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x03,0xFC,0x03,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x07,0xFC,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 69
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x07,0xFC,0x07,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x07,0xFC,0x07,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 70
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x07,0xF0,0x1F,0x38,0x1C,0x0C,0x10,0x0C,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x1F,0x06,0x1F,0x06,0x18,0x0C,0x18,0x0C,0x18,0x38,0x18,0xF8,0x1F,0xE0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 71
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0xFC,0x0F,0xFC,0x0F,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 72
0x00,0x00,0x00,0x00,0x00,0x7E,0x7E,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x7E,0x7E,0x00,0x00,0x00,0x00, // Code for char num 73
0x00,0x00,0x00,0x00,0x00,0xFC,0xFC,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xE0,0x7F,0x3F,0x00,0x00,0x00,0x00, // Code for char num 74
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0E,0x0C,0x07,0x8C,0x03,0x8C,0x01,0xCC,0x00,0xEC,0x00,0x7C,0x00,0x3C,0x00,0x7C,0x00,0xEC,0x00,0xCC,0x00,0x8C,0x01,0x8C,0x03,0x0C,0x03,0x0C,0x06,0x0C,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 75
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x03,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 76
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x38,0x1C,0x38,0x3C,0x3C,0x3C,0x3C,0x2C,0x34,0x6C,0x36,0x6C,0x32,0x4C,0x32,0xCC,0x33,0x8C,0x31,0x8C,0x31,0x8C,0x31,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 77
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x0C,0x1C,0x0C,0x3C,0x0C,0x2C,0x0C,0x6C,0x0C,0x6C,0x0C,0x4C,0x0C,0xCC,0x0C,0x8C,0x0C,0x8C,0x0D,0x8C,0x0D,0x0C,0x0F,0x0C,0x0F,0x0C,0x0E,0x0C,0x0E,0x0C,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 78
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x03,0xF8,0x0F,0x1C,0x1C,0x0C,0x18,0x0E,0x38,0x06,0x30,0x06,0x30,0x06,0x30,0x06,0x30,0x06,0x30,0x06,0x30,0x0E,0x38,0x0C,0x18,0x1C,0x1C,0xF8,0x0F,0xE0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 79
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x01,0xFC,0x07,0x0C,0x06,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x06,0xFC,0x03,0xFC,0x01,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 80
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x03,0xF8,0x0F,0x1C,0x1C,0x0C,0x18,0x0E,0x38,0x06,0x30,0x06,0x30,0x06,0x30,0x06,0x30,0x06,0x30,0x06,0x30,0x0E,0x38,0x0C,0x18,0x1C,0x1C,0xF8,0x0F,0xE0,0x03,0x00,0x03,0x00,0x07,0x00,0x3E,0x00,0x3C, // Code for char num 81
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x01,0xFC,0x03,0x0C,0x07,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x03,0xFC,0x01,0xFC,0x00,0xCC,0x01,0x8C,0x03,0x0C,0x03,0x0C,0x06,0x0C,0x0E,0x0C,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 82
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x02,0x06,0x00,0x06,0x00,0x06,0x00,0x1E,0x00,0xFC,0x00,0xF0,0x03,0x00,0x07,0x00,0x06,0x00,0x06,0x02,0x06,0x06,0x03,0xFE,0x03,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 83
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x0F,0xFF,0x0F,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 84
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x0E,0x1C,0x1C,0x0E,0xF8,0x07,0xF0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 85
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x18,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x18,0x03,0x18,0x03,0x18,0x03,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xE0,0x00,0xE0,0x00,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 86
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x07,0x06,0x03,0x07,0x06,0x06,0x07,0x03,0x06,0x05,0x03,0x86,0x0D,0x03,0x86,0x0D,0x03,0x8C,0x8D,0x01,0x8C,0x88,0x01,0xCC,0x98,0x01,0xCC,0x98,0x01,0xD8,0xD8,0x00,0x58,0xD0,0x00,0x58,0xF0,0x00,0x78,0xF0,0x00,0x70,0x70,
0x00,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 87
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0C,0x06,0x06,0x0C,0x03,0x0C,0x03,0x98,0x01,0x98,0x01,0xF0,0x00,0x60,0x00,0x60,0x00,0xF0,0x00,0x98,0x01,0x98,0x01,0x0C,0x03,0x0C,0x03,0x06,0x06,0x03,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 88
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x0E,0x06,0x06,0x0E,0x07,0x0C,0x03,0x9C,0x01,0x98,0x01,0xF0,0x00,0xF0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 89
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x07,0xFE,0x07,0x00,0x06,0x00,0x03,0x80,0x01,0x80,0x01,0xC0,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x18,0x00,0x0C,0x00,0x06,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 90
0x00,0x00,0x00,0x00,0x7C,0x7C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x7C,0x7C, // Code for char num 91
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0x80,0x01,0x80,0x01,0x00,0x00, // Code for char num 92
0x00,0x00,0x00,0x00,0x3E,0x3E,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3E,0x3E, // Code for char num 93
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x01,0xC0,0x01,0x60,0x03,0x30,0x06,0x30,0x06,0x18,0x0C,0x0C,0x18,0x06,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 94
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x07,0x00,0x00, // Code for char num 95
0x00,0x00,0x00,0x00,0x38,0x30,0x20,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 96
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0xFE,0x00,0x80,0x01,0x80,0x01,0xF8,0x01,0xFE,0x01,0x87,0x01,0x83,0x01,0xC3,0x01,0xFF,0x01,0xBC,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 97
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xE6,0x01,0xFE,0x03,0x0E,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x03,0xFE,0x03,0xF6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 98
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x00,0xFE,0x01,0x06,0x01,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x06,0x01,0xFE,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 99
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x78,0x03,0xFE,0x03,0x06,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x86,0x03,0xFE,0x03,0x7C,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 100
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x00,0xFE,0x01,0x86,0x03,0x03,0x03,0xFF,0x03,0xFF,0x03,0x03,0x00,0x03,0x00,0x06,0x02,0xFE,0x03,0xF8,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 101
0x00,0x00,0x00,0x00,0xF0,0xF8,0x1C,0x0C,0x0C,0x0C,0x7E,0x7E,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00, // Code for char num 102
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x03,0xFC,0x03,0x06,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x86,0x03,0xFE,0x03,0x7C,0x03,0x00,0x03,0x82,0x01,0xFE,0x01,0x7E,0x00, // Code for char num 103
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xF6,0x00,0xFE,0x01,0x8E,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 104
0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00, // Code for char num 105
0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x00,0x00,0x00,0x0F,0x0F,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x03, // Code for char num 106
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x86,0x01,0xC6,0x00,0x66,0x00,0x36,0x00,0x1E,0x00,0x3E,0x00,0x36,0x00,0x66,0x00,0xC6,0x00,0xC6,0x01,0x86,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 107
0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00, // Code for char num 108
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF6,0x78,0x00,0xFE,0xFD,0x00,0x8E,0xC7,0x01,0x06,0x83,0x01,0x06,0x83,0x01,0x06,0x83,0x01,0x06,0x83,0x01,0x06,0x83,0x01,0x06,0x83,0x01,0x06,0x83,
0x01,0x06,0x83,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 109
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF6,0x00,0xFE,0x01,0x8E,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 110
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0xFE,0x01,0x86,0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x86,0x01,0xFE,0x01,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 111
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF6,0x01,0xFE,0x03,0x0E,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x03,0xFE,0x03,0xFE,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00, // Code for char num 112
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x03,0xFE,0x03,0x06,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x86,0x03,0xFE,0x03,0x7C,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03, // Code for char num 113
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE6,0xFE,0x0E,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00, // Code for char num 114
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0xFE,0x83,0x03,0x0F,0x7E,0xF8,0xC0,0xC1,0x7F,0x3E,0x00,0x00,0x00,0x00, // Code for char num 115
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x7E,0x7E,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x7C,0x78,0x00,0x00,0x00,0x00, // Code for char num 116
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x03,0xFC,0x03,0x78,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 117
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x01,0xC6,0x00,0xC6,0x00,0xC6,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 118
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x61,0xC3,0x61,0xC6,0x31,0x46,0x33,0x66,0x33,0x66,0x33,0x2C,0x12,0x3C,0x1E,0x3C,0x1E,0x18,0x0C,0x18,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 119
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x01,0xC6,0x00,0x6C,0x00,0x6C,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x6C,0x00,0x6C,0x00,0xC6,0x00,0x83,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 120
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x01,0xC6,0x00,0xC6,0x00,0xC6,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x18,0x00,0x18,0x00,0x1C,0x00,0x0C,0x00,0x0C,0x00, // Code for char num 121
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xFE,0x60,0x60,0x30,0x38,0x18,0x0C,0x0E,0xFE,0xFE,0x00,0x00,0x00,0x00, // Code for char num 122
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x01,0xE0,0x01,0x70,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x0E,0x00,0x0E,0x00,0x18,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x70,0x00,0xE0,0x01,0xC0,0x01, // Code for char num 123
0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, // Code for char num 124
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x00,0x1E,0x00,0x38,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x60,0x00,0xC0,0x01,0xC0,0x01,0x60,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x38,0x00,0x1E,0x00,0x0E,0x00, // Code for char num 125
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x30,0xFC,0x30,0xCE,0x39,0x86,0x1F,0x06,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 126
0x00,0x00,0x00,0x00,0x3E,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x3E,0x00,0x00,0x00,0x00,0x00 // Code for char num 127
};
#endif
#ifdef EINK_BUNDLE_GUIFONT_TAHOMA_10_REGULAR
const uint8_t guiFont_Tahoma_10_Regular[] =
{
0x00,
0x00,
0x20,0x00,
0x7F,0x00,
0x10,
0x10,
0x03,0x88,0x01,0x00,
0x02,0x98,0x01,0x00,
0x04,0xA8,0x01,0x00,
0x08,0xB8,0x01,0x00,
0x06,0xC8,0x01,0x00,
0x0B,0xD8,0x01,0x00,
0x08,0xF8,0x01,0x00,
0x02,0x08,0x02,0x00,
0x05,0x18,0x02,0x00,
0x04,0x28,0x02,0x00,
0x06,0x38,0x02,0x00,
0x07,0x48,0x02,0x00,
0x02,0x58,0x02,0x00,
0x04,0x68,0x02,0x00,
0x02,0x78,0x02,0x00,
0x05,0x88,0x02,0x00,
0x06,0x98,0x02,0x00,
0x06,0xA8,0x02,0x00,
0x06,0xB8,0x02,0x00,
0x06,0xC8,0x02,0x00,
0x06,0xD8,0x02,0x00,
0x06,0xE8,0x02,0x00,
0x06,0xF8,0x02,0x00,
0x06,0x08,0x03,0x00,
0x06,0x18,0x03,0x00,
0x06,0x28,0x03,0x00,
0x03,0x38,0x03,0x00,
0x03,0x48,0x03,0x00,
0x08,0x58,0x03,0x00,
0x08,0x68,0x03,0x00,
0x08,0x78,0x03,0x00,
0x05,0x88,0x03,0x00,
0x0B,0x98,0x03,0x00,
0x07,0xB8,0x03,0x00,
0x06,0xC8,0x03,0x00,
0x07,0xD8,0x03,0x00,
0x07,0xE8,0x03,0x00,
0x06,0xF8,0x03,0x00,
0x06,0x08,0x04,0x00,
0x07,0x18,0x04,0x00,
0x07,0x28,0x04,0x00,
0x03,0x38,0x04,0x00,
0x04,0x48,0x04,0x00,
0x06,0x58,0x04,0x00,
0x05,0x68,0x04,0x00,
0x09,0x78,0x04,0x00,
0x07,0x98,0x04,0x00,
0x08,0xA8,0x04,0x00,
0x06,0xB8,0x04,0x00,
0x08,0xC8,0x04,0x00,
0x07,0xD8,0x04,0x00,
0x07,0xE8,0x04,0x00,
0x07,0xF8,0x04,0x00,
0x07,0x08,0x05,0x00,
0x07,0x18,0x05,0x00,
0x0B,0x28,0x05,0x00,
0x07,0x48,0x05,0x00,
0x07,0x58,0x05,0x00,
0x06,0x68,0x05,0x00,
0x04,0x78,0x05,0x00,
0x05,0x88,0x05,0x00,
0x04,0x98,0x05,0x00,
0x09,0xA8,0x05,0x00,
0x07,0xC8,0x05,0x00,
0x05,0xD8,0x05,0x00,
0x06,0xE8,0x05,0x00,
0x06,0xF8,0x05,0x00,
0x05,0x08,0x06,0x00,
0x06,0x18,0x06,0x00,
0x06,0x28,0x06,0x00,
0x05,0x38,0x06,0x00,
0x06,0x48,0x06,0x00,
0x06,0x58,0x06,0x00,
0x02,0x68,0x06,0x00,
0x03,0x78,0x06,0x00,
0x05,0x88,0x06,0x00,
0x02,0x98,0x06,0x00,
0x0A,0xA8,0x06,0x00,
0x06,0xC8,0x06,0x00,
0x06,0xD8,0x06,0x00,
0x06,0xE8,0x06,0x00,
0x06,0xF8,0x06,0x00,
0x04,0x08,0x07,0x00,
0x05,0x18,0x07,0x00,
0x04,0x28,0x07,0x00,
0x06,0x38,0x07,0x00,
0x05,0x48,0x07,0x00,
0x09,0x58,0x07,0x00,
0x05,0x78,0x07,0x00,
0x05,0x88,0x07,0x00,
0x05,0x98,0x07,0x00,
0x05,0xA8,0x07,0x00,
0x03,0xB8,0x07,0x00,
0x05,0xC8,0x07,0x00,
0x08,0xD8,0x07,0x00,
0x03,0xE8,0x07,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 32
0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x02,0x02,0x00,0x00,0x00, // Code for char num 33
0x00,0x00,0x00,0x0A,0x0A,0x0A,0x0A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 34
0x00,0x00,0x00,0x00,0x50,0x50,0xFC,0x28,0x28,0x7E,0x28,0x14,0x14,0x00,0x00,0x00, // Code for char num 35
0x00,0x00,0x00,0x04,0x04,0x3E,0x05,0x05,0x06,0x1C,0x24,0x24,0x1F,0x04,0x04,0x00, // Code for char num 36
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x01,0x92,0x00,0x92,0x00,0x52,0x00,0x2C,0x03,0xA0,0x04,0x90,0x04,0x90,0x04,0x08,0x03,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 37
0x00,0x00,0x00,0x00,0x1E,0x21,0x21,0x12,0x4E,0x51,0x61,0x61,0x9E,0x00,0x00,0x00, // Code for char num 38
0x00,0x00,0x00,0x02,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 39
0x00,0x00,0x00,0x10,0x08,0x04,0x04,0x02,0x02,0x02,0x02,0x02,0x04,0x04,0x08,0x10, // Code for char num 40
0x00,0x00,0x00,0x01,0x02,0x04,0x04,0x08,0x08,0x08,0x08,0x08,0x04,0x04,0x02,0x01, // Code for char num 41
0x00,0x00,0x00,0x08,0x2A,0x1C,0x2A,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 42
0x00,0x00,0x00,0x00,0x00,0x08,0x08,0x08,0x7F,0x08,0x08,0x08,0x00,0x00,0x00,0x00, // Code for char num 43
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x01,0x00, // Code for char num 44
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 45
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x00,0x00, // Code for char num 46
0x00,0x00,0x00,0x10,0x10,0x08,0x08,0x08,0x04,0x04,0x02,0x02,0x02,0x01,0x01,0x00, // Code for char num 47
0x00,0x00,0x00,0x00,0x1E,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x1E,0x00,0x00,0x00, // Code for char num 48
0x00,0x00,0x00,0x00,0x08,0x0E,0x08,0x08,0x08,0x08,0x08,0x08,0x3E,0x00,0x00,0x00, // Code for char num 49
0x00,0x00,0x00,0x00,0x1E,0x21,0x20,0x20,0x10,0x0C,0x02,0x01,0x3F,0x00,0x00,0x00, // Code for char num 50
0x00,0x00,0x00,0x00,0x1E,0x21,0x20,0x20,0x1C,0x20,0x20,0x21,0x1E,0x00,0x00,0x00, // Code for char num 51
0x00,0x00,0x00,0x00,0x10,0x18,0x14,0x12,0x11,0x3F,0x10,0x10,0x10,0x00,0x00,0x00, // Code for char num 52
0x00,0x00,0x00,0x00,0x3F,0x01,0x01,0x1F,0x20,0x20,0x20,0x21,0x1E,0x00,0x00,0x00, // Code for char num 53
0x00,0x00,0x00,0x00,0x1C,0x02,0x01,0x1F,0x21,0x21,0x21,0x21,0x1E,0x00,0x00,0x00, // Code for char num 54
0x00,0x00,0x00,0x00,0x3F,0x20,0x10,0x10,0x08,0x08,0x04,0x04,0x02,0x00,0x00,0x00, // Code for char num 55
0x00,0x00,0x00,0x00,0x1E,0x21,0x21,0x21,0x1E,0x21,0x21,0x21,0x1E,0x00,0x00,0x00, // Code for char num 56
0x00,0x00,0x00,0x00,0x1E,0x21,0x21,0x21,0x21,0x3E,0x20,0x10,0x0E,0x00,0x00,0x00, // Code for char num 57
0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x00,0x00,0x00,0x04,0x04,0x00,0x00,0x00, // Code for char num 58
0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x00,0x00,0x00,0x04,0x04,0x04,0x02,0x00, // Code for char num 59
0x00,0x00,0x00,0x00,0x00,0x80,0x60,0x18,0x06,0x18,0x60,0x80,0x00,0x00,0x00,0x00, // Code for char num 60
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00, // Code for char num 61
0x00,0x00,0x00,0x00,0x00,0x02,0x0C,0x30,0xC0,0x30,0x0C,0x02,0x00,0x00,0x00,0x00, // Code for char num 62
0x00,0x00,0x00,0x00,0x0E,0x11,0x10,0x08,0x04,0x02,0x00,0x02,0x02,0x00,0x00,0x00, // Code for char num 63
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x00,0x06,0x03,0xF2,0x02,0x89,0x04,0x89,0x04,0x89,0x04,0x89,0x04,0xF2,0x03,0x06,0x00,0xF8,0x00,0x00,0x00,0x00,0x00, // Code for char num 64
0x00,0x00,0x00,0x00,0x08,0x08,0x14,0x14,0x22,0x22,0x3E,0x41,0x41,0x00,0x00,0x00, // Code for char num 65
0x00,0x00,0x00,0x00,0x0F,0x11,0x11,0x11,0x1F,0x21,0x21,0x21,0x1F,0x00,0x00,0x00, // Code for char num 66
0x00,0x00,0x00,0x00,0x3C,0x42,0x01,0x01,0x01,0x01,0x01,0x42,0x3C,0x00,0x00,0x00, // Code for char num 67
0x00,0x00,0x00,0x00,0x1F,0x21,0x41,0x41,0x41,0x41,0x41,0x21,0x1F,0x00,0x00,0x00, // Code for char num 68
0x00,0x00,0x00,0x00,0x3F,0x01,0x01,0x01,0x3F,0x01,0x01,0x01,0x3F,0x00,0x00,0x00, // Code for char num 69
0x00,0x00,0x00,0x00,0x3F,0x01,0x01,0x01,0x3F,0x01,0x01,0x01,0x01,0x00,0x00,0x00, // Code for char num 70
0x00,0x00,0x00,0x00,0x3C,0x42,0x01,0x01,0x01,0x71,0x41,0x42,0x7C,0x00,0x00,0x00, // Code for char num 71
0x00,0x00,0x00,0x00,0x41,0x41,0x41,0x41,0x7F,0x41,0x41,0x41,0x41,0x00,0x00,0x00, // Code for char num 72
0x00,0x00,0x00,0x00,0x07,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x07,0x00,0x00,0x00, // Code for char num 73
0x00,0x00,0x00,0x00,0x0E,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x07,0x00,0x00,0x00, // Code for char num 74
0x00,0x00,0x00,0x00,0x21,0x11,0x09,0x05,0x03,0x05,0x09,0x11,0x21,0x00,0x00,0x00, // Code for char num 75
0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x1F,0x00,0x00,0x00, // Code for char num 76
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x01,0x83,0x01,0x45,0x01,0x45,0x01,0x29,0x01,0x29,0x01,0x11,0x01,0x11,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 77
0x00,0x00,0x00,0x00,0x43,0x43,0x45,0x45,0x49,0x51,0x51,0x61,0x61,0x00,0x00,0x00, // Code for char num 78
0x00,0x00,0x00,0x00,0x3C,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3C,0x00,0x00,0x00, // Code for char num 79
0x00,0x00,0x00,0x00,0x1F,0x21,0x21,0x21,0x1F,0x01,0x01,0x01,0x01,0x00,0x00,0x00, // Code for char num 80
0x00,0x00,0x00,0x00,0x3C,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3C,0x10,0xE0,0x00, // Code for char num 81
0x00,0x00,0x00,0x00,0x1F,0x21,0x21,0x21,0x1F,0x09,0x11,0x21,0x41,0x00,0x00,0x00, // Code for char num 82
0x00,0x00,0x00,0x00,0x3E,0x41,0x01,0x01,0x3E,0x40,0x40,0x41,0x3E,0x00,0x00,0x00, // Code for char num 83
0x00,0x00,0x00,0x00,0x7F,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x00,0x00,0x00, // Code for char num 84
0x00,0x00,0x00,0x00,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x22,0x1C,0x00,0x00,0x00, // Code for char num 85
0x00,0x00,0x00,0x00,0x41,0x41,0x41,0x22,0x22,0x14,0x14,0x08,0x08,0x00,0x00,0x00, // Code for char num 86
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0x04,0x21,0x04,0x51,0x04,0x51,0x04,0x52,0x02,0x8A,0x02,0x8A,0x02,0x8A,0x02,0x04,0x01,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 87
0x00,0x00,0x00,0x00,0x41,0x22,0x14,0x14,0x08,0x14,0x14,0x22,0x41,0x00,0x00,0x00, // Code for char num 88
0x00,0x00,0x00,0x00,0x41,0x22,0x22,0x14,0x08,0x08,0x08,0x08,0x08,0x00,0x00,0x00, // Code for char num 89
0x00,0x00,0x00,0x00,0x3F,0x20,0x10,0x08,0x04,0x04,0x02,0x01,0x3F,0x00,0x00,0x00, // Code for char num 90
0x00,0x00,0x00,0x0E,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x0E,0x00, // Code for char num 91
0x00,0x00,0x00,0x01,0x01,0x02,0x02,0x02,0x04,0x04,0x08,0x08,0x08,0x10,0x10,0x00, // Code for char num 92
0x00,0x00,0x00,0x0E,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x0E,0x00, // Code for char num 93
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x48,0x00,0x84,0x00,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 94
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x00, // Code for char num 95
0x00,0x00,0x00,0x08,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 96
0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x20,0x20,0x3E,0x21,0x31,0x2E,0x00,0x00,0x00, // Code for char num 97
0x00,0x00,0x00,0x01,0x01,0x01,0x1D,0x23,0x21,0x21,0x21,0x21,0x1F,0x00,0x00,0x00, // Code for char num 98
0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x01,0x01,0x01,0x01,0x01,0x1E,0x00,0x00,0x00, // Code for char num 99
0x00,0x00,0x00,0x20,0x20,0x20,0x3E,0x21,0x21,0x21,0x21,0x31,0x2E,0x00,0x00,0x00, // Code for char num 100
0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x21,0x21,0x3F,0x01,0x21,0x1E,0x00,0x00,0x00, // Code for char num 101
0x00,0x00,0x00,0x1C,0x02,0x02,0x0F,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x00, // Code for char num 102
0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x21,0x21,0x21,0x21,0x31,0x2E,0x20,0x20,0x1E, // Code for char num 103
0x00,0x00,0x00,0x01,0x01,0x01,0x1D,0x23,0x21,0x21,0x21,0x21,0x21,0x00,0x00,0x00, // Code for char num 104
0x00,0x00,0x00,0x00,0x02,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x00, // Code for char num 105
0x00,0x00,0x00,0x00,0x04,0x00,0x06,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03, // Code for char num 106
0x00,0x00,0x00,0x01,0x01,0x01,0x11,0x09,0x05,0x03,0x05,0x09,0x11,0x00,0x00,0x00, // Code for char num 107
0x00,0x00,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x00, // Code for char num 108
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9A,0x01,0x66,0x02,0x22,0x02,0x22,0x02,0x22,0x02,0x22,0x02,0x22,0x02,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 109
0x00,0x00,0x00,0x00,0x00,0x00,0x1D,0x23,0x21,0x21,0x21,0x21,0x21,0x00,0x00,0x00, // Code for char num 110
0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x21,0x21,0x21,0x21,0x21,0x1E,0x00,0x00,0x00, // Code for char num 111
0x00,0x00,0x00,0x00,0x00,0x00,0x1D,0x23,0x21,0x21,0x21,0x21,0x1F,0x01,0x01,0x01, // Code for char num 112
0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x21,0x21,0x21,0x21,0x31,0x2E,0x20,0x20,0x20, // Code for char num 113
0x00,0x00,0x00,0x00,0x00,0x00,0x0D,0x03,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00, // Code for char num 114
0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x11,0x01,0x0E,0x10,0x11,0x0E,0x00,0x00,0x00, // Code for char num 115
0x00,0x00,0x00,0x00,0x02,0x02,0x0F,0x02,0x02,0x02,0x02,0x02,0x0C,0x00,0x00,0x00, // Code for char num 116
0x00,0x00,0x00,0x00,0x00,0x00,0x21,0x21,0x21,0x21,0x21,0x31,0x2E,0x00,0x00,0x00, // Code for char num 117
0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x11,0x0A,0x0A,0x0A,0x04,0x04,0x00,0x00,0x00, // Code for char num 118
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x01,0x11,0x01,0xAA,0x00,0xAA,0x00,0xAA,0x00,0x44,0x00,0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 119
0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x0A,0x0A,0x04,0x0A,0x0A,0x11,0x00,0x00,0x00, // Code for char num 120
0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x11,0x0A,0x0A,0x0A,0x04,0x04,0x04,0x02,0x02, // Code for char num 121
0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x10,0x08,0x04,0x02,0x01,0x1F,0x00,0x00,0x00, // Code for char num 122
0x00,0x00,0x00,0x18,0x04,0x04,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x04,0x18,0x00, // Code for char num 123
0x00,0x00,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00, // Code for char num 124
0x00,0x00,0x00,0x03,0x04,0x04,0x04,0x04,0x04,0x18,0x04,0x04,0x04,0x04,0x03,0x00, // Code for char num 125
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8C,0x92,0x62,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 126
0x00,0x00,0x00,0x07,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x07,0x00,0x00,0x00 // Code for char num 127
};
#endif
#ifdef EINK_BUNDLE_GUIFONT_ROBOTO_MONO11X23_REGULAR
const uint8_t guiFont_Roboto_Mono11x23_Regular[] = {
0x00,
0x00,
0x20,0x00,
0x7F,0x00,
0x17,
0x10,
0x05,0x88,0x01,0x00,
0x07,0x9F,0x01,0x00,
0x08,0xB6,0x01,0x00,
0x0B,0xCD,0x01,0x00,
0x0A,0xFB,0x01,0x00,
0x0B,0x29,0x02,0x00,
0x0B,0x57,0x02,0x00,
0x06,0x85,0x02,0x00,
0x08,0x9C,0x02,0x00,
0x08,0xB3,0x02,0x00,
0x0A,0xCA,0x02,0x00,
0x0A,0xF8,0x02,0x00,
0x06,0x26,0x03,0x00,
0x09,0x3D,0x03,0x00,
0x07,0x6B,0x03,0x00,
0x0A,0x82,0x03,0x00,
0x0A,0xB0,0x03,0x00,
0x07,0xDE,0x03,0x00,
0x0A,0xF5,0x03,0x00,
0x09,0x23,0x04,0x00,
0x0A,0x51,0x04,0x00,
0x0A,0x7F,0x04,0x00,
0x0A,0xAD,0x04,0x00,
0x0A,0xDB,0x04,0x00,
0x0A,0x09,0x05,0x00,
0x0A,0x37,0x05,0x00,
0x07,0x65,0x05,0x00,
0x07,0x7C,0x05,0x00,
0x09,0x93,0x05,0x00,
0x0A,0xC1,0x05,0x00,
0x0A,0xEF,0x05,0x00,
0x0A,0x1D,0x06,0x00,
0x0B,0x4B,0x06,0x00,
0x0B,0x79,0x06,0x00,
0x0A,0xA7,0x06,0x00,
0x0A,0xD5,0x06,0x00,
0x0B,0x03,0x07,0x00,
0x0A,0x31,0x07,0x00,
0x0A,0x5F,0x07,0x00,
0x0A,0x8D,0x07,0x00,
0x0A,0xBB,0x07,0x00,
0x0A,0xE9,0x07,0x00,
0x0A,0x17,0x08,0x00,
0x0B,0x45,0x08,0x00,
0x0A,0x73,0x08,0x00,
0x0A,0xA1,0x08,0x00,
0x0A,0xCF,0x08,0x00,
0x0A,0xFD,0x08,0x00,
0x0B,0x2B,0x09,0x00,
0x0B,0x59,0x09,0x00,
0x0B,0x87,0x09,0x00,
0x0A,0xB5,0x09,0x00,
0x0B,0xE3,0x09,0x00,
0x0A,0x11,0x0A,0x00,
0x0B,0x3F,0x0A,0x00,
0x0B,0x6D,0x0A,0x00,
0x0B,0x9B,0x0A,0x00,
0x0B,0xC9,0x0A,0x00,
0x0A,0xF7,0x0A,0x00,
0x08,0x25,0x0B,0x00,
0x09,0x3C,0x0B,0x00,
0x07,0x6A,0x0B,0x00,
0x09,0x81,0x0B,0x00,
0x0A,0xAF,0x0B,0x00,
0x08,0xDD,0x0B,0x00,
0x0A,0xF4,0x0B,0x00,
0x0A,0x22,0x0C,0x00,
0x0A,0x50,0x0C,0x00,
0x0A,0x7E,0x0C,0x00,
0x0A,0xAC,0x0C,0x00,
0x0B,0xDA,0x0C,0x00,
0x0A,0x08,0x0D,0x00,
0x0A,0x36,0x0D,0x00,
0x0A,0x64,0x0D,0x00,
0x08,0x92,0x0D,0x00,
0x0A,0xA9,0x0D,0x00,
0x0A,0xD7,0x0D,0x00,
0x0B,0x05,0x0E,0x00,
0x0A,0x33,0x0E,0x00,
0x0A,0x61,0x0E,0x00,
0x0A,0x8F,0x0E,0x00,
0x0A,0xBD,0x0E,0x00,
0x0A,0xEB,0x0E,0x00,
0x0A,0x19,0x0F,0x00,
0x0A,0x47,0x0F,0x00,
0x0A,0x75,0x0F,0x00,
0x0A,0xA3,0x0F,0x00,
0x0B,0xD1,0x0F,0x00,
0x0B,0xFF,0x0F,0x00,
0x0B,0x2D,0x10,0x00,
0x0A,0x5B,0x10,0x00,
0x09,0x89,0x10,0x00,
0x06,0xB7,0x10,0x00,
0x09,0xCE,0x10,0x00,
0x0B,0xFC,0x10,0x00,
0x04,0x2A,0x11,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 32
0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00, // Code for char num 33
0x00,0x00,0x00,0x00,0x98,0x98,0x98,0x98,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 34
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x03,0x30,0x01,0x10,0x01,0xFE,0x07,0x90,0x01,0x98,0x01,0x98,0x00,0x88,0x00,0xFE,0x03,0x88,0x00,0xC8,0x00,0x4C,0x00,0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 35
0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0xF8,0x01,0x8C,0x01,0x0C,0x03,0x0C,0x03,0x0C,0x00,0x38,0x00,0xF0,0x00,0xC0,0x01,0x00,0x03,0x06,0x03,0x04,0x03,0x0C,0x03,0xF8,0x01,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 36
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x00,0x12,0x00,0x13,0x01,0x93,0x00,0xDE,0x00,0x40,0x00,0x20,0x00,0xB0,0x03,0xD0,0x06,0x58,0x04,0x48,0x04,0xC0,0x06,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 37
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0xD8,0x00,0x8C,0x00,0x8C,0x00,0xC8,0x00,0x38,0x00,0x38,0x00,0x6C,0x06,0xC6,0x06,0xC6,0x02,0x86,0x03,0xCC,0x03,0x78,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 38
0x00,0x00,0x00,0x00,0x20,0x20,0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 39
0x00,0x00,0x00,0x80,0xC0,0x60,0x20,0x30,0x30,0x10,0x18,0x18,0x18,0x18,0x18,0x10,0x10,0x30,0x20,0x60,0x40,0x80,0x00, // Code for char num 40
0x00,0x00,0x00,0x08,0x18,0x30,0x20,0x60,0x40,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x40,0x60,0x60,0x20,0x10,0x08,0x00, // Code for char num 41
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x64,0x00,0xFC,0x03,0xFA,0x01,0x60,0x00,0xD0,0x00,0x98,0x01,0x08,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 42
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xFE,0x03,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 43
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x30,0x30,0x18,0x00,0x00, // Code for char num 44
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 45
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x60,0x00,0x00,0x00,0x00,0x00, // Code for char num 46
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x80,0x01,0x80,0x01,0x80,0x00,0xC0,0x00,0x40,0x00,0x60,0x00,0x60,0x00,0x20,0x00,0x30,0x00,0x10,0x00,0x10,0x00,0x18,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 47
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x9C,0x01,0x0C,0x03,0x06,0x03,0x06,0x03,0xC6,0x03,0x66,0x03,0x1E,0x03,0x0E,0x03,0x06,0x03,0x0C,0x03,0x9C,0x01,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 48
0x00,0x00,0x00,0x00,0x00,0x60,0x7C,0x6C,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00,0x00, // Code for char num 49
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0xCC,0x01,0x86,0x01,0x06,0x01,0x80,0x01,0x80,0x01,0xC0,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0x06,0x00,0xFE,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 50
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x00,0xCC,0x01,0x86,0x01,0x80,0x01,0x80,0x01,0x70,0x00,0xC0,0x01,0x80,0x01,0x00,0x01,0x06,0x01,0x86,0x01,0xCC,0x01,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 51
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x01,0xC0,0x01,0xE0,0x01,0xB0,0x01,0xB0,0x01,0x98,0x01,0x88,0x01,0x8C,0x01,0x86,0x01,0xFE,0x03,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 52
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x03,0x08,0x00,0x08,0x00,0x08,0x00,0xFC,0x00,0x9C,0x01,0x00,0x03,0x00,0x03,0x00,0x02,0x04,0x03,0x0C,0x03,0x98,0x01,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 53
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0x38,0x00,0x0C,0x00,0x0C,0x00,0xF4,0x00,0x9E,0x01,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x0C,0x01,0xDC,0x01,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 54
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x03,0x00,0x03,0x00,0x01,0x80,0x01,0x80,0x01,0xC0,0x00,0xC0,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 55
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x9C,0x01,0x0C,0x03,0x0C,0x03,0x8C,0x01,0xF0,0x00,0x98,0x01,0x0C,0x03,0x04,0x03,0x04,0x03,0x0C,0x03,0x9C,0x01,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 56
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x00,0xDC,0x01,0x04,0x01,0x06,0x03,0x06,0x03,0x04,0x03,0x8C,0x03,0xF8,0x03,0x00,0x03,0x00,0x01,0x80,0x01,0xE0,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 57
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x60,0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x60,0x00,0x00,0x00,0x00,0x00, // Code for char num 58
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x60,0x60,0x30,0x00,0x00, // Code for char num 59
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xC0,0x01,0xF0,0x00,0x1C,0x00,0x0C,0x00,0x78,0x00,0xC0,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 60
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 61
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x1C,0x00,0xF0,0x00,0xC0,0x03,0x80,0x03,0xF0,0x00,0x3C,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 62
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x9C,0x01,0x0C,0x03,0x00,0x03,0x00,0x03,0x80,0x01,0xC0,0x00,0x60,0x00,0x60,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 63
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x98,0x01,0xE4,0x02,0xB6,0x02,0x92,0x04,0x9A,0x04,0x8A,0x04,0x8A,0x04,0xDA,0x02,0xB2,0x03,0x06,0x00,0x9C,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 64
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x70,0x00,0xD0,0x00,0xD0,0x00,0x98,0x00,0x88,0x01,0x88,0x01,0xFC,0x01,0x04,0x03,0x04,0x03,0x06,0x02,0x06,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 65
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x00,0x84,0x01,0x04,0x03,0x04,0x03,0x04,0x03,0x84,0x01,0xFC,0x00,0x84,0x03,0x04,0x03,0x04,0x02,0x04,0x03,0x84,0x03,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 66
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x9C,0x01,0x0C,0x03,0x06,0x02,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x02,0x0C,0x03,0x9C,0x01,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 67
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0xC6,0x01,0x06,0x03,0x06,0x03,0x06,0x02,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x02,0x06,0x03,0x06,0x03,0xC6,0x01,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 68
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0xFC,0x01,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 69
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x01,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 70
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x9C,0x01,0x0C,0x03,0x06,0x02,0x06,0x00,0x06,0x00,0xC6,0x03,0x06,0x02,0x06,0x02,0x06,0x02,0x0C,0x02,0x9C,0x03,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 71
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0xFE,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 72
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 73
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x06,0x03,0x86,0x01,0xCC,0x01,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 74
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x07,0x84,0x01,0x84,0x01,0xC4,0x00,0x64,0x00,0x34,0x00,0x3C,0x00,0x6C,0x00,0xC4,0x00,0x84,0x01,0x84,0x01,0x04,0x03,0x04,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 75
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 76
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x03,0x0E,0x03,0x8E,0x03,0x9E,0x02,0xD6,0x02,0xD6,0x02,0x76,0x02,0x66,0x02,0x26,0x02,0x06,0x02,0x06,0x02,0x06,0x02,0x06,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 77
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x03,0x0E,0x03,0x0E,0x03,0x1E,0x03,0x16,0x03,0x36,0x03,0x66,0x03,0x66,0x03,0xC6,0x03,0xC6,0x03,0x86,0x03,0x06,0x03,0x06,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 78
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x9C,0x01,0x0C,0x03,0x06,0x03,0x06,0x02,0x06,0x02,0x06,0x02,0x06,0x02,0x06,0x02,0x06,0x03,0x0C,0x03,0x9C,0x01,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 79
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x01,0x84,0x03,0x04,0x02,0x04,0x06,0x04,0x06,0x04,0x03,0xFC,0x01,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 80
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x9C,0x01,0x04,0x03,0x06,0x03,0x06,0x02,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x02,0x06,0x03,0x04,0x03,0x9C,0x01,0xF0,0x01,0x00,0x07,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 81
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x00,0x84,0x03,0x04,0x03,0x04,0x03,0x04,0x03,0x84,0x03,0xFC,0x01,0xC4,0x00,0x84,0x00,0x84,0x01,0x04,0x01,0x04,0x03,0x04,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 82
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x9C,0x03,0x0C,0x03,0x06,0x02,0x0C,0x00,0x1C,0x00,0xF0,0x00,0x80,0x03,0x00,0x03,0x06,0x02,0x06,0x03,0x9C,0x03,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 83
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x07,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 84
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x0C,0x03,0x9C,0x01,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 85
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x03,0x06,0x03,0x0C,0x03,0x0C,0x01,0x8C,0x01,0x88,0x01,0x98,0x00,0xD8,0x00,0xD0,0x00,0x70,0x00,0x70,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 86
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x62,0x06,0x62,0x06,0x66,0x06,0x76,0x06,0x76,0x02,0xD6,0x02,0xD6,0x02,0x94,0x02,0x94,0x03,0x9C,0x03,0x9C,0x03,0x8C,0x03,0x8C,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 87
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x07,0x0C,0x03,0x8C,0x01,0x98,0x01,0xD0,0x00,0x70,0x00,0x60,0x00,0x70,0x00,0xD0,0x00,0x98,0x01,0x8C,0x01,0x0C,0x03,0x06,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 88
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x07,0x06,0x03,0x0C,0x01,0x8C,0x01,0x98,0x00,0xD8,0x00,0x50,0x00,0x70,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 89
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x03,0x00,0x03,0x80,0x01,0xC0,0x00,0xC0,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x08,0x00,0x0C,0x00,0x06,0x00,0xFE,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 90
0x00,0x00,0x00,0xF0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xF0,0x00,0x00, // Code for char num 91
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x08,0x00,0x18,0x00,0x10,0x00,0x10,0x00,0x30,0x00,0x20,0x00,0x60,0x00,0x60,0x00,0x40,0x00,0xC0,0x00,0x80,0x00,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 92
0x00,0x00,0x00,0x70,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x70,0x00,0x00, // Code for char num 93
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x70,0x00,0x70,0x00,0xD0,0x00,0x98,0x00,0x88,0x01,0x8C,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 94
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 95
0x00,0x00,0x00,0x00,0x30,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 96
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x00,0xDC,0x01,0x04,0x03,0x00,0x03,0xF8,0x03,0x0C,0x03,0x04,0x03,0x06,0x03,0xCC,0x03,0x78,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 97
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0xF4,0x00,0x9C,0x01,0x0C,0x03,0x04,0x03,0x04,0x03,0x04,0x03,0x04,0x03,0x0C,0x03,0x9C,0x01,0xF4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 98
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x9C,0x01,0x0C,0x03,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x0C,0x03,0x9C,0x01,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 99
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x78,0x03,0x9C,0x03,0x0C,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x0C,0x03,0x9C,0x03,0x78,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 100
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x98,0x01,0x0C,0x03,0x06,0x03,0xFE,0x03,0x06,0x00,0x06,0x00,0x0C,0x02,0x9C,0x03,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 101
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x07,0x60,0x04,0x30,0x00,0x30,0x00,0xFE,0x03,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 102
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x03,0x9C,0x03,0x0C,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x0C,0x03,0x9C,0x03,0x78,0x03,0x00,0x03,0x04,0x01,0xDC,0x01,0xF8,0x00,0x00,0x00, // Code for char num 103
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0xE4,0x00,0x9C,0x01,0x0C,0x03,0x04,0x03,0x04,0x03,0x04,0x03,0x04,0x03,0x04,0x03,0x04,0x03,0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 104
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 105
0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0xF8,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x60,0x3C,0x00, // Code for char num 106
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x84,0x03,0xC4,0x00,0x64,0x00,0x34,0x00,0x3C,0x00,0x6C,0x00,0xC4,0x00,0xC4,0x00,0x84,0x01,0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 107
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 108
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBA,0x03,0x76,0x03,0x66,0x06,0x66,0x06,0x66,0x06,0x66,0x06,0x66,0x06,0x66,0x06,0x66,0x06,0x66,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 109
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF4,0x00,0x9C,0x01,0x0C,0x03,0x04,0x03,0x04,0x03,0x04,0x03,0x04,0x03,0x04,0x03,0x04,0x03,0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 110
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x9C,0x01,0x0C,0x03,0x06,0x03,0x06,0x02,0x06,0x02,0x06,0x03,0x0C,0x03,0x9C,0x01,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 111
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF4,0x00,0xDC,0x01,0x04,0x03,0x04,0x03,0x04,0x03,0x04,0x03,0x04,0x03,0x04,0x03,0xDC,0x01,0xF4,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x00,0x00, // Code for char num 112
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x03,0x9C,0x03,0x0C,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x0C,0x03,0x9C,0x03,0x78,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x00, // Code for char num 113
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD8,0x03,0x78,0x02,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 114
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x9C,0x01,0x0C,0x03,0x0C,0x00,0x78,0x00,0xE0,0x01,0x00,0x03,0x0C,0x03,0x9C,0x03,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 115
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0xFE,0x03,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x70,0x02,0xE0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 116
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x03,0x04,0x03,0x04,0x03,0x04,0x03,0x04,0x03,0x04,0x03,0x04,0x03,0x0C,0x03,0xDC,0x03,0x78,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 117
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x02,0x04,0x03,0x0C,0x01,0x8C,0x01,0x88,0x01,0x98,0x00,0xD0,0x00,0x70,0x00,0x70,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 118
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0x06,0x62,0x06,0x62,0x06,0x76,0x02,0x56,0x02,0xD4,0x02,0x94,0x03,0x9C,0x01,0x8C,0x01,0x8C,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 119
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x03,0x8C,0x01,0x98,0x01,0xF0,0x00,0x60,0x00,0x70,0x00,0xF0,0x00,0x98,0x01,0x8C,0x01,0x06,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 120
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x03,0x0C,0x03,0x8C,0x01,0x88,0x01,0x98,0x00,0xD0,0x00,0x70,0x00,0x70,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x1C,0x00,0x0E,0x00,0x00,0x00, // Code for char num 121
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0x80,0x01,0x80,0x01,0xC0,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x18,0x00,0x0C,0x00,0xFE,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 122
0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0xC0,0x00,0xC0,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x60,0x00,0x60,0x00,0x18,0x00,0x70,0x00,0x60,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0xC0,0x00,0xC0,0x00,0x80,0x01,0x00,0x00,0x00,0x00, // Code for char num 123
0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00, // Code for char num 124
0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x30,0x00,0x20,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xC0,0x00,0x80,0x01,0xC0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x00,0x00,0x00,0x00, // Code for char num 125
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x04,0x72,0x06,0xC3,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 126
0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x0F,0x00,0x00,0x00,0x00,0x00,0x00 // Code for char num 127
};
#endif
|
v0lkan/o2.js | draft/examples/widget-demo/api.widget.wwwroot/static/lib/o2.js/o2.dom.core.js | <reponame>v0lkan/o2.js
/**
* @module dom.core
* @requires core
* @requires dom.constants
* @requires dom.style
*
* <!--
* This program is distributed under
* the terms of the MIT license.
* Please see the LICENSE file for details.
*
* lastModified: 2012-06-03 00:12:56.288837
* -->
*
* <p>A cross-browser <strong>DOM</strong> manipulation helper.</p>
*/
(function(framework, document, UNDEFINED) {
'use strict';
var _ = framework.protecteds;
var attr = _.getAttr;
var alias = attr(_, 'alias');
var create = attr(_, 'create');
var def = attr(_, 'define');
var require = attr(_, 'require');
var exports = {};
/*
* Module Name
*/
var kModuleName = 'Dom';
/*
* Dom (core)
*/
var me = create(kModuleName);
/*
* Aliases
*/
var $ = require('$');
var nt = require(kModuleName, 'nodeType');
var kElementNode = attr(nt, 'ELEMENT');
var kDocumentNode = attr(nt, 'DOCUMENT');
var kText = attr(nt, 'TEXT');
var createElement = attr(document,'createElement');
var createDocumentFragment = attr(document, 'createDocumentFragment');
/*
* Common Constants
*/
var kClass = 'class';
var kClassName = 'className';
var kCss = 'css';
var kCssText = 'cssText';
var kDiv = 'div';
var kEmpty = '';
var kFunction = 'function';
var kNumber = 'number';
var kObject = 'object';
var kString = 'string';
var kStyle = 'style';
/*
* Common Regular Expression
*/
var kReturnRegExp = /\r\n|\r/g;
var kWhiteSpaceRegExp = /^\s*$/;
/*
* For creating document fragments.
*/
var tempFragmentDiv = null;
/**
* @function {static} o2.Dom.append
*
* <p>Appends the element to the bottom of its parent.</p>
*
* <p><strong>Usage example:</strong></p>
*
* <pre>
* var child = o2.$('childNode');
* var parent = o2.$('parentNode');
* o2.Dom.append(child, parent);
* </pre>
*
* @param {Object} elmChild - the child node, or the <strong>id</strong> of
* the node to append.
* @param {Object} elmParent - the parent container, or the
* <strong>id</strong> of the container.
*/
exports.append = def(me, 'append', function(elmChild, elmParent) {
var child = $(elmChild);
var parent = $(elmParent);
var temp = null;
if (!child || !parent) {
return;
}
if (typeof child === 'string') {
temp = createElement(kDiv);
parent.appendChild(temp).innerHTML = child;
return temp;
}
return parent.appendChild(child);
});
/**
* @function {static} o2.Dom.createDocumentFragment
*
* <p>Creates a <strong>Document Fragment</strong> from an
* <strong>HTML</strong> <code>String</code>.</p>
*
* <p><strong>Usage example:</strong></p>
*
* <pre>
* var frag = o2.Dom.createDocumentFragment('[div]test[/div]');
* </pre>
*
* @param {String} html - the <strong>HTML</strong> to create a fragment
* from.
*
* @return {HTMLDocumentFragment} - the amd <code>document</code>
* fragment.
*/
exports.createDocumentFragment = def(me, 'createDocumentFragment',
function(html) {
var result = createDocumentFragment();
tempFragmentDiv = tempFragmentDiv || createElement(kDiv);
tempFragmentDiv.innerHTML = html;
while (tempFragmentDiv.firstChild) {
result.appendChild(tempFragmentDiv.firstChild);
}
tempFragmentDiv = null;
return result;
});
/**
* @function {static} o2.Dom.createElement
*
* <p>Creates an element with given name and attributes.</p>
*
* <p><strong>Usage example:</strong></p>
*
* <pre>
* var el = o2.Dom.createElement(
* 'div',
* {className : 'active', style : 'font-weight : bold'}
* );
* </pre>
*
* @param {String} name - the node name of the element (i.e. 'div', 'a').
* @param {Object} attributes - an associative array in the form
* <code>{att1:value1, att2:value2}</code>.
*
* @return the created element.
*/
exports.createElement = def(me, 'createElement', function(name,
attributes) {
var e = createElement(name);
var isClass = false;
var isStyle = false;
var key = null;
var value = kEmpty;
// Internet Explorer 7- (and some minor browsers) cannot set values
// for style, class or event handlers, using setAttribute.
// Internet Explorer 8 has fixed most of these, but still cannot set
// event handlers. Internet Explorer 9 can now set these attributes
// in standards mode. A few more browsers also have trouble reading
// these attributes using getAttribute.
for (key in attributes) {
if (attributes.hasOwnProperty(key)) {
value = attributes[key];
isClass = key === kClass || key === kClassName;
isStyle = key === kStyle || key === kCss ||
key === kCssText;
if (isClass) {
e.className = value;
} else if (isStyle) {
// The string value of the style attribute is available
// as a read/write string called cssText, which is a
// property of the style object, which itself is a
// property of the element.
//
// Note, however, that it is not supported very well;
// Safari does not support it up to version 1.1 (reading
// it produces the value null)
//
// ...
//
// To avoid problems a combination of cssText and
// getAttribute/setAttribute can be used.
e.style.cssText = value;
e.setAttribute(kStyle, value);
} else {
e[key] = attributes[key];
}
}
}
return e;
});
/**
* @function {static} o2.Dom.create
*
* <p>An alias to {@link o2.Dom.createElement}.</p>
*
* @see o2.Dom.createElement
*/
exports.create = alias(me, 'create', 'createElement');
/**
* @function {static} o2.Dom.getAttribute
*
* <p>Gets the attribute of a given node.</p>
*
* <p><strong>Usage example:</strong></p>
*
* <pre>
* var uid = o2.Dom.getAttribute('container', 'data-user-id');
* </pre>
*
* @param {Object} elm - the node, or the <strong>id</strong> of the
* node, to get the attribute of.
* @param {String} attribute - the attribute to gather.
*
* @return the value of the attribute if found; <code>null</code>
* otherwise.
*/
exports.getAttribute = def(me, 'getAttribute', function(elm, attribute) {
var obj = $(elm);
if (!obj || !attribute) {
return null;
}
var value = null;
if (attribute === kClass || attribute === kClassName) {
value = obj.className;
if (value !== UNDEFINED) {
return value;
}
}
if (attribute === kStyle || attribute === kCss ||
attribute === kCssText) {
value = obj.cssText;
if (value !== UNDEFINED) {
return value;
}
}
// The DOM object (obj) may not have a getAttribute method.
if (typeof obj.getAttribute === kFunction) {
value = obj.getAttribute(attribute);
if (value !== UNDEFINED) {
return value;
}
}
return obj[attribute] || null;
});
/**
* @function {static} o2.Dom.getHtml
*
* <p>Gets the <strong>HTML</strong> of a given element.</p>
*
* <p><strong>Usage example:</strong></p>
*
* <pre>
* var html = o2.Dom.getHtml('container');
* </pre>
*
* @param {Object} elm - the <strong>DOM</strong> node or its
* <code>String</code> id.
*
* @return the <code>innerHTML</code> of the given node, if it exists;
* <code>null</code> otherwise.
*/
exports.getHtml = def(me, 'getHtml', function(elm) {
var obj = $(elm);
if (!obj) {
return null;
}
return obj.innerHTML;
});
if (document.innerText !== UNDEFINED) {
/**
* @function {static} o2.Dom.getText
*
* <p>Gets the textual content of the given node, replacing entities
* like <code>& amp;</code> with it's corresponding character
* counterpart (<strong>&</strong> in this example).</p>
*
* <p><strong>Usage example:</strong></p>
*
* <pre>
* var txt = o2.Dom.getText('container');
* </pre>
*
* @param {Object} elm - the <strong>DOM</strong> node or its
* <code>String</code> id.
*
* @return the textual content of the given node.
*/
exports.getText = def(me, 'getText', function(elm) {
var obj = $(elm);
if (!obj) {
return null;
}
var nodeType = obj.nodeType;
if (!nodeType) {
return null;
}
if (nodeType !== kElementNode && nodeType !== kDocumentNode) {
return null;
}
if (typeof obj.innerText !== kString) {
return null;
}
return obj.innerText.replace(kReturnRegExp, '');
});
} else {
exports.getText = def(me, 'getText', function(elm) {
var obj = $(elm);
if (!obj) {
return null;
}
var nodeType = obj.nodeType;
if (!nodeType) {
return null;
}
if (nodeType !== kElementNode && nodeType !== kDocumentNode) {
return null;
}
if (typeof obj.textContent !== kString) {
return null;
}
return obj.textContent;
});
}
/**
* @function {static} o2.Dom.insertAfter
*
* <p>Adds the node after the reference node.</p>
*
* <p><strong>Usage example:</strong></p>
*
* <pre>
* var ref = o2.$('ref');
* var new = o2.$('new');
* o2.Dom.insertAfter(new, ref);
* </pre>
*
* @param {Object} elmNewNode - the DOM node, or the <strong>id</strong> of
* the node, to insert after.
* @param {Object} elmRefNode - the reference node, or the
* <strong>id</strong> of the node.
*/
exports.insertAfter = def(me, 'insertAfter', function(elmNewNode, elmRefNode) {
var newNode = $(elmNewNode);
var refNode = $(elmRefNode);
if (!newNode || !refNode) {
return;
}
var obj = refNode.parentNode;
if (refNode.nextSibling) {
obj.insertBefore(newNode, refNode.nextSibling);
return;
}
obj.appendChild(newNode);
});
/**
* @function {static} o2.Dom.insertBefore
*
* <p>Adds the node before the reference node.</p>
*
* <p><strong>Usage example:</strong></p>
*
* <pre>
* var ref = o2.$('ref');
* var new = o2.$('new');
* o2.Dom.insertBefore(new, ref);
* </pre>
*
* @param {Object} elmNewNode - the node, or the <strong>id</strong> of the
* node, to insert before.
* @param {Object} elmRefNode - the reference, or the <strong>id</strong> of
* the node.
*/
exports.insertBefore = def(me, 'insertBefore', function(elmNewNode,
elmRefNode) {
var newNode = $(elmNewNode);
var refNode = $(elmRefNode);
if (!newNode || !refNode) {
return;
}
var obj = refNode.parentNode;
obj.insertBefore(newNode, refNode);
});
/**
* @function {static} o2.Dom.isDocument
*
* <p>Checks whether the given node is a <code>document</code> node.</p>
*
* <p><strong>Usage example:</strong></p>
*
* <pre>
* var isDocument = o2.Dom.isDocument(currentNode);
* </pre>
*
* @param {DOMNode} obj - the <strong>node</strong> to test.
*
* @return <code>true</code> if the <strong>node</strong> is the
* <code>document</code> element; <code>false</code> otherwise.
*/
exports.isDocument = def(me, 'isDocument', function(obj) {
return !!(obj && obj.nodeType === kElementNode);
});
/**
* @function {static} o2.Dom.isElement
*
* <p>Checks whether the given node is an <strong>element</strong> node.</p>
*
* <p><strong>Usage example:</strong></p>
*
* <pre>
* var isElement = o2.Dom.isElement(currentNode);
* </pre>
*
* @param {DOMNode} obj - the <strong>node</strong> to test.
*
* @return <code>true</code> if the <strong>node</strong> is an
* <strong>element</strong> node; <code>false</code> otherwise.
*/
exports.isElement = def(me, 'isElement', function(obj) {
return !!(obj && obj.nodeType === kElementNode);
});
/**
*
*/
//TODO: add documentation.
exports.isNode = def(me, 'isNode', function(obj) {
return (
typeof window.Node === 'object' ?
// DOM Level 2
obj instanceof window.Node :
obj && typeof obj === kObject &&
typeof obj.nodeType === kNumber &&
typeof obj.nodeName === kString
);
});
/**
* @function {static} o2.Dom.prepend
*
* <p>Prepends the element to the top of its parent.</p>
*
* <p><strong>Usage example:</strong></p>
*
* <pre>
* var child = o2.$('ChildContainer');
* var parent = o2.$('MasterContainer');
* o2.Dom.prepend(child, parent);
* </pre>
*
* @param {Object} elmChild - the child node, or the id of the node to
* prepend.
* @param {Object} elmParent - the parent container, or the id of the
* container.
*/
exports.prepend = def(me, 'prepend', function(elmChild, elmParent) {
var child = $(elmChild);
var parent = $(elmParent);
if (!child || !parent) {
return;
}
if (typeof child === kString) {
var temp = createElement(kDiv);
temp.innerHTML = child;
if (parent.childNodes.length === 0) {
return parent.appendChild(temp);
}
return parent.insertBefore(child, parent.childNodes[0]);
}
if (parent.childNodes.length === 0) {
return parent.appendChild(child);
}
return parent.insertBefore(child, parent.childNodes[0]);
});
/**
* @function {static} o2.Dom.remove
*
* <p>Removes the element from the <strong>DOM</strong> flow.</p>
*
* <p><strong>Usage example:</strong></p>
*
* <pre>
* o2.Dom.remove('nagivation');
* </pre>
*
* @param {Object} e - either the <strong>element</strong>, or the
* <strong>id</strong> of it, to remove.
*
* @return the removed node.
*/
exports.remove = def(me, 'remove', function(e) {
var elm = $(e);
if (!elm) {
return null;
}
elm.parentNode.removeChild(elm);
return elm;
});
/**
* @function {static} o2.Dom.removeNode
*
* <p>An <strong>alias</strong> to {@link o2.Dom.remove}.</p>
*
* @see o2.Dom.remove
*/
exports.removeNode = alias(me, 'removeNode', 'remove');
/**
* @function {static} o2.Dom.removeChildren
*
* <p>Removes all the children of the element.</p>
*
* <p><strong>Usage example:</strong></p>
*
* <pre>
* o2.Dom.removeChildren('container');
* </pre>
*
* @param {Object} e - either the <strong>element</strong>, or the
* <strong>id</strong> of it to process.
*/
exports.removeChildren = def(me, 'removeChildren', function(elm) {
var node = $(elm);
if (!node) {
return;
}
node.innerHTML = kEmpty;
});
/**
* @function {static} o2.Dom.empty
*
* <p>An <strong>alias</strong> to {@link o2.Dom.removeChildren}.</p>
*
* @param {Object} elm - either the <strong>element</strong>, or the
* <strong>id</strong> of it to process.
*/
exports.empty = alias(me, 'empty', 'removeChildren');
/**
* @function {static} o2.Dom.removeEmptyTextNodes
*
* <p>Removes empty text nodes from the element.</p>
* <p>Note that this removal is not recursive; only the first-level empty
* child nodes of the element will be removed.</p>
*
* <p><strong>Usage example:</strong></p>
*
* <pre>
* o2.Dom.removeEmptyTextNodes('container');
* </pre>
*
* @param {Object} e - either the <strong>element</strong>, or the
* <strong>id</strong> of it to process.
*/
exports.removeEmptyTextNodes = def(me, 'removeEmptyTextNodes', function(e) {
var arRemove = [];
var child = null;
var elm = $(e);
var i = 0;
var shouldRemove = false;
if (!elm) {
return;
}
var children = elm.childNodes;
var len = children.length;
for (i = 0; i < len; i++) {
child = children[i];
if (!child.hasChildNodes()) {
shouldRemove = child.nodeType === kText &&
kWhiteSpaceRegExp.test(child.nodeValue);
if (shouldRemove) {
arRemove.push(child);
}
}
}
for (i = 0, len = arRemove.length; i < len; i++) {
child = arRemove[i];
child.parentNode.removeChild(child);
}
});
/**
* @function {static} o2.Dom.removeEmpty
*
* <p>An <strong>alias</strong> to
* {@link o2.Dom.removeEmptyTextNodes}.</p>
*
* @see o2.Dom.removeEmptyTextNodes
*/
exports.removeEmpty = alias(me, 'removeEmpty', 'removeEmptyTextNodes');
/**
* @function {static} o2.Dom.setAttribute
*
* <p>Sets the attribute of the given object.</p>
*
* <p><strong>Usage example:</strong></p>
*
* <pre>
* o2.Dom.setAttribute('container', 'data-user-id', '123');
* </pre>
*
* @param {Object} elm - the object or the <code>String</code> id of it.
* @param {String} attribute - the name of the attribute.
* @param {String} value - the value of the attribute.
*/
exports.setAttribute = def(me, 'setAttribute', function(elm, attribute,
value) {
var obj = $(elm);
if (!obj || !attribute) {
return;
}
if (attribute === kClass || attribute === kClassName){
obj.className = value;
return;
}
if (typeof obj.setAttribute === kFunction) {
obj.setAttribute(attribute, value);
return;
}
obj[attribute] = value;
});
/**
* @function {static} o2.Dom.setHtml
*
* <p>Simply sets the <code>innerHTML</code> of the element.
*
* <p><strong>Usage example:</strong></p>
*
* <pre>
* o2.Dom.setHtml('container', '[h1]hello[/h1]');
* </pre>
*
* @param {Object} elm - The <strong>DOM</strong> element to set the
* <strong>HTML</strong> of, or its <code>String</code> id.
*/
exports.setHtml = def(me, 'setHtml', function(elm, html) {
var obj = $(elm);
if (!obj) {
return;
}
obj.innerHTML = html;
});
}(this.o2, this.document));
|
wohaaitinciu/zpublic | 3rdparty/stlsoft/include/winstl/toolhelp/error/exceptions.hpp | /* /////////////////////////////////////////////////////////////////////////
* File: winstl/toolhelp/error/exceptions.hpp
*
* Purpose: Exception classes for TOOLHELP components.
*
* Created: 21st May 2005
* Updated: 10th August 2009
*
* Thanks: To Pablo for contributing this great library.
*
* Home: http://stlsoft.org/
*
* Copyright (c) 2005-2009, <NAME>
* Copyright (c) 2006-2007, <NAME>
* 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(s) of <NAME> and Synesis Software, nor Pablo
* Aguilar, nor the names of any contributors may be used to endorse or
* promote products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* ////////////////////////////////////////////////////////////////////// */
/** \file winstl/toolhelp/error/exceptions.hpp
*
* \brief [C++ only] Exception classes for the
* (\ref group__library__windows_toolhelp "Windows ToolHelp" Library).
*/
#ifndef WINSTL_INCL_WINSTL_TOOLHELP_ERROR_HPP_SEQUENCE_EXCEPTION
#define WINSTL_INCL_WINSTL_TOOLHELP_ERROR_HPP_SEQUENCE_EXCEPTION
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define WINSTL_VER_WINSTL_TOOLHELP_ERROR_HPP_SEQUENCE_EXCEPTION_MAJOR 2
# define WINSTL_VER_WINSTL_TOOLHELP_ERROR_HPP_SEQUENCE_EXCEPTION_MINOR 0
# define WINSTL_VER_WINSTL_TOOLHELP_ERROR_HPP_SEQUENCE_EXCEPTION_REVISION 2
# define WINSTL_VER_WINSTL_TOOLHELP_ERROR_HPP_SEQUENCE_EXCEPTION_EDIT 13
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
* Includes
*/
#ifndef WINSTL_INCL_WINSTL_H_WINSTL
# include <winstl/winstl.h>
#endif /* !WINSTL_INCL_WINSTL_H_WINSTL */
#ifdef STLSOFT_CF_PRAGMA_ONCE_SUPPORT
# pragma once
#endif /* STLSOFT_CF_PRAGMA_ONCE_SUPPORT */
#ifndef WINSTL_INCL_WINSTL_ERROR_HPP_WINDOWS_EXCEPTIONS
# include <winstl/error/exceptions.hpp>
#endif /* !WINSTL_INCL_WINSTL_ERROR_HPP_WINDOWS_EXCEPTIONS */
#ifndef STLSOFT_INCL_H_TLHELP32
# define STLSOFT_INCL_H_TLHELP32
# include <tlhelp32.h>
#endif /* !STLSOFT_INCL_H_TLHELP32 */
/* /////////////////////////////////////////////////////////////////////////
* Namespace
*/
#ifndef _WINSTL_NO_NAMESPACE
# if defined(_STLSOFT_NO_NAMESPACE) || \
defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
/* There is no stlsoft namespace, so must define ::winstl */
namespace winstl
{
# else
/* Define stlsoft::winstl_project */
namespace stlsoft
{
namespace winstl_project
{
# endif /* _STLSOFT_NO_NAMESPACE */
#endif /* !_WINSTL_NO_NAMESPACE */
/* /////////////////////////////////////////////////////////////////////////
* Classes
*/
/** \brief Root exception thrown by
* the \ref group__library__windows_toolhelp "ToolHelp" Library.
*
* \ingroup group__library__windows_toolhelp
*/
struct toolhelp_exception
: public windows_exception
{
/// \name Member Types
/// @{
public:
typedef windows_exception parent_class_type;
typedef toolhelp_exception class_type;
typedef parent_class_type::error_code_type error_code_type;
/// @}
/// \name Construction
/// @{
public:
/// \brief Constructs an instance from the given error code
///
/// \param err The error code that is passed to the parent class (winstl::windows_exception) constructor
ss_explicit_k toolhelp_exception(error_code_type err)
: parent_class_type(err)
{}
/// \brief Constructs an instance from the given message and error code
///
/// \param reason The reason that is passed to the parent class (winstl::windows_exception) constructor
/// \param err The error code that is passed to the parent class (winstl::windows_exception) constructor
toolhelp_exception(char const* reason, error_code_type err)
: parent_class_type(reason, err)
{}
/// @}
};
/* ////////////////////////////////////////////////////////////////////// */
#ifndef _WINSTL_NO_NAMESPACE
# if defined(_STLSOFT_NO_NAMESPACE) || \
defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
} // namespace winstl
# else
} // namespace winstl_project
} // namespace stlsoft
# endif /* _STLSOFT_NO_NAMESPACE */
#endif /* !_WINSTL_NO_NAMESPACE */
/* ////////////////////////////////////////////////////////////////////// */
#endif // WINSTL_INCL_WINSTL_TOOLHELP_ERROR_HPP_SEQUENCE_EXCEPTION
/* ///////////////////////////// end of file //////////////////////////// */
|
taowu750/LeetCodeJourney | src/training/binarysearch/E1044_Hard_LongestDuplicateSubstring.java | package training.binarysearch;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import java.util.HashMap;
import java.util.Map;
import java.util.function.UnaryOperator;
/**
* 1044. 最长重复子串: https://leetcode-cn.com/problems/longest-duplicate-substring/
*
* 给出一个字符串 S,考虑其所有重复子串(S 的连续子串,出现两次或多次,可能会有重叠)。
* 返回「任何」具有最长可能长度的重复子串。(如果 S 不含重复子串,那么答案为 ""。)
*
* 例 1:
* 输入:"banana"
* 输出:"ana"
*
* 例 2:
* 输入:"abcd"
* 输出:""
*
* 约束:
* - 2 <= S.length <= 10^5
* - S 由小写英文字母组成。
*/
public class E1044_Hard_LongestDuplicateSubstring {
static void test(UnaryOperator<String> method) {
Assertions.assertEquals("ana", method.apply("banana"));
Assertions.assertEquals("", method.apply("abcd"));
Assertions.assertEquals("a", method.apply("aa"));
}
public String longestDupSubstring(String s) {
int n = s.length();
// dp[i][j] 表示以 i 开头和以 j 开头的最长重复子串的长度。
// 其中 i > j,因为不能让它们有一样的位置
int[][] dp = new int[n + 1][n];
int start = 0, maxLen = 0;
// 扫描下三角
for (int i = n - 1; i > 0; i--) {
for (int j = i - 1; j >= 0; j--) {
if (s.charAt(i) == s.charAt(j))
dp[i][j] = dp[i + 1][j + 1] + 1;
if (dp[i][j] > maxLen) {
maxLen = dp[i][j];
start = j;
}
}
}
return maxLen > 0 ? s.substring(start, start + maxLen) : "";
}
@Test
public void testLongestDupSubstring() {
test(this::longestDupSubstring);
}
/**
* 超时。s 长度最大有 10**5。
*/
public String compressMethod(String s) {
int n = s.length();
int[] dp = new int[n];
int start = 0, maxLen = 0;
for (int i = n - 1; i > 0; i--) {
// 左边的状态依赖右边的状态,所以需要从左到右遍历
for (int j = 0; j <= i - 1; j++) {
if (s.charAt(i) == s.charAt(j))
dp[j] = dp[j + 1] + 1;
else
// 注意重置为 0
dp[j] = 0;
if (dp[j] > maxLen) {
maxLen = dp[j];
start = j;
}
}
}
return maxLen > 0 ? s.substring(start, start + maxLen) : "";
}
@Test
public void testCompressMethod() {
test(this::compressMethod);
}
/**
* 二分查找结合 Rabin-Karp 算法,参见:
* https://leetcode-cn.com/problems/longest-duplicate-substring/solution/zui-chang-zhong-fu-zi-chuan-by-leetcode/
*
* LeetCode 耗时:374 ms - 16.04%
* 内存消耗:46.6 MB - 52.94%
*/
public String binaryAndRKMethod(String s) {
// s 只包含小写字符,将其转化为 0-25 的数字
int n = s.length();
int[] sequence = new int[n];
for (int i = 0; i < n; i++) {
sequence[i] = s.charAt(i) - 'a';
}
long modulus = (long) Integer.MAX_VALUE + 1;
int lo = 1, hi = n - 1, start = -1, maxLen = 0;
while (lo <= hi) {
int mid = (lo + hi) >>> 1;
int st = rabinKarpSearch(sequence, mid, 26, modulus);
if (st != -1) {
lo = mid + 1;
if (mid > maxLen) {
start = st;
maxLen = mid;
}
} else
hi = mid - 1;
}
return start != -1 ? s.substring(start, start + maxLen) : "";
}
/**
* Radin-Karp 算法。
*
* @param sequence 序列
* @param searchLen 要查找的子序列长度
* @param radix 序列的基数
* @param modulus 模数,限定计算的哈希值的范围,防止其过大溢出
* @return 重复字符串的开始下标
*/
private int rabinKarpSearch(int[] sequence, int searchLen, int radix, long modulus) {
// 先计算出前面 searchLen 的子序列哈希值
long h = 0;
for (int i = 0; i < searchLen; i++) {
h = (h * radix + sequence[i]) % modulus;
}
// 计算 radix 的 searchLen 次方
long radixL = 1;
for (int i = 0; i < searchLen; i++) {
radixL = (radixL * radix) % modulus;
}
// 保存访问过的哈希值和下标
Map<Long, Integer> visited = new HashMap<>();
visited.put(h, 0);
int n = sequence.length;
for (int i = 1; i < n - searchLen + 1; i++) {
h = (h * radix - sequence[i - 1] * radixL % modulus + modulus) % modulus;
h = (h + sequence[i + searchLen - 1]) % modulus;
int idx = visited.getOrDefault(h, -1);
// 哈希值相同还要计算子序列是否相等,因为有哈希碰撞的可能性
if (idx != -1 && eq(sequence, idx, i, searchLen))
return i;
visited.put(h, i);
}
return -1;
}
private boolean eq(int[] sequence, int i, int j, int len) {
while (len-- > 0) {
if (sequence[i++] != sequence[j++])
return false;
}
return true;
}
@Test
public void testBinaryAndRKMethod() {
test(this::binaryAndRKMethod);
}
}
|
cybervisiontech/coopr | coopr-e2e/test/e2e/redirects.js | /**
* e2e tests for generic redirects
*/
describe('redirects', function() {
it('should show a soft 404 when navigatin to /whatever', function() {
browser.get('/whatever');
expect(
browser.getLocationAbsUrl()
).toMatch(/\/whatever$/);
expect(
element(by.css('main .jumbotron')).getText()
).toContain("Page not found");
});
it('should show a real 404 for static paths', function() {
// there is no angular here, so we have to use the driver directly
browser.driver.get(browser.baseUrl + 'assets/bundle/foo.bar');
expect(
browser.driver.getCurrentUrl()
).toMatch(/\/assets\/bundle\/foo.bar$/);
expect(
browser.driver.getPageSource()
).toContain('Cannot GET /assets/bundle/foo.bar');
});
it('should go to login when navigated to /signin', function() {
browser.get('/signin');
expect(
browser.getLocationAbsUrl()
).toMatch(/\/login$/);
});
});
|
justacoder/mica | src/core/MiAttributes.java | <reponame>justacoder/mica
/*
***************************************************************************
* Mica - the Java(tm) Graphics Framework *
***************************************************************************
* NOTICE: Permission to use, copy, and modify this software and its *
* documentation is hereby granted provided that this notice appears in *
* all copies. *
* *
* Permission to distribute un-modified copies of this software and its *
* documentation is hereby granted provided that no fee is charged and *
* that this notice appears in all copies. *
* *
* SOFTWARE FARM MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE *
* SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT *
* NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR *
* A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SOFTWARE FARM SHALL NOT BE *
* LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR *
* CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE, MODIFICATION OR *
* DISTRIBUTION OF THIS SOFTWARE OR ITS DERIVATIVES. *
* *
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND *
* DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, *
* UPDATES, ENHANCEMENTS, OR MODIFICATIONS. *
* *
***************************************************************************
* Copyright (c) 1997-2004 Software Farm, Inc. All Rights Reserved. *
***************************************************************************
*/
package com.swfm.mica;
import com.swfm.mica.util.Utility;
import com.swfm.mica.util.Strings;
import com.swfm.mica.util.CaselessKeyHashtable;
import java.awt.Color;
import java.awt.Image;
import java.awt.Font;
/**----------------------------------------------------------------------------------------------
* Instances of this class contain a number of attributes (about 64 at
* this writing). There are a large number of methods to get and set
* the values of these attributes.
* <p>
* Instances can be mutable or immutable (the default). If immutable,
* then values of attributes cannot be set directly. Instead, the
* methods to set the values of attributes return a new instance of
* MiAttributes, a copy of the original but with a particular attribute
* value modified.
* <p>
* In order to set the value of a _mutable_ attribute use the setStaticXXX
* methods.
* <p>
* A number of the advanced methods use attribute 'indexes'. See the
* MiiAttributeTypes file for a list of attribute indexes.
*
* @version %I% %G%
* @author <NAME>
* @release 1.4.1
* @module %M%
* @language Java (JDK 1.4)
*----------------------------------------------------------------------------------------------*/
public class MiAttributes extends MiGeneralAttributes implements MiiTypes, MiiAttributeTypes, MiiPropertyTypes, MiiNames
{
// private static MiFont defaultFont = new MiFont("TimesRoman", MiFont.PLAIN, 12);
// public static MiFont defaultFont = new MiFont("Courier", MiFont.PLAIN, 12);
// public static MiFont defaultFont = new MiFont("serif", MiFont.PLAIN, 12);
// public static MiFont defaultFont = new MiFont("Monospaced", MiFont.PLAIN, 12);
// public static MiFont defaultFont = new MiFont("SansSerif", MiFont.PLAIN, 12);
private static MiFont defaultFont = new MiFont("Dialog", MiFont.PLAIN, 12);
private static int numCreated = 0;
private static MiAttributeCache cache = new MiAttributeCache();
private static MiAttributes defaultAttributes = new MiAttributes(0);
private static MiLineEndsRenderer defaultLineEndsRenderer;
private static MiBorderLookRenderer defaultBorderRenderer;
private static MiiShadowRenderer defaultShadowRenderer;
private static CaselessKeyHashtable attributeNames;
private static CaselessKeyHashtable fontAttributeNames;
private static MiPropertyDescriptions propertyDescriptions;
private static MiChangedAttributes changedAttributes = new MiChangedAttributes();
private static MiAttributes complexXorResult = new MiAttributes(false);
private static final int Mi_FONT_NAME = 0;
private static final int Mi_FONT_SIZE = 1;
private static final int Mi_FONT_BOLD = 2;
private static final int Mi_FONT_ITALIC = 3;
private static final int Mi_FONT_UNDERLINED = 4;
private static final int Mi_FONT_STRIKEOUT = 5;
/**------------------------------------------------------
* Constructs a new immutable MiAttributes.
*------------------------------------------------------*/
public MiAttributes()
{
this(true);
}
/**------------------------------------------------------
* Constructs a new MiAttributes.
* @param isImmutable true if immutable
*------------------------------------------------------*/
public MiAttributes(boolean isImmutable)
{
super(isImmutable,
Mi_NUMBER_OF_ATTRIBUTES,
Mi_START_OBJECT_INDEX, Mi_NUM_OBJECT_INDEXES,
Mi_START_INTEGER_INDEX, Mi_NUM_INTEGER_INDEXES,
Mi_START_DOUBLE_INDEX, Mi_NUM_DOUBLE_INDEXES,
Mi_START_BOOLEAN_INDEX, Mi_NUM_BOOLEAN_INDEXES);
directCopy(defaultAttributes);
}
/**------------------------------------------------------
* For debugging, return the number and a description of
* all of the attributes created so far.
* @return a textual description of the
* attribute cache
* @overrides MiGeneralAttributes#cacheToString
*------------------------------------------------------*/
public String cacheToString()
{
return("Number of graphics attributes created: " + numCreated
+ "\nNumber of unique graphics attributes cached:"
+ getCache().getNumberOfCachedAttributes()
+ "\nCache = " + getCache().toString());
}
public static void setDefaultAttributes(MiAttributes atts)
{
defaultAttributes = atts;
}
public static MiAttributes getDefaultAttributes()
{
return(defaultAttributes);
}
/**------------------------------------------------------
* Gets the index of the attribute with the given name.
* @return the index or -1, if no such attribute
* @overrides MiGeneralAttributes#getIndexOfAttributeName
*------------------------------------------------------*/
public int getIndexOfAttributeName(String name)
{
if (attributeNames == null)
{
buildSpacelessAttributeNames();
}
Integer index = (Integer )attributeNames.get(name);
if (index != null)
{
return(index.intValue());
}
return(-1);
}
protected void buildSpacelessAttributeNames()
{
attributeNames = new CaselessKeyHashtable();
for (int i = 0; i < MiiNames.attributeNames.length; ++i)
{
// Add the name both with and without spaces...
String str = MiiNames.attributeNames[i];
Integer attIndex = new Integer(i);
attributeNames.put(str, attIndex);
if (str.indexOf(' ') != -1)
attributeNames.put(Utility.replaceAll(str, " ", ""), attIndex);
}
fontAttributeNames = new CaselessKeyHashtable();
String str = Mi_FONT_NAME_ATT_NAME;
Integer attIndex = new Integer(Mi_FONT_NAME);
fontAttributeNames.put(str, attIndex);
if (str.indexOf(' ') != -1)
fontAttributeNames.put(Utility.replaceAll(str, " ", ""), attIndex);
str = Mi_FONT_SIZE_ATT_NAME;
attIndex = new Integer(Mi_FONT_SIZE);
fontAttributeNames.put(str, attIndex);
if (str.indexOf(' ') != -1)
fontAttributeNames.put(Utility.replaceAll(str, " ", ""), attIndex);
str = Mi_FONT_BOLD_ATT_NAME;
attIndex = new Integer(Mi_FONT_BOLD);
fontAttributeNames.put(str, attIndex);
if (str.indexOf(' ') != -1)
fontAttributeNames.put(Utility.replaceAll(str, " ", ""), attIndex);
str = Mi_FONT_ITALIC_ATT_NAME;
attIndex = new Integer(Mi_FONT_ITALIC);
fontAttributeNames.put(str, attIndex);
if (str.indexOf(' ') != -1)
fontAttributeNames.put(Utility.replaceAll(str, " ", ""), attIndex);
str = Mi_FONT_UNDERLINED_ATT_NAME;
attIndex = new Integer(Mi_FONT_UNDERLINED);
fontAttributeNames.put(str, attIndex);
if (str.indexOf(' ') != -1)
fontAttributeNames.put(Utility.replaceAll(str, " ", ""), attIndex);
str = Mi_FONT_STRIKEOUT_ATT_NAME;
attIndex = new Integer(Mi_FONT_STRIKEOUT);
fontAttributeNames.put(str, attIndex);
if (str.indexOf(' ') != -1)
fontAttributeNames.put(Utility.replaceAll(str, " ", ""), attIndex);
}
/**------------------------------------------------------
* Gets the name of the attribute specified by the given
* index. This name may have spaces in it.
* @param index the index of an attribute
* @return the name of the attribute
* @overrides MiGeneralAttributes#getNameOfAttribute
*------------------------------------------------------*/
public String getNameOfAttribute(int index)
{
return(MiiNames.attributeNames[index]);
}
/**------------------------------------------------------
* Gets whether an attribute with the given name exists.
* @return true if such an attribute exists.
*------------------------------------------------------*/
public boolean hasAttribute(String name)
{
if (super.hasAttribute(name))
return(true);
if ((Mi_FONT_NAME_ATT_NAME.equalsIgnoreCase(name))
|| (Mi_FONT_SIZE_ATT_NAME.equalsIgnoreCase(name))
|| (Mi_FONT_BOLD_ATT_NAME.equalsIgnoreCase(name))
|| (Mi_FONT_ITALIC_ATT_NAME.equalsIgnoreCase(name))
|| (Mi_FONT_UNDERLINED_ATT_NAME.equalsIgnoreCase(name))
|| (Mi_FONT_STRIKEOUT_ATT_NAME.equalsIgnoreCase(name)))
{
return(true);
}
return(false);
}
/**------------------------------------------------------
* Makes and returns a copy of this MiAttributes.
* @return the copy
*------------------------------------------------------*/
public MiAttributes copy()
{
return((MiAttributes )makeCopy());
}
//***************************************************************************************
// Set attribute on MUTABLE MiAttributes
//***************************************************************************************
/**------------------------------------------------------
* Sets the attribute specified by the given index to the
* specified value. This method, like all setStaticXXX
* methods, are to be used with mutable MiAttributes only.
* @param which the index of the attribute
* @param color the new value of the attribute
* @exception IllegalArgumentException invalid
* color attribute index
* @exception RuntimeException attempt to modify
* immutable attributes
*------------------------------------------------------*/
public void setStaticAttribute(int which, Color color)
{
if ((which < Mi_START_COLOR_INDEX) || (which > Mi_START_COLOR_INDEX + Mi_NUM_COLOR_INDEXES - 1))
{
throw new IllegalArgumentException("Invalid Color attribute index");
}
if (isImmutable())
{
throw new RuntimeException("Attempt to modify immutable attributes");
}
super.setStaticAttribute(which, color);
}
/**------------------------------------------------------
* Gets the value of the attribute specified by the given
* index.
* @param index the index of an attribute
* @return the value of the attribute
*------------------------------------------------------*/
public Color getColorAttribute(int which)
{
return((Color )getAttribute(which));
}
/**------------------------------------------------------
* Sets the attribute specified by the given index to the
* specified value. This method, like all setStaticXXX
* methods, are to be used with mutable MiAttributes only.
* @param which the index of the attribute
* @param image the new value of the attribute
* @exception IllegalArgumentException invalid
* image attribute index
* @exception RuntimeException attempt to modify
* immutable attributes
*------------------------------------------------------*/
public void setStaticAttribute(int which, Image image)
{
if ((which < Mi_START_IMAGE_INDEX) || (which >= Mi_START_IMAGE_INDEX + Mi_NUM_IMAGE_INDEXES - 1))
{
throw new IllegalArgumentException("Invalid Color attribute index");
}
if (isImmutable())
{
throw new RuntimeException("Attempt to modify immutable attributes");
}
super.setStaticAttribute(which, image);
}
/**------------------------------------------------------
* Gets the value of the attribute specified by the given
* index.
* @param index the index of an attribute
* @return the value of the attribute
*------------------------------------------------------*/
public Image getImageAttribute(int which)
{
return((Image )getAttribute(which));
}
//***************************************************************************************
// Set attribute on the given MiParts by assigning a new MiAttributes to the object.
//***************************************************************************************
public void setAttributeForObject(MiPart part, int which, Object object)
{
MiAttributes atts = (MiAttributes )getModifiedAttributes(which, object);
part.setAttributes(atts);
}
public void setAttributeForObject(MiPart part, int which, int value)
{
MiAttributes atts = (MiAttributes )getModifiedAttributes(which, value);
part.setAttributes(atts);
}
public void setAttributeForObject(MiPart part, int which, double value)
{
MiAttributes atts = (MiAttributes )getModifiedAttributes(which, value);
part.setAttributes(atts);
}
public void setAttributeForObject(MiPart part, int which, boolean value)
{
MiAttributes atts = (MiAttributes )getModifiedAttributes(which, value);
part.setAttributes(atts);
}
public void setAttributeForObject(MiPart part, String name, String value)
{
MiAttributes atts = (MiAttributes )getModifiedAttributes(name, value);
part.setAttributes(atts);
}
public void setAttributeValue(MiPart part, String name, Object value)
{
int index = getIndexOfAttribute(name);
MiAttributes atts = (MiAttributes )getModifiedAttributes(index, value);
part.setAttributes(atts);
}
public void setAttributeValue(MiPart part, String name, int value)
{
int index = getIndexOfAttribute(name);
MiAttributes atts = (MiAttributes )getModifiedAttributes(index, value);
part.setAttributes(atts);
}
public void setAttributeValue(MiPart part, String name, double value)
{
int index = getIndexOfAttribute(name);
MiAttributes atts = (MiAttributes )getModifiedAttributes(index, value);
part.setAttributes(atts);
}
public void setAttributeValue(MiPart part, String name, boolean value)
{
MiAttributes atts;
if (name.equals(Mi_FONT_BOLD_ATT_NAME))
{
atts = setFont(((MiFont )objectAttributes[Mi_FONT]).setBold(value));
}
else if (name.equals(Mi_FONT_ITALIC_ATT_NAME))
{
atts = setFont(((MiFont )objectAttributes[Mi_FONT]).setItalic(value));
}
else if (name.equals(Mi_FONT_UNDERLINED_ATT_NAME))
{
atts = setFont(((MiFont )objectAttributes[Mi_FONT]).setUnderlined(value));
}
else if (name.equals(Mi_FONT_STRIKEOUT_ATT_NAME))
{
atts = setFont(((MiFont )objectAttributes[Mi_FONT]).setStrikeOut(value));
}
else
{
int index = getIndexOfAttribute(name);
atts = (MiAttributes )getModifiedAttributes(index, value);
}
part.setAttributes(atts);
}
public void setAttributeValue(MiPart part, String name, String value)
{
MiAttributes atts = setAttributeValue(name, value);
part.setAttributes(atts);
}
public MiAttributes setAttributeValue(String name, String value)
{
if ((value != null)
&& ((Mi_NULL_VALUE_NAME.equalsIgnoreCase(value)) || ("null".equalsIgnoreCase(value))))
{
value = null;
}
MiAttributes atts;
int index = -1;
if (attributeNames == null)
{
buildSpacelessAttributeNames();
}
Integer indexInt = (Integer )fontAttributeNames.get(name);
if (indexInt != null)
{
index = indexInt.intValue();
if (index == Mi_FONT_NAME)
{
return(setFont(((MiFont )objectAttributes[Mi_FONT]).setName(value)));
}
if (index == Mi_FONT_SIZE)
{
return(setFont(((MiFont )objectAttributes[Mi_FONT]).setPointSize(
Utility.toInteger(value))));
}
if (index == Mi_FONT_BOLD)
{
return(setFont(((MiFont )objectAttributes[Mi_FONT]).setBold(
Utility.toBoolean(value))));
}
if (index == Mi_FONT_ITALIC)
{
return(setFont(((MiFont )objectAttributes[Mi_FONT]).setItalic(
Utility.toBoolean(value))));
}
if (index == Mi_FONT_UNDERLINED)
{
return(setFont(((MiFont )objectAttributes[Mi_FONT]).setUnderlined(
Utility.toBoolean(value))));
}
if (index == Mi_FONT_STRIKEOUT)
{
return(setFont(((MiFont )objectAttributes[Mi_FONT]).setStrikeOut(
Utility.toBoolean(value))));
}
}
indexInt = (Integer )attributeNames.get(name);
if (indexInt != null)
index = indexInt.intValue();
else
throw new IllegalArgumentException("\"" + name + "\" is not a valid name of an attribute");
if (index == Mi_FONT)
{
return(setFont(MiFontManager.findFont(value)));
}
if ((index >= Mi_START_COLOR_INDEX) && (index < Mi_START_COLOR_INDEX + Mi_NUM_COLOR_INDEXES))
{
atts = (MiAttributes )getModifiedAttributes(index, MiColorManager.getColor(value));
return(atts);
}
if ((index == Mi_BACKGROUND_IMAGE) || (index == Mi_BACKGROUND_TILE))
{
if (value == null)
{
atts = (MiAttributes )getModifiedAttributes(index, null);
}
else
{
MiImage image = new MiImage(value);
atts = (MiAttributes )getModifiedAttributes(index, image.getImage());
}
return(atts);
}
if ((index == Mi_TOOL_HINT_HELP) || (index == Mi_BALLOON_HELP)
|| (index == Mi_STATUS_HELP) || (index == Mi_DIALOG_HELP))
{
// ?????? why not? 9-8-2003 MiDebug.printStackTrace("ERROR - Setting help on attributes no longer supported");
atts = (MiAttributes )getModifiedAttributes(index, value != null ? new MiHelpInfo(value) : null);
}
else
{
atts = (MiAttributes )getModifiedAttributes(name, value);
}
return(atts);
}
/**------------------------------------------------------
* Gets the value of the attribute with the given name
* as a text string. This will be object.toString() for
* object-value attributes, MiiTypes.Mi_NULL_VALUE_NAME
* for null valued object-value attributes, otherwise it
* will be the value in text format.
* @return the value as a string
* @overrides MiGeneralAttributes#getAttributeValue
*------------------------------------------------------*/
public String getAttributeValue(String name)
{
int index = -1;
if (fontAttributeNames == null)
{
buildSpacelessAttributeNames();
}
Integer indexInt = (Integer )fontAttributeNames.get(name);
if (indexInt != null)
{
index = indexInt.intValue();
if (index == Mi_FONT_NAME)
return(((MiFont )objectAttributes[Mi_FONT]).getName());
if (index == Mi_FONT_SIZE)
return("" + ((MiFont )objectAttributes[Mi_FONT]).getPointSize());
if (index == Mi_FONT_BOLD)
return("" + ((MiFont )objectAttributes[Mi_FONT]).isBold());
if (index == Mi_FONT_ITALIC)
return("" + ((MiFont )objectAttributes[Mi_FONT]).isItalic());
if (index == Mi_FONT_UNDERLINED)
return("" + ((MiFont )objectAttributes[Mi_FONT]).isUnderlined());
if (index == Mi_FONT_STRIKEOUT)
return("" + ((MiFont )objectAttributes[Mi_FONT]).isStrikeOut());
}
index = getIndexOfAttribute(name);
if (index == Mi_FONT)
return(((MiFont )objectAttributes[Mi_FONT]).getFullName());
if (index < Mi_START_INTEGER_INDEX)
{
if ((index >= Mi_START_COLOR_INDEX)
&& (index < Mi_START_COLOR_INDEX + Mi_NUM_COLOR_INDEXES))
{
return(MiColorManager.getColorName((Color )objectAttributes[index]));
}
if (objectAttributes[index] == null)
return(Mi_NULL_VALUE_NAME);
if ((index >= Mi_START_IMAGE_INDEX)
&& (index < Mi_START_IMAGE_INDEX + Mi_NUM_IMAGE_INDEXES))
{
String filename = null; // FIX! Make this a MiImage! and uniquely identify for undo
// ((MiImage )objectAttributes[index]).getFilename();
return((filename != null) ? filename : Mi_NULL_VALUE_NAME); // objectAttributes[index].toString());
}
return(objectAttributes[index].toString());
}
if (index < Mi_START_DOUBLE_INDEX)
{
MiPropertyDescriptions propertyDescriptions = getPropertyDescriptions();
MiPropertyDescription propertyDescription = propertyDescriptions.elementAt(name);
if (propertyDescription.getNumberOfValidValues() <= 0)
return(Utility.toString(intAttributes[index - Mi_START_INTEGER_INDEX]));
String valueName = MiSystem.getNameOfAttributeValue(
propertyDescription.getValidValues().toArray(),
intAttributes[index - Mi_START_INTEGER_INDEX]);
if (valueName == null)
{
throw new IllegalArgumentException(
"Attribute: " + name + " has no known valid name for value: "
+ intAttributes[index - Mi_START_INTEGER_INDEX] + "\n"
+ "Valid names are: " + propertyDescription.getValidValues());
}
return(valueName);
}
if (index < Mi_START_BOOLEAN_INDEX)
return(Utility.toString(doubleAttributes[index - Mi_START_DOUBLE_INDEX]));
return(Utility.toString(booleanAttributes[index - Mi_START_BOOLEAN_INDEX]));
}
//***************************************************************************************
// Overriding these methods so the return type is of MiAttributes
//***************************************************************************************
public MiAttributes overrideFrom(MiAttributes from)
{
return((MiAttributes )super.overrideFrom(from));
}
public MiAttributes inheritFrom(MiAttributes from)
{
return((MiAttributes )super.inheritFrom(from));
}
public MiAttributes inheritFromAll(MiAttributes from)
{
return((MiAttributes )super.inheritFromAll(from));
}
/**------------------------------------------------------
* Copies the value of the specific attribute specified
* by the given index from the 'from' attributes and
* returns the resultant attributes.
* @param from the attributes from which we will
* get new value of an attribute
* @param which the index of the attribute to copy
* @return the resultant attributes
*------------------------------------------------------*/
public MiAttributes copyAttribute(MiAttributes from, int which)
{
return((MiAttributes )super.copyAttribute(from, which));
}
//***************************************************************************************
// Convenience routines for MUTABLE MiAttributes
//***************************************************************************************
/**------------------------------------------------------
* Sets the foreground color attribute to the given value.
* This method, like all setStaticXXX methods, are to be
* used with mutable MiAttributes only.
* @param color the new value of the attribute
* @exception RuntimeException attempt to modify
* immutable attributes
*------------------------------------------------------*/
public void setStaticColor(Color c)
{
if (isImmutable())
{
throw new RuntimeException("Attempt to modify immutable attributes");
}
objectAttributes[Mi_COLOR] = c;
assignedAttributes[Mi_COLOR] = true;
}
/**------------------------------------------------------
* Sets the background color attribute to the given value.
* This method, like all setStaticXXX methods, are to be
* used with mutable MiAttributes only.
* @param color the new value of the attribute
* @exception RuntimeException attempt to modify
* immutable attributes
*------------------------------------------------------*/
public void setStaticBackgroundColor(Color c)
{
if (isImmutable())
{
throw new RuntimeException("Attempt to modify immutable attributes");
}
objectAttributes[Mi_BACKGROUND_COLOR] = c;
assignedAttributes[Mi_BACKGROUND_COLOR] = true;
}
/**------------------------------------------------------
* Sets the border look attribute to the given value.
* This method, like all setStaticXXX methods, are to be
* used with mutable MiAttributes only.
* @param color the new value of the attribute
* @exception RuntimeException attempt to modify
* immutable attributes
*------------------------------------------------------*/
public void setStaticBorderLook(int look)
{
if (isImmutable())
{
throw new RuntimeException("Attempt to modify immutable attributes");
}
intAttributes[Mi_BORDER_LOOK - Mi_START_INTEGER_INDEX] = look;
assignedAttributes[Mi_BORDER_LOOK] = true;
}
//***************************************************************************************
// Convenience routines for setting and getting immutable MiAttributes
//***************************************************************************************
public boolean isDeletable()
{ return(getBooleanAttribute(Mi_DELETABLE)); }
public boolean isMovable()
{ return(getBooleanAttribute(Mi_MOVABLE)); }
public boolean isCopyable()
{ return(getBooleanAttribute(Mi_COPYABLE)); }
public boolean isCopyableAsPartOfCopyable()
{ return(getBooleanAttribute(Mi_COPYABLE_AS_PART_OF_COPYABLE)); }
public boolean isSelectable()
{ return(getBooleanAttribute(Mi_SELECTABLE)); }
public boolean isUngroupable()
{ return(getBooleanAttribute(Mi_UNGROUPABLE)); }
public boolean hasFixedWidth()
{ return(getBooleanAttribute(Mi_FIXED_WIDTH)); }
public boolean hasFixedHeight()
{ return(getBooleanAttribute(Mi_FIXED_HEIGHT)); }
public boolean hasFixedAspectRatio()
{ return(getBooleanAttribute(Mi_FIXED_ASPECT_RATIO)); }
public boolean isPickable()
{ return(getBooleanAttribute(Mi_PICKABLE)); }
public boolean isAcceptingMouseFocus()
{ return(getBooleanAttribute(Mi_ACCEPTS_MOUSE_FOCUS)); }
public boolean isAcceptingKeyboardFocus()
{ return(getBooleanAttribute(Mi_ACCEPTS_KEYBOARD_FOCUS)); }
public boolean isAcceptingEnterKeyFocus()
{ return(getBooleanAttribute(Mi_ACCEPTS_ENTER_KEY_FOCUS)); }
public boolean isAcceptingTabKeys()
{ return(getBooleanAttribute(Mi_ACCEPTS_TAB_KEYS)); }
public boolean isPrintable()
{ return(getBooleanAttribute(Mi_PRINTABLE)); }
public boolean isSavable()
{ return(getBooleanAttribute(Mi_SAVABLE)); }
public boolean isSnappable()
{ return(getBooleanAttribute(Mi_SNAPPABLE)); }
public MiAttributes setDeletable(boolean b)
{ return((MiAttributes )getModifiedAttributes(Mi_DELETABLE, b)); }
public MiAttributes setMovable(boolean b)
{ return((MiAttributes )getModifiedAttributes(Mi_MOVABLE, b)); }
public MiAttributes setCopyable(boolean b)
{ return((MiAttributes )getModifiedAttributes(Mi_COPYABLE, b)); }
public MiAttributes setCopyableAsPartOfCopyable(boolean b)
{ return((MiAttributes )getModifiedAttributes(Mi_COPYABLE_AS_PART_OF_COPYABLE, b)); }
public MiAttributes setSelectable(boolean b)
{ return((MiAttributes )getModifiedAttributes(Mi_SELECTABLE, b)); }
public MiAttributes setFixedWidth(boolean b)
{ return((MiAttributes )getModifiedAttributes(Mi_FIXED_WIDTH, b)); }
public MiAttributes setFixedHeight(boolean b)
{ return((MiAttributes )getModifiedAttributes(Mi_FIXED_HEIGHT, b)); }
public MiAttributes setFixedAspectRatio(boolean b)
{ return((MiAttributes )getModifiedAttributes(Mi_FIXED_ASPECT_RATIO, b)); }
public MiAttributes setPickable(boolean b)
{ return((MiAttributes )getModifiedAttributes(Mi_PICKABLE, b)); }
public MiAttributes setAcceptingMouseFocus(boolean b)
{ return((MiAttributes )getModifiedAttributes(Mi_ACCEPTS_MOUSE_FOCUS, b)); }
public MiAttributes setAcceptingKeyboardFocus(boolean b)
{ return((MiAttributes )getModifiedAttributes(Mi_ACCEPTS_KEYBOARD_FOCUS, b)); }
public MiAttributes setAcceptingEnterKeyFocus(boolean b)
{ return((MiAttributes )getModifiedAttributes(Mi_ACCEPTS_ENTER_KEY_FOCUS, b)); }
public MiAttributes setAcceptingTabKeys(boolean b)
{ return((MiAttributes )getModifiedAttributes(Mi_ACCEPTS_TAB_KEYS, b)); }
public MiAttributes setPrintable(boolean b)
{ return((MiAttributes )getModifiedAttributes(Mi_PRINTABLE, b)); }
public MiAttributes setSavable(boolean b)
{ return((MiAttributes )getModifiedAttributes(Mi_SAVABLE, b)); }
public MiAttributes setSnappable(boolean b)
{ return((MiAttributes )getModifiedAttributes(Mi_SNAPPABLE, b)); }
public Color getColor()
{ return((Color )objectAttributes[Mi_COLOR]); }
public Color getBackgroundColor()
{ return((Color )objectAttributes[Mi_BACKGROUND_COLOR]); }
public Image getBackgroundImage()
{ return(getImageAttribute(Mi_BACKGROUND_IMAGE)); }
public Color getWhiteColor()
{ return((Color )objectAttributes[Mi_WHITE_COLOR]); }
public Color getLightColor()
{ return((Color )objectAttributes[Mi_LIGHT_COLOR]); }
public Color getDarkColor()
{ return((Color )objectAttributes[Mi_DARK_COLOR]); }
public Color getBlackColor()
{ return((Color )objectAttributes[Mi_BLACK_COLOR]); }
public Color getXorColor()
{ return(getColorAttribute(Mi_XOR_COLOR)); }
public Image getBackgroundTile()
{ return(getImageAttribute(Mi_BACKGROUND_TILE)); }
public MiDistance getLineWidth()
{ return(getDoubleAttribute(Mi_LINE_WIDTH)); }
public int getLineStyle()
{ return(getIntegerAttribute(Mi_LINE_STYLE)); }
public int getLineStartStyle()
{ return(getIntegerAttribute(Mi_LINE_START_STYLE)); }
public int getLineEndStyle()
{ return(getIntegerAttribute(Mi_LINE_END_STYLE)); }
public MiDistance getLineStartSize()
{ return(getDoubleAttribute(Mi_LINE_START_SIZE)); }
public MiDistance getLineEndSize()
{ return(getDoubleAttribute(Mi_LINE_END_SIZE)); }
public boolean getLineEndsSizeFnOfLineWidth()
{ return(getBooleanAttribute(Mi_LINE_ENDS_SIZE_FN_OF_LINE_WIDTH)); }
public MiFont getFont()
{ return((MiFont )getAttribute(Mi_FONT)); }
public int getWriteMode()
{ return(getIntegerAttribute(Mi_WRITE_MODE)); }
public MiiHelpInfo getToolHintHelp()
{return((MiiHelpInfo )getAttribute(Mi_TOOL_HINT_HELP)); }
public MiiHelpInfo getBalloonHelp()
{return((MiiHelpInfo )getAttribute(Mi_BALLOON_HELP)); }
public MiiHelpInfo getStatusHelp()
{return((MiiHelpInfo )getAttribute(Mi_STATUS_HELP)); }
public MiiHelpInfo getDialogHelp()
{return((MiiHelpInfo )getAttribute(Mi_DIALOG_HELP)); }
public MiiContextMenu getContextMenu()
{ return((MiiContextMenu )getAttribute(Mi_CONTEXT_MENU)); }
public int getContextCursor()
{ return(getIntegerAttribute(Mi_CONTEXT_CURSOR)); }
public MiDistance getMinimumWidth()
{ return(getDoubleAttribute(Mi_MINIMUM_WIDTH)); }
public MiDistance getMinimumHeight()
{ return(getDoubleAttribute(Mi_MINIMUM_HEIGHT)); }
public MiDistance getMaximumWidth()
{ return(getDoubleAttribute(Mi_MAXIMUM_WIDTH)); }
public MiDistance getMaximumHeight()
{ return(getDoubleAttribute(Mi_MAXIMUM_HEIGHT)); }
public int getBorderLook()
{ return(intAttributes[Mi_BORDER_LOOK - Mi_START_INTEGER_INDEX]); }
public boolean getHasBorderHilite()
{ return(getBooleanAttribute(Mi_HAS_BORDER_HILITE)); }
public Color getBorderHiliteColor()
{ return(getColorAttribute(Mi_BORDER_HILITE_COLOR)); }
public MiDistance getBorderHiliteWidth()
{ return(getDoubleAttribute(Mi_BORDER_HILITE_WIDTH)); }
public boolean getHasShadow()
{ return(getBooleanAttribute(Mi_HAS_SHADOW)); }
public Color getShadowColor()
{ return(getColorAttribute(Mi_SHADOW_COLOR)); }
public MiDistance getShadowLength()
{ return(getDoubleAttribute(Mi_SHADOW_LENGTH)); }
public int getShadowDirection()
{ return(getIntegerAttribute(Mi_SHADOW_DIRECTION)); }
public MiiPartRenderer getBeforeRenderer()
{ return((MiiPartRenderer )getAttribute(Mi_BEFORE_RENDERER)); }
public MiiPartRenderer getAfterRenderer()
{ return((MiiPartRenderer )getAttribute(Mi_AFTER_RENDERER)); }
public MiiShadowRenderer getShadowRenderer()
{ return((MiiShadowRenderer )getAttribute(Mi_SHADOW_RENDERER)); }
public MiiLineEndsRenderer getLineEndsRenderer()
{ return((MiiLineEndsRenderer )getAttribute(Mi_LINE_ENDS_RENDERER)); }
public MiiDeviceRenderer getBackgroundRenderer()
{ return((MiiDeviceRenderer )getAttribute(Mi_BACKGROUND_RENDERER)); }
public MiiDeviceRenderer getBorderRenderer()
{ return((MiiDeviceRenderer )getAttribute(Mi_BORDER_RENDERER)); }
public MiPartAnimator getVisibilityAnimator()
{ return((MiPartAnimator )getAttribute(Mi_VISIBILITY_ANIMATOR)); }
public MiAttributes setColor(Color c)
{ return((MiAttributes )getModifiedAttributes(Mi_COLOR, c)); }
public MiAttributes setColor(String name)
{ return(setColor(MiColorManager.getColor(name))); }
public MiAttributes setBackgroundColor(Color c)
{ return((MiAttributes )getModifiedAttributes(Mi_BACKGROUND_COLOR, c)); }
public MiAttributes setBackgroundColor(String name)
{ return(setBackgroundColor(MiColorManager.getColor(name))); }
public MiAttributes setWhiteColor(Color c)
{ return((MiAttributes )getModifiedAttributes(Mi_WHITE_COLOR, c)); }
public MiAttributes setLightColor(Color c)
{ return((MiAttributes )getModifiedAttributes(Mi_LIGHT_COLOR, c)); }
public MiAttributes setDarkColor(Color c)
{ return((MiAttributes )getModifiedAttributes(Mi_DARK_COLOR, c)); }
public MiAttributes setBlackColor(Color c)
{ return((MiAttributes )getModifiedAttributes(Mi_BLACK_COLOR, c)); }
public MiAttributes setXorColor(Color c)
{ return((MiAttributes )getModifiedAttributes(Mi_XOR_COLOR, c)); }
public MiAttributes setBackgroundImage(Image i)
{ return((MiAttributes )getModifiedAttributes(Mi_BACKGROUND_IMAGE, i)); }
public MiAttributes setBackgroundTile(Image i)
{ return((MiAttributes )getModifiedAttributes(Mi_BACKGROUND_TILE, i)); }
public MiAttributes setLineWidth(MiDistance w)
{ return((MiAttributes )getModifiedAttributes(Mi_LINE_WIDTH, w)); }
public MiAttributes setLineStyle(int style)
{ return((MiAttributes )getModifiedAttributes(Mi_LINE_STYLE, style)); }
public MiAttributes setLineStartStyle(int style)
{ return((MiAttributes )getModifiedAttributes(Mi_LINE_START_STYLE, style));}
public MiAttributes setLineEndStyle(int style)
{ return((MiAttributes )getModifiedAttributes(Mi_LINE_END_STYLE, style));}
public MiAttributes setLineStartSize(MiDistance size)
{ return((MiAttributes )getModifiedAttributes(Mi_LINE_START_SIZE, size));}
public MiAttributes setLineEndSize(MiDistance size)
{ return((MiAttributes )getModifiedAttributes(Mi_LINE_END_SIZE, size));}
public MiAttributes setLineEndsSizeFnOfLineWidth(boolean flag)
{ return((MiAttributes )getModifiedAttributes(Mi_LINE_ENDS_SIZE_FN_OF_LINE_WIDTH, flag));}
public MiAttributes setFont(MiFont f)
{ return((MiAttributes )getModifiedAttributes(Mi_FONT, f)); }
public MiAttributes setWriteMode(int wmode)
{ return((MiAttributes )getModifiedAttributes(Mi_WRITE_MODE, wmode)); }
public MiAttributes setContextMenu(MiiContextMenu menu)
{ return((MiAttributes )getModifiedAttributes(Mi_CONTEXT_MENU, menu)); }
public MiAttributes setContextCursor(int cursor)
{ return((MiAttributes )getModifiedAttributes(Mi_CONTEXT_CURSOR, cursor)); }
public MiAttributes setMinimumWidth(MiDistance width)
{ return((MiAttributes )getModifiedAttributes(Mi_MINIMUM_WIDTH, width)); }
public MiAttributes setMinimumHeight(MiDistance height)
{ return((MiAttributes )getModifiedAttributes(Mi_MINIMUM_HEIGHT, height)); }
public MiAttributes setMaximumWidth(MiDistance width)
{ return((MiAttributes )getModifiedAttributes(Mi_MAXIMUM_WIDTH, width)); }
public MiAttributes setMaximumHeight(MiDistance height)
{ return((MiAttributes )getModifiedAttributes(Mi_MAXIMUM_HEIGHT, height)); }
public MiAttributes setToolHintMessage(String msg)
{
return((MiAttributes )getModifiedAttributes(Mi_TOOL_HINT_HELP,
(msg != null) ? new MiHelpInfo(msg) : null));
}
public MiAttributes setBalloonHelpMessage(String msg)
{
return((MiAttributes )getModifiedAttributes(Mi_BALLOON_HELP,
(msg != null) ? new MiHelpInfo(msg) : null));
}
public MiAttributes setStatusHelpMessage(String msg)
{
return((MiAttributes )getModifiedAttributes(Mi_STATUS_HELP,
(msg != null) ? new MiHelpInfo(msg) : null));
}
public MiAttributes setDialogHelpMessage(String msg)
{
return((MiAttributes )getModifiedAttributes(Mi_DIALOG_HELP,
(msg != null) ? new MiHelpInfo(msg) : null));
}
public MiAttributes setToolHintHelp(MiiHelpInfo msg)
{return((MiAttributes )getModifiedAttributes(Mi_TOOL_HINT_HELP, msg)); }
public MiAttributes setBalloonHelp(MiiHelpInfo msg)
{return((MiAttributes )getModifiedAttributes(Mi_BALLOON_HELP, msg)); }
public MiAttributes setStatusHelp(MiiHelpInfo msg)
{return((MiAttributes )getModifiedAttributes(Mi_STATUS_HELP, msg)); }
public MiAttributes setDialogHelp(MiiHelpInfo msg)
{return((MiAttributes )getModifiedAttributes(Mi_DIALOG_HELP, msg)); }
public MiAttributes setBorderLook(int look)
{ return((MiAttributes )getModifiedAttributes(Mi_BORDER_LOOK, look)); }
public MiAttributes setHasBorderHilite(boolean flag)
{ return((MiAttributes )getModifiedAttributes(Mi_HAS_BORDER_HILITE, flag)); }
public MiAttributes setBorderHiliteColor(Color c)
{ return((MiAttributes )getModifiedAttributes(Mi_BORDER_HILITE_COLOR, c)); }
public MiAttributes setBorderHiliteWidth(MiDistance w)
{ return((MiAttributes )getModifiedAttributes(Mi_BORDER_HILITE_WIDTH, w)); }
public MiAttributes setHasShadow(boolean flag)
{ return((MiAttributes )getModifiedAttributes(Mi_HAS_SHADOW, flag)); }
public MiAttributes setShadowColor(Color c)
{ return((MiAttributes )getModifiedAttributes(Mi_SHADOW_COLOR, c)); }
public MiAttributes setShadowLength(MiDistance w)
{ return((MiAttributes )getModifiedAttributes(Mi_SHADOW_LENGTH, w)); }
public MiAttributes setShadowDirection(int d)
{ return((MiAttributes )getModifiedAttributes(Mi_SHADOW_DIRECTION, d)); }
public MiAttributes setBeforeRenderer(MiiPartRenderer r)
{ return((MiAttributes )getModifiedAttributes(Mi_BEFORE_RENDERER, r)); }
public MiAttributes setAfterRenderer(MiiPartRenderer r)
{ return((MiAttributes )getModifiedAttributes(Mi_AFTER_RENDERER, r)); }
public MiAttributes setShadowRenderer(MiiShadowRenderer r)
{ return((MiAttributes )getModifiedAttributes(Mi_SHADOW_RENDERER, r)); }
public MiAttributes setLineEndsRenderer(MiiLineEndsRenderer r)
{ return((MiAttributes )getModifiedAttributes(Mi_LINE_ENDS_RENDERER, r)); }
public MiAttributes setBackgroundRenderer(MiiDeviceRenderer r)
{ return((MiAttributes )getModifiedAttributes(Mi_BACKGROUND_RENDERER, r)); }
public MiAttributes setBorderRenderer(MiiDeviceRenderer r)
{ return((MiAttributes )getModifiedAttributes(Mi_BORDER_RENDERER, r)); }
public MiAttributes setVisibilityAnimator(MiPartAnimator animator)
{ return((MiAttributes )getModifiedAttributes(Mi_VISIBILITY_ANIMATOR, animator)); }
public String getFontName()
{ return(getFont().getName()); }
public MiAttributes setFontName(String name)
{ return(setFont(getFont().setName(name))); }
public boolean isFontBold()
{ return(getFont().isBold()); }
public MiAttributes setFontBold(boolean flag)
{ return(setFont(getFont().setBold(flag))); }
public boolean isFontItalic()
{ return(getFont().isItalic()); }
public MiAttributes setFontItalic(boolean flag)
{ return(setFont(getFont().setItalic(flag))); }
public int getFontPointSize()
{ return(getFont().getPointSize()); }
public MiAttributes setFontPointSize(int size)
{ return(setFont(getFont().setPointSize(size))); }
public int getFontHorizontalJustification()
{ return(getIntegerAttribute(Mi_FONT_HORIZONTAL_JUSTIFICATION)); }
public MiAttributes setFontHorizontalJustification(int j)
{ return((MiAttributes )getModifiedAttributes(Mi_FONT_HORIZONTAL_JUSTIFICATION, j)); }
/**------------------------------------------------------
* Gets whether any geometric attributes are different
* between this and the given 'other' attributes.
* @param other the other attributes to compare
* this to
* @return true if any one of the geometric
* attributes has changed
* @see MiiAttributeTypes#geometricAttributesTable
*------------------------------------------------------*/
public boolean isGeometricChange(MiAttributes other)
{
return(isChange(other, geometricAttributesTable));
}
/**------------------------------------------------------
* Gets whether any appearance attributes are different
* between this and the given 'other' attributes. Appearance
* attributes are attributes that only affect the visual
* appearance of a MiPart they are assigned to.
* @param other the other attributes to compare
* this to
* @return true if any one of the appearance
* attributes has changed
* @see MiiAttributeTypes#appearanceAttributesTable
*------------------------------------------------------*/
public boolean isAppearanceChange(MiAttributes other)
{
return(isChange(other, appearanceAttributesTable));
}
/**------------------------------------------------------
* Gets whether the attributes specified by the given table
* are different between this and the given 'other' attributes.
* Geometric attributes are attributes that only affect the
* size of a MiPart they are assigned to.
* @param other the other attributes to compare
* this to
* @param attributeChangeTable
* an array of indexes of the attributes
* that will be compared
* this to
* @return true if any one of the attributes
* specified has changed
*------------------------------------------------------*/
protected boolean isChange(MiAttributes other, int[] attributeChangeTable)
{
int[] table = attributeChangeTable;
int length = table.length;
for (int i = 0; i < length; ++i)
{
int index = table[i];
if (index >= Mi_START_BOOLEAN_INDEX)
{
if (booleanAttributes[index - Mi_START_BOOLEAN_INDEX]
!= other.booleanAttributes[index - Mi_START_BOOLEAN_INDEX])
{
//System.out.println("boolean change: " + (index - Mi_START_BOOLEAN_INDEX));
return(true);
}
}
else if (index >= Mi_START_DOUBLE_INDEX)
{
if (doubleAttributes[index - Mi_START_DOUBLE_INDEX]
!= other.doubleAttributes[index - Mi_START_DOUBLE_INDEX])
{
//System.out.println("double change: " + (index - Mi_START_DOUBLE_INDEX));
return(true);
}
}
else if (index >= Mi_START_INTEGER_INDEX)
{
if (intAttributes[index - Mi_START_INTEGER_INDEX]
!= other.intAttributes[index - Mi_START_INTEGER_INDEX])
{
//System.out.println("int change: " + (index - Mi_START_INTEGER_INDEX));
return(true);
}
}
else
{
if (objectAttributes[index] != other.objectAttributes[index])
{
//System.out.println("object change: " + (index));
return(true);
}
}
}
return(false);
}
/**------------------------------------------------------
* Gets whether the attributes specified by the given table
* are different between this and the given 'other' attributes.
* Geometric attributes are attributes that only affect the
* size of a MiPart they are assigned to.
* @param other the other attributes to compare
* this to
* @param attributeChangeTable
* an array of indexes of the attributes
* that will be compared
* this to
* @return true if any one of the attributes
* specified has changed
*------------------------------------------------------*/
protected MiChangedAttributes getChangedAttributes(MiAttributes oldAtts)
{
int numChanges = 0;
changedAttributes.oldAttributes = oldAtts;
changedAttributes.newAttributes = this;
for (int index = 0; index < Mi_NUMBER_OF_ATTRIBUTES; ++index)
{
if (index < Mi_START_INTEGER_INDEX)
{
if (objectAttributes[index] != oldAtts.objectAttributes[index])
{
changedAttributes.changedAttributeIndexes[numChanges++] = index;
changedAttributes.changedAttributeEvents[index].setPropertyValue(
objectAttributes[index] == null
? Mi_NULL_VALUE_NAME : objectAttributes[index].toString());
changedAttributes.changedAttributeEvents[index].setOldPropertyValue(
oldAtts.objectAttributes[index] == null
? Mi_NULL_VALUE_NAME : oldAtts.objectAttributes[index].toString());
}
}
else if (index < Mi_START_DOUBLE_INDEX)
{
if (intAttributes[index - Mi_START_INTEGER_INDEX]
!= oldAtts.intAttributes[index - Mi_START_INTEGER_INDEX])
{
changedAttributes.changedAttributeIndexes[numChanges++] = index;
changedAttributes.changedAttributeEvents[index].setPropertyValue(
intAttributes[index - Mi_START_INTEGER_INDEX] + "");
changedAttributes.changedAttributeEvents[index].setOldPropertyValue(
oldAtts.intAttributes[index - Mi_START_INTEGER_INDEX] + "");
}
}
else if (index < Mi_START_BOOLEAN_INDEX)
{
if (doubleAttributes[index - Mi_START_DOUBLE_INDEX]
!= oldAtts.doubleAttributes[index - Mi_START_DOUBLE_INDEX])
{
changedAttributes.changedAttributeIndexes[numChanges++] = index;
changedAttributes.changedAttributeEvents[index].setPropertyValue(
doubleAttributes[index - Mi_START_DOUBLE_INDEX] + "");
changedAttributes.changedAttributeEvents[index].setOldPropertyValue(
oldAtts.doubleAttributes[index - Mi_START_DOUBLE_INDEX] + "");
}
}
else
{
if (booleanAttributes[index - Mi_START_BOOLEAN_INDEX]
!= oldAtts.booleanAttributes[index - Mi_START_BOOLEAN_INDEX])
{
changedAttributes.changedAttributeIndexes[numChanges++] = index;
changedAttributes.changedAttributeEvents[index].setPropertyValue(
booleanAttributes[index - Mi_START_BOOLEAN_INDEX]
? Mi_TRUE_NAME : Mi_FALSE_NAME);
changedAttributes.changedAttributeEvents[index].setOldPropertyValue(
oldAtts.booleanAttributes[index - Mi_START_BOOLEAN_INDEX]
? Mi_TRUE_NAME : Mi_FALSE_NAME);
}
}
}
return(changedAttributes);
}
// for each att == mask.att, replace with paint.att
protected MiAttributes complexXor(MiAttributes mask, MiAttributes paint)
{
if (this.equals(mask))
return(paint);
complexXorResult.directCopy(this);
for (int index = 0; index < Mi_NUMBER_OF_ATTRIBUTES; ++index)
{
if (index < Mi_START_INTEGER_INDEX)
{
if (objectAttributes[index] == mask.objectAttributes[index])
{
complexXorResult.objectAttributes[index] = paint.objectAttributes[index];
}
}
else if (index < Mi_START_DOUBLE_INDEX)
{
if (intAttributes[index - Mi_START_INTEGER_INDEX]
== mask.intAttributes[index - Mi_START_INTEGER_INDEX])
{
complexXorResult.intAttributes[index - Mi_START_INTEGER_INDEX]
= paint.intAttributes[index - Mi_START_INTEGER_INDEX];
}
}
else if (index < Mi_START_BOOLEAN_INDEX)
{
if (doubleAttributes[index - Mi_START_DOUBLE_INDEX]
== mask.doubleAttributes[index - Mi_START_DOUBLE_INDEX])
{
complexXorResult.doubleAttributes[index - Mi_START_DOUBLE_INDEX]
= paint.doubleAttributes[index - Mi_START_DOUBLE_INDEX];
}
}
else
{
if (booleanAttributes[index - Mi_START_BOOLEAN_INDEX]
== mask.booleanAttributes[index - Mi_START_BOOLEAN_INDEX])
{
complexXorResult.booleanAttributes[index - Mi_START_BOOLEAN_INDEX]
= paint.booleanAttributes[index - Mi_START_BOOLEAN_INDEX];
}
}
}
complexXorResult.setIsImmutable(true);
MiAttributes atts = (MiAttributes )complexXorResult.getImmutableCopyFromCache();
complexXorResult.setIsImmutable(false);
return(atts);
}
/**------------------------------------------------------
* Gets the number of MiAttributes created and increases
* the number at the same time.
* @return the number of MiAttributes created
* @overrides MiGeneralAttributes#getAndIncNumCreated
*------------------------------------------------------*/
protected int getAndIncNumCreated()
{
return(numCreated++);
}
/**------------------------------------------------------
* Gets the cache that stores reusable, immutable
* MiAttributes.
* @return the attribute cache
* @overrides MiGeneralAttributes#getCache
*------------------------------------------------------*/
protected MiAttributeCache getCache()
{
return(cache);
}
/**------------------------------------------------------
* Makes the default attributes whose values are copied
* into all newly created attributes.
* @param makeDefaultAttributes not used
*------------------------------------------------------*/
private MiAttributes(int makeDefaultAttributes)
{
super(
Mi_NUMBER_OF_ATTRIBUTES,
Mi_START_OBJECT_INDEX, Mi_NUM_OBJECT_INDEXES,
Mi_START_INTEGER_INDEX, Mi_NUM_INTEGER_INDEXES,
Mi_START_DOUBLE_INDEX, Mi_NUM_DOUBLE_INDEXES,
Mi_START_BOOLEAN_INDEX, Mi_NUM_BOOLEAN_INDEXES);
// Bug in 1.2.1 makes standard fonts twice as tall as they should be
if (MiSystem.getJDKVersion() >= 1.2)
defaultFont = new MiFont("Courier", MiFont.PLAIN, 12);
super.setStaticAttribute(Mi_FONT, defaultFont);
super.setStaticAttribute(Mi_COLOR, MiColorManager.black);
super.setStaticAttribute(Mi_BACKGROUND_COLOR, Mi_TRANSPARENT_COLOR);
super.setStaticAttribute(Mi_LIGHT_COLOR, MiColorManager.darkWhite);
super.setStaticAttribute(Mi_WHITE_COLOR, MiColorManager.white);
super.setStaticAttribute(Mi_DARK_COLOR, MiColorManager.gray);
super.setStaticAttribute(Mi_BLACK_COLOR, MiColorManager.darkGray);
super.setStaticAttribute(Mi_XOR_COLOR, MiColorManager.red);
super.setStaticAttribute(Mi_BORDER_HILITE_COLOR, MiColorManager.black);
super.setStaticAttribute(Mi_SHADOW_COLOR, MiColorManager.lightGray);
super.setStaticAttribute(Mi_BORDER_LOOK, Mi_FLAT_BORDER_LOOK);
super.setStaticAttribute(Mi_BORDER_HILITE_WIDTH, 2.0);
super.setStaticAttribute(Mi_SHADOW_LENGTH, 4.0);
super.setStaticAttribute(Mi_SHADOW_DIRECTION, Mi_LOWER_RIGHT_LOCATION);
super.setStaticAttribute(Mi_FONT_HORIZONTAL_JUSTIFICATION, Mi_LEFT_JUSTIFIED);
super.setStaticAttribute(Mi_FONT_VERTICAL_JUSTIFICATION, Mi_CENTER_JUSTIFIED);
super.setStaticAttribute(Mi_CONTEXT_CURSOR, Mi_DEFAULT_CURSOR);
super.setStaticAttribute(Mi_DELETABLE, true);
super.setStaticAttribute(Mi_MOVABLE, true);
super.setStaticAttribute(Mi_COPYABLE, true);
super.setStaticAttribute(Mi_COPYABLE_AS_PART_OF_COPYABLE, true);
super.setStaticAttribute(Mi_SELECTABLE, true);
super.setStaticAttribute(Mi_PICKABLE, true);
super.setStaticAttribute(Mi_UNGROUPABLE, true);
super.setStaticAttribute(Mi_CONNECTABLE, true);
super.setStaticAttribute(Mi_ACCEPTS_TAB_KEYS, true);
super.setStaticAttribute(Mi_LINE_ENDS_SIZE_FN_OF_LINE_WIDTH, true);
super.setStaticAttribute(Mi_PRINTABLE, true);
super.setStaticAttribute(Mi_SAVABLE, true);
super.setStaticAttribute(Mi_PICKABLE_WHEN_TRANSPARENT, true);
super.setStaticAttribute(Mi_SNAPPABLE, true);
super.setStaticAttribute(Mi_MAXIMUM_WIDTH, Mi_MAX_DISTANCE_VALUE);
super.setStaticAttribute(Mi_MAXIMUM_HEIGHT, Mi_MAX_DISTANCE_VALUE);
super.setStaticAttribute(Mi_LINE_START_SIZE, 10.0);
super.setStaticAttribute(Mi_LINE_END_SIZE, 10.0);
defaultBorderRenderer = new MiBorderLookRenderer();
super.setStaticAttribute(Mi_BORDER_RENDERER, defaultBorderRenderer);
// Need to do this in order because LineEndsRenderer wants to make an MiAttributes
defaultAttributes = this;
defaultLineEndsRenderer = new MiLineEndsRenderer();
super.setStaticAttribute(Mi_LINE_ENDS_RENDERER, defaultLineEndsRenderer);
defaultShadowRenderer = new MiShadowRenderer();
super.setStaticAttribute(Mi_SHADOW_RENDERER, defaultShadowRenderer);
initializeAsInheritedAttributes();
}
/**------------------------------------------------------
* Gets the descriptions of all of the properties. These
* can be used to see if an property is different from the
* default value or if a proposed value is valid or to get
* a list of all of the valid values of a property.
* @return the list of property descriptions
*------------------------------------------------------*/
public MiPropertyDescriptions getPropertyDescriptions()
{
if (propertyDescriptions != null)
return(propertyDescriptions);
propertyDescriptions = new MiPropertyDescriptions("Basic Attribute Properties");
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_BACKGROUND_IMAGE_ATT_NAME, "Image"));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_BACKGROUND_TILE_ATT_NAME, "Image"));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_FONT_NAME_ATT_NAME, Mi_STRING_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_FONT_SIZE_ATT_NAME, Mi_POSITIVE_INTEGER_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_FONT_BOLD_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_FONT_ITALIC_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_FONT_UNDERLINED_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_FONT_STRIKEOUT_ATT_NAME, Mi_BOOLEAN_TYPE));
/*
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_TOOL_HINT_HELP_ATT_NAME, Mi_STRING_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_BALLOON_HELP_ATT_NAME, Mi_STRING_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_STATUS_HELP_ATT_NAME, Mi_STRING_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_DIALOG_HELP_ATT_NAME, Mi_STRING_TYPE));
*/
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_SHADOW_RENDERER_ATT_NAME, "MiiShadowRenderer"));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_BEFORE_RENDERER_ATT_NAME, "MiiPartRenderer"));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_AFTER_RENDERER_ATT_NAME, "MiiPartRenderer"));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_LINE_ENDS_RENDERER_ATT_NAME, "MiiLineEndsRenderer"));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_BACKGROUND_RENDERER_ATT_NAME, "MiiDeviceRenderer"));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_BORDER_RENDERER_ATT_NAME, "MiiDeviceRenderer"));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_VISIBILITY_ANIMATOR_ATT_NAME, "MiPartAnimator"));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_CONTEXT_MENU_NAME, "MiiContextMenu"));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_COLOR_ATT_NAME, Mi_COLOR_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_BACKGROUND_COLOR_ATT_NAME, Mi_COLOR_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_LIGHT_COLOR_ATT_NAME, Mi_COLOR_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_WHITE_COLOR_ATT_NAME, Mi_COLOR_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_DARK_COLOR_ATT_NAME, Mi_COLOR_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_BLACK_COLOR_ATT_NAME, Mi_COLOR_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_XOR_COLOR_ATT_NAME, Mi_COLOR_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_BORDER_HILITE_COLOR_ATT_NAME, Mi_COLOR_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_SHADOW_COLOR_ATT_NAME, Mi_COLOR_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_BORDER_LOOK_ATT_NAME,
new Strings(MiiNames.borderLookNames)));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_LINE_STYLE_ATT_NAME,
new Strings(MiiNames.lineStyleNames)));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_LINE_START_STYLE_ATT_NAME,
new Strings(MiiNames.lineEndStyleNames)));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_LINE_END_STYLE_ATT_NAME,
new Strings(MiiNames.lineEndStyleNames)));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_WRITE_MODE_ATT_NAME,
new Strings(MiiNames.writeModeNames)));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_CONTEXT_CURSOR_ATT_NAME,
new Strings(MiiNames.cursorNames)));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_ATTRIBUTE_LOCK_MASK_ATT_NAME, Mi_INTEGER_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_ATTRIBUTE_PUBLIC_MASK_ATT_NAME, Mi_INTEGER_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_SHADOW_DIRECTION_ATT_NAME,
new Strings(MiiNames.locationNames)));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_SHADOW_STYLE_ATT_NAME, Mi_INTEGER_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_FONT_HORIZONTAL_JUSTIFICATION_ATT_NAME,
new Strings(MiiNames.horizontalJustificationNames)));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_FONT_VERTICAL_JUSTIFICATION_ATT_NAME,
new Strings(MiiNames.verticalJustificationNames)));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_MINIMUM_WIDTH_ATT_NAME, Mi_POSITIVE_DOUBLE_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_MINIMUM_HEIGHT_ATT_NAME, Mi_POSITIVE_DOUBLE_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_MAXIMUM_WIDTH_ATT_NAME, Mi_POSITIVE_DOUBLE_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_MAXIMUM_HEIGHT_ATT_NAME, Mi_POSITIVE_DOUBLE_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_BORDER_HILITE_WIDTH_ATT_NAME, Mi_POSITIVE_DOUBLE_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_SHADOW_LENGTH_ATT_NAME, Mi_POSITIVE_DOUBLE_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_LINE_WIDTH_ATT_NAME, Mi_POSITIVE_DOUBLE_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_LINE_START_SIZE_ATT_NAME, Mi_POSITIVE_DOUBLE_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_LINE_END_SIZE_ATT_NAME, Mi_POSITIVE_DOUBLE_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_DELETABLE_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_MOVABLE_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_COPYABLE_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_COPYABLE_AS_PART_OF_COPYABLE_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_SELECTABLE_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_FIXED_WIDTH_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_FIXED_WIDTH_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_FIXED_HEIGHT_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_FIXED_ASPECT_RATIO_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_PICKABLE_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_UNGROUPABLE_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_SNAPPABLE_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_CONNECTABLE_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_HIDDEN_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_DRAG_AND_DROP_SOURCE_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_DRAG_AND_DROP_TARGET_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_ACCEPTS_MOUSE_FOCUS_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_ACCEPTS_KEYBOARD_FOCUS_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_ACCEPTS_ENTER_KEY_FOCUS_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_ACCEPTS_TAB_KEYS_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_HAS_BORDER_HILITE_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_HAS_SHADOW_ATT_NAME, Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_LINE_ENDS_SIZE_FN_OF_LINE_WIDTH_ATT_NAME,
Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_PICKABLE_WHEN_TRANSPARENT_ATT_NAME,
Mi_BOOLEAN_TYPE));
propertyDescriptions.addElement(
new MiPropertyDescription(Mi_FILLED_ATT_NAME,
Mi_BOOLEAN_TYPE));
for (int i = 0; i < propertyDescriptions.size(); ++i)
{
MiPropertyDescription desc = propertyDescriptions.elementAt(i);
String defaultValue = defaultAttributes.getAttributeValue(desc.getName());
desc.setDefaultValue(defaultValue);
}
return(propertyDescriptions);
}
}
class MiChangedAttributes implements MiiAttributeTypes
{
protected MiAttributes oldAttributes;
protected MiAttributes newAttributes;
protected int[] changedAttributeIndexes;
protected static MiPropertyChange[] changedAttributeEvents;
public MiChangedAttributes()
{
changedAttributeIndexes = new int[Mi_NUMBER_OF_ATTRIBUTES];
}
static {
changedAttributeEvents = new MiPropertyChange[Mi_NUMBER_OF_ATTRIBUTES];
for (int i = 0; i < Mi_NUMBER_OF_ATTRIBUTES; ++i)
{
changedAttributeEvents[i] = new MiPropertyChange(null, MiiNames.attributeNames[i] , null, null);
}
}
}
|
Bradicus/XCTE3 | lib/plugins_core/lang_ruby/method_constructor.rb | ##
#
# Copyright (C) 2008 <NAME>
# This file is released under the zlib/libpng license, see license.txt in the
# root directory
#
# This plugin creates a constructor for a class
require 'x_c_t_e_plugin.rb'
require 'plugins_core/lang_ruby/x_c_t_e_ruby.rb'
class XCTERuby::MethodConstructor < XCTEPlugin
def initialize
@name = "method_constructor"
@language = "ruby"
@category = XCTEPlugin::CAT_METHOD
end
# Returns definition string for this class's constructor
def get_definition(codeClass, cfg)
conDef = String.new
indent = " "
conDef << indent << "# Constructor\n"
conDef << indent << "def initialize()\n"
varArray = Array.new
codeClass.getAllVarsFor(varArray);
for var in varArray
if var.elementId == CodeElem::ELEM_VARIABLE
if var.defaultValue != nil
conDef << indent << " @" << var.name << " = "
if var.vtype == "String"
conDef << "\"" << var.defaultValue << "\""
else
conDef << var.defaultValue << ""
end
if var.comment != nil
conDef << "\t# " << var.comment
end
conDef << "\n"
end
end
end
conDef << indent << "end # initialize\n\n";
return(conDef);
end
end
# Now register an instance of our plugin
XCTEPlugin::registerPlugin(XCTERuby::MethodConstructor.new)
|
lsdlab/djshop_toturial | apps/products/urls.py | <filename>apps/products/urls.py
from django.urls import include, path
from rest_framework.routers import DefaultRouter
from .views import (CategoryViewSet, ArticleViewSet, ProductsViewSet, ProductSpecViewSet,
ProductReviewViewSet, ProductSpecReviewViewSet,
ProductReviewAppendViewSet, ProductRecommendationViewSet,
product_detail_mobile)
product_spec_list = ProductSpecViewSet.as_view({
'get': 'list',
'post': 'create'
})
product_spec_detail = ProductSpecViewSet.as_view({
'patch': 'partial_update',
'get': 'retrieve'
})
product_review_list = ProductReviewViewSet.as_view({
'get': 'list',
'post': 'create'
})
product_review_append_list = ProductReviewAppendViewSet.as_view(
{'post': 'create'})
product_spec_review_list = ProductSpecReviewViewSet.as_view({
'get': 'list',
'post': 'create'
})
product_recommendation_list = ProductRecommendationViewSet.as_view({
'get':
'list',
'post':
'create'
})
product_recommendation_detail = ProductRecommendationViewSet.as_view(
{'patch': 'partial_update'})
router = DefaultRouter()
router.register('category', CategoryViewSet)
router.register('products', ProductsViewSet)
router.register('articles', ArticleViewSet)
app_name = 'products'
urlpatterns = [
path('api/v1/', include(router.urls)),
path('api/v1/product_detail_mobile/<uuid:product_id>/',
product_detail_mobile,
name='product_detail_mobile'),
path('api/v1/products/<uuid:product_id>/specs/',
product_spec_list,
name='product-spec-list'),
path('api/v1/products/specs/<int:pk>/',
product_spec_detail,
name='product-spec-detail'),
path(
'api/v1/products/<uuid:product_id>/reviews/',
product_review_list,
name='product-review-list',
),
path(
'api/v1/products/reviews/<str:product_review_id>/append/',
product_review_append_list,
name='product-review-append-list',
),
path(
'api/v1/products/<uuid:product_id>/specs/<str:product_spec_id>/reviews/',
product_spec_review_list,
name='product-spec-review-lsit',
),
path(
'api/v1/product_recommendations/',
product_recommendation_list,
name='product-recommendation-list',
),
path(
'api/v1/product_recommendations/<int:pk>/',
product_recommendation_detail,
name='product-recommendation-detail',
),
]
|
tiwer/letv | src/main/java/cn/jpush/a/a/ah.java | package cn.jpush.a.a;
public final class ah {
}
|
isaackwan/jsdelivr | files/bluebird/0.9.10-1/bluebird.js | /**
* bluebird build version 0.9.10-0
* Features enabled: core, race, any, call_get, filter, generators, map, nodeify, promisify, props, reduce, settle, some, progress, cancel, complex_thenables, synchronous_inspection
* Features disabled: simple_thenables
*/
/**
* @preserve Copyright (c) 2013 <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:</p>
*
* 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.
*/
;(function (f) {
// CommonJS
if (typeof exports === "object") {
module.exports = f();
// RequireJS
} else if (typeof define === "function" && define.amd) {
define(f);
// <script>
} else {
if (typeof window !== "undefined") {
window.Promise = f();
} else if (typeof global !== "undefined") {
global.Promise = f();
} else if (typeof self !== "undefined") {
self.Promise = f();
}
}
})(function () {var define,module,exports;
return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function( Promise, Promise$_All, PromiseArray ) {
var SomePromiseArray = require( "./some_promise_array.js" )(PromiseArray);
function Promise$_Any( promises, useBound, caller ) {
var ret = Promise$_All(
promises,
SomePromiseArray,
caller,
useBound === true ? promises._boundTo : void 0
);
ret.setHowMany( 1 );
ret.setUnwrap();
return ret.promise();
}
Promise.any = function Promise$Any( promises ) {
return Promise$_Any( promises, false, Promise.any );
};
Promise.prototype.any = function Promise$any() {
return Promise$_Any( this, true, this.any );
};
};
},{"./some_promise_array.js":34}],2:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = (function(){
var AssertionError = (function() {
function AssertionError( a ) {
this.constructor$( a );
this.message = a;
this.name = "AssertionError";
}
AssertionError.prototype = new Error();
AssertionError.prototype.constructor = AssertionError;
AssertionError.prototype.constructor$ = Error;
return AssertionError;
})();
return function assert( boolExpr, message ) {
if( boolExpr === true ) return;
var ret = new AssertionError( message );
if( Error.captureStackTrace ) {
Error.captureStackTrace( ret, assert );
}
if( console && console.error ) {
console.error( ret.stack + "" );
}
throw ret;
};
})();
},{}],3:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
var ASSERT = require("./assert.js");
var schedule = require( "./schedule.js" );
var Queue = require( "./queue.js" );
var errorObj = require( "./util.js").errorObj;
var tryCatch1 = require( "./util.js").tryCatch1;
function Async() {
this._isTickUsed = false;
this._length = 0;
this._lateBuffer = new Queue();
this._functionBuffer = new Queue( 25000 * 3 );
var self = this;
this.consumeFunctionBuffer = function Async$consumeFunctionBuffer() {
self._consumeFunctionBuffer();
};
}
Async.prototype.haveItemsQueued = function Async$haveItemsQueued() {
return this._length > 0;
};
Async.prototype.invokeLater = function Async$invokeLater( fn, receiver, arg ) {
this._lateBuffer.push( fn, receiver, arg );
this._queueTick();
};
Async.prototype.invoke = function Async$invoke( fn, receiver, arg ) {
var functionBuffer = this._functionBuffer;
functionBuffer.push( fn, receiver, arg );
this._length = functionBuffer.length();
this._queueTick();
};
Async.prototype._consumeFunctionBuffer =
function Async$_consumeFunctionBuffer() {
var functionBuffer = this._functionBuffer;
while( functionBuffer.length() > 0 ) {
var fn = functionBuffer.shift();
var receiver = functionBuffer.shift();
var arg = functionBuffer.shift();
fn.call( receiver, arg );
}
this._reset();
this._consumeLateBuffer();
};
Async.prototype._consumeLateBuffer = function Async$_consumeLateBuffer() {
var buffer = this._lateBuffer;
while( buffer.length() > 0 ) {
var fn = buffer.shift();
var receiver = buffer.shift();
var arg = buffer.shift();
var res = tryCatch1( fn, receiver, arg );
if( res === errorObj ) {
this._queueTick();
throw res.e;
}
}
};
Async.prototype._queueTick = function Async$_queue() {
if( !this._isTickUsed ) {
schedule( this.consumeFunctionBuffer );
this._isTickUsed = true;
}
};
Async.prototype._reset = function Async$_reset() {
this._isTickUsed = false;
this._length = 0;
};
module.exports = new Async();
},{"./assert.js":2,"./queue.js":26,"./schedule.js":30,"./util.js":36}],4:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
var Promise = require("./promise.js")();
module.exports = Promise;
},{"./promise.js":18}],5:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function( Promise ) {
Promise.prototype.call = function Promise$call( propertyName ) {
var len = arguments.length;
var args = new Array(len-1);
for( var i = 1; i < len; ++i ) {
args[ i - 1 ] = arguments[ i ];
}
return this._then( function( obj ) {
return obj[ propertyName ].apply( obj, args );
},
void 0,
void 0,
void 0,
void 0,
this.call
);
};
function Promise$getter( obj ) {
var prop = typeof this === "string"
? this
: ("" + this);
return obj[ prop ];
}
Promise.prototype.get = function Promise$get( propertyName ) {
return this._then(
Promise$getter,
void 0,
void 0,
propertyName,
void 0,
this.get
);
};
};
},{}],6:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function( Promise ) {
var errors = require( "./errors.js" );
var async = require( "./async.js" );
var CancellationError = errors.CancellationError;
Promise.prototype.cancel = function Promise$cancel() {
if( !this.isCancellable() ) return this;
var cancelTarget = this;
while( cancelTarget._cancellationParent !== void 0 ) {
cancelTarget = cancelTarget._cancellationParent;
}
if( cancelTarget === this ) {
var err = new CancellationError();
this._attachExtraTrace( err );
this._reject( err );
}
else {
async.invoke( cancelTarget.cancel, cancelTarget, void 0 );
}
return this;
};
Promise.prototype.uncancellable = function Promise$uncancellable() {
var ret = new Promise();
ret._setTrace( this.uncancellable, this );
ret._unsetCancellable();
ret._assumeStateOf( this, true );
ret._boundTo = this._boundTo;
return ret;
};
Promise.prototype.fork =
function Promise$fork( didFulfill, didReject, didProgress ) {
var ret = this._then( didFulfill, didReject, didProgress,
void 0, void 0, this.fork );
ret._cancellationParent = void 0;
return ret;
};
};
},{"./async.js":3,"./errors.js":10}],7:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function() {
var ASSERT = require("./assert.js");
var inherits = require( "./util.js").inherits;
var rignore = new RegExp(
"\\b(?:Promise(?:Array|Spawn)?\\$_\\w+|tryCatch(?:1|2|Apply)|setTimeout" +
"|CatchFilter\\$_\\w+|makeNodePromisified|processImmediate|nextTick" +
"|Async\\$\\w+)\\b"
);
var rtraceline = null;
var formatStack = null;
var areNamesMangled = false;
function CapturedTrace( ignoreUntil, isTopLevel ) {
if( !areNamesMangled ) {
}
this.captureStackTrace( ignoreUntil, isTopLevel );
}
inherits( CapturedTrace, Error );
CapturedTrace.prototype.captureStackTrace =
function CapturedTrace$captureStackTrace( ignoreUntil, isTopLevel ) {
captureStackTrace( this, ignoreUntil, isTopLevel );
};
CapturedTrace.possiblyUnhandledRejection =
function CapturedTrace$PossiblyUnhandledRejection( reason ) {
if( typeof console === "object" ) {
var stack = reason.stack;
var message = "Possibly unhandled " + formatStack( stack, reason );
if( typeof console.error === "function" ) {
console.error( message );
}
else if( typeof console.log === "function" ) {
console.log( message );
}
}
};
areNamesMangled = CapturedTrace.prototype.captureStackTrace.name !==
"CapturedTrace$captureStackTrace";
CapturedTrace.combine = function CapturedTrace$Combine( current, prev ) {
var curLast = current.length - 1;
for( var i = prev.length - 1; i >= 0; --i ) {
var line = prev[i];
if( current[ curLast ] === line ) {
current.pop();
curLast--;
}
else {
break;
}
}
current.push( "From previous event:" );
var lines = current.concat( prev );
var ret = [];
for( var i = 0, len = lines.length; i < len; ++i ) {
if( ( rignore.test( lines[i] ) ||
( i > 0 && !rtraceline.test( lines[i] ) ) &&
lines[i] !== "From previous event:" )
) {
continue;
}
ret.push( lines[i] );
}
return ret;
};
CapturedTrace.isSupported = function CapturedTrace$IsSupported() {
return typeof captureStackTrace === "function";
};
var captureStackTrace = (function stackDetection() {
function snip( str ) {
var maxChars = 41;
if( str.length < maxChars ) {
return str;
}
return str.substr(0, maxChars - 3) + "...";
}
function formatNonError( obj ) {
var str = obj.toString();
var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/;
if( ruselessToString.test( str ) ) {
try {
var newStr = JSON.stringify(obj);
str = newStr;
}
catch( e ) {
}
}
return ("(<" + snip( str ) + ">, no stack trace)");
}
if( typeof Error.stackTraceLimit === "number" &&
typeof Error.captureStackTrace === "function" ) {
rtraceline = /^\s*at\s*/;
formatStack = function( stack, error ) {
if( typeof stack === "string" ) return stack;
if( error.name !== void 0 &&
error.message !== void 0 ) {
return error.name + ". " + error.message;
}
return formatNonError( error );
};
var captureStackTrace = Error.captureStackTrace;
return function CapturedTrace$_captureStackTrace(
receiver, ignoreUntil, isTopLevel ) {
var prev = -1;
if( !isTopLevel ) {
prev = Error.stackTraceLimit;
Error.stackTraceLimit =
Math.max(1, Math.min(10000, prev) / 3 | 0);
}
captureStackTrace( receiver, ignoreUntil );
if( !isTopLevel ) {
Error.stackTraceLimit = prev;
}
};
}
var err = new Error();
if( !areNamesMangled && typeof err.stack === "string" &&
typeof "".startsWith === "function" &&
( err.stack.startsWith("stackDetection@")) &&
stackDetection.name === "stackDetection" ) {
Object.defineProperty( Error, "stackTraceLimit", {
writable: true,
enumerable: false,
configurable: false,
value: 25
});
rtraceline = /@/;
var rline = /[@\n]/;
formatStack = function( stack, error ) {
if( typeof stack === "string" ) {
return ( error.name + ". " + error.message + "\n" + stack );
}
if( error.name !== void 0 &&
error.message !== void 0 ) {
return error.name + ". " + error.message;
}
return formatNonError( error );
};
return function captureStackTrace(o, fn) {
var name = fn.name;
var stack = new Error().stack;
var split = stack.split( rline );
var i, len = split.length;
for (i = 0; i < len; i += 2) {
if (split[i] === name) {
break;
}
}
split = split.slice(i + 2);
len = split.length - 2;
var ret = "";
for (i = 0; i < len; i += 2) {
ret += split[i];
ret += "@";
ret += split[i + 1];
ret += "\n";
}
o.stack = ret;
};
}
else {
return null;
}
})();
return CapturedTrace;
};
},{"./assert.js":2,"./util.js":36}],8:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
var ensureNotHandled = require( "./errors.js" ).ensureNotHandled;
var util = require( "./util.js");
var tryCatch1 = util.tryCatch1;
var errorObj = util.errorObj;
function CatchFilter( instances, callback, promise ) {
this._instances = instances;
this._callback = callback;
this._promise = promise;
}
function CatchFilter$_safePredicate( predicate, e ) {
var safeObject = {};
var retfilter = tryCatch1( predicate, safeObject, e );
if( retfilter === errorObj ) return retfilter;
var safeKeys = Object.keys(safeObject);
if( safeKeys.length ) {
errorObj.e = new TypeError(
"Catch filter must inherit from Error "
+ "or be a simple predicate function" );
return errorObj;
}
return retfilter;
}
CatchFilter.prototype.doFilter = function CatchFilter$_doFilter( e ) {
var cb = this._callback;
for( var i = 0, len = this._instances.length; i < len; ++i ) {
var item = this._instances[i];
var itemIsErrorType = item === Error ||
( item != null && item.prototype instanceof Error );
if( itemIsErrorType && e instanceof item ) {
var ret = tryCatch1( cb, this._promise._boundTo, e );
if( ret === errorObj ) {
throw ret.e;
}
return ret;
} else if( typeof item === "function" && !itemIsErrorType ) {
var shouldHandle = CatchFilter$_safePredicate(item, e);
if( shouldHandle === errorObj ) {
this._promise._attachExtraTrace( errorObj.e );
e = errorObj.e;
break;
} else if(shouldHandle) {
var ret = tryCatch1( cb, this._promise._boundTo, e );
if( ret === errorObj ) {
throw ret.e;
}
return ret;
}
}
}
ensureNotHandled( e );
throw e;
};
module.exports = CatchFilter;
},{"./errors.js":10,"./util.js":36}],9:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function( Promise ) {
var ASSERT = require("./assert.js");
var async = require( "./async.js" );
var util = require( "./util.js" );
var isPrimitive = util.isPrimitive;
var errorObj = util.errorObj;
var isObject = util.isObject;
var tryCatch2 = util.tryCatch2;
function Thenable() {
this.errorObj = errorObj;
this.__id__ = 0;
this.treshold = 1000;
this.thenableCache = new Array( this.treshold );
this.promiseCache = new Array( this.treshold );
this._compactQueued = false;
}
Thenable.prototype.couldBe = function Thenable$couldBe( ret ) {
if( isPrimitive( ret ) ) {
return false;
}
var id = ret.__id_$thenable__;
if( typeof id === "number" &&
this.thenableCache[id] !== void 0 ) {
return true;
}
return ("then" in ret);
};
Thenable.prototype.is = function Thenable$is( ret, ref ) {
var id = ret.__id_$thenable__;
if( typeof id === "number" &&
this.thenableCache[id] !== void 0 ) {
ref.ref = this.thenableCache[id];
ref.promise = this.promiseCache[id];
return true;
}
return this._thenableSlowCase( ret, ref );
};
Thenable.prototype.addCache =
function Thenable$_addCache( thenable, promise ) {
var id = this.__id__;
this.__id__ = id + 1;
var descriptor = this._descriptor( id );
Object.defineProperty( thenable, "__id_$thenable__", descriptor );
this.thenableCache[id] = thenable;
this.promiseCache[id] = promise;
if( this.thenableCache.length > this.treshold &&
!this._compactQueued) {
this._compactQueued = true;
async.invokeLater( this._compactCache, this, void 0 );
}
};
Thenable.prototype.deleteCache = function Thenable$deleteCache( thenable ) {
var id = thenable.__id_$thenable__;
if( id === -1 ) {
return;
}
this.thenableCache[id] = void 0;
this.promiseCache[id] = void 0;
thenable.__id_$thenable__ = -1; };
var descriptor = {
value: 0,
enumerable: false,
writable: true,
configurable: true
};
Thenable.prototype._descriptor = function Thenable$_descriptor( id ) {
descriptor.value = id;
return descriptor;
};
Thenable.prototype._compactCache = function Thenable$_compactCache() {
var arr = this.thenableCache;
var promiseArr = this.promiseCache;
var skips = 0;
var j = 0;
for( var i = 0, len = arr.length; i < len; ++i ) {
var item = arr[ i ];
if( item === void 0 ) {
skips++;
}
else {
promiseArr[ j ] = promiseArr[ i ];
item.__id_$thenable__ = j;
arr[ j++ ] = item;
}
}
var newId = arr.length - skips;
if( newId === this.__id__ ) {
this.treshold *= 2;
}
else for( var i = newId, len = arr.length; i < len; ++i ) {
promiseArr[ j ] = arr[ i ] = void 0;
}
this.__id__ = newId;
this._compactQueued = false;
};
Thenable.prototype._thenableSlowCase =
function Thenable$_thenableSlowCase( ret, ref ) {
try {
var then = ret.then;
if( typeof then === "function" ) {
ref.ref = then;
return true;
}
return false;
}
catch(e) {
this.errorObj.e = e;
ref.ref = this.errorObj;
return true;
}
};
var thenable = new Thenable( errorObj );
Promise._couldBeThenable = function( val ) {
return thenable.couldBe( val );
};
function doThenable( obj, ref, caller ) {
if( ref.promise != null ) {
return ref.promise;
}
var resolver = Promise.pending( caller );
var result = ref.ref;
if( result === errorObj ) {
resolver.reject( result.e );
return resolver.promise;
}
thenable.addCache( obj, resolver.promise );
var called = false;
var ret = tryCatch2( result, obj, function t( a ) {
if( called ) return;
called = true;
async.invoke( thenable.deleteCache, thenable, obj );
var b = Promise$_Cast( a );
if( b === a ) {
resolver.fulfill( a );
}
else {
if( a === obj ) {
resolver.promise._resolveFulfill( a );
}
else {
b._then(
resolver.fulfill,
resolver.reject,
void 0,
resolver,
void 0,
t
);
}
}
}, function t( a ) {
if( called ) return;
called = true;
async.invoke( thenable.deleteCache, thenable, obj );
resolver.reject( a );
});
if( ret === errorObj && !called ) {
resolver.reject( ret.e );
async.invoke( thenable.deleteCache, thenable, obj );
}
return resolver.promise;
}
function Promise$_Cast( obj, caller ) {
if( isObject( obj ) ) {
if( obj instanceof Promise ) {
return obj;
}
var ref = { ref: null, promise: null };
if( thenable.is( obj, ref ) ) {
caller = typeof caller === "function" ? caller : Promise$_Cast;
return doThenable( obj, ref, caller );
}
}
return obj;
}
Promise.prototype._resolveThenable =
function Promise$_resolveThenable( x, ref ) {
if( ref.promise != null ) {
this._assumeStateOf( ref.promise, true );
return;
}
if( ref.ref === errorObj ) {
this._attachExtraTrace( ref.ref.e );
async.invoke( this._reject, this, ref.ref.e );
}
else {
thenable.addCache( x, this );
var then = ref.ref;
var localX = x;
var localP = this;
var key = {};
var called = false;
var t = function t( v ) {
if( called && this !== key ) return;
called = true;
var fn = localP._fulfill;
var b = Promise$_Cast( v );
if( b !== v ||
( b instanceof Promise && b.isPending() ) ) {
if( v === x ) {
async.invoke( fn, localP, v );
async.invoke( thenable.deleteCache, thenable, localX );
}
else {
b._then( t, r, void 0, key, void 0, t);
}
return;
}
if( b instanceof Promise ) {
var fn = b.isFulfilled()
? localP._fulfill : localP._reject;
v = v._resolvedValue;
b = Promise$_Cast( v );
if( b !== v ||
( b instanceof Promise && b !== v ) ) {
b._then( t, r, void 0, key, void 0, t);
return;
}
}
async.invoke( fn, localP, v );
async.invoke( thenable.deleteCache,
thenable, localX );
};
var r = function r( v ) {
if( called && this !== key ) return;
var fn = localP._reject;
called = true;
var b = Promise$_Cast( v );
if( b !== v ||
( b instanceof Promise && b.isPending() ) ) {
if( v === x ) {
async.invoke( fn, localP, v );
async.invoke( thenable.deleteCache, thenable, localX );
}
else {
b._then( t, r, void 0, key, void 0, t);
}
return;
}
if( b instanceof Promise ) {
var fn = b.isFulfilled()
? localP._fulfill : localP._reject;
v = v._resolvedValue;
b = Promise$_Cast( v );
if( b !== v ||
( b instanceof Promise && b.isPending() ) ) {
b._then( t, r, void 0, key, void 0, t);
return;
}
}
async.invoke( fn, localP, v );
async.invoke( thenable.deleteCache,
thenable, localX );
};
var threw = tryCatch2( then, x, t, r);
if( threw === errorObj &&
!called ) {
this._attachExtraTrace( threw.e );
async.invoke( this._reject, this, threw.e );
async.invoke( thenable.deleteCache, thenable, x );
}
}
};
Promise.prototype._tryThenable = function Promise$_tryThenable( x ) {
var ref;
if( !thenable.is( x, ref = {ref: null, promise: null} ) ) {
return false;
}
this._resolveThenable( x, ref );
return true;
};
Promise._cast = Promise$_Cast;
};
},{"./assert.js":2,"./async.js":3,"./util.js":36}],10:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
var global = require("./global.js");
var Objectfreeze = global.Object.freeze;
var util = require( "./util.js");
var inherits = util.inherits;
var isObject = util.isObject;
var notEnumerableProp = util.notEnumerableProp;
var Error = global.Error;
function isStackAttached( val ) {
return ( val & 1 ) > 0;
}
function isHandled( val ) {
return ( val & 2 ) > 0;
}
function withStackAttached( val ) {
return ( val | 1 );
}
function withHandledMarked( val ) {
return ( val | 2 );
}
function withHandledUnmarked( val ) {
return ( val & ( ~2 ) );
}
function ensureNotHandled( reason ) {
var field;
if( isObject( reason ) &&
( ( field = reason["__promiseHandled__"] ) !== void 0 ) ) {
reason["__promiseHandled__"] = withHandledUnmarked( field );
}
}
function attachDefaultState( obj ) {
try {
notEnumerableProp( obj, "__promiseHandled__", 0 );
return true;
}
catch( e ) {
return false;
}
}
function isError( obj ) {
return obj instanceof Error;
}
function canAttach( obj ) {
if( isError( obj ) ) {
var handledState = obj["__promiseHandled__"];
if( handledState === void 0 ) {
return attachDefaultState( obj );
}
return !isStackAttached( handledState );
}
return false;
}
function subError( nameProperty, defaultMessage ) {
function SubError( message ) {
this.message = typeof message === "string" ? message : defaultMessage;
this.name = nameProperty;
if( Error.captureStackTrace ) {
Error.captureStackTrace( this, this.constructor );
}
}
inherits( SubError, Error );
return SubError;
}
var TypeError = global.TypeError;
if( typeof TypeError !== "function" ) {
TypeError = subError( "TypeError", "type error" );
}
var CancellationError = subError( "CancellationError", "cancellation error" );
var TimeoutError = subError( "TimeoutError", "timeout error" );
function RejectionError( message ) {
this.name = "RejectionError";
this.message = message;
this.cause = message;
if( message instanceof Error ) {
this.message = message.message;
this.stack = message.stack;
}
else if( Error.captureStackTrace ) {
Error.captureStackTrace( this, this.constructor );
}
}
inherits( RejectionError, Error );
var key = "__BluebirdErrorTypes__";
var errorTypes = global[key];
if( !errorTypes ) {
errorTypes = Objectfreeze({
CancellationError: CancellationError,
TimeoutError: TimeoutError,
RejectionError: RejectionError
});
notEnumerableProp( global, key, errorTypes );
}
module.exports = {
Error: Error,
TypeError: TypeError,
CancellationError: errorTypes.CancellationError,
RejectionError: errorTypes.RejectionError,
TimeoutError: errorTypes.TimeoutError,
attachDefaultState: attachDefaultState,
ensureNotHandled: ensureNotHandled,
withHandledUnmarked: withHandledUnmarked,
withHandledMarked: withHandledMarked,
withStackAttached: withStackAttached,
isStackAttached: isStackAttached,
isHandled: isHandled,
canAttach: canAttach
};
},{"./global.js":14,"./util.js":36}],11:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function(Promise) {
var TypeError = require('./errors.js').TypeError;
function apiRejection( msg ) {
var error = new TypeError( msg );
var ret = Promise.rejected( error );
var parent = ret._peekContext();
if( parent != null ) {
parent._attachExtraTrace( error );
}
return ret;
}
return apiRejection;
};
},{"./errors.js":10}],12:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function( Promise, Promise$_All, PromiseArray, apiRejection ) {
var ASSERT = require( "./assert.js" );
function Promise$_filterer( fulfilleds ) {
var fn = this;
var receiver = void 0;
if( typeof fn !== "function" ) {
receiver = fn.receiver;
fn = fn.fn;
}
var ret = new Array( fulfilleds.length );
var j = 0;
if( receiver === void 0 ) {
for( var i = 0, len = fulfilleds.length; i < len; ++i ) {
var item = fulfilleds[i];
if( item === void 0 &&
!( i in fulfilleds ) ) {
continue;
}
if( fn( item, i, len ) ) {
ret[j++] = item;
}
}
}
else {
for( var i = 0, len = fulfilleds.length; i < len; ++i ) {
var item = fulfilleds[i];
if( item === void 0 &&
!( i in fulfilleds ) ) {
continue;
}
if( fn.call( receiver, item, i, len ) ) {
ret[j++] = item;
}
}
}
ret.length = j;
return ret;
}
function Promise$_Filter( promises, fn, useBound, caller ) {
if( typeof fn !== "function" ) {
return apiRejection( "fn is not a function" );
}
if( useBound === true ) {
fn = {
fn: fn,
receiver: promises._boundTo
};
}
return Promise$_All( promises, PromiseArray, caller,
useBound === true ? promises._boundTo : void 0 )
.promise()
._then( Promise$_filterer, void 0, void 0, fn, void 0, caller );
}
Promise.filter = function Promise$Filter( promises, fn ) {
return Promise$_Filter( promises, fn, false, Promise.filter );
};
Promise.prototype.filter = function Promise$filter( fn ) {
return Promise$_Filter( this, fn, true, this.filter );
};
};
},{"./assert.js":2}],13:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function( Promise, apiRejection ) {
var PromiseSpawn = require( "./promise_spawn.js" )(Promise);
var errors = require( "./errors.js");
var TypeError = errors.TypeError;
Promise.coroutine = function Promise$Coroutine( generatorFunction ) {
if( typeof generatorFunction !== "function" ) {
throw new TypeError( "generatorFunction must be a function" );
}
var PromiseSpawn$ = PromiseSpawn;
return function anonymous() {
var generator = generatorFunction.apply( this, arguments );
var spawn = new PromiseSpawn$( void 0, void 0, anonymous );
spawn._generator = generator;
spawn._next( void 0 );
return spawn.promise();
};
};
Promise.spawn = function Promise$Spawn( generatorFunction ) {
if( typeof generatorFunction !== "function" ) {
return apiRejection( "generatorFunction must be a function" );
}
var spawn = new PromiseSpawn( generatorFunction, this, Promise.spawn );
var ret = spawn.promise();
spawn._run( Promise.spawn );
return ret;
};
};
},{"./errors.js":10,"./promise_spawn.js":22}],14:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = (function(){
if( typeof this !== "undefined" ) {
return this;
}
if( typeof process !== "undefined" &&
typeof global !== "undefined" &&
typeof process.execPath === "string" ) {
return global;
}
if( typeof window !== "undefined" &&
typeof document !== "undefined" &&
typeof navigator !== "undefined" && navigator !== null &&
typeof navigator.appName === "string" ) {
return window;
}
})();
},{}],15:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function( Promise, Promise$_All, PromiseArray, apiRejection ) {
var ASSERT = require( "./assert.js" );
function Promise$_mapper( fulfilleds ) {
var fn = this;
var receiver = void 0;
if( typeof fn !== "function" ) {
receiver = fn.receiver;
fn = fn.fn;
}
var shouldDefer = false;
if( receiver === void 0 ) {
for( var i = 0, len = fulfilleds.length; i < len; ++i ) {
if( fulfilleds[i] === void 0 &&
!(i in fulfilleds) ) {
continue;
}
var fulfill = fn( fulfilleds[ i ], i, len );
if( !shouldDefer && Promise.is( fulfill ) ) {
if( fulfill.isFulfilled() ) {
fulfilleds[i] = fulfill._resolvedValue;
continue;
}
else {
shouldDefer = true;
}
}
fulfilleds[i] = fulfill;
}
}
else {
for( var i = 0, len = fulfilleds.length; i < len; ++i ) {
if( fulfilleds[i] === void 0 &&
!(i in fulfilleds) ) {
continue;
}
var fulfill = fn.call( receiver, fulfilleds[ i ], i, len );
if( !shouldDefer && Promise.is( fulfill ) ) {
if( fulfill.isFulfilled() ) {
fulfilleds[i] = fulfill._resolvedValue;
continue;
}
else {
shouldDefer = true;
}
}
fulfilleds[i] = fulfill;
}
}
return shouldDefer
? Promise$_All( fulfilleds, PromiseArray,
Promise$_mapper, void 0 ).promise()
: fulfilleds;
}
function Promise$_Map( promises, fn, useBound, caller ) {
if( typeof fn !== "function" ) {
return apiRejection( "fn is not a function" );
}
if( useBound === true ) {
fn = {
fn: fn,
receiver: promises._boundTo
};
}
return Promise$_All(
promises,
PromiseArray,
caller,
useBound === true ? promises._boundTo : void 0
).promise()
._then(
Promise$_mapper,
void 0,
void 0,
fn,
void 0,
caller
);
}
Promise.prototype.map = function Promise$map( fn ) {
return Promise$_Map( this, fn, true, this.map );
};
Promise.map = function Promise$Map( promises, fn ) {
return Promise$_Map( promises, fn, false, Promise.map );
};
};
},{"./assert.js":2}],16:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function( Promise ) {
var util = require( "./util.js" );
var async = require( "./async.js" );
var ASSERT = require( "./assert.js" );
var tryCatch2 = util.tryCatch2;
var tryCatch1 = util.tryCatch1;
var errorObj = util.errorObj;
function thrower( r ) {
throw r;
}
function Promise$_successAdapter( val, receiver ) {
var nodeback = this;
var ret = tryCatch2( nodeback, receiver, null, val );
if( ret === errorObj ) {
async.invokeLater( thrower, void 0, ret.e );
}
}
function Promise$_errorAdapter( reason, receiver ) {
var nodeback = this;
var ret = tryCatch1( nodeback, receiver, reason );
if( ret === errorObj ) {
async.invokeLater( thrower, void 0, ret.e );
}
}
Promise.prototype.nodeify = function Promise$nodeify( nodeback ) {
if( typeof nodeback == "function" ) {
this._then(
Promise$_successAdapter,
Promise$_errorAdapter,
void 0,
nodeback,
this._isBound() ? this._boundTo : null,
this.nodeify
);
}
return this;
};
};
},{"./assert.js":2,"./async.js":3,"./util.js":36}],17:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function( Promise ) {
var ASSERT = require( "./assert.js");
var util = require( "./util.js" );
var async = require( "./async.js" );
var tryCatch1 = util.tryCatch1;
var errorObj = util.errorObj;
Promise.prototype.progressed = function Promise$progressed( fn ) {
return this._then( void 0, void 0, fn,
void 0, void 0, this.progressed );
};
Promise.prototype._progress = function Promise$_progress( progressValue ) {
if( this._isFollowingOrFulfilledOrRejected() ) return;
this._resolveProgress( progressValue );
};
Promise.prototype._progressAt = function Promise$_progressAt( index ) {
if( index === 0 ) return this._progress0;
return this[ index + 2 - 5 ];
};
Promise.prototype._resolveProgress =
function Promise$_resolveProgress( progressValue ) {
var len = this._length();
for( var i = 0; i < len; i += 5 ) {
var fn = this._progressAt( i );
var promise = this._promiseAt( i );
if( !Promise.is( promise ) ) {
fn.call( this._receiverAt( i ), progressValue, promise );
continue;
}
var ret = progressValue;
if( fn !== void 0 ) {
this._pushContext();
ret = tryCatch1( fn, this._receiverAt( i ), progressValue );
this._popContext();
if( ret === errorObj ) {
if( ret.e != null &&
ret.e.name === "StopProgressPropagation" ) {
ret.e["__promiseHandled__"] = 2;
}
else {
promise._attachExtraTrace( ret.e );
async.invoke( promise._progress, promise, ret.e );
}
}
else if( Promise.is( ret ) ) {
ret._then( promise._progress, null, null, promise, void 0,
this._progress );
}
else {
async.invoke( promise._progress, promise, ret );
}
}
else {
async.invoke( promise._progress, promise, ret );
}
}
};
};
},{"./assert.js":2,"./async.js":3,"./util.js":36}],18:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function() {
var global = require("./global.js");
var ASSERT = require("./assert.js");
var util = require( "./util.js" );
var async = require( "./async.js" );
var errors = require( "./errors.js" );
var PromiseArray = require( "./promise_array.js" )(Promise);
var CapturedTrace = require( "./captured_trace.js")();
var CatchFilter = require( "./catch_filter.js");
var PromiseResolver = require( "./promise_resolver.js" );
var isArray = util.isArray;
var notEnumerableProp = util.notEnumerableProp;
var isObject = util.isObject;
var ensurePropertyExpansion = util.ensurePropertyExpansion;
var errorObj = util.errorObj;
var tryCatch1 = util.tryCatch1;
var tryCatch2 = util.tryCatch2;
var tryCatchApply = util.tryCatchApply;
var TypeError = errors.TypeError;
var CancellationError = errors.CancellationError;
var TimeoutError = errors.TimeoutError;
var RejectionError = errors.RejectionError;
var ensureNotHandled = errors.ensureNotHandled;
var withHandledMarked = errors.withHandledMarked;
var withStackAttached = errors.withStackAttached;
var isStackAttached = errors.isStackAttached;
var isHandled = errors.isHandled;
var canAttach = errors.canAttach;
var apiRejection = require("./errors_api_rejection")(Promise);
var APPLY = {};
function isPromise( obj ) {
if( typeof obj !== "object" ) return false;
return obj instanceof Promise;
}
function Promise( resolver ) {
this._bitField = 67108864;
this._fulfill0 = void 0;
this._reject0 = void 0;
this._progress0 = void 0;
this._promise0 = void 0;
this._receiver0 = void 0;
this._resolvedValue = void 0;
this._cancellationParent = void 0;
this._boundTo = void 0;
if( longStackTraces ) this._traceParent = this._peekContext();
if( typeof resolver === "function" ) this._resolveResolver( resolver );
}
Promise.prototype.bind = function Promise$bind( obj ) {
var ret = new Promise();
ret._setTrace( this.bind, this );
ret._assumeStateOf( this, true );
ret._setBoundTo( obj );
return ret;
};
Promise.prototype.toString = function Promise$toString() {
return "[object Promise]";
};
Promise.prototype.caught = Promise.prototype["catch"] =
function Promise$_catch( fn ) {
var len = arguments.length;
if( len > 1 ) {
var catchInstances = new Array( len - 1 ),
j = 0, i;
for( i = 0; i < len - 1; ++i ) {
var item = arguments[i];
if( typeof item === "function" ) {
catchInstances[j++] = item;
}
else {
var catchFilterTypeError =
new TypeError(
"A catch filter must be an error constructor "
+ "or a filter function");
this._attachExtraTrace( catchFilterTypeError );
async.invoke( this._reject, this, catchFilterTypeError );
return;
}
}
catchInstances.length = j;
fn = arguments[i];
this._resetTrace();
var catchFilter = new CatchFilter( catchInstances, fn, this );
return this._then( void 0, catchFilter.doFilter, void 0,
catchFilter, void 0, this.caught );
}
return this._then( void 0, fn, void 0, void 0, void 0, this.caught );
};
function thrower( r ) {
throw r;
}
function slowFinally( ret, reasonOrValue ) {
if( this.isFulfilled() ) {
return ret._then(function() {
return reasonOrValue;
}, thrower, void 0, this, void 0, slowFinally );
}
else {
return ret._then(function() {
ensureNotHandled( reasonOrValue );
throw reasonOrValue;
}, thrower, void 0, this, void 0, slowFinally );
}
}
Promise.prototype.lastly = Promise.prototype["finally"] =
function Promise$finally( fn ) {
var r = function( reasonOrValue ) {
var ret = this._isBound() ? fn.call( this._boundTo ) : fn();
if( isPromise( ret ) ) {
return slowFinally.call( this, ret, reasonOrValue );
}
if( this.isRejected() ) {
ensureNotHandled( reasonOrValue );
throw reasonOrValue;
}
return reasonOrValue;
};
return this._then( r, r, void 0, this, void 0, this.lastly );
};
Promise.prototype.then =
function Promise$then( didFulfill, didReject, didProgress ) {
return this._then( didFulfill, didReject, didProgress,
void 0, void 0, this.then );
};
Promise.prototype.done =
function Promise$done( didFulfill, didReject, didProgress ) {
var promise = this._then( didFulfill, didReject, didProgress,
void 0, void 0, this.done );
promise._setIsFinal();
};
Promise.prototype.spread = function Promise$spread( didFulfill, didReject ) {
return this._then( didFulfill, didReject, void 0,
APPLY, void 0, this.spread );
};
Promise.prototype.isFulfilled = function Promise$isFulfilled() {
return ( this._bitField & 268435456 ) > 0;
};
Promise.prototype.isRejected = function Promise$isRejected() {
return ( this._bitField & 134217728 ) > 0;
};
Promise.prototype.isPending = function Promise$isPending() {
return !this.isResolved();
};
Promise.prototype.isResolved = function Promise$isResolved() {
return ( this._bitField & 402653184 ) > 0;
};
Promise.prototype.isCancellable = function Promise$isCancellable() {
return !this.isResolved() &&
this._cancellable();
};
Promise.prototype.toJSON = function Promise$toJSON() {
var ret = {
isFulfilled: false,
isRejected: false,
fulfillmentValue: void 0,
rejectionReason: void 0
};
if( this.isFulfilled() ) {
ret.fulfillmentValue = this._resolvedValue;
ret.isFulfilled = true;
}
else if( this.isRejected() ) {
ret.rejectionReason = this._resolvedValue;
ret.isRejected = true;
}
return ret;
};
Promise.prototype.all = function Promise$all() {
return Promise$_all( this, true, this.all );
};
Promise.is = isPromise;
function Promise$_all( promises, useBound, caller ) {
return Promise$_All(
promises,
PromiseArray,
caller,
useBound === true ? promises._boundTo : void 0
).promise();
}
Promise.all = function Promise$All( promises ) {
return Promise$_all( promises, false, Promise.all );
};
Promise.join = function Promise$Join() {
var ret = new Array( arguments.length );
for( var i = 0, len = ret.length; i < len; ++i ) {
ret[i] = arguments[i];
}
return Promise$_All( ret, PromiseArray, Promise.join, void 0 ).promise();
};
Promise.fulfilled = function Promise$Fulfilled( value, caller ) {
var ret = new Promise();
ret._setTrace( typeof caller === "function"
? caller
: Promise.fulfilled, void 0 );
if( ret._tryAssumeStateOf( value, false ) ) {
return ret;
}
ret._cleanValues();
ret._setFulfilled();
ret._resolvedValue = value;
return ret;
};
Promise.rejected = function Promise$Rejected( reason ) {
var ret = new Promise();
ret._setTrace( Promise.rejected, void 0 );
ret._cleanValues();
ret._setRejected();
ret._resolvedValue = reason;
return ret;
};
Promise["try"] = Promise.attempt = function Promise$_Try( fn, args, ctx ) {
if( typeof fn !== "function" ) {
return apiRejection("fn must be a function");
}
var value = isArray( args )
? tryCatchApply( fn, args, ctx )
: tryCatch1( fn, ctx, args );
var ret = new Promise();
ret._setTrace( Promise.attempt, void 0 );
if( value === errorObj ) {
ret._cleanValues();
ret._setRejected();
ret._resolvedValue = value.e;
return ret;
}
var maybePromise = Promise._cast(value);
if( maybePromise instanceof Promise ) {
ret._assumeStateOf( maybePromise, true );
}
else {
ret._cleanValues();
ret._setFulfilled();
ret._resolvedValue = value;
}
return ret;
};
Promise.pending = function Promise$Pending( caller ) {
var promise = new Promise();
promise._setTrace( typeof caller === "function"
? caller : Promise.pending, void 0 );
return new PromiseResolver( promise );
};
Promise.bind = function Promise$Bind( obj ) {
var ret = new Promise();
ret._setTrace( Promise.bind, void 0 );
ret._setFulfilled();
ret._setBoundTo( obj );
return ret;
};
Promise.cast = function Promise$Cast( obj, caller ) {
var ret = Promise._cast( obj, caller );
if( !( ret instanceof Promise ) ) {
return Promise.fulfilled( ret, caller );
}
return ret;
};
Promise.onPossiblyUnhandledRejection =
function Promise$OnPossiblyUnhandledRejection( fn ) {
if( typeof fn === "function" ) {
CapturedTrace.possiblyUnhandledRejection = fn;
}
else {
CapturedTrace.possiblyUnhandledRejection = void 0;
}
};
var longStackTraces = true || false || !!(
typeof process !== "undefined" &&
typeof process.execPath === "string" &&
typeof process.env === "object" &&
process.env[ "BLUEBIRD_DEBUG" ]
);
Promise.longStackTraces = function Promise$LongStackTraces() {
if( async.haveItemsQueued() &&
longStackTraces === false
) {
throw new Error("Cannot enable long stack traces " +
"after promises have been created");
}
longStackTraces = true;
};
Promise.hasLongStackTraces = function Promise$HasLongStackTraces() {
return longStackTraces;
};
Promise.prototype._then =
function Promise$_then(
didFulfill,
didReject,
didProgress,
receiver,
internalData,
caller
) {
var haveInternalData = internalData !== void 0;
var ret = haveInternalData ? internalData : new Promise();
if( longStackTraces && !haveInternalData ) {
var haveSameContext = this._peekContext() === this._traceParent;
ret._traceParent = haveSameContext ? this._traceParent : this;
ret._setTrace( typeof caller === "function" ?
caller : this._then, this );
}
if( !haveInternalData ) {
ret._boundTo = this._boundTo;
}
var callbackIndex =
this._addCallbacks( didFulfill, didReject, didProgress, ret, receiver );
if( this.isResolved() ) {
async.invoke( this._resolveLast, this, callbackIndex );
}
else if( !haveInternalData && this.isCancellable() ) {
ret._cancellationParent = this;
}
if( this._isDelegated() ) {
this._unsetDelegated();
var x = this._resolvedValue;
if( !this._tryThenable( x ) ) {
async.invoke( this._fulfill, this, x );
}
}
return ret;
};
Promise.prototype._length = function Promise$_length() {
return this._bitField & 16777215;
};
Promise.prototype._isFollowingOrFulfilledOrRejected =
function Promise$_isFollowingOrFulfilledOrRejected() {
return ( this._bitField & 939524096 ) > 0;
};
Promise.prototype._setLength = function Promise$_setLength( len ) {
this._bitField = ( this._bitField & -16777216 ) |
( len & 16777215 ) ;
};
Promise.prototype._cancellable = function Promise$_cancellable() {
return ( this._bitField & 67108864 ) > 0;
};
Promise.prototype._setFulfilled = function Promise$_setFulfilled() {
this._bitField = this._bitField | 268435456;
};
Promise.prototype._setRejected = function Promise$_setRejected() {
this._bitField = this._bitField | 134217728;
};
Promise.prototype._setFollowing = function Promise$_setFollowing() {
this._bitField = this._bitField | 536870912;
};
Promise.prototype._setDelegated = function Promise$_setDelegated() {
this._bitField = this._bitField | -1073741824;
};
Promise.prototype._setIsFinal = function Promise$_setIsFinal() {
this._bitField = this._bitField | 33554432;
};
Promise.prototype._isFinal = function Promise$_isFinal() {
return ( this._bitField & 33554432 ) > 0;
};
Promise.prototype._isDelegated = function Promise$_isDelegated() {
return ( this._bitField & -1073741824 ) === -1073741824;
};
Promise.prototype._unsetDelegated = function Promise$_unsetDelegated() {
this._bitField = this._bitField & ( ~-1073741824 );
};
Promise.prototype._setCancellable = function Promise$_setCancellable() {
this._bitField = this._bitField | 67108864;
};
Promise.prototype._unsetCancellable = function Promise$_unsetCancellable() {
this._bitField = this._bitField & ( ~67108864 );
};
Promise.prototype._receiverAt = function Promise$_receiverAt( index ) {
var ret;
if( index === 0 ) {
ret = this._receiver0;
}
else {
ret = this[ index + 4 - 5 ];
}
if( this._isBound() && ret === void 0 ) {
return this._boundTo;
}
return ret;
};
Promise.prototype._promiseAt = function Promise$_promiseAt( index ) {
if( index === 0 ) return this._promise0;
return this[ index + 3 - 5 ];
};
Promise.prototype._fulfillAt = function Promise$_fulfillAt( index ) {
if( index === 0 ) return this._fulfill0;
return this[ index + 0 - 5 ];
};
Promise.prototype._rejectAt = function Promise$_rejectAt( index ) {
if( index === 0 ) return this._reject0;
return this[ index + 1 - 5 ];
};
Promise.prototype._unsetAt = function Promise$_unsetAt( index ) {
if( index === 0 ) {
this._fulfill0 =
this._reject0 =
this._progress0 =
this._promise0 =
this._receiver0 = void 0;
}
else {
this[ index - 5 + 0 ] =
this[ index - 5 + 1 ] =
this[ index - 5 + 2 ] =
this[ index - 5 + 3 ] =
this[ index - 5 + 4 ] = void 0;
}
};
Promise.prototype._resolveResolver =
function Promise$_resolveResolver( resolver ) {
this._setTrace( this._resolveResolver, void 0 );
var p = new PromiseResolver( this );
this._pushContext();
var r = tryCatch2( resolver, this, function Promise$_fulfiller( val ) {
p.fulfill( val );
}, function Promise$_rejecter( val ) {
p.reject( val );
});
this._popContext();
if( r === errorObj ) {
p.reject( r.e );
}
};
Promise.prototype._addCallbacks = function Promise$_addCallbacks(
fulfill,
reject,
progress,
promise,
receiver
) {
fulfill = typeof fulfill === "function" ? fulfill : void 0;
reject = typeof reject === "function" ? reject : void 0;
progress = typeof progress === "function" ? progress : void 0;
var index = this._length();
if( index === 0 ) {
this._fulfill0 = fulfill;
this._reject0 = reject;
this._progress0 = progress;
this._promise0 = promise;
this._receiver0 = receiver;
this._setLength( index + 5 );
return index;
}
this[ index - 5 + 0 ] = fulfill;
this[ index - 5 + 1 ] = reject;
this[ index - 5 + 2 ] = progress;
this[ index - 5 + 3 ] = promise;
this[ index - 5 + 4 ] = receiver;
this._setLength( index + 5 );
return index;
};
Promise.prototype._spreadSlowCase =
function Promise$_spreadSlowCase( targetFn, promise, values, boundTo ) {
promise._assumeStateOf(
Promise$_All( values, PromiseArray, this._spreadSlowCase, boundTo )
.promise()
._then( function() {
return targetFn.apply( boundTo, arguments );
}, void 0, void 0, APPLY, void 0,
this._spreadSlowCase ),
false
);
};
Promise.prototype._setBoundTo = function Promise$_setBoundTo( obj ) {
this._boundTo = obj;
};
Promise.prototype._isBound = function Promise$_isBound() {
return this._boundTo !== void 0;
};
var ignore = CatchFilter.prototype.doFilter;
Promise.prototype._resolvePromise = function Promise$_resolvePromise(
onFulfilledOrRejected, receiver, value, promise
) {
var isRejected = this.isRejected();
if( isRejected &&
typeof value === "object" &&
value !== null ) {
var handledState = value["__promiseHandled__"];
if( handledState === void 0 ) {
notEnumerableProp( value, "__promiseHandled__", 2 );
}
else {
value["__promiseHandled__"] =
withHandledMarked( handledState );
}
}
if( !isPromise( promise ) ) {
return onFulfilledOrRejected.call( receiver, value, promise );
}
var x;
if( !isRejected && receiver === APPLY ) {
if( isArray( value ) ) {
for( var i = 0, len = value.length; i < len; ++i ) {
if( isPromise( value[i] ) ) {
this._spreadSlowCase(
onFulfilledOrRejected,
promise,
value,
this._boundTo
);
return;
}
}
promise._pushContext();
x = tryCatchApply( onFulfilledOrRejected, value, this._boundTo );
}
else {
this._spreadSlowCase( onFulfilledOrRejected, promise,
value, this._boundTo );
return;
}
}
else {
promise._pushContext();
x = tryCatch1( onFulfilledOrRejected, receiver, value );
}
promise._popContext();
if( x === errorObj ) {
ensureNotHandled(x.e);
if( onFulfilledOrRejected !== ignore ) {
promise._attachExtraTrace( x.e );
}
async.invoke( promise._reject, promise, x.e );
}
else if( x === promise ) {
var selfResolutionError =
new TypeError( "Circular thenable chain" );
this._attachExtraTrace( selfResolutionError );
async.invoke(
promise._reject,
promise,
selfResolutionError
);
}
else {
if( promise._tryAssumeStateOf( x, true ) ) {
return;
}
else if( Promise._couldBeThenable( x ) ) {
if( promise._length() === 0 ) {
promise._resolvedValue = x;
promise._setDelegated();
return;
}
else if( promise._tryThenable( x ) ) {
return;
}
}
async.invoke( promise._fulfill, promise, x );
}
};
Promise.prototype._assumeStateOf =
function Promise$_assumeStateOf( promise, mustAsync ) {
this._setFollowing();
if( promise.isPending() ) {
if( promise._cancellable() ) {
this._cancellationParent = promise;
}
promise._then(
this._resolveFulfill,
this._resolveReject,
this._resolveProgress,
this,
void 0, this._tryAssumeStateOf
);
}
else if( promise.isFulfilled() ) {
if( mustAsync === true )
async.invoke( this._resolveFulfill, this, promise._resolvedValue );
else
this._resolveFulfill( promise._resolvedValue );
}
else {
if( mustAsync === true )
async.invoke( this._resolveReject, this, promise._resolvedValue );
else
this._resolveReject( promise._resolvedValue );
}
if( longStackTraces &&
promise._traceParent == null ) {
promise._traceParent = this;
}
};
Promise.prototype._tryAssumeStateOf =
function Promise$_tryAssumeStateOf( value, mustAsync ) {
if( !isPromise( value ) ||
this._isFollowingOrFulfilledOrRejected() ) return false;
this._assumeStateOf( value, mustAsync );
return true;
};
Promise.prototype._resetTrace = function Promise$_resetTrace( caller ) {
if( longStackTraces ) {
var context = this._peekContext();
var isTopLevel = context === void 0;
this._trace = new CapturedTrace(
typeof caller === "function"
? caller
: this._resetTrace,
isTopLevel
);
}
};
Promise.prototype._setTrace = function Promise$_setTrace( caller, parent ) {
if( longStackTraces ) {
var context = this._peekContext();
var isTopLevel = context === void 0;
if( parent !== void 0 &&
parent._traceParent === context ) {
this._trace = parent._trace;
}
else {
this._trace = new CapturedTrace(
typeof caller === "function"
? caller
: this._setTrace,
isTopLevel
);
}
}
return this;
};
Promise.prototype._attachExtraTrace =
function Promise$_attachExtraTrace( error ) {
if( longStackTraces &&
canAttach( error ) ) {
var promise = this;
var stack = error.stack;
stack = typeof stack === "string"
? stack.split("\n") : [];
var headerLineCount = 1;
while( promise != null &&
promise._trace != null ) {
stack = CapturedTrace.combine(
stack,
promise._trace.stack.split( "\n" )
);
promise = promise._traceParent;
}
var max = Error.stackTraceLimit + headerLineCount;
var len = stack.length;
if( len > max ) {
stack.length = max;
}
if( stack.length <= headerLineCount ) {
error.stack = "(No stack trace)";
}
else {
error.stack = stack.join("\n");
}
error["__promiseHandled__"] =
withStackAttached( error["__promiseHandled__"] );
}
};
Promise.prototype._notifyUnhandledRejection =
function Promise$_notifyUnhandledRejection( reason ) {
if( !isHandled( reason["__promiseHandled__"] ) ) {
reason["__promiseHandled__"] =
withHandledMarked( reason["__promiseHandled__"] );
CapturedTrace.possiblyUnhandledRejection( reason, this );
}
};
Promise.prototype._unhandledRejection =
function Promise$_unhandledRejection( reason ) {
if( !isHandled( reason["__promiseHandled__"] ) ) {
async.invokeLater( this._notifyUnhandledRejection, this, reason );
}
};
Promise.prototype._cleanValues = function Promise$_cleanValues() {
this._cancellationParent = void 0;
};
Promise.prototype._fulfill = function Promise$_fulfill( value ) {
if( this._isFollowingOrFulfilledOrRejected() ) return;
this._resolveFulfill( value );
};
Promise.prototype._reject = function Promise$_reject( reason ) {
if( this._isFollowingOrFulfilledOrRejected() ) return;
this._resolveReject( reason );
};
Promise.prototype._doResolveAt = function Promise$_doResolveAt( i ) {
var fn = this.isFulfilled()
? this._fulfillAt( i )
: this._rejectAt( i );
var value = this._resolvedValue;
var receiver = this._receiverAt( i );
var promise = this._promiseAt( i );
this._unsetAt( i );
this._resolvePromise( fn, receiver, value, promise );
};
Promise.prototype._resolveFulfill = function Promise$_resolveFulfill( value ) {
this._cleanValues();
this._setFulfilled();
this._resolvedValue = value;
var len = this._length();
this._setLength( 0 );
for( var i = 0; i < len; i+= 5 ) {
if( this._fulfillAt( i ) !== void 0 ) {
async.invoke( this._doResolveAt, this, i );
}
else {
var promise = this._promiseAt( i );
this._unsetAt( i );
async.invoke( promise._fulfill, promise, value );
}
}
};
Promise.prototype._resolveLast = function Promise$_resolveLast( index ) {
this._setLength( 0 );
var fn;
if( this.isFulfilled() ) {
fn = this._fulfillAt( index );
}
else {
fn = this._rejectAt( index );
}
if( fn !== void 0 ) {
async.invoke( this._doResolveAt, this, index );
}
else {
var promise = this._promiseAt( index );
var value = this._resolvedValue;
this._unsetAt( index );
if( this.isFulfilled() ) {
async.invoke( promise._fulfill, promise, value );
}
else {
async.invoke( promise._reject, promise, value );
}
}
};
Promise.prototype._resolveReject = function Promise$_resolveReject( reason ) {
this._cleanValues();
this._setRejected();
this._resolvedValue = reason;
if( this._isFinal() ) {
async.invokeLater( thrower, void 0, reason );
return;
}
var len = this._length();
this._setLength( 0 );
var rejectionWasHandled = false;
for( var i = 0; i < len; i+= 5 ) {
if( this._rejectAt( i ) !== void 0 ) {
rejectionWasHandled = true;
async.invoke( this._doResolveAt, this, i );
}
else {
var promise = this._promiseAt( i );
this._unsetAt( i );
if( !rejectionWasHandled )
rejectionWasHandled = promise._length() > 0;
async.invoke( promise._reject, promise, reason );
}
}
if( !rejectionWasHandled &&
CapturedTrace.possiblyUnhandledRejection !== void 0
) {
if( isObject( reason ) ) {
var handledState = reason["__promiseHandled__"];
var newReason = reason;
if( handledState === void 0 ) {
newReason = ensurePropertyExpansion(reason,
"__promiseHandled__", 0 );
handledState = 0;
}
else if( isHandled( handledState ) ) {
return;
}
if( !isStackAttached( handledState ) ) {
this._attachExtraTrace( newReason );
}
async.invoke( this._unhandledRejection, this, newReason );
}
}
};
var contextStack = [];
Promise.prototype._peekContext = function Promise$_peekContext() {
var lastIndex = contextStack.length - 1;
if( lastIndex >= 0 ) {
return contextStack[ lastIndex ];
}
return void 0;
};
Promise.prototype._pushContext = function Promise$_pushContext() {
if( !longStackTraces ) return;
contextStack.push( this );
};
Promise.prototype._popContext = function Promise$_popContext() {
if( !longStackTraces ) return;
contextStack.pop();
};
function Promise$_All( promises, PromiseArray, caller, boundTo ) {
if( isPromise( promises ) ||
isArray( promises ) ) {
return new PromiseArray(
promises,
typeof caller === "function"
? caller
: Promise$_All,
boundTo
);
}
return new PromiseArray(
[ apiRejection( "expecting an array or a promise" ) ],
caller,
boundTo
);
}
var old = global.Promise;
Promise.noConflict = function() {
if( global.Promise === Promise ) {
global.Promise = old;
}
return Promise;
};
if( !CapturedTrace.isSupported() ) {
Promise.longStackTraces = function(){};
CapturedTrace.possiblyUnhandledRejection = function(){};
Promise.onPossiblyUnhandledRejection = function(){};
longStackTraces = false;
}
Promise.CancellationError = CancellationError;
Promise.TimeoutError = TimeoutError;
Promise.TypeError = TypeError;
Promise.RejectionError = RejectionError;
require('./synchronous_inspection.js')(Promise);
require('./any.js')(Promise,Promise$_All,PromiseArray);
require('./race.js')(Promise,Promise$_All,PromiseArray);
require('./call_get.js')(Promise);
require('./filter.js')(Promise,Promise$_All,PromiseArray,apiRejection);
require('./generators.js')(Promise,apiRejection);
require('./map.js')(Promise,Promise$_All,PromiseArray,apiRejection);
require('./nodeify.js')(Promise);
require('./promisify.js')(Promise);
require('./props.js')(Promise,PromiseArray);
require('./reduce.js')(Promise,Promise$_All,PromiseArray,apiRejection);
require('./settle.js')(Promise,Promise$_All,PromiseArray);
require('./some.js')(Promise,Promise$_All,PromiseArray,apiRejection);
require('./progress.js')(Promise);
require('./cancel.js')(Promise);
require('./complex_thenables.js')(Promise);
Promise.prototype = Promise.prototype;
return Promise;
};
},{"./any.js":1,"./assert.js":2,"./async.js":3,"./call_get.js":5,"./cancel.js":6,"./captured_trace.js":7,"./catch_filter.js":8,"./complex_thenables.js":9,"./errors.js":10,"./errors_api_rejection":11,"./filter.js":12,"./generators.js":13,"./global.js":14,"./map.js":15,"./nodeify.js":16,"./progress.js":17,"./promise_array.js":19,"./promise_resolver.js":21,"./promisify.js":23,"./props.js":25,"./race.js":27,"./reduce.js":29,"./settle.js":31,"./some.js":33,"./synchronous_inspection.js":35,"./util.js":36}],19:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function( Promise ) {
var ASSERT = require("./assert.js");
var ensureNotHandled = require( "./errors.js").ensureNotHandled;
var util = require("./util.js");
var async = require( "./async.js");
var hasOwn = {}.hasOwnProperty;
var isArray = util.isArray;
function toFulfillmentValue( val ) {
switch( val ) {
case 0: return void 0;
case 1: return [];
case 2: return {};
}
}
function PromiseArray( values, caller, boundTo ) {
this._values = values;
this._resolver = Promise.pending( caller );
if( boundTo !== void 0 ) {
this._resolver.promise._setBoundTo( boundTo );
}
this._length = 0;
this._totalResolved = 0;
this._init( void 0, 1 );
}
PromiseArray.PropertiesPromiseArray = function() {};
PromiseArray.prototype.length = function PromiseArray$length() {
return this._length;
};
PromiseArray.prototype.promise = function PromiseArray$promise() {
return this._resolver.promise;
};
PromiseArray.prototype._init =
function PromiseArray$_init( _, fulfillValueIfEmpty ) {
var values = this._values;
if( Promise.is( values ) ) {
if( values.isFulfilled() ) {
values = values._resolvedValue;
if( !isArray( values ) ) {
this._fulfill( toFulfillmentValue( fulfillValueIfEmpty ) );
return;
}
this._values = values;
}
else if( values.isPending() ) {
values._then(
this._init,
this._reject,
void 0,
this,
fulfillValueIfEmpty,
this.constructor
);
return;
}
else {
this._reject( values._resolvedValue );
return;
}
}
if( values.length === 0 ) {
this._fulfill( toFulfillmentValue( fulfillValueIfEmpty ) );
return;
}
var len = values.length;
var newLen = len;
var newValues;
if( this instanceof PromiseArray.PropertiesPromiseArray ) {
newValues = this._values;
}
else {
newValues = new Array( len );
}
var isDirectScanNeeded = false;
for( var i = 0; i < len; ++i ) {
var promise = values[i];
if( promise === void 0 && !hasOwn.call( values, i ) ) {
newLen--;
continue;
}
var maybePromise = Promise._cast( promise );
if( maybePromise instanceof Promise &&
maybePromise.isPending() ) {
maybePromise._then(
this._promiseFulfilled,
this._promiseRejected,
this._promiseProgressed,
this, i, this._scanDirectValues
);
}
else {
isDirectScanNeeded = true;
}
newValues[i] = maybePromise;
}
if( newLen === 0 ) {
if( fulfillValueIfEmpty === 1 ) {
this._fulfill( newValues );
}
else {
this._fulfill( toFulfillmentValue( fulfillValueIfEmpty ) );
}
return;
}
this._values = newValues;
this._length = newLen;
if( isDirectScanNeeded ) {
var scanMethod = newLen === len
? this._scanDirectValues
: this._scanDirectValuesHoled;
async.invoke( scanMethod, this, len );
}
};
PromiseArray.prototype._resolvePromiseAt =
function PromiseArray$_resolvePromiseAt( i ) {
var value = this._values[i];
if( !Promise.is( value ) ) {
this._promiseFulfilled( value, i );
}
else if( value.isFulfilled() ) {
this._promiseFulfilled( value._resolvedValue, i );
}
else if( value.isRejected() ) {
this._promiseRejected( value._resolvedValue, i );
}
};
PromiseArray.prototype._scanDirectValuesHoled =
function PromiseArray$_scanDirectValuesHoled( len ) {
for( var i = 0; i < len; ++i ) {
if( this._isResolved() ) {
break;
}
if( hasOwn.call( this._values, i ) ) {
this._resolvePromiseAt( i );
}
}
};
PromiseArray.prototype._scanDirectValues =
function PromiseArray$_scanDirectValues( len ) {
for( var i = 0; i < len; ++i ) {
if( this._isResolved() ) {
break;
}
this._resolvePromiseAt( i );
}
};
PromiseArray.prototype._isResolved = function PromiseArray$_isResolved() {
return this._values === null;
};
PromiseArray.prototype._fulfill = function PromiseArray$_fulfill( value ) {
this._values = null;
this._resolver.fulfill( value );
};
PromiseArray.prototype._reject = function PromiseArray$_reject( reason ) {
ensureNotHandled( reason );
this._values = null;
this._resolver.reject( reason );
};
PromiseArray.prototype._promiseProgressed =
function PromiseArray$_promiseProgressed( progressValue, index ) {
if( this._isResolved() ) return;
this._resolver.progress({
index: index,
value: progressValue
});
};
PromiseArray.prototype._promiseFulfilled =
function PromiseArray$_promiseFulfilled( value, index ) {
if( this._isResolved() ) return;
this._values[ index ] = value;
var totalResolved = ++this._totalResolved;
if( totalResolved >= this._length ) {
this._fulfill( this._values );
}
};
PromiseArray.prototype._promiseRejected =
function PromiseArray$_promiseRejected( reason ) {
if( this._isResolved() ) return;
this._totalResolved++;
this._reject( reason );
};
return PromiseArray;
};
},{"./assert.js":2,"./async.js":3,"./errors.js":10,"./util.js":36}],20:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
var TypeError = require( "./errors.js" ).TypeError;
function PromiseInspection( promise ) {
if( promise !== void 0 ) {
this._bitField = promise._bitField;
this._resolvedValue = promise.isResolved()
? promise._resolvedValue
: void 0;
}
else {
this._bitField = 0;
this._resolvedValue = void 0;
}
}
PromiseInspection.prototype.isFulfilled =
function PromiseInspection$isFulfilled() {
return ( this._bitField & 268435456 ) > 0;
};
PromiseInspection.prototype.isRejected =
function PromiseInspection$isRejected() {
return ( this._bitField & 134217728 ) > 0;
};
PromiseInspection.prototype.isPending = function PromiseInspection$isPending() {
return ( this._bitField & 402653184 ) === 0;
};
PromiseInspection.prototype.value = function PromiseInspection$value() {
if( !this.isFulfilled() ) {
throw new TypeError(
"cannot get fulfillment value of a non-fulfilled promise");
}
return this._resolvedValue;
};
PromiseInspection.prototype.error = function PromiseInspection$error() {
if( !this.isRejected() ) {
throw new TypeError(
"cannot get rejection reason of a non-rejected promise");
}
return this._resolvedValue;
};
module.exports = PromiseInspection;
},{"./errors.js":10}],21:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
var util = require( "./util.js" );
var maybeWrapAsError = util.maybeWrapAsError;
var errors = require( "./errors.js");
var TimeoutError = errors.TimeoutError;
var RejectionError = errors.RejectionError;
var async = require( "./async.js" );
var haveGetters = util.haveGetters;
function isUntypedError( obj ) {
return obj instanceof Error &&
Object.getPrototypeOf( obj ) === Error.prototype;
}
function wrapAsRejectionError( obj ) {
if( isUntypedError( obj ) ) {
return new RejectionError( obj );
}
return obj;
}
function nodebackForResolver( resolver ) {
function PromiseResolver$_callback( err, value ) {
if( err ) {
resolver.reject( wrapAsRejectionError( maybeWrapAsError( err ) ) );
}
else {
if( arguments.length > 2 ) {
var len = arguments.length;
var val = new Array( len - 1 );
for( var i = 1; i < len; ++i ) {
val[ i - 1 ] = arguments[ i ];
}
value = val;
}
resolver.fulfill( value );
}
}
return PromiseResolver$_callback;
}
var PromiseResolver;
if( !haveGetters ) {
PromiseResolver = function PromiseResolver( promise ) {
this.promise = promise;
this.asCallback = nodebackForResolver( this );
};
}
else {
PromiseResolver = function PromiseResolver( promise ) {
this.promise = promise;
};
}
if( haveGetters ) {
Object.defineProperty( PromiseResolver.prototype, "asCallback", {
get: function() {
return nodebackForResolver( this );
}
});
}
PromiseResolver._nodebackForResolver = nodebackForResolver;
PromiseResolver.prototype.toString = function PromiseResolver$toString() {
return "[object PromiseResolver]";
};
PromiseResolver.prototype.fulfill = function PromiseResolver$fulfill( value ) {
if( this.promise._tryAssumeStateOf( value, false ) ) {
return;
}
async.invoke( this.promise._fulfill, this.promise, value );
};
PromiseResolver.prototype.reject = function PromiseResolver$reject( reason ) {
this.promise._attachExtraTrace( reason );
async.invoke( this.promise._reject, this.promise, reason );
};
PromiseResolver.prototype.progress =
function PromiseResolver$progress( value ) {
async.invoke( this.promise._progress, this.promise, value );
};
PromiseResolver.prototype.cancel = function PromiseResolver$cancel() {
async.invoke( this.promise.cancel, this.promise, void 0 );
};
PromiseResolver.prototype.timeout = function PromiseResolver$timeout() {
this.reject( new TimeoutError( "timeout" ) );
};
PromiseResolver.prototype.isResolved = function PromiseResolver$isResolved() {
return this.promise.isResolved();
};
PromiseResolver.prototype.toJSON = function PromiseResolver$toJSON() {
return this.promise.toJSON();
};
module.exports = PromiseResolver;
},{"./async.js":3,"./errors.js":10,"./util.js":36}],22:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function( Promise ) {
var errors = require( "./errors.js" );
var TypeError = errors.TypeError;
var ensureNotHandled = errors.ensureNotHandled;
var util = require("./util.js");
var errorObj = util.errorObj;
var tryCatch1 = util.tryCatch1;
function PromiseSpawn( generatorFunction, receiver, caller ) {
this._resolver = Promise.pending( caller );
this._generatorFunction = generatorFunction;
this._receiver = receiver;
this._generator = void 0;
}
PromiseSpawn.prototype.promise = function PromiseSpawn$promise() {
return this._resolver.promise;
};
PromiseSpawn.prototype._run = function PromiseSpawn$_run() {
this._generator = this._generatorFunction.call( this._receiver );
this._receiver =
this._generatorFunction = void 0;
this._next( void 0 );
};
PromiseSpawn.prototype._continue = function PromiseSpawn$_continue( result ) {
if( result === errorObj ) {
this._generator = void 0;
this._resolver.reject( result.e );
return;
}
var value = result.value;
if( result.done === true ) {
this._generator = void 0;
this._resolver.fulfill( value );
}
else {
var maybePromise = Promise._cast( value, PromiseSpawn$_continue );
if( !( maybePromise instanceof Promise ) ) {
this._throw( new TypeError(
"A value was yielded that could not be treated as a promise"
) );
return;
}
maybePromise._then(
this._next,
this._throw,
void 0,
this,
null,
void 0
);
}
};
PromiseSpawn.prototype._throw = function PromiseSpawn$_throw( reason ) {
ensureNotHandled( reason );
this.promise()._attachExtraTrace( reason );
this._continue(
tryCatch1( this._generator["throw"], this._generator, reason )
);
};
PromiseSpawn.prototype._next = function PromiseSpawn$_next( value ) {
this._continue(
tryCatch1( this._generator.next, this._generator, value )
);
};
return PromiseSpawn;
};
},{"./errors.js":10,"./util.js":36}],23:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function( Promise ) {
var THIS = {};
var util = require( "./util.js");
var errors = require( "./errors.js" );
var nodebackForResolver = require( "./promise_resolver.js" )
._nodebackForResolver;
var RejectionError = errors.RejectionError;
var withAppended = util.withAppended;
var maybeWrapAsError = util.maybeWrapAsError;
var canEvaluate = util.canEvaluate;
var notEnumerableProp = util.notEnumerableProp;
var deprecated = util.deprecated;
var ASSERT = require( "./assert.js" );
Promise.prototype.error = function( fn ) {
return this.caught( RejectionError, fn );
};
function makeNodePromisifiedEval( callback, receiver, originalName ) {
function getCall(count) {
var args = new Array(count);
for( var i = 0, len = args.length; i < len; ++i ) {
args[i] = "a" + (i+1);
}
var comma = count > 0 ? "," : "";
if( typeof callback === "string" &&
receiver === THIS ) {
return "this['" + callback + "']("+args.join(",") +
comma +" fn);"+
"break;";
}
return ( receiver === void 0
? "callback("+args.join(",")+ comma +" fn);"
: "callback.call("+( receiver === THIS
? "this"
: "receiver" )+", "+args.join(",") + comma + " fn);" ) +
"break;";
}
function getArgs() {
return "var args = new Array( len + 1 );" +
"var i = 0;" +
"for( var i = 0; i < len; ++i ) { " +
" args[i] = arguments[i];" +
"}" +
"args[i] = fn;";
}
var callbackName = ( typeof originalName === "string" ?
originalName + "Async" :
"promisified" );
return new Function("Promise", "callback", "receiver",
"withAppended", "maybeWrapAsError", "nodebackForResolver",
"var ret = function " + callbackName +
"( a1, a2, a3, a4, a5 ) {\"use strict\";" +
"var len = arguments.length;" +
"var resolver = Promise.pending( " + callbackName + " );" +
"var fn = nodebackForResolver( resolver );"+
"try{" +
"switch( len ) {" +
"case 1:" + getCall(1) +
"case 2:" + getCall(2) +
"case 3:" + getCall(3) +
"case 0:" + getCall(0) +
"case 4:" + getCall(4) +
"case 5:" + getCall(5) +
"default: " + getArgs() + (typeof callback === "string"
? "this['" + callback + "'].apply("
: "callback.apply("
) +
( receiver === THIS ? "this" : "receiver" ) +
", args ); break;" +
"}" +
"}" +
"catch(e){ " +
"" +
"resolver.reject( maybeWrapAsError( e ) );" +
"}" +
"return resolver.promise;" +
"" +
"}; ret.__isPromisified__ = true; return ret;"
)(Promise, callback, receiver, withAppended,
maybeWrapAsError, nodebackForResolver);
}
function makeNodePromisifiedClosure( callback, receiver ) {
function promisified() {
var _receiver = receiver;
if( receiver === THIS ) _receiver = this;
if( typeof callback === "string" ) {
callback = _receiver[callback];
}
var resolver = Promise.pending( promisified );
var fn = nodebackForResolver( resolver );
try {
callback.apply( _receiver, withAppended( arguments, fn ) );
}
catch(e) {
resolver.reject( maybeWrapAsError( e ) );
}
return resolver.promise;
}
promisified.__isPromisified__ = true;
return promisified;
}
var makeNodePromisified = canEvaluate
? makeNodePromisifiedEval
: makeNodePromisifiedClosure;
function f(){}
function isPromisified( fn ) {
return fn.__isPromisified__ === true;
}
var hasProp = {}.hasOwnProperty;
var roriginal = new RegExp( "__beforePromisified__" + "$" );
function _promisify( callback, receiver, isAll ) {
if( isAll ) {
var changed = 0;
var o = {};
for( var key in callback ) {
if( !roriginal.test( key ) &&
!hasProp.call( callback,
( key + "__beforePromisified__" ) ) &&
typeof callback[ key ] === "function" ) {
var fn = callback[key];
if( !isPromisified( fn ) ) {
changed++;
var originalKey = key + "__beforePromisified__";
var promisifiedKey = key + "Async";
notEnumerableProp( callback, originalKey, fn );
o[ promisifiedKey ] =
makeNodePromisified( originalKey, THIS, key );
}
}
}
if( changed > 0 ) {
for( var key in o ) {
if( hasProp.call( o, key ) ) {
callback[key] = o[key];
}
}
f.prototype = callback;
}
return callback;
}
else {
return makeNodePromisified( callback, receiver, void 0 );
}
}
Promise.promisify = function Promise$Promisify( callback, receiver ) {
if( typeof callback === "object" && callback !== null ) {
deprecated( "Promise.promisify for promisifying entire objects " +
"is deprecated. Use Promise.promisifyAll instead." );
return _promisify( callback, receiver, true );
}
if( typeof callback !== "function" ) {
throw new TypeError( "callback must be a function" );
}
if( isPromisified( callback ) ) {
return callback;
}
return _promisify(
callback,
arguments.length < 2 ? THIS : receiver,
false );
};
Promise.promisifyAll = function Promise$PromisifyAll( target ) {
if( typeof target !== "function" && typeof target !== "object" ) {
throw new TypeError( "Cannot promisify " + typeof target );
}
return _promisify( target, void 0, true );
};
};
},{"./assert.js":2,"./errors.js":10,"./promise_resolver.js":21,"./util.js":36}],24:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function(Promise, PromiseArray) {
var ASSERT = require("./assert.js");
var util = require("./util.js");
var inherits = util.inherits;
function PropertiesPromiseArray( obj, caller, boundTo ) {
var keys = Object.keys( obj );
var values = new Array( keys.length );
for( var i = 0, len = values.length; i < len; ++i ) {
values[i] = obj[keys[i]];
}
this.constructor$( values, caller, boundTo );
if( !this._isResolved() ) {
for( var i = 0, len = keys.length; i < len; ++i ) {
values.push( keys[i] );
}
}
}
inherits( PropertiesPromiseArray, PromiseArray );
PropertiesPromiseArray.prototype._init =
function PropertiesPromiseArray$_init() {
this._init$( void 0, 2 ) ;
};
PropertiesPromiseArray.prototype._promiseFulfilled =
function PropertiesPromiseArray$_promiseFulfilled( value, index ) {
if( this._isResolved() ) return;
this._values[ index ] = value;
var totalResolved = ++this._totalResolved;
if( totalResolved >= this._length ) {
var val = {};
var keyOffset = this.length();
for( var i = 0, len = this.length(); i < len; ++i ) {
val[this._values[i + keyOffset]] = this._values[i];
}
this._fulfill( val );
}
};
PropertiesPromiseArray.prototype._promiseProgressed =
function PropertiesPromiseArray$_promiseProgressed( value, index ) {
if( this._isResolved() ) return;
this._resolver.progress({
key: this._values[ index + this.length() ],
value: value
});
};
PromiseArray.PropertiesPromiseArray = PropertiesPromiseArray;
return PropertiesPromiseArray;
};
},{"./assert.js":2,"./util.js":36}],25:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function( Promise, PromiseArray ) {
var PropertiesPromiseArray = require("./properties_promise_array.js")(
Promise, PromiseArray);
var util = require( "./util.js" );
var isPrimitive = util.isPrimitive;
function Promise$_Props( promises, useBound, caller ) {
var ret;
if( isPrimitive( promises ) ) {
ret = Promise.fulfilled( promises, caller );
}
else if( Promise.is( promises ) ) {
ret = promises._then( Promise.props, void 0, void 0,
void 0, void 0, caller );
}
else {
ret = new PropertiesPromiseArray(
promises,
caller,
useBound === true ? promises._boundTo : void 0
).promise();
useBound = false;
}
if( useBound === true ) {
ret._boundTo = promises._boundTo;
}
return ret;
}
Promise.prototype.props = function Promise$props() {
return Promise$_Props( this, true, this.props );
};
Promise.props = function Promise$Props( promises ) {
return Promise$_Props( promises, false, Promise.props );
};
};
},{"./properties_promise_array.js":24,"./util.js":36}],26:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
var ASSERT = require("./assert.js");
function arrayCopy( src, srcIndex, dst, dstIndex, len ) {
for( var j = 0; j < len; ++j ) {
dst[ j + dstIndex ] = src[ j + srcIndex ];
}
}
function pow2AtLeast( n ) {
n = n >>> 0;
n = n - 1;
n = n | (n >> 1);
n = n | (n >> 2);
n = n | (n >> 4);
n = n | (n >> 8);
n = n | (n >> 16);
return n + 1;
}
function getCapacity( capacity ) {
if( typeof capacity !== "number" ) return 16;
return pow2AtLeast(
Math.min(
Math.max( 16, capacity ), 1073741824 )
);
}
function Queue( capacity ) {
this._capacity = getCapacity( capacity );
this._length = 0;
this._front = 0;
this._makeCapacity();
}
Queue.prototype._willBeOverCapacity =
function Queue$_willBeOverCapacity( size ) {
return this._capacity < size;
};
Queue.prototype._pushOne = function Queue$_pushOne( arg ) {
var length = this.length();
this._checkCapacity( length + 1 );
var i = ( this._front + length ) & ( this._capacity - 1 );
this[i] = arg;
this._length = length + 1;
};
Queue.prototype.push = function Queue$push( fn, receiver, arg ) {
var length = this.length() + 3;
if( this._willBeOverCapacity( length ) ) {
this._pushOne( fn );
this._pushOne( receiver );
this._pushOne( arg );
return;
}
var j = this._front + length - 3;
this._checkCapacity( length );
var wrapMask = this._capacity - 1;
this[ ( j + 0 ) & wrapMask ] = fn;
this[ ( j + 1 ) & wrapMask ] = receiver;
this[ ( j + 2 ) & wrapMask ] = arg;
this._length = length;
};
Queue.prototype.shift = function Queue$shift() {
var front = this._front,
ret = this[ front ];
this[ front ] = void 0;
this._front = ( front + 1 ) & ( this._capacity - 1 );
this._length--;
return ret;
};
Queue.prototype.length = function Queue$length() {
return this._length;
};
Queue.prototype._makeCapacity = function Queue$_makeCapacity() {
var len = this._capacity;
for( var i = 0; i < len; ++i ) {
this[i] = void 0;
}
};
Queue.prototype._checkCapacity = function Queue$_checkCapacity( size ) {
if( this._capacity < size ) {
this._resizeTo( this._capacity << 3 );
}
};
Queue.prototype._resizeTo = function Queue$_resizeTo( capacity ) {
var oldFront = this._front;
var oldCapacity = this._capacity;
var oldQueue = new Array( oldCapacity );
var length = this.length();
arrayCopy( this, 0, oldQueue, 0, oldCapacity );
this._capacity = capacity;
this._makeCapacity();
this._front = 0;
if( oldFront + length <= oldCapacity ) {
arrayCopy( oldQueue, oldFront, this, 0, length );
}
else { var lengthBeforeWrapping =
length - ( ( oldFront + length ) & ( oldCapacity - 1 ) );
arrayCopy( oldQueue, oldFront, this, 0, lengthBeforeWrapping );
arrayCopy( oldQueue, 0, this, lengthBeforeWrapping,
length - lengthBeforeWrapping );
}
};
module.exports = Queue;
},{"./assert.js":2}],27:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function( Promise, Promise$_All, PromiseArray ) {
var RacePromiseArray =
require( "./race_promise_array.js" )(Promise, PromiseArray);
function Promise$_Race( promises, useBound, caller ) {
return Promise$_All(
promises,
RacePromiseArray,
caller,
useBound === true ? promises._boundTo : void 0
).promise();
}
Promise.race = function Promise$Race( promises ) {
return Promise$_Race( promises, false, Promise.race );
};
Promise.prototype.race = function Promise$race() {
return Promise$_Race( this, true, this.race );
};
};
},{"./race_promise_array.js":28}],28:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function( Promise, PromiseArray ) {
var util = require("./util.js");
var inherits = util.inherits;
function RacePromiseArray( values, caller, boundTo ) {
this.constructor$( values, caller, boundTo );
}
inherits( RacePromiseArray, PromiseArray );
RacePromiseArray.prototype._init =
function RacePromiseArray$_init() {
this._init$( void 0, 0 );
};
RacePromiseArray.prototype._promiseFulfilled =
function RacePromiseArray$_promiseFulfilled( value ) {
if( this._isResolved() ) return;
this._fulfill( value );
};
RacePromiseArray.prototype._promiseRejected =
function RacePromiseArray$_promiseRejected( reason ) {
if( this._isResolved() ) return;
this._reject( reason );
};
return RacePromiseArray;
};
},{"./util.js":36}],29:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function( Promise, Promise$_All, PromiseArray, apiRejection ) {
var ASSERT = require( "./assert.js" );
function Promise$_reducer( fulfilleds, initialValue ) {
var fn = this;
var receiver = void 0;
if( typeof fn !== "function" ) {
receiver = fn.receiver;
fn = fn.fn;
}
var len = fulfilleds.length;
var accum = void 0;
var startIndex = 0;
if( initialValue !== void 0 ) {
accum = initialValue;
startIndex = 0;
}
else {
startIndex = 1;
if( len > 0 ) {
for( var i = 0; i < len; ++i ) {
if( fulfilleds[i] === void 0 &&
!(i in fulfilleds) ) {
continue;
}
accum = fulfilleds[i];
startIndex = i + 1;
break;
}
}
}
if( receiver === void 0 ) {
for( var i = startIndex; i < len; ++i ) {
if( fulfilleds[i] === void 0 &&
!(i in fulfilleds) ) {
continue;
}
accum = fn( accum, fulfilleds[i], i, len );
}
}
else {
for( var i = startIndex; i < len; ++i ) {
if( fulfilleds[i] === void 0 &&
!(i in fulfilleds) ) {
continue;
}
accum = fn.call( receiver, accum, fulfilleds[i], i, len );
}
}
return accum;
}
function Promise$_unpackReducer( fulfilleds ) {
var fn = this.fn;
var initialValue = this.initialValue;
return Promise$_reducer.call( fn, fulfilleds, initialValue );
}
function Promise$_slowReduce(
promises, fn, initialValue, useBound, caller ) {
return initialValue._then( function callee( initialValue ) {
return Promise$_Reduce(
promises, fn, initialValue, useBound, callee );
}, void 0, void 0, void 0, void 0, caller);
}
function Promise$_Reduce( promises, fn, initialValue, useBound, caller ) {
if( typeof fn !== "function" ) {
return apiRejection( "fn is not a function" );
}
if( useBound === true ) {
fn = {
fn: fn,
receiver: promises._boundTo
};
}
if( initialValue !== void 0 ) {
if( Promise.is( initialValue ) ) {
if( initialValue.isFulfilled() ) {
initialValue = initialValue._resolvedValue;
}
else {
return Promise$_slowReduce( promises,
fn, initialValue, useBound, caller );
}
}
return Promise$_All( promises, PromiseArray, caller,
useBound === true ? promises._boundTo : void 0 )
.promise()
._then( Promise$_unpackReducer, void 0, void 0, {
fn: fn,
initialValue: initialValue
}, void 0, Promise.reduce );
}
return Promise$_All( promises, PromiseArray, caller,
useBound === true ? promises._boundTo : void 0 ).promise()
._then( Promise$_reducer, void 0, void 0, fn, void 0, caller );
}
Promise.reduce = function Promise$Reduce( promises, fn, initialValue ) {
return Promise$_Reduce( promises, fn,
initialValue, false, Promise.reduce);
};
Promise.prototype.reduce = function Promise$reduce( fn, initialValue ) {
return Promise$_Reduce( this, fn, initialValue,
true, this.reduce );
};
};
},{"./assert.js":2}],30:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
var global = require("./global.js");
var ASSERT = require("./assert.js");
var schedule;
if( typeof process !== "undefined" && process !== null &&
typeof process.cwd === "function" ) {
if( typeof global.setImmediate !== "undefined" ) {
schedule = function Promise$_Scheduler( fn ) {
global.setImmediate( fn );
};
}
else {
schedule = function Promise$_Scheduler( fn ) {
process.nextTick( fn );
};
}
}
else if( ( typeof MutationObserver === "function" ||
typeof WebkitMutationObserver === "function" ||
typeof WebKitMutationObserver === "function" ) &&
typeof document !== "undefined" &&
typeof document.createElement === "function" ) {
schedule = (function(){
var MutationObserver = global.MutationObserver ||
global.WebkitMutationObserver ||
global.WebKitMutationObserver;
var div = document.createElement("div");
var queuedFn = void 0;
var observer = new MutationObserver(
function Promise$_Scheduler() {
var fn = queuedFn;
queuedFn = void 0;
fn();
}
);
var cur = true;
observer.observe( div, {
attributes: true,
childList: true,
characterData: true
});
return function Promise$_Scheduler( fn ) {
queuedFn = fn;
cur = !cur;
div.setAttribute( "class", cur ? "foo" : "bar" );
};
})();
}
else if ( typeof global.postMessage === "function" &&
typeof global.importScripts !== "function" &&
typeof global.addEventListener === "function" &&
typeof global.removeEventListener === "function" ) {
var MESSAGE_KEY = "bluebird_message_key_" + Math.random();
schedule = (function(){
var queuedFn = void 0;
function Promise$_Scheduler(e) {
if(e.source === global &&
e.data === MESSAGE_KEY) {
var fn = queuedFn;
queuedFn = void 0;
fn();
}
}
global.addEventListener( "message", Promise$_Scheduler, false );
return function Promise$_Scheduler( fn ) {
queuedFn = fn;
global.postMessage(
MESSAGE_KEY, "*"
);
};
})();
}
else if( typeof MessageChannel === "function" ) {
schedule = (function(){
var queuedFn = void 0;
var channel = new MessageChannel();
channel.port1.onmessage = function Promise$_Scheduler() {
var fn = queuedFn;
queuedFn = void 0;
fn();
};
return function Promise$_Scheduler( fn ) {
queuedFn = fn;
channel.port2.postMessage( null );
};
})();
}
else if( global.setTimeout ) {
schedule = function Promise$_Scheduler( fn ) {
setTimeout( fn, 4 );
};
}
else {
schedule = function Promise$_Scheduler( fn ) {
fn();
};
}
module.exports = schedule;
},{"./assert.js":2,"./global.js":14}],31:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function( Promise, Promise$_All, PromiseArray ) {
var SettledPromiseArray = require( "./settled_promise_array.js" )(
Promise, PromiseArray);
function Promise$_Settle( promises, useBound, caller ) {
return Promise$_All(
promises,
SettledPromiseArray,
caller,
useBound === true ? promises._boundTo : void 0
).promise();
}
Promise.settle = function Promise$Settle( promises ) {
return Promise$_Settle( promises, false, Promise.settle );
};
Promise.prototype.settle = function Promise$settle() {
return Promise$_Settle( this, true, this.settle );
};
};
},{"./settled_promise_array.js":32}],32:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function( Promise, PromiseArray ) {
var ASSERT = require("./assert.js");
var PromiseInspection = require( "./promise_inspection.js" );
var util = require("./util.js");
var inherits = util.inherits;
function SettledPromiseArray( values, caller, boundTo ) {
this.constructor$( values, caller, boundTo );
}
inherits( SettledPromiseArray, PromiseArray );
SettledPromiseArray.prototype._promiseResolved =
function SettledPromiseArray$_promiseResolved( index, inspection ) {
this._values[ index ] = inspection;
var totalResolved = ++this._totalResolved;
if( totalResolved >= this._length ) {
this._fulfill( this._values );
}
};
SettledPromiseArray.prototype._promiseFulfilled =
function SettledPromiseArray$_promiseFulfilled( value, index ) {
if( this._isResolved() ) return;
var ret = new PromiseInspection();
ret._bitField = 268435456;
ret._resolvedValue = value;
this._promiseResolved( index, ret );
};
SettledPromiseArray.prototype._promiseRejected =
function SettledPromiseArray$_promiseRejected( reason, index ) {
if( this._isResolved() ) return;
var ret = new PromiseInspection();
ret._bitField = 134217728;
ret._resolvedValue = reason;
this._promiseResolved( index, ret );
};
return SettledPromiseArray;
};
},{"./assert.js":2,"./promise_inspection.js":20,"./util.js":36}],33:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function( Promise, Promise$_All, PromiseArray, apiRejection ) {
var SomePromiseArray = require( "./some_promise_array.js" )(PromiseArray);
var ASSERT = require( "./assert.js" );
function Promise$_Some( promises, howMany, useBound, caller ) {
if( ( howMany | 0 ) !== howMany ) {
return apiRejection("howMany must be an integer");
}
var ret = Promise$_All(
promises,
SomePromiseArray,
caller,
useBound === true ? promises._boundTo : void 0
);
ret.setHowMany( howMany );
return ret.promise();
}
Promise.some = function Promise$Some( promises, howMany ) {
return Promise$_Some( promises, howMany, false, Promise.some );
};
Promise.prototype.some = function Promise$some( count ) {
return Promise$_Some( this, count, true, this.some );
};
};
},{"./assert.js":2,"./some_promise_array.js":34}],34:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function ( PromiseArray ) {
var util = require("./util.js");
var inherits = util.inherits;
var isArray = util.isArray;
function SomePromiseArray( values, caller, boundTo ) {
this.constructor$( values, caller, boundTo );
this._howMany = 0;
this._unwrap = false;
}
inherits( SomePromiseArray, PromiseArray );
SomePromiseArray.prototype._init = function SomePromiseArray$_init() {
this._init$( void 0, 1 );
var isArrayResolved = isArray( this._values );
this._holes = isArrayResolved
? this._values.length - this.length()
: 0;
if( !this._isResolved() && isArrayResolved ) {
this._howMany = Math.max(0, Math.min( this._howMany, this.length() ) );
if( this.howMany() > this._canPossiblyFulfill() ) {
this._reject( [] );
}
}
};
SomePromiseArray.prototype.setUnwrap = function SomePromiseArray$setUnwrap() {
this._unwrap = true;
};
SomePromiseArray.prototype.howMany = function SomePromiseArray$howMany() {
return this._howMany;
};
SomePromiseArray.prototype.setHowMany =
function SomePromiseArray$setHowMany( count ) {
if( this._isResolved() ) return;
this._howMany = count;
};
SomePromiseArray.prototype._promiseFulfilled =
function SomePromiseArray$_promiseFulfilled( value ) {
if( this._isResolved() ) return;
this._addFulfilled( value );
if( this._fulfilled() === this.howMany() ) {
this._values.length = this.howMany();
if( this.howMany() === 1 && this._unwrap ) {
this._fulfill( this._values[0] );
}
else {
this._fulfill( this._values );
}
}
};
SomePromiseArray.prototype._promiseRejected =
function SomePromiseArray$_promiseRejected( reason ) {
if( this._isResolved() ) return;
this._addRejected( reason );
if( this.howMany() > this._canPossiblyFulfill() ) {
if( this._values.length === this.length() ) {
this._reject([]);
}
else {
this._reject( this._values.slice( this.length() + this._holes ) );
}
}
};
SomePromiseArray.prototype._fulfilled = function SomePromiseArray$_fulfilled() {
return this._totalResolved;
};
SomePromiseArray.prototype._rejected = function SomePromiseArray$_rejected() {
return this._values.length - this.length() - this._holes;
};
SomePromiseArray.prototype._addRejected =
function SomePromiseArray$_addRejected( reason ) {
this._values.push( reason );
};
SomePromiseArray.prototype._addFulfilled =
function SomePromiseArray$_addFulfilled( value ) {
this._values[ this._totalResolved++ ] = value;
};
SomePromiseArray.prototype._canPossiblyFulfill =
function SomePromiseArray$_canPossiblyFulfill() {
return this.length() - this._rejected();
};
return SomePromiseArray;
};
},{"./util.js":36}],35:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
module.exports = function( Promise ) {
var PromiseInspection = require( "./promise_inspection.js" );
Promise.prototype.inspect = function Promise$inspect() {
return new PromiseInspection( this );
};
};
},{"./promise_inspection.js":20}],36:[function(require,module,exports){
/**
* Copyright (c) 2013 <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:</p>
*
* 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.
*/
"use strict";
var global = require("./global.js");
var ASSERT = require("./assert.js");
var haveGetters = (function(){
try {
var o = {};
Object.defineProperty(o, "f", {
get: function () {
return 3;
}
});
return o.f === 3;
}
catch(e) {
return false;
}
})();
var ensurePropertyExpansion = function( obj, prop, value ) {
try {
notEnumerableProp( obj, prop, value );
return obj;
}
catch( e ) {
var ret = {};
var keys = Object.keys( obj );
for( var i = 0, len = keys.length; i < len; ++i ) {
try {
var key = keys[i];
ret[key] = obj[key];
}
catch( err ) {
ret[key] = err;
}
}
notEnumerableProp( ret, prop, value );
return ret;
}
};
var canEvaluate = (function() {
if( typeof window !== "undefined" && window !== null &&
typeof window.document !== "undefined" &&
typeof navigator !== "undefined" && navigator !== null &&
typeof navigator.appName === "string" &&
window === global ) {
return false;
}
return true;
})();
function deprecated( msg ) {
if( typeof console !== "undefined" && console !== null &&
typeof console.warn === "function" ) {
console.warn( "Bluebird: " + msg );
}
}
var isArray = Array.isArray || function( obj ) {
return obj instanceof Array;
};
var errorObj = {e: {}};
function tryCatch1( fn, receiver, arg ) {
try {
return fn.call( receiver, arg );
}
catch( e ) {
errorObj.e = e;
return errorObj;
}
}
function tryCatch2( fn, receiver, arg, arg2 ) {
try {
return fn.call( receiver, arg, arg2 );
}
catch( e ) {
errorObj.e = e;
return errorObj;
}
}
function tryCatchApply( fn, args, receiver ) {
try {
return fn.apply( receiver, args );
}
catch( e ) {
errorObj.e = e;
return errorObj;
}
}
var inherits = function( Child, Parent ) {
var hasProp = {}.hasOwnProperty;
function T() {
this.constructor = Child;
this.constructor$ = Parent;
for (var propertyName in Parent.prototype) {
if (hasProp.call( Parent.prototype, propertyName) &&
propertyName.charAt(propertyName.length-1) !== "$"
) {
this[ propertyName + "$"] = Parent.prototype[propertyName];
}
}
}
T.prototype = Parent.prototype;
Child.prototype = new T();
return Child.prototype;
};
function asString( val ) {
return typeof val === "string" ? val : ( "" + val );
}
function isPrimitive( val ) {
return val == null || val === true || val === false ||
typeof val === "string" || typeof val === "number";
}
function isObject( value ) {
return !isPrimitive( value );
}
function maybeWrapAsError( maybeError ) {
if( !isPrimitive( maybeError ) ) return maybeError;
return new Error( asString( maybeError ) );
}
function withAppended( target, appendee ) {
var len = target.length;
var ret = new Array( len + 1 );
var i;
for( i = 0; i < len; ++i ) {
ret[ i ] = target[ i ];
}
ret[ i ] = appendee;
return ret;
}
function notEnumerableProp( obj, name, value ) {
var descriptor = {
value: value,
configurable: true,
enumerable: false,
writable: true
};
Object.defineProperty( obj, name, descriptor );
return obj;
}
module.exports ={
isArray: isArray,
haveGetters: haveGetters,
notEnumerableProp: notEnumerableProp,
isPrimitive: isPrimitive,
isObject: isObject,
ensurePropertyExpansion: ensurePropertyExpansion,
canEvaluate: canEvaluate,
deprecated: deprecated,
errorObj: errorObj,
tryCatch1: tryCatch1,
tryCatch2: tryCatch2,
tryCatchApply: tryCatchApply,
inherits: inherits,
withAppended: withAppended,
asString: asString,
maybeWrapAsError: maybeWrapAsError
};
},{"./assert.js":2,"./global.js":14}]},{},[4])
(4)
//trick uglify-js into not minifying
});
; |
ejc123/geotrellis | spark/src/test/scala/geotrellis/spark/cmd/BuildPyramidSpec.scala | /*
* Copyright (c) 2014 DigitalGlobe.
*
* 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 geotrellis.spark.cmd
import geotrellis.spark.metadata.PyramidMetadata
import geotrellis.spark.SharedSparkContext
import geotrellis.spark.TestEnvironment
import org.apache.hadoop.fs.FileUtil
import org.apache.hadoop.fs.Path
import org.scalatest.Suite
import org.scalatest.FunSpec
trait BuildPyramidSetup extends TestEnvironment with SharedSparkContext { self: Suite =>
val allOnesOrig = new Path(inputHome, "all-ones")
val allOnes = new Path(outputLocal, "all-ones")
// delete may seem redundant with the "overwrite" flag in FileUtil.copy but
// apparently it is not, since it throws an exception if it finds the directory pre-existing
localFS.delete(allOnes, true)
FileUtil.copy(localFS, allOnesOrig, localFS, allOnes.getParent(),
false /* deleteSource */ ,
true /* overwrite */ ,
conf)
// lazy so runs only after the BuildPyramid.build runs
lazy val meta = PyramidMetadata(allOnes, conf)
override def beforeAll() {
super.beforeAll()
BuildPyramid.build(sc, allOnes, conf)
}
}
class BuildPyramidSpec extends FunSpec with RasterVerifyMethods with BuildPyramidSetup {
describe("Build Pyramid") {
it("should create the correct metadata") {
// first lets make sure that the base attributes (everything but the zoom levels in rasterMetadata)
// has not changed
val actualMetaBase = meta.copy(
rasterMetadata = meta.rasterMetadata.filterKeys(_ == meta.maxZoomLevel.toString))
val expectedMetaBase = PyramidMetadata(allOnesOrig, conf)
actualMetaBase should be(expectedMetaBase)
// now lets make sure that the metadata has all the zoom levels in the rasterMetadata
meta.rasterMetadata.keys.toList.map(_.toInt).sorted should be((1 to meta.maxZoomLevel).toList)
}
it("should have the right zoom level directory") {
for (z <- 1 until meta.maxZoomLevel) {
verifyZoomLevelDirectory(new Path(allOnes, z.toString))
}
}
it("should have the right number of splits for each of the zoom levels") {
for (z <- 1 until meta.maxZoomLevel) {
verifyPartitions(new Path(allOnes, z.toString))
}
}
it("should have the correct tiles (checking tileIds)") {
for (z <- 1 until meta.maxZoomLevel) {
verifyTiles(new Path(allOnes, z.toString), meta)
}
}
it("should have its data files compressed") {
for (z <- 1 until meta.maxZoomLevel) {
verifyCompression(new Path(allOnes, z.toString))
}
}
it("should have its block size set correctly") {
for (z <- 1 until meta.maxZoomLevel) {
verifyBlockSize(new Path(allOnes, z.toString))
}
}
}
} |
surrealdb/ember-surreal | addon/services/surreal.js | <reponame>surrealdb/ember-surreal
import Service from '@ember/service';
import Evented from '@ember/object/evented';
import { computed } from '@ember/object';
import { A } from '@ember/array';
import { key } from '../utils/conf';
import guid from '../utils/guid';
import { Promise } from 'rsvp';
import Config from '../-private/config';
import Storage from '../classes/storage';
import Socket from '../classes/socket';
import Poller from '../classes/poller';
import Live from '../classes/live';
import JWT from '../utils/jwt';
import DS from 'ember-data';
export default Service.extend(Config, Evented, {
// The underlying instance of
// the WebSocket used for
// sending and receiving data.
ws: null,
// The contents of the decoded
// JWT token used for retrieving
// the scope and JWT details.
jwt: null,
// Store the requests which are
// currently waiting for the
// server to respond.
events: A(),
// Whether we can proceed to
// transition to authenticated
// and unauthenticated routes.
opened: false,
// Whether there is an active
// connection with the Surreal
// database server over Socket.
attempted: false,
// Whether the connection to the
// Surreal database has been
// invalidated with no token.
invalidated: false,
// Whether the connection to the
// Surreal database has been
// authenticated with a token.
authenticated: false,
// Add a computed property for
// the authentication token so
// we can get it when needed.
token: computed(function() {
return this.storage.get(key);
}),
// A computed property which
// will be true if there are
// any open server requests.
loading: computed('events.length', function() {
return this.get('events.length') > 0;
}),
// Setup the Surreal service,
// listening for token changes
// and connecting to the DB.
init() {
this._super(...arguments);
// Create a new storage instance so that
// we can store and persist all session
// authentication information.
this.storage = new Storage();
// Create a new poller for sending ping
// requests in a repeated manner in order
// to keep loadbalancing requests open.
this.pinger = new Poller(60000);
// Listen for changes to the local storage
// authentication key, and reauthenticate
// if the token changes from another tab.
if (window && window.addEventListener) {
window.addEventListener('storage', (e) => {
if (e.key == key) {
this.authenticate(e.newValue);
}
});
}
// Listen for invalidation events so that
// we can decode the JWT contents in order
// to store it in the JWT object.
this.on('invalidated', function() {
let t = this.get('token');
this.set('jwt', JWT(t));
});
// Listen for authentication events so that
// we can decode the JWT contents in order
// to store it in the JWT object.
this.on('authenticated', function() {
let t = this.get('token');
this.set('jwt', JWT(t));
});
// Next we setup the websocket connection
// and listen for events on the socket,
// specifying whether logging is enabled.
this.ws = new Socket(this.config.url, this.config.opts, {
log: this.get('storage.debug') === '*',
});
// When the connection is closed we
// change the relevant properties
// stop live queries, and trigger.
this.ws.onclose = () => {
this.pinger.clear();
this.setProperties({
events: A(),
opened: false,
closed: true,
attempted: false,
invalidated: false,
authentcated: false,
});
this.trigger("closed");
};
// When the connection is opened we
// change the relevant properties
// open live queries, and trigger.
this.ws.onopen = () => {
this.pinger.start(this, () => {
this._send(guid(), 'Ping');
});
this.setProperties({
events: A(),
opened: true,
closed: false,
attempted: false,
invalidated: false,
authentcated: false,
});
this.trigger("opened");
this._attempt();
};
// When we receive a socket message
// we process it. If it has an ID
// then it is a query response.
this.ws.onmessage = (e) => {
let d = JSON.parse(e.data);
if (d.id) {
this.trigger(d.id, d);
} else {
this.trigger(d.method, d.params);
}
};
// Open the websocket for the first
// time. This will automatically
// attempt to reconnect on failure.
this.ws.open();
},
// Tear down the Surreal service,
// ensuring we stop the pinger,
// and close the WebSocket.
willDestroy() {
this.pinger.clear();
this.ws.close();
this.ws.onopen = () => {};
this.ws.onclose = () => {};
this.ws.onmessage = () => {};
this._super(...arguments);
},
// --------------------------------------------------
// Helper methods
// --------------------------------------------------
sync() {
return new Live(this, ...arguments);
},
when(e, f) {
return this.get(e) ? f() : this.on(e, f);
},
wait(e) {
return new Promise( (resolve) => {
return this.get(e) ? resolve() : this.one(e, resolve);
});
},
// --------------------------------------------------
// Methods for authentication
// --------------------------------------------------
signup(v={}) {
let id = guid();
return this.wait('opened').then( () => {
return new Promise( (resolve, reject) => {
this.one(id, e => this._signup(e, resolve, reject) );
this._send(id, "Signup", [v]);
});
});
},
signin(v={}) {
let id = guid();
return this.wait('opened').then( () => {
return new Promise( (resolve, reject) => {
this.one(id, e => this._signin(e, resolve, reject) );
this._send(id, "Signin", [v]);
});
});
},
invalidate() {
let id = guid();
return this.wait('opened').then( () => {
return new Promise( (resolve, reject) => {
this.one(id, e => this._invalidate(e, resolve, reject) );
this._send(id, "Invalidate");
});
});
},
authenticate(t) {
let id = guid();
return this.wait('opened').then( () => {
return new Promise( (resolve, reject) => {
this.one(id, e => this._authenticate(e, resolve, reject) );
this._send(id, "Authenticate", [t]);
});
});
},
// --------------------------------------------------
// Methods for live queries
// --------------------------------------------------
live(c) {
let id = guid();
return this.wait('attempted').then( () => {
return new Promise( (resolve, reject) => {
this.one(id, e => this._return(e, resolve, reject) );
this._send(id, "Live", [c]);
});
});
},
kill(q) {
let id = guid();
return this.wait('attempted').then( () => {
return new Promise( (resolve, reject) => {
this.one(id, e => this._return(e, resolve, reject) );
this._send(id, "Kill", [q]);
});
});
},
// --------------------------------------------------
// Methods for static queries
// --------------------------------------------------
info() {
let id = guid();
return this.wait('attempted').then( () => {
return new Promise( (resolve, reject) => {
this.one(id, e => this._return(e, resolve, reject) );
this._send(id, "Info");
});
});
},
query(q, v={}) {
let id = guid();
return this.wait('attempted').then( () => {
return new Promise( (resolve, reject) => {
this.one(id, e => this._return(e, resolve, reject) );
this._send(id, "Query", [q, v]);
});
});
},
select(c, t=null) {
let id = guid();
return this.wait('attempted').then( () => {
return new Promise( (resolve, reject) => {
this.one(id, e => this._result(e, t, 'select', resolve, reject) );
this._send(id, "Select", [c, t]);
});
});
},
create(c, t=null, d={}) {
let id = guid();
return this.wait('attempted').then( () => {
return new Promise( (resolve, reject) => {
this.one(id, e => this._result(e, t, 'create', resolve, reject) );
this._send(id, "Create", [c, t, d]);
});
});
},
update(c, t=null, d={}) {
let id = guid();
return this.wait('attempted').then( () => {
return new Promise( (resolve, reject) => {
this.one(id, e => this._result(e, t, 'update', resolve, reject) );
this._send(id, "Update", [c, t, d]);
});
});
},
change(c, t=null, d={}) {
let id = guid();
return this.wait('attempted').then( () => {
return new Promise( (resolve, reject) => {
this.one(id, e => this._result(e, t, 'change', resolve, reject) );
this._send(id, "Change", [c, t, d]);
});
});
},
modify(c, t=null, d={}) {
let id = guid();
return this.wait('attempted').then( () => {
return new Promise( (resolve, reject) => {
this.one(id, e => this._result(e, t, 'modify', resolve, reject) );
this._send(id, "Modify", [c, t, d]);
});
});
},
delete(c, t=null) {
let id = guid();
return this.wait('attempted').then( () => {
return new Promise( (resolve, reject) => {
this.one(id, e => this._result(e, t, 'delete', resolve, reject) );
this._send(id, "Delete", [c, t]);
});
});
},
// --------------------------------------------------
// Private methods
// --------------------------------------------------
_send(id, method, params=[]) {
this.events.pushObject(id);
this.one(id, () => this.events.removeObject(id) );
this.ws.send(JSON.stringify({
id, method, params, async:true
}));
},
_return(e, resolve, reject) {
if (e.error) {
return reject( new Error(e.error.message) );
} else if (e.result) {
return resolve(e.result);
}
return resolve();
},
_result(e, t, a, resolve, reject) {
if (e.error) {
return reject( new DS.InvalidError(e.error.message) );
} else if (e.result) {
return this._output(
e.result[0].status,
e.result[0].result,
e.result[0].detail,
a, t, resolve, reject,
)
}
return resolve();
},
_output(s, r, m, a, t, resolve, reject) {
switch (s) {
default:
return reject( new Error(m) );
case 'ERR_DB':
return reject( new DS.ServerError() );
case 'ERR_KV':
return reject( new DS.ServerError() );
case 'ERR_TO':
return reject( new DS.TimeoutError() );
case 'ERR_PE':
return reject( new DS.ForbiddenError() );
case 'ERR_EX':
return reject( new DS.ConflictError() );
case 'ERR_FD':
return reject( new DS.InvalidError() );
case 'ERR_IX':
return reject( new DS.ConflictError() );
case 'OK':
switch (a) {
case 'delete':
return resolve();
case 'modify':
return r && r.length ? resolve(r[0]) : resolve([]);
case 'create':
return r && r.length ? resolve(r[0]) : resolve({});
case 'update':
return r && r.length ? resolve(r[0]) : resolve({});
default:
if (typeof t === "string") {
return r && r.length ? resolve(r[0]) : reject( new DS.NotFoundError() );
} else {
return r && r.length ? resolve(r) : resolve([]);
}
}
}
},
_signup(e, resolve, reject) {
if (e.error) {
this.storage.set(key, e.result);
this.setProperties({ attempted: true, invalidated: true, authenticated: false });
this.trigger('attempted');
this.trigger('invalidated');
return reject();
} else {
this.storage.set(key, e.result);
this.setProperties({ attempted: true, invalidated: false, authenticated: true });
this.trigger('attempted');
this.trigger('authenticated');
return resolve();
}
},
_signin(e, resolve, reject) {
if (e.error) {
this.storage.set(key, e.result);
this.setProperties({ attempted: true, invalidated: true, authenticated: false });
this.trigger('attempted');
this.trigger('invalidated');
return reject();
} else {
this.storage.set(key, e.result);
this.setProperties({ attempted: true, invalidated: false, authenticated: true });
this.trigger('attempted');
this.trigger('authenticated');
return resolve();
}
},
_attempt() {
let token = this.get('token');
if (token) {
this.authenticate(token);
} else {
this.set('attempted', true);
this.trigger('attempted');
}
},
_invalidate(e, resolve) {
this.storage.set(key, null);
this.setProperties({ attempted: true, invalidated: true, authenticated: false });
this.trigger('attempted');
this.trigger('invalidated');
return resolve();
},
_authenticate(e, resolve) {
if (e.error) {
this.setProperties({ attempted: true, invalidated: true, authenticated: false });
this.trigger('attempted');
this.trigger('invalidated');
return resolve();
} else {
this.setProperties({ attempted: true, invalidated: false, authenticated: true });
this.trigger('attempted');
this.trigger('authenticated');
return resolve();
}
},
});
|
lionelpa/openvalidation | openvalidation-common/src/main/java/io/openvalidation/common/ast/ASTActionError.java | /*
* Copyright 2019 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.openvalidation.common.ast;
import java.util.Objects;
public class ASTActionError extends ASTActionBase {
private String errorMessage;
private Integer errorCode;
public ASTActionError() {}
public ASTActionError(String errorMsg) {
this.setErrorMessage(errorMsg);
}
public String getErrorMessage() {
return errorMessage;
}
public void setErrorMessage(String errorMessage) {
this.errorMessage =
(errorMessage != null) ? errorMessage.replace("\r\n", " ").replace("\n", " ").trim() : null;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof ASTActionError)) return false;
ASTActionError that = (ASTActionError) o;
return Objects.equals(getErrorMessage(), that.getErrorMessage());
}
@Override
public int hashCode() {
return Objects.hash(getErrorMessage());
}
@Override
public String print(int level) {
StringBuilder sb = new StringBuilder();
sb.append("\n" + this.space(level) + "error message: " + this.getErrorMessage());
if (errorCode != null) sb.append("\n" + this.space(level) + "error code: " + errorCode);
return sb.toString();
}
public Integer getErrorCode() {
return this.errorCode;
}
public void setErrorCode(Integer errorCode) {
this.errorCode = errorCode;
}
}
|
sullis/mockserver | mockserver-core/src/test/java/org/mockserver/serialization/java/NottableStringToJavaSerializerTest.java | package org.mockserver.serialization.java;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.mockserver.model.NottableString.string;
/**
* @author jamesdbloom
*/
public class NottableStringToJavaSerializerTest {
@Test
public void shouldSerializeNottedString() {
assertEquals("not(\"some_value\")",
NottableStringToJavaSerializer.serialize(
string("some_value", true)
)
);
}
@Test
public void shouldSerializeString() {
assertEquals("\"some_value\"",
NottableStringToJavaSerializer.serialize(
string("some_value", false)
)
);
}
}
|
davidbebangarang/gesbonos | frontend/src/__mocks__/BonoMock.js | <gh_stars>0
const BonoMock = {
"idBono": "1",
"titulo": "Masaje relajante",
"ubicacion": "Las Americas",
"valor": "90",
"precio": "55.90",
"tiempo": "",
"textoAdicional":"",
"descripcion": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum",
"condiciones": "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as thei",
"imagenesTarjetas":"https://thumbs.subefotos.com/06d5c633285f1dc69fa200d0d56d7171o.jpg",
"linkRedes": "https://fisioproyectos.com/",
"imagen":[
"https://thumbs.subefotos.com/06d5c633285f1dc69fa200d0d56d7171o.jpg",
"https://thumbs.subefotos.com/bd510227293481f4a31b54d94a47dc85o.jpg",
"https://thumbs.subefotos.com/0744162882bae23773904f2c80206917o.jpg",
"https://thumbs.subefotos.com/06d5c633285f1dc69fa200d0d56d7171o.jpg"
]
};
export default BonoMock; |
cooperative-humans/localorbit | db/migrate/20140319184312_add_facebook_and_twitter_to_organizations.rb | <filename>db/migrate/20140319184312_add_facebook_and_twitter_to_organizations.rb
class AddFacebookAndTwitterToOrganizations < ActiveRecord::Migration
def change
add_column :organizations, :facebook, :string
add_column :organizations, :twitter, :string
end
end
|
mwarkentin/homebrew-versions | Casks/command-line-tools-lion.rb | <gh_stars>0
class CommandLineToolsLion < Cask
version 'lion_april_2013'
sha256 '20a3e1965c685c6c079ffe89b168c3975c9a106c4b33b89aeac93c8ffa4e0523'
url 'http://devimages.apple.com/downloads/xcode/command_line_tools_for_xcode_os_x_lion_april_2013.dmg'
homepage 'https://developer.apple.com/xcode/downloads/'
license :unknown
pkg 'Command Line Tools (Lion).mpkg'
end
|
ahota/visit_ospray | databases/IDX/avtIDXFileFormat.h | <gh_stars>0
/*****************************************************************************
*
* Copyright (c) 2000 - 2013, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-442911
* All rights reserved.
*
* This file is part of VisIt. For details, see https://visit.llnl.gov/. The
* full copyright notice is contained in the file COPYRIGHT located at the root
* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
*
* 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 disclaimer below.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the disclaimer (as noted below) in the
* documentation and/or other materials provided with the distribution.
* - Neither the name of the LLNS/LLNL 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 LAWRENCE LIVERMORE NATIONAL SECURITY,
* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*****************************************************************************/
// ************************************************************************* //
// avtIDXFileFormat.h //
// ************************************************************************* //
#ifndef AVT_IDX_FILE_FORMAT_H
#define AVT_IDX_FILE_FORMAT_H
#include <avtMTMDFileFormat.h>
#include <vector>
#include <visuscpp/appkit/visus_appkit.h>
///////////////////////////////////////////////////////////////////////////////
class avtIDXFileFormat;
class avtIDXQueryNode : public Visus::QueryNode
{
public:
//constructor
avtIDXQueryNode(avtIDXFileFormat *node_):node(node_) {VisusAssert(node);}
//destructor
~avtIDXQueryNode() {}
//publish
virtual bool publish(const Visus::DictObject& evt);
private:
avtIDXFileFormat *node;
};
// ****************************************************************************
// Class: avtIDXFileFormat
//
// Purpose:
// Reads in IDX files as a plugin to VisIt.
//
// Programmer: camc -- generated by xml2avt
// Creation: Tue Jan 7 12:20:07 MST 2014
//
// ****************************************************************************
class DummyNode;
class avtView3D;
class avtIDXFileFormat : public avtMTMDFileFormat, public Visus::Object
{
friend class avtIDXQueryNode;
public:
avtIDXFileFormat(const char *);
virtual ~avtIDXFileFormat();
//
// This is used to return unconvention data -- ranging from material
// information to information about block connectivity.
//
// virtual void *GetAuxiliaryData(const char *var, int timestep,
// int domain, const char *type, void *args,
// DestructorFunction &);
//
//
// If you know the times and cycle numbers, overload this function.
// Otherwise, VisIt will make up some reasonable ones for you.
//
// virtual void GetCycles(std::vector<int> &);
// virtual void GetTimes(std::vector<double> &);
//
virtual int GetNTimesteps(void);
virtual const char *GetType(void) { return "IDX"; };
virtual bool CanCacheVariable(const char *);
//virtual bool HasInvariantMetaData(void) const { return false; }
virtual void RegisterDataSelections(
const std::vector<avtDataSelection_p>&,
std::vector<bool>* applied);
virtual void PopulateDatabaseMetaData(avtDatabaseMetaData *, int);
virtual vtkDataSet *GetMesh(int, int, const char *);
virtual vtkDataArray *GetVar(int, int, const char *);
virtual vtkDataArray *GetVectorVar(int, int, const char *);
virtual void FreeUpResources(void);
protected:
std::string filename;
// int meshNx, meshNy;
// double meshXmin, meshXmax, meshYmin, meshYmax;
// int coarseNx, coarseNy;
std::vector<avtDataSelection_p> selectionsList;
std::vector<bool> *selectionsApplied;
void CalculateMesh(/*double &, double &,
double &, double &, */int timestate);
//
//<ctc> old ViSUS plugin stuff, may not all be necessary
//
double frustum2d[6];
double frustum3d[6];
int resolution;
int nblocks;
int rank;
bool haveData;
int dim; //2d or 3d
int bounds[3];
double extents[6];
double fullextents[6];
static int num_instances;
UniquePtr<Visus::Application> app;
UniquePtr<Visus::Dataflow> dataflow;
void onDataflowInput(Visus::DataflowNode* dnode);
// bool connect(Visus::DataflowPortPtr oport,Visus::DataflowPortPtr iport);
// bool connect(Visus::DataflowNodePtr from,Visus::String oport,Visus::String iport,Visus::DataflowNodePtr to);
SharedPtr<Visus::Dataset> dataset;
SharedPtr<Visus::DatasetNode> dataflow_dataset;
avtIDXQueryNode *query; //<ctc> memory?
SharedPtr<Visus::Array> data;
// Visus::KDataflowNodePtr K (Visus::ObjectPtr value,Visus::String oport="value") {return dataflow->K(value,oport);}
VISUS_DECLARE_BINDABLE(avtIDXFileFormat);
};
#endif
|
guychris/canvas | canvas_modules/common-canvas/__tests__/common-properties/panels/summary-test.js | /*
* Copyright 2017-2020 IBM Corporation
*
* 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.
*/
import propertyUtils from "./../../_utils_/property-utils";
import tableUtils from "./../../_utils_/table-utils";
import summarypanelParamDef from "./../../test_resources/paramDefs/summarypanel_paramDef.json";
import panelConditionsParamDef from "./../../test_resources/paramDefs/panelConditions_paramDef.json";
import { expect } from "chai";
describe("summary renders correctly", () => {
let wrapper;
beforeEach(() => {
const renderedObject = propertyUtils.flyoutEditorForm(summarypanelParamDef);
wrapper = renderedObject.wrapper;
});
afterEach(() => {
wrapper.unmount();
});
it("should have displayed the initial values in the summary", () => {
const summaries = wrapper.find("div.properties-summary-values");
expect(summaries).to.have.length(3); // all summary tables including table in wideflyout
const sortSummary = wrapper.find("div[data-id='properties-structuretableSortOrder-summary-panel']");
const sortSummaryRows = sortSummary.find("tr.properties-summary-row");
expect(sortSummaryRows).to.have.length(1);
const sortRow1 = sortSummaryRows.at(0);
const sortRow1Texts = sortRow1.find("td.properties-summary-row-data").at(0)
.find("span");
expect(sortRow1Texts.at(0).text()
.trim()).to.equal("Cholesterol");
expect(sortRow1.find("td.properties-summary-row-data").at(0)
.find("span")
.at(1)
.text()
.trim()).to.equal("Cholesterol");
});
it("should open fieldpicker when type unknown", () => {
const sortSummary = wrapper.find("div[data-id='properties-structuretableSortOrder-summary-panel']");
const summaryButton = sortSummary.find("button.properties-summary-link-button");
summaryButton.simulate("click");
const fieldPickerWrapper = tableUtils.openFieldPicker(wrapper, "properties-structuretableSortOrder");
tableUtils.fieldPicker(fieldPickerWrapper, ["Age"], ["Age", "Sex", "BP", "Cholesterol", "Na", "K", "Drug"]);
});
});
describe("summary panel renders correctly", () => {
let wrapper;
beforeEach(() => {
const renderedObject = propertyUtils.flyoutEditorForm(summarypanelParamDef);
wrapper = renderedObject.wrapper;
});
afterEach(() => {
wrapper.unmount();
});
it("should have displayed placeholder in summary panel for more then 10 fields", () => {
const summaries = wrapper.find("div[data-id='properties-Derive-Node'] .properties-summary-values");
const summaryRows = summaries.at(1).find("tr.properties-summary-row"); // Table Input
expect(summaryRows).to.have.length(0);
const summaryPlaceholder = summaries.at(1).find("div.properties-summary-table span");
expect(summaryPlaceholder).to.have.length(1);
expect(summaryPlaceholder.text()).to.equal("More than ten fields...");
});
it("should have a summary panel in a summary panel", () => {
const wideflyout = propertyUtils.openSummaryPanel(wrapper, "structuretableSortOrder-summary-panel");
const summaryButton = wideflyout.find("button.properties-summary-link-button");
expect(summaryButton).to.have.length(1);
const summaryData = wideflyout.find("tr.properties-summary-row");
expect(summaryData).to.have.length(1);
});
});
describe("summary panel renders error/warning status correctly", () => {
let wrapper;
beforeEach(() => {
const renderedObject = propertyUtils.flyoutEditorForm(summarypanelParamDef);
wrapper = renderedObject.wrapper;
});
afterEach(() => {
wrapper.unmount();
});
it("should show warning message in summary when removing rows", () => {
let wideflyout = propertyUtils.openSummaryPanel(wrapper, "Derive-Node");
tableUtils.clickTableRows(wideflyout, [0]);
// ensure remove button is enabled and click it
wideflyout = wrapper.find("div.properties-wf-content.show");
const enabledRemoveColumnButton = wideflyout.find("button.properties-remove-fields-button");
expect(enabledRemoveColumnButton).to.have.length(2);
expect(enabledRemoveColumnButton.at(0).prop("disabled")).to.be.false;
expect(enabledRemoveColumnButton.at(1).prop("disabled")).to.equal(true);
enabledRemoveColumnButton.at(0).simulate("click");
// remove second row
tableUtils.clickTableRows(wideflyout, [0]);
enabledRemoveColumnButton.at(0).simulate("click");
// close fly-out
wideflyout.find("button.properties-apply-button").simulate("click");
// check that Alerts tab is added
const alertCategory = wrapper.find("div.properties-category-container").at(0); // alert category
const alertButton = alertCategory.find("button.properties-category-title");
expect(alertButton.text()).to.equal("Alerts (1)");
alertButton.simulate("click");
const alertList = alertCategory.find("div.properties-link-text-container.warning");
expect(alertList).to.have.length(1);
const warningMsg = alertList.at(0).find("a.properties-link-text");
expect(warningMsg.text()).to.equal("Expression cell table cannot be empty");
// click on the link should open up structure list table category
warningMsg.simulate("click");
expect(wrapper.find("div.properties-category-content.show")).to.have.length(1);
// check that warning icon is shown in summary
let tableCategory = wrapper.find("div[data-id='properties-Derive-Node']");
let summary = tableCategory.find("div.properties-summary-link-container");
expect(summary.find("svg.warning")).to.have.length(1);
// add row back in tables
tableCategory.find("button.properties-summary-link-button").simulate("click");
wideflyout = wrapper.find("div.properties-wf-content.show");
wideflyout.find("button.properties-add-fields-button").at(0)
.simulate("click");
// close fly-out
wideflyout.find("button.properties-apply-button").simulate("click");
// ensure warning message and alerts tab are gone
tableCategory = wrapper.find("div[data-id='properties-Derive-Node']");
summary = tableCategory.find("div.properties-summary-link-container");
expect(summary.find("svg.warning")).to.have.length(0);
});
it("should show error icon in summary when both error and warning messages exist", () => {
let wideflyout = propertyUtils.openSummaryPanel(wrapper, "Derive-Node");
tableUtils.clickTableRows(wideflyout, [0]);
wideflyout = wrapper.find("div.properties-wf-content.show");
// ensure remove button is enabled and click it
const enabledRemoveColumnButton = wideflyout.find("button.properties-remove-fields-button");
expect(enabledRemoveColumnButton).to.have.length(2);
expect(enabledRemoveColumnButton.at(0).prop("disabled")).to.be.false;
expect(enabledRemoveColumnButton.at(1).prop("disabled")).to.equal(true);
enabledRemoveColumnButton.at(0).simulate("click");
// remove second row
tableUtils.clickTableRows(wideflyout, [0]);
enabledRemoveColumnButton.at(0).simulate("click");
wideflyout = wrapper.find("div.properties-wf-content.show");
expect(tableUtils.getTableRows(wideflyout.find("div[data-id='properties-ft-structurelisteditorTableInput']"))).to.have.length(11);
// remove all rows from Table Input table
const tableInputBodyData = wideflyout.find("div[data-id='properties-ft-structurelisteditorTableInput']");
summarypanelParamDef.current_parameters.structurelisteditorTableInput.forEach((value) => {
tableUtils.selectCheckboxes(tableInputBodyData, [0]);
const tableInputRemoveButton = wideflyout.find("button.properties-remove-fields-button");
expect(tableInputRemoveButton).to.have.length(2);
tableInputRemoveButton.at(1).simulate("click");
});
// check that all rows were removed
wideflyout = wrapper.find("div.properties-wf-content.show");
expect(tableUtils.getTableRows(wideflyout.find("div[data-id='properties-ft-structurelisteditorTableInput']"))).to.have.length(0);
// close fly-out
wideflyout.find("button.properties-apply-button").simulate("click");
// check that Alerts tab is added and that is shows error message before warning message
let alertCategory = wrapper.find("div.properties-category-container").at(0); // alert category
expect(alertCategory.find("button.properties-category-title").text()).to.equal("Alerts (2)");
let alertList = alertCategory.find("div.properties-link-text-container");
expect(alertList).to.have.length(2);
const errorWrapper = alertCategory.find("div.properties-link-text-container.error");
expect(errorWrapper).to.have.length(1);
expect(errorWrapper.find("a.properties-link-text").text()).to.equal("Structure list editor table cannot be empty");
let warningWrapper = alertCategory.find("div.properties-link-text-container.warning");
expect(warningWrapper).to.have.length(1);
expect(warningWrapper.find("a.properties-link-text").text()).to.equal("Expression cell table cannot be empty");
// check that summary icon is an error icon
let tableCategory = wrapper.find("div.properties-category-container").at(1); // Structure list table category
expect(tableCategory.find("button.properties-category-title").text()).to.equal("Structure List Table (2)");
let summary = tableCategory.find("div.properties-summary-link-container");
expect(summary.find("svg.error")).to.have.length(1);
// add row back into Table Input table
tableCategory.find("button.properties-summary-link-button").simulate("click");
wideflyout = wrapper.find("div.properties-wf-content.show");
wideflyout.find("button.properties-add-fields-button").at(1)
.simulate("click");
// close fly-out
wideflyout.find("button.properties-apply-button").simulate("click");
// check that Alerts tab is added and that is shows error message before warning message
alertCategory = wrapper.find("div.properties-category-container").at(0); // alert category
expect(alertCategory.find("button.properties-category-title").text()).to.equal("Alerts (1)");
alertList = alertCategory.find("div.properties-link-text-container");
expect(alertList).to.have.length(1);
warningWrapper = alertCategory.find("div.properties-link-text-container.warning");
expect(warningWrapper).to.have.length(1);
expect(warningWrapper.find("a.properties-link-text").text()).to.equal("Expression cell table cannot be empty");
// check that summary icon is an error icon
tableCategory = wrapper.find("div.properties-category-container").at(1); // Structure list table category
expect(tableCategory.find("button.properties-category-title").text()).to.equal("Structure List Table (1)");
summary = tableCategory.find("div.properties-summary-link-container");
expect(summary.find("svg.warning")).to.have.length(1);
});
});
describe("summary panel visible and enabled conditions work correctly", () => {
let wrapper;
let controller;
beforeEach(() => {
const renderedObject = propertyUtils.flyoutEditorForm(panelConditionsParamDef);
wrapper = renderedObject.wrapper;
controller = renderedObject.controller;
});
afterEach(() => {
wrapper.unmount();
});
it("summary panel link should be disabled and table should be gone", () => {
let firstSummary = wrapper.find("div[data-id='properties-structuretable-summary-panel1']");
expect(firstSummary.props().disabled).to.be.false;
expect(firstSummary.find("div.properties-summary-values")).to.have.length(2);
expect(controller.getPanelState({ name: "structuretable-summary-panel1" })).to.equal("enabled");
expect(controller.getControlState({ name: "structuretable_summary1" })).to.equal("enabled");
expect(controller.getControlState({ name: "structuretable_summary2" })).to.equal("enabled");
controller.updatePropertyValue({ name: "enableSummary" }, false);
wrapper.update();
firstSummary = wrapper.find("div[data-id='properties-structuretable-summary-panel1']");
expect(firstSummary.props().disabled).to.be.true;
expect(controller.getPanelState({ name: "structuretable-summary-panel1" })).to.equal("disabled");
expect(controller.getControlState({ name: "structuretable_summary1" })).to.equal("disabled");
expect(controller.getControlState({ name: "structuretable_summary2" })).to.equal("disabled");
expect(firstSummary.find("div.properties-summary-values")).to.have.length(0);
});
it("summary panel link should be hidden", () => {
let secondSummary = wrapper.find("div[data-id='properties-structuretable-summary-panel2']");
const link = secondSummary.find("button.properties-summary-link-button");
expect(link).to.have.length(1);
expect(controller.getPanelState({ name: "structuretable-summary-panel2" })).to.equal("visible");
expect(secondSummary.find("div.properties-summary-values")).to.have.length(1);
controller.updatePropertyValue({ name: "hideSummary" }, true);
wrapper.update();
expect(controller.getPanelState({ name: "structuretable-summary-panel2" })).to.equal("hidden");
expect(controller.getControlState({ name: "structuretable_summary3" })).to.equal("hidden");
secondSummary = wrapper.find("div[data-id='properties-structuretable-summary-panel2']");
expect(secondSummary.find("div.properties-summary-values")).to.have.length(0);
});
});
|
Eng-RSMY/OpenPNM | OpenPNM/Geometry/__Cube_and_Cuboid__.py | # -*- coding: utf-8 -*-
"""
===============================================================================
Cube_and_Cuboid -- A standard Cubic pore and Cuboic throat model
===============================================================================
"""
from OpenPNM.Geometry import models as gm
from OpenPNM.Geometry import GenericGeometry
class Cube_and_Cuboid(GenericGeometry):
r"""
Toray090 subclass of GenericGeometry
"""
def __init__(self, **kwargs):
super().__init__(**kwargs)
self._generate()
def _generate(self):
self.models.add(propname='pore.seed',
model=gm.pore_misc.random)
self.models.add(propname='throat.seed',
model=gm.throat_misc.neighbor,
pore_prop='pore.seed',
mode='min')
self.models.add(propname='pore.diameter',
model=gm.pore_diameter.sphere,
psd_name='weibull_min',
psd_shape=1.5,
psd_loc=14e-6,
psd_scale=2e-6)
self.models.add(propname='pore.area',
model=gm.pore_area.cubic)
self.models.add(propname='pore.volume',
model=gm.pore_volume.cube)
self.models.add(propname='throat.diameter',
model=gm.throat_diameter.cylinder,
tsd_name='weibull_min',
tsd_shape=1.5,
tsd_loc=14e-6,
tsd_scale=2e-6)
self.models.add(propname='throat.length',
model=gm.throat_length.straight)
self.models.add(propname='throat.volume',
model=gm.throat_volume.cuboid)
self.models.add(propname='throat.area',
model=gm.throat_area.cuboid)
self.models.add(propname='throat.surface_area',
model=gm.throat_surface_area.cuboid)
|
sleyzerzon/soar | Deprecated/GGP/translator/src/Model3.py | from PositionIndex import PositionIndex
from GDL import *
import pdb
class Model:
def __init__(self):
self.__grounds = set()
def __iter__(self):
return iter(self.__grounds)
def __eq__(self, other):
if not isinstance(other, Model): return False
return self.__grounds == other.__grounds
def add_ground(self, s):
if s.get_relation() == "legal":
g = Sentence("does", s.get_terms())
elif s.get_relation() == "next":
g = Sentence("true", s.get_terms())
else:
g = s
self.__grounds.add(g)
def count(self): return len(self.__grounds)
def union(self, other):
self.__grounds.update(other.__grounds)
def subtract(self, other):
self.__grounds.difference_update(other.__grounds)
def copy(self):
copy = Model()
copy.__grounds = self.__grounds.copy()
return copy
def print_m(self):
for g in self.__grounds:
print g
def intersect(self, other, my_i, other_i):
'Return all grounds g such that there exists h in other and g[my_i] = h[other_i]'
res = set()
for g in self.__grounds:
for h in other.__grounds:
if g.get_term(my_i) == h.get_term(other_i):
res.add(g)
break
return res
# leave only those grounds whose terms in each position are mutually equal
def filter_term_equality(self, positions):
for g in self.__grounds.copy():
for i in range(len(positions)):
for j in range(len(positions))[i+1:]:
v1 = positions[i].fetch(g)
v2 = positions[j].fetch(g)
if v1 != v2:
self.__grounds.remove(g)
# leave only those grounds that are compatible with the one passed in
# constraints is a list of tuples (p1, p2, comparison)
# it's important that p1 is for the grounds in the model and p2 is for
# the compatible ground, and that the comparison orientation is correct
def filter_compatible(self, ground, constraints):
for g in self.__grounds.copy():
for p1, p2, c in contraints:
val1 = p1.fetch(g)
val2 = p2.fetch(ground)
if not c.check(val1, val2):
self.__grounds.remove(g)
|
bhojpur/web | pkg/app/testing_test.go | <gh_stars>0
package app
// Copyright (c) 2018 Bhojpur Consulting Private Limited, India. 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.
import (
"io/ioutil"
"os"
"runtime"
"testing"
"github.com/bhojpur/web/pkg/app/logs"
"github.com/stretchr/testify/require"
)
func testSkipNonWasm(t *testing.T) {
if goarch := runtime.GOARCH; goarch != "wasm" {
t.Skip(logs.New("skipping test").
Tag("reason", "unsupported architecture").
Tag("required-architecture", "wasm").
Tag("current-architecture", goarch),
)
}
}
func testSkipWasm(t *testing.T) {
if goarch := runtime.GOARCH; goarch == "wasm" {
t.Skip(logs.New("skipping test").
Tag("reason", "unsupported architecture").
Tag("required-architecture", "!= than wasm").
Tag("current-architecture", goarch),
)
}
}
func testCreateDir(t *testing.T, path string) func() {
err := os.MkdirAll(path, 0755)
require.NoError(t, err)
return func() {
os.RemoveAll(path)
}
}
func testCreateFile(t *testing.T, path, content string) {
err := ioutil.WriteFile(path, []byte(content), 0666)
require.NoError(t, err)
}
|
DS3Lab/LambdaML | archived/functions/cifar10/trigger.py | <reponame>DS3Lab/LambdaML
import os
import boto3
import json
def handler(event,context):
dataset_name = 'cifar10'
bucket_name = 'cifar10dataset'
key = 'cifar-10-python.tar.gz'
num_workers = 10
data_path = os.path.join(os.sep, 'tmp', 'data')
# preprocess_start = time.time()
# preprocess_cifar10(bucket_name = bucket_name, key = key, data_path = data_path, num_workers = num_workers)
# print("pre-process mnist cost {} s".format(time.time()-preprocess_start))
# invoke functions
payload = dict()
payload['dataset'] = dataset_name
payload['data_bucket'] = bucket_name
# payload['model_bucket'] = 'model_bucket'
payload['num_workers'] = num_workers
payload['roundID'] = 0
# invoke functions
lambda_client = boto3.client('lambda')
for i in range(num_workers):
payload['rank'] = i
payload['keys_training_data'] = 'training_{}.pt'.format(i)
lambda_client.invoke(FunctionName='cifar10_F2', InvocationType='Event', Payload=json.dumps(payload))
|
cuichuanteng/njs | test/js/promise_prototype_reject_type_confusion.t.js | /*---
includes: []
flags: [async]
---*/
Symbol.__proto__ = new Promise(()=>{});
Promise.reject(Symbol)
.then(v => $DONOTEVALUATE())
.catch(err => assert.sameValue(err.name, 'Symbol'))
.then($DONE, $DONE);
|
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_3_0_0/models/questionnaireresponse_tests.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 on 2017-03-22.
# 2017, SMART Health IT.
import io
import json
import os
import unittest
from . import questionnaireresponse
from .fhirdate import FHIRDate
class QuestionnaireResponseTests(unittest.TestCase):
def instantiate_from(self, filename):
datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
js = json.load(handle)
self.assertEqual("QuestionnaireResponse", js["resourceType"])
return questionnaireresponse.QuestionnaireResponse(js)
def testQuestionnaireResponse1(self):
inst = self.instantiate_from("questionnaireresponse-example-bluebook.json")
self.assertIsNotNone(inst, "Must have instantiated a QuestionnaireResponse instance")
self.implQuestionnaireResponse1(inst)
js = inst.as_json()
self.assertEqual("QuestionnaireResponse", js["resourceType"])
inst2 = questionnaireresponse.QuestionnaireResponse(js)
self.implQuestionnaireResponse1(inst2)
def implQuestionnaireResponse1(self, inst):
self.assertEqual(inst.authored.date, FHIRDate("2013-02-19T14:15:00+10:00").date)
self.assertEqual(inst.authored.as_json(), "2013-02-19T14:15:00+10:00")
self.assertEqual(inst.id, "bb")
self.assertEqual(inst.item[0].item[0].item[0].answer[0].valueString, "<NAME>")
self.assertEqual(inst.item[0].item[0].item[0].linkId, "nameOfChild")
self.assertEqual(inst.item[0].item[0].item[0].text, "Name of child")
self.assertEqual(inst.item[0].item[0].item[1].answer[0].valueCoding.code, "f")
self.assertEqual(inst.item[0].item[0].item[1].linkId, "sex")
self.assertEqual(inst.item[0].item[0].item[1].text, "Sex")
self.assertEqual(inst.item[0].item[0].linkId, "group")
self.assertEqual(inst.item[0].item[1].item[0].answer[0].valueDecimal, 3.25)
self.assertEqual(inst.item[0].item[1].item[0].linkId, "birthWeight")
self.assertEqual(inst.item[0].item[1].item[0].text, "Birth weight (kg)")
self.assertEqual(inst.item[0].item[1].item[1].answer[0].valueDecimal, 44.3)
self.assertEqual(inst.item[0].item[1].item[1].linkId, "birthLength")
self.assertEqual(inst.item[0].item[1].item[1].text, "Birth length (cm)")
self.assertEqual(inst.item[0].item[1].item[2].answer[0].item[0].item[0].answer[0].valueDate.date, FHIRDate("1972-11-30").date)
self.assertEqual(inst.item[0].item[1].item[2].answer[0].item[0].item[0].answer[0].valueDate.as_json(), "1972-11-30")
self.assertEqual(inst.item[0].item[1].item[2].answer[0].item[0].item[0].linkId, "vitaminKDose1")
self.assertEqual(inst.item[0].item[1].item[2].answer[0].item[0].item[0].text, "1st dose")
self.assertEqual(inst.item[0].item[1].item[2].answer[0].item[0].item[1].answer[0].valueDate.date, FHIRDate("1972-12-11").date)
self.assertEqual(inst.item[0].item[1].item[2].answer[0].item[0].item[1].answer[0].valueDate.as_json(), "1972-12-11")
self.assertEqual(inst.item[0].item[1].item[2].answer[0].item[0].item[1].linkId, "vitaminKDose2")
self.assertEqual(inst.item[0].item[1].item[2].answer[0].item[0].item[1].text, "2nd dose")
self.assertEqual(inst.item[0].item[1].item[2].answer[0].item[0].linkId, "vitaminKgivenDoses")
self.assertEqual(inst.item[0].item[1].item[2].answer[0].valueCoding.code, "INJECTION")
self.assertEqual(inst.item[0].item[1].item[2].linkId, "vitaminKgiven")
self.assertEqual(inst.item[0].item[1].item[2].text, "Vitamin K given")
self.assertEqual(inst.item[0].item[1].item[3].answer[0].item[0].answer[0].valueDate.date, FHIRDate("1972-12-04").date)
self.assertEqual(inst.item[0].item[1].item[3].answer[0].item[0].answer[0].valueDate.as_json(), "1972-12-04")
self.assertEqual(inst.item[0].item[1].item[3].answer[0].item[0].linkId, "hepBgivenDate")
self.assertEqual(inst.item[0].item[1].item[3].answer[0].item[0].text, "Date given")
self.assertTrue(inst.item[0].item[1].item[3].answer[0].valueBoolean)
self.assertEqual(inst.item[0].item[1].item[3].linkId, "hepBgiven")
self.assertEqual(inst.item[0].item[1].item[3].text, "Hep B given y / n")
self.assertEqual(inst.item[0].item[1].item[4].answer[0].valueString, "Already able to speak Chinese")
self.assertEqual(inst.item[0].item[1].item[4].linkId, "abnormalitiesAtBirth")
self.assertEqual(inst.item[0].item[1].item[4].text, "Abnormalities noted at birth")
self.assertEqual(inst.item[0].item[1].linkId, "neonatalInformation")
self.assertEqual(inst.item[0].item[1].text, "Neonatal Information")
self.assertEqual(inst.item[0].linkId, "birthDetails")
self.assertEqual(inst.item[0].text, "Birth details - To be completed by health professional")
self.assertEqual(inst.status, "completed")
self.assertEqual(inst.text.status, "generated")
def testQuestionnaireResponse2(self):
inst = self.instantiate_from("questionnaireresponse-example-f201-lifelines.json")
self.assertIsNotNone(inst, "Must have instantiated a QuestionnaireResponse instance")
self.implQuestionnaireResponse2(inst)
js = inst.as_json()
self.assertEqual("QuestionnaireResponse", js["resourceType"])
inst2 = questionnaireresponse.QuestionnaireResponse(js)
self.implQuestionnaireResponse2(inst2)
def implQuestionnaireResponse2(self, inst):
self.assertEqual(inst.authored.date, FHIRDate("2013-06-18T00:00:00+01:00").date)
self.assertEqual(inst.authored.as_json(), "2013-06-18T00:00:00+01:00")
self.assertEqual(inst.id, "f201")
self.assertEqual(inst.item[0].item[0].answer[0].valueString, "I am allergic to house dust")
self.assertEqual(inst.item[0].item[0].linkId, "1.1")
self.assertEqual(inst.item[0].item[0].text, "Do you have allergies?")
self.assertEqual(inst.item[0].linkId, "1")
self.assertEqual(inst.item[1].item[0].answer[0].valueString, "Male")
self.assertEqual(inst.item[1].item[0].linkId, "2.1")
self.assertEqual(inst.item[1].item[0].text, "What is your gender?")
self.assertEqual(inst.item[1].item[1].answer[0].valueDate.date, FHIRDate("1960-03-13").date)
self.assertEqual(inst.item[1].item[1].answer[0].valueDate.as_json(), "1960-03-13")
self.assertEqual(inst.item[1].item[1].linkId, "2.2")
self.assertEqual(inst.item[1].item[1].text, "What is your date of birth?")
self.assertEqual(inst.item[1].item[2].answer[0].valueString, "The Netherlands")
self.assertEqual(inst.item[1].item[2].linkId, "2.3")
self.assertEqual(inst.item[1].item[2].text, "What is your country of birth?")
self.assertEqual(inst.item[1].item[3].answer[0].valueString, "married")
self.assertEqual(inst.item[1].item[3].linkId, "2.4")
self.assertEqual(inst.item[1].item[3].text, "What is your marital status?")
self.assertEqual(inst.item[1].linkId, "2")
self.assertEqual(inst.item[1].text, "General questions")
self.assertEqual(inst.item[2].item[0].answer[0].valueString, "No")
self.assertEqual(inst.item[2].item[0].linkId, "3.1")
self.assertEqual(inst.item[2].item[0].text, "Do you smoke?")
self.assertEqual(inst.item[2].item[1].answer[0].valueString, "No, but I used to drink")
self.assertEqual(inst.item[2].item[1].linkId, "3.2")
self.assertEqual(inst.item[2].item[1].text, "Do you drink alchohol?")
self.assertEqual(inst.item[2].linkId, "3")
self.assertEqual(inst.item[2].text, "Intoxications")
self.assertEqual(inst.status, "completed")
self.assertEqual(inst.text.status, "generated")
def testQuestionnaireResponse3(self):
inst = self.instantiate_from("questionnaireresponse-example-gcs.json")
self.assertIsNotNone(inst, "Must have instantiated a QuestionnaireResponse instance")
self.implQuestionnaireResponse3(inst)
js = inst.as_json()
self.assertEqual("QuestionnaireResponse", js["resourceType"])
inst2 = questionnaireresponse.QuestionnaireResponse(js)
self.implQuestionnaireResponse3(inst2)
def implQuestionnaireResponse3(self, inst):
self.assertEqual(inst.authored.date, FHIRDate("2014-12-11T04:44:16Z").date)
self.assertEqual(inst.authored.as_json(), "2014-12-11T04:44:16Z")
self.assertEqual(inst.id, "gcs")
self.assertEqual(inst.item[0].answer[0].valueCoding.code, "LA6560-2")
self.assertEqual(inst.item[0].answer[0].valueCoding.display, "Confused")
self.assertEqual(inst.item[0].answer[0].valueCoding.extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
self.assertEqual(inst.item[0].answer[0].valueCoding.extension[0].valueDecimal, 4)
self.assertEqual(inst.item[0].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[0].linkId, "1.1")
self.assertEqual(inst.item[1].answer[0].valueCoding.code, "LA6566-9")
self.assertEqual(inst.item[1].answer[0].valueCoding.display, "Localizing pain")
self.assertEqual(inst.item[1].answer[0].valueCoding.extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
self.assertEqual(inst.item[1].answer[0].valueCoding.extension[0].valueDecimal, 5)
self.assertEqual(inst.item[1].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[1].linkId, "1.2")
self.assertEqual(inst.item[2].answer[0].valueCoding.code, "LA6556-0")
self.assertEqual(inst.item[2].answer[0].valueCoding.display, "Eyes open spontaneously")
self.assertEqual(inst.item[2].answer[0].valueCoding.extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
self.assertEqual(inst.item[2].answer[0].valueCoding.extension[0].valueDecimal, 4)
self.assertEqual(inst.item[2].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].linkId, "1.3")
self.assertEqual(inst.status, "completed")
self.assertEqual(inst.text.status, "generated")
def testQuestionnaireResponse4(self):
inst = self.instantiate_from("questionnaireresponse-example-ussg-fht-answers.json")
self.assertIsNotNone(inst, "Must have instantiated a QuestionnaireResponse instance")
self.implQuestionnaireResponse4(inst)
js = inst.as_json()
self.assertEqual("QuestionnaireResponse", js["resourceType"])
inst2 = questionnaireresponse.QuestionnaireResponse(js)
self.implQuestionnaireResponse4(inst2)
def implQuestionnaireResponse4(self, inst):
self.assertEqual(inst.authored.date, FHIRDate("2008-01-17").date)
self.assertEqual(inst.authored.as_json(), "2008-01-17")
self.assertEqual(inst.id, "ussg-fht-answers")
self.assertEqual(inst.item[0].item[0].answer[0].valueDate.date, FHIRDate("2008-01-17").date)
self.assertEqual(inst.item[0].item[0].answer[0].valueDate.as_json(), "2008-01-17")
self.assertEqual(inst.item[0].item[0].linkId, "0.1")
self.assertEqual(inst.item[0].item[0].text, "Date Done")
self.assertEqual(inst.item[0].linkId, "0")
self.assertEqual(inst.item[1].definition, "http://loinc.org/fhir/DataElement/54126-8")
self.assertEqual(inst.item[1].item[0].item[0].answer[0].valueString, "<NAME>")
self.assertEqual(inst.item[1].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54125-0")
self.assertEqual(inst.item[1].item[0].item[0].linkId, "1.1.1")
self.assertEqual(inst.item[1].item[0].item[0].text, "Name")
self.assertEqual(inst.item[1].item[0].item[1].answer[0].valueCoding.code, "LA3-6")
self.assertEqual(inst.item[1].item[0].item[1].answer[0].valueCoding.display, "Female")
self.assertEqual(inst.item[1].item[0].item[1].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[1].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54131-8")
self.assertEqual(inst.item[1].item[0].item[1].linkId, "1.1.2")
self.assertEqual(inst.item[1].item[0].item[1].text, "Gender")
self.assertEqual(inst.item[1].item[0].item[2].answer[0].valueDate.date, FHIRDate("1966-04-04").date)
self.assertEqual(inst.item[1].item[0].item[2].answer[0].valueDate.as_json(), "1966-04-04")
self.assertEqual(inst.item[1].item[0].item[2].definition, "http://loinc.org/fhir/DataElement/21112-8")
self.assertEqual(inst.item[1].item[0].item[2].linkId, "1.1.3")
self.assertEqual(inst.item[1].item[0].item[2].text, "Date of Birth")
self.assertEqual(inst.item[1].item[0].item[3].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[1].item[0].item[3].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[1].item[0].item[3].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[1].item[0].item[3].definition, "http://loinc.org/fhir/DataElement/54132-6")
self.assertEqual(inst.item[1].item[0].item[3].linkId, "1.1.4")
self.assertEqual(inst.item[1].item[0].item[3].text, "Were you born a twin?")
self.assertEqual(inst.item[1].item[0].item[4].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[1].item[0].item[4].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[1].item[0].item[4].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[1].item[0].item[4].definition, "http://loinc.org/fhir/DataElement/54128-4")
self.assertEqual(inst.item[1].item[0].item[4].linkId, "1.1.5")
self.assertEqual(inst.item[1].item[0].item[4].text, "Were you adopted?")
self.assertEqual(inst.item[1].item[0].item[5].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[1].item[0].item[5].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[1].item[0].item[5].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[1].item[0].item[5].definition, "http://loinc.org/fhir/DataElement/54135-9")
self.assertEqual(inst.item[1].item[0].item[5].linkId, "1.1.6")
self.assertEqual(inst.item[1].item[0].item[5].text, "Are your parents related to each other in any way other than marriage?")
self.assertEqual(inst.item[1].item[0].item[6].answer[0].item[0].item[0].answer[0].valueCoding.code, "[in_i]")
self.assertEqual(inst.item[1].item[0].item[6].answer[0].item[0].item[0].answer[0].valueCoding.display, "inches")
self.assertEqual(inst.item[1].item[0].item[6].answer[0].item[0].item[0].answer[0].valueCoding.system, "http://unitsofmeasure.org")
self.assertEqual(inst.item[1].item[0].item[6].answer[0].item[0].item[0].linkId, "1.1.7.1.1")
self.assertEqual(inst.item[1].item[0].item[6].answer[0].item[0].item[0].text, "Units")
self.assertEqual(inst.item[1].item[0].item[6].answer[0].item[0].linkId, "1.1.7.1")
self.assertEqual(inst.item[1].item[0].item[6].answer[0].valueDecimal, 63)
self.assertEqual(inst.item[1].item[0].item[6].definition, "http://loinc.org/fhir/DataElement/8302-2")
self.assertEqual(inst.item[1].item[0].item[6].linkId, "1.1.7")
self.assertEqual(inst.item[1].item[0].item[6].text, "Height")
self.assertEqual(inst.item[1].item[0].item[7].answer[0].item[0].item[0].answer[0].valueCoding.code, "lb")
self.assertEqual(inst.item[1].item[0].item[7].answer[0].item[0].item[0].answer[0].valueCoding.display, "pounds")
self.assertEqual(inst.item[1].item[0].item[7].answer[0].item[0].item[0].answer[0].valueCoding.system, "http://unitsofmeasure.org")
self.assertEqual(inst.item[1].item[0].item[7].answer[0].item[0].item[0].linkId, "1.1.8.1.1")
self.assertEqual(inst.item[1].item[0].item[7].answer[0].item[0].item[0].text, "Units")
self.assertEqual(inst.item[1].item[0].item[7].answer[0].item[0].linkId, "1.1.8.1")
self.assertEqual(inst.item[1].item[0].item[7].answer[0].valueDecimal, 127)
self.assertEqual(inst.item[1].item[0].item[7].definition, "http://loinc.org/fhir/DataElement/29463-7")
self.assertEqual(inst.item[1].item[0].item[7].linkId, "1.1.8")
self.assertEqual(inst.item[1].item[0].item[7].text, "Weight")
self.assertEqual(inst.item[1].item[0].item[8].answer[0].valueDecimal, 22.5)
self.assertEqual(inst.item[1].item[0].item[8].definition, "http://loinc.org/fhir/DataElement/39156-5")
self.assertEqual(inst.item[1].item[0].item[8].linkId, "1.1.9")
self.assertEqual(inst.item[1].item[0].item[8].text, "Body mass index (BMI) [Ratio]")
self.assertEqual(inst.item[1].item[0].item[9].answer[0].valueCoding.code, "LA4457-3")
self.assertEqual(inst.item[1].item[0].item[9].answer[0].valueCoding.display, "White")
self.assertEqual(inst.item[1].item[0].item[9].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[1].item[0].item[9].definition, "http://loinc.org/fhir/DataElement/54134-2")
self.assertEqual(inst.item[1].item[0].item[9].linkId, "1.1.10")
self.assertEqual(inst.item[1].item[0].item[9].text, "Race")
self.assertEqual(inst.item[1].item[0].linkId, "1.1")
self.assertEqual(inst.item[1].linkId, "1")
self.assertEqual(inst.item[1].text, "Your health information")
self.assertEqual(inst.item[2].definition, "http://loinc.org/fhir/DataElement/54114-4")
self.assertEqual(inst.item[2].item[0].item[0].item[0].answer[0].valueCoding.code, "LA10405-1")
self.assertEqual(inst.item[2].item[0].item[0].item[0].answer[0].valueCoding.display, "Daughter")
self.assertEqual(inst.item[2].item[0].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[0].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54136-7")
self.assertEqual(inst.item[2].item[0].item[0].item[0].linkId, "2.1.1.1")
self.assertEqual(inst.item[2].item[0].item[0].item[0].text, "Relationship to you")
self.assertEqual(inst.item[2].item[0].item[0].item[1].answer[0].valueString, "Susan")
self.assertEqual(inst.item[2].item[0].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54138-3")
self.assertEqual(inst.item[2].item[0].item[0].item[1].linkId, "2.1.1.2")
self.assertEqual(inst.item[2].item[0].item[0].item[1].text, "Name")
self.assertEqual(inst.item[2].item[0].item[0].item[2].answer[0].valueCoding.code, "LA3-6")
self.assertEqual(inst.item[2].item[0].item[0].item[2].answer[0].valueCoding.display, "Female")
self.assertEqual(inst.item[2].item[0].item[0].item[2].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[0].item[0].item[2].definition, "http://loinc.org/fhir/DataElement/54123-5")
self.assertEqual(inst.item[2].item[0].item[0].item[2].linkId, "2.1.1.3")
self.assertEqual(inst.item[2].item[0].item[0].item[2].text, "Gender")
self.assertEqual(inst.item[2].item[0].item[0].item[3].answer[0].item[0].item[0].answer[0].valueDecimal, 17)
self.assertEqual(inst.item[2].item[0].item[0].item[3].answer[0].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54141-7")
self.assertEqual(inst.item[2].item[0].item[0].item[3].answer[0].item[0].item[0].linkId, "2.1.1.4.2.2")
self.assertEqual(inst.item[2].item[0].item[0].item[3].answer[0].item[0].item[0].text, "Age")
self.assertEqual(inst.item[2].item[0].item[0].item[3].answer[0].item[0].linkId, "2.1.1.4.2")
self.assertEqual(inst.item[2].item[0].item[0].item[3].answer[0].valueCoding.code, "LA33-6")
self.assertEqual(inst.item[2].item[0].item[0].item[3].answer[0].valueCoding.display, "Yes")
self.assertEqual(inst.item[2].item[0].item[0].item[3].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[0].item[0].item[3].definition, "http://loinc.org/fhir/DataElement/54139-1")
self.assertEqual(inst.item[2].item[0].item[0].item[3].linkId, "2.1.1.4")
self.assertEqual(inst.item[2].item[0].item[0].item[3].text, "Living?")
self.assertEqual(inst.item[2].item[0].item[0].item[4].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[2].item[0].item[0].item[4].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[2].item[0].item[0].item[4].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[0].item[0].item[4].definition, "http://loinc.org/fhir/DataElement/54121-9")
self.assertEqual(inst.item[2].item[0].item[0].item[4].linkId, "2.1.1.5")
self.assertEqual(inst.item[2].item[0].item[0].item[4].text, "Was this person born a twin?")
self.assertEqual(inst.item[2].item[0].item[0].item[5].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[2].item[0].item[0].item[5].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[2].item[0].item[0].item[5].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[0].item[0].item[5].definition, "http://loinc.org/fhir/DataElement/54122-7")
self.assertEqual(inst.item[2].item[0].item[0].item[5].linkId, "2.1.1.6")
self.assertEqual(inst.item[2].item[0].item[0].item[5].text, "Was this person adopted?")
self.assertEqual(inst.item[2].item[0].item[0].linkId, "2.1.1")
self.assertEqual(inst.item[2].item[0].linkId, "2.1")
self.assertEqual(inst.item[2].item[1].item[0].item[0].answer[0].valueCoding.code, "LA10415-0")
self.assertEqual(inst.item[2].item[1].item[0].item[0].answer[0].valueCoding.display, "Brother")
self.assertEqual(inst.item[2].item[1].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[1].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54136-7")
self.assertEqual(inst.item[2].item[1].item[0].item[0].linkId, "2.1.1.1")
self.assertEqual(inst.item[2].item[1].item[0].item[0].text, "Relationship to you")
self.assertEqual(inst.item[2].item[1].item[0].item[1].answer[0].valueString, "Brian")
self.assertEqual(inst.item[2].item[1].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54138-3")
self.assertEqual(inst.item[2].item[1].item[0].item[1].linkId, "2.1.1.2")
self.assertEqual(inst.item[2].item[1].item[0].item[1].text, "Name")
self.assertEqual(inst.item[2].item[1].item[0].item[2].answer[0].valueCoding.code, "LA2-8")
self.assertEqual(inst.item[2].item[1].item[0].item[2].answer[0].valueCoding.display, "Male")
self.assertEqual(inst.item[2].item[1].item[0].item[2].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[1].item[0].item[2].definition, "http://loinc.org/fhir/DataElement/54123-5")
self.assertEqual(inst.item[2].item[1].item[0].item[2].linkId, "2.1.1.3")
self.assertEqual(inst.item[2].item[1].item[0].item[2].text, "Gender")
self.assertEqual(inst.item[2].item[1].item[0].item[3].answer[0].item[0].item[0].answer[0].valueDecimal, 32)
self.assertEqual(inst.item[2].item[1].item[0].item[3].answer[0].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54141-7")
self.assertEqual(inst.item[2].item[1].item[0].item[3].answer[0].item[0].item[0].linkId, "2.1.1.4.2.2")
self.assertEqual(inst.item[2].item[1].item[0].item[3].answer[0].item[0].item[0].text, "Age")
self.assertEqual(inst.item[2].item[1].item[0].item[3].answer[0].item[0].linkId, "2.1.1.4.2")
self.assertEqual(inst.item[2].item[1].item[0].item[3].answer[0].valueCoding.code, "LA33-6")
self.assertEqual(inst.item[2].item[1].item[0].item[3].answer[0].valueCoding.display, "Yes")
self.assertEqual(inst.item[2].item[1].item[0].item[3].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[1].item[0].item[3].definition, "http://loinc.org/fhir/DataElement/54139-1")
self.assertEqual(inst.item[2].item[1].item[0].item[3].linkId, "2.1.1.4")
self.assertEqual(inst.item[2].item[1].item[0].item[3].text, "Living?")
self.assertEqual(inst.item[2].item[1].item[0].item[4].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[2].item[1].item[0].item[4].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[2].item[1].item[0].item[4].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[1].item[0].item[4].definition, "http://loinc.org/fhir/DataElement/54121-9")
self.assertEqual(inst.item[2].item[1].item[0].item[4].linkId, "2.1.1.5")
self.assertEqual(inst.item[2].item[1].item[0].item[4].text, "Was this person born a twin?")
self.assertEqual(inst.item[2].item[1].item[0].item[5].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[2].item[1].item[0].item[5].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[2].item[1].item[0].item[5].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[1].item[0].item[5].definition, "http://loinc.org/fhir/DataElement/54122-7")
self.assertEqual(inst.item[2].item[1].item[0].item[5].linkId, "2.1.1.6")
self.assertEqual(inst.item[2].item[1].item[0].item[5].text, "Was this person adopted?")
self.assertEqual(inst.item[2].item[1].item[0].linkId, "2.1.1")
self.assertEqual(inst.item[2].item[1].item[1].item[0].answer[0].valueCoding.code, "LA10550-4")
self.assertEqual(inst.item[2].item[1].item[1].item[0].answer[0].valueCoding.display, "-- Other Cancer")
self.assertEqual(inst.item[2].item[1].item[1].item[0].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[1].item[1].item[0].linkId, "2.1.2.1")
self.assertEqual(inst.item[2].item[1].item[1].item[0].text, "Disease or Condition")
self.assertEqual(inst.item[2].item[1].item[1].item[1].answer[0].valueCoding.code, "LA10397-0")
self.assertEqual(inst.item[2].item[1].item[1].item[1].answer[0].valueCoding.display, "30-39")
self.assertEqual(inst.item[2].item[1].item[1].item[1].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[1].item[1].item[1].linkId, "2.1.2.2")
self.assertEqual(inst.item[2].item[1].item[1].item[1].text, "Age at Diagnosis")
self.assertEqual(inst.item[2].item[1].item[1].linkId, "2.1.2")
self.assertEqual(inst.item[2].item[1].item[1].text, "This family member's history of disease")
self.assertEqual(inst.item[2].item[1].linkId, "2.1")
self.assertEqual(inst.item[2].item[2].item[0].item[0].answer[0].valueCoding.code, "LA10418-4")
self.assertEqual(inst.item[2].item[2].item[0].item[0].answer[0].valueCoding.display, "Sister")
self.assertEqual(inst.item[2].item[2].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[2].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54136-7")
self.assertEqual(inst.item[2].item[2].item[0].item[0].linkId, "2.1.1.1")
self.assertEqual(inst.item[2].item[2].item[0].item[0].text, "Relationship to you")
self.assertEqual(inst.item[2].item[2].item[0].item[1].answer[0].valueString, "Janet")
self.assertEqual(inst.item[2].item[2].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54138-3")
self.assertEqual(inst.item[2].item[2].item[0].item[1].linkId, "2.1.1.2")
self.assertEqual(inst.item[2].item[2].item[0].item[1].text, "Name")
self.assertEqual(inst.item[2].item[2].item[0].item[2].answer[0].valueCoding.code, "LA3-6")
self.assertEqual(inst.item[2].item[2].item[0].item[2].answer[0].valueCoding.display, "Female")
self.assertEqual(inst.item[2].item[2].item[0].item[2].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[2].item[0].item[2].definition, "http://loinc.org/fhir/DataElement/54123-5")
self.assertEqual(inst.item[2].item[2].item[0].item[2].linkId, "2.1.1.3")
self.assertEqual(inst.item[2].item[2].item[0].item[2].text, "Gender")
self.assertEqual(inst.item[2].item[2].item[0].item[3].answer[0].item[0].item[0].answer[0].valueDecimal, 36)
self.assertEqual(inst.item[2].item[2].item[0].item[3].answer[0].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54141-7")
self.assertEqual(inst.item[2].item[2].item[0].item[3].answer[0].item[0].item[0].linkId, "2.1.1.4.2.2")
self.assertEqual(inst.item[2].item[2].item[0].item[3].answer[0].item[0].item[0].text, "Age")
self.assertEqual(inst.item[2].item[2].item[0].item[3].answer[0].item[0].linkId, "2.1.1.4.2")
self.assertEqual(inst.item[2].item[2].item[0].item[3].answer[0].valueCoding.code, "LA33-6")
self.assertEqual(inst.item[2].item[2].item[0].item[3].answer[0].valueCoding.display, "Yes")
self.assertEqual(inst.item[2].item[2].item[0].item[3].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[2].item[0].item[3].definition, "http://loinc.org/fhir/DataElement/54139-1")
self.assertEqual(inst.item[2].item[2].item[0].item[3].linkId, "2.1.1.4")
self.assertEqual(inst.item[2].item[2].item[0].item[3].text, "Living?")
self.assertEqual(inst.item[2].item[2].item[0].item[4].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[2].item[2].item[0].item[4].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[2].item[2].item[0].item[4].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[2].item[0].item[4].definition, "http://loinc.org/fhir/DataElement/54121-9")
self.assertEqual(inst.item[2].item[2].item[0].item[4].linkId, "2.1.1.5")
self.assertEqual(inst.item[2].item[2].item[0].item[4].text, "Was this person born a twin?")
self.assertEqual(inst.item[2].item[2].item[0].item[5].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[2].item[2].item[0].item[5].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[2].item[2].item[0].item[5].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[2].item[0].item[5].definition, "http://loinc.org/fhir/DataElement/54122-7")
self.assertEqual(inst.item[2].item[2].item[0].item[5].linkId, "2.1.1.6")
self.assertEqual(inst.item[2].item[2].item[0].item[5].text, "Was this person adopted?")
self.assertEqual(inst.item[2].item[2].item[0].linkId, "2.1.1")
self.assertEqual(inst.item[2].item[2].item[1].item[0].answer[0].valueCoding.code, "LA10536-3")
self.assertEqual(inst.item[2].item[2].item[1].item[0].answer[0].valueCoding.display, "-- Breast Cancer")
self.assertEqual(inst.item[2].item[2].item[1].item[0].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[2].item[1].item[0].linkId, "2.1.2.1")
self.assertEqual(inst.item[2].item[2].item[1].item[0].text, "Disease or Condition")
self.assertEqual(inst.item[2].item[2].item[1].item[1].answer[0].valueCoding.code, "LA10397-0")
self.assertEqual(inst.item[2].item[2].item[1].item[1].answer[0].valueCoding.display, "30-39")
self.assertEqual(inst.item[2].item[2].item[1].item[1].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[2].item[1].item[1].linkId, "2.1.2.2")
self.assertEqual(inst.item[2].item[2].item[1].item[1].text, "Age at Diagnosis")
self.assertEqual(inst.item[2].item[2].item[1].linkId, "2.1.2")
self.assertEqual(inst.item[2].item[2].item[1].text, "This family member's history of disease")
self.assertEqual(inst.item[2].item[2].linkId, "2.1")
self.assertEqual(inst.item[2].item[3].item[0].item[0].answer[0].valueCoding.code, "LA10419-2")
self.assertEqual(inst.item[2].item[3].item[0].item[0].answer[0].valueCoding.display, "Nephew")
self.assertEqual(inst.item[2].item[3].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[3].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54136-7")
self.assertEqual(inst.item[2].item[3].item[0].item[0].linkId, "2.1.1.1")
self.assertEqual(inst.item[2].item[3].item[0].item[0].text, "Relationship to you")
self.assertEqual(inst.item[2].item[3].item[0].item[1].answer[0].valueString, "Ian")
self.assertEqual(inst.item[2].item[3].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54138-3")
self.assertEqual(inst.item[2].item[3].item[0].item[1].linkId, "2.1.1.2")
self.assertEqual(inst.item[2].item[3].item[0].item[1].text, "Name")
self.assertEqual(inst.item[2].item[3].item[0].item[2].answer[0].valueCoding.code, "LA2-8")
self.assertEqual(inst.item[2].item[3].item[0].item[2].answer[0].valueCoding.display, "Male")
self.assertEqual(inst.item[2].item[3].item[0].item[2].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[3].item[0].item[2].definition, "http://loinc.org/fhir/DataElement/54123-5")
self.assertEqual(inst.item[2].item[3].item[0].item[2].linkId, "2.1.1.3")
self.assertEqual(inst.item[2].item[3].item[0].item[2].text, "Gender")
self.assertEqual(inst.item[2].item[3].item[0].item[3].answer[0].item[0].item[0].answer[0].valueDecimal, 16)
self.assertEqual(inst.item[2].item[3].item[0].item[3].answer[0].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54141-7")
self.assertEqual(inst.item[2].item[3].item[0].item[3].answer[0].item[0].item[0].linkId, "2.1.1.4.2.2")
self.assertEqual(inst.item[2].item[3].item[0].item[3].answer[0].item[0].item[0].text, "Age")
self.assertEqual(inst.item[2].item[3].item[0].item[3].answer[0].item[0].linkId, "2.1.1.4.2")
self.assertEqual(inst.item[2].item[3].item[0].item[3].answer[0].valueCoding.code, "LA33-6")
self.assertEqual(inst.item[2].item[3].item[0].item[3].answer[0].valueCoding.display, "Yes")
self.assertEqual(inst.item[2].item[3].item[0].item[3].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[3].item[0].item[3].definition, "http://loinc.org/fhir/DataElement/54139-1")
self.assertEqual(inst.item[2].item[3].item[0].item[3].linkId, "2.1.1.4")
self.assertEqual(inst.item[2].item[3].item[0].item[3].text, "Living?")
self.assertEqual(inst.item[2].item[3].item[0].item[4].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[2].item[3].item[0].item[4].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[2].item[3].item[0].item[4].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[3].item[0].item[4].definition, "http://loinc.org/fhir/DataElement/54121-9")
self.assertEqual(inst.item[2].item[3].item[0].item[4].linkId, "2.1.1.5")
self.assertEqual(inst.item[2].item[3].item[0].item[4].text, "Was this person born a twin?")
self.assertEqual(inst.item[2].item[3].item[0].item[5].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[2].item[3].item[0].item[5].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[2].item[3].item[0].item[5].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[3].item[0].item[5].definition, "http://loinc.org/fhir/DataElement/54122-7")
self.assertEqual(inst.item[2].item[3].item[0].item[5].linkId, "2.1.1.6")
self.assertEqual(inst.item[2].item[3].item[0].item[5].text, "Was this person adopted?")
self.assertEqual(inst.item[2].item[3].item[0].linkId, "2.1.1")
self.assertEqual(inst.item[2].item[3].linkId, "2.1")
self.assertEqual(inst.item[2].item[4].item[0].item[0].answer[0].valueCoding.code, "LA10420-0")
self.assertEqual(inst.item[2].item[4].item[0].item[0].answer[0].valueCoding.display, "Niece")
self.assertEqual(inst.item[2].item[4].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[4].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54136-7")
self.assertEqual(inst.item[2].item[4].item[0].item[0].linkId, "2.1.1.1")
self.assertEqual(inst.item[2].item[4].item[0].item[0].text, "Relationship to you")
self.assertEqual(inst.item[2].item[4].item[0].item[1].answer[0].valueString, "Helen")
self.assertEqual(inst.item[2].item[4].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54138-3")
self.assertEqual(inst.item[2].item[4].item[0].item[1].linkId, "2.1.1.2")
self.assertEqual(inst.item[2].item[4].item[0].item[1].text, "Name")
self.assertEqual(inst.item[2].item[4].item[0].item[2].answer[0].valueCoding.code, "LA3-6")
self.assertEqual(inst.item[2].item[4].item[0].item[2].answer[0].valueCoding.display, "Female")
self.assertEqual(inst.item[2].item[4].item[0].item[2].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[4].item[0].item[2].definition, "http://loinc.org/fhir/DataElement/54123-5")
self.assertEqual(inst.item[2].item[4].item[0].item[2].linkId, "2.1.1.3")
self.assertEqual(inst.item[2].item[4].item[0].item[2].text, "Gender")
self.assertEqual(inst.item[2].item[4].item[0].item[3].answer[0].item[0].item[0].answer[0].valueDecimal, 15)
self.assertEqual(inst.item[2].item[4].item[0].item[3].answer[0].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54141-7")
self.assertEqual(inst.item[2].item[4].item[0].item[3].answer[0].item[0].item[0].linkId, "2.1.1.4.2.2")
self.assertEqual(inst.item[2].item[4].item[0].item[3].answer[0].item[0].item[0].text, "Age")
self.assertEqual(inst.item[2].item[4].item[0].item[3].answer[0].item[0].linkId, "2.1.1.4.2")
self.assertEqual(inst.item[2].item[4].item[0].item[3].answer[0].valueCoding.code, "LA33-6")
self.assertEqual(inst.item[2].item[4].item[0].item[3].answer[0].valueCoding.display, "Yes")
self.assertEqual(inst.item[2].item[4].item[0].item[3].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[4].item[0].item[3].definition, "http://loinc.org/fhir/DataElement/54139-1")
self.assertEqual(inst.item[2].item[4].item[0].item[3].linkId, "2.1.1.4")
self.assertEqual(inst.item[2].item[4].item[0].item[3].text, "Living?")
self.assertEqual(inst.item[2].item[4].item[0].item[4].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[2].item[4].item[0].item[4].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[2].item[4].item[0].item[4].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[4].item[0].item[4].definition, "http://loinc.org/fhir/DataElement/54121-9")
self.assertEqual(inst.item[2].item[4].item[0].item[4].linkId, "2.1.1.5")
self.assertEqual(inst.item[2].item[4].item[0].item[4].text, "Was this person born a twin?")
self.assertEqual(inst.item[2].item[4].item[0].item[5].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[2].item[4].item[0].item[5].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[2].item[4].item[0].item[5].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[4].item[0].item[5].definition, "http://loinc.org/fhir/DataElement/54122-7")
self.assertEqual(inst.item[2].item[4].item[0].item[5].linkId, "2.1.1.6")
self.assertEqual(inst.item[2].item[4].item[0].item[5].text, "Was this person adopted?")
self.assertEqual(inst.item[2].item[4].item[0].linkId, "2.1.1")
self.assertEqual(inst.item[2].item[4].linkId, "2.1")
self.assertEqual(inst.item[2].item[5].item[0].item[0].answer[0].valueCoding.code, "LA10416-8")
self.assertEqual(inst.item[2].item[5].item[0].item[0].answer[0].valueCoding.display, "Father")
self.assertEqual(inst.item[2].item[5].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[5].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54136-7")
self.assertEqual(inst.item[2].item[5].item[0].item[0].linkId, "2.1.1.1")
self.assertEqual(inst.item[2].item[5].item[0].item[0].text, "Relationship to you")
self.assertEqual(inst.item[2].item[5].item[0].item[1].answer[0].valueString, "Donald")
self.assertEqual(inst.item[2].item[5].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54138-3")
self.assertEqual(inst.item[2].item[5].item[0].item[1].linkId, "2.1.1.2")
self.assertEqual(inst.item[2].item[5].item[0].item[1].text, "Name")
self.assertEqual(inst.item[2].item[5].item[0].item[2].answer[0].valueCoding.code, "LA2-8")
self.assertEqual(inst.item[2].item[5].item[0].item[2].answer[0].valueCoding.display, "Male")
self.assertEqual(inst.item[2].item[5].item[0].item[2].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[5].item[0].item[2].definition, "http://loinc.org/fhir/DataElement/54123-5")
self.assertEqual(inst.item[2].item[5].item[0].item[2].linkId, "2.1.1.3")
self.assertEqual(inst.item[2].item[5].item[0].item[2].text, "Gender")
self.assertEqual(inst.item[2].item[5].item[0].item[3].answer[0].item[0].item[0].answer[0].valueDecimal, 52)
self.assertEqual(inst.item[2].item[5].item[0].item[3].answer[0].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54141-7")
self.assertEqual(inst.item[2].item[5].item[0].item[3].answer[0].item[0].item[0].linkId, "2.1.1.4.2.2")
self.assertEqual(inst.item[2].item[5].item[0].item[3].answer[0].item[0].item[0].text, "Age")
self.assertEqual(inst.item[2].item[5].item[0].item[3].answer[0].item[0].linkId, "2.1.1.4.2")
self.assertEqual(inst.item[2].item[5].item[0].item[3].answer[0].valueCoding.code, "LA33-6")
self.assertEqual(inst.item[2].item[5].item[0].item[3].answer[0].valueCoding.display, "Yes")
self.assertEqual(inst.item[2].item[5].item[0].item[3].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[5].item[0].item[3].definition, "http://loinc.org/fhir/DataElement/54139-1")
self.assertEqual(inst.item[2].item[5].item[0].item[3].linkId, "2.1.1.4")
self.assertEqual(inst.item[2].item[5].item[0].item[3].text, "Living?")
self.assertEqual(inst.item[2].item[5].item[0].item[4].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[2].item[5].item[0].item[4].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[2].item[5].item[0].item[4].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[5].item[0].item[4].definition, "http://loinc.org/fhir/DataElement/54121-9")
self.assertEqual(inst.item[2].item[5].item[0].item[4].linkId, "2.1.1.5")
self.assertEqual(inst.item[2].item[5].item[0].item[4].text, "Was this person born a twin?")
self.assertEqual(inst.item[2].item[5].item[0].item[5].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[2].item[5].item[0].item[5].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[2].item[5].item[0].item[5].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[5].item[0].item[5].definition, "http://loinc.org/fhir/DataElement/54122-7")
self.assertEqual(inst.item[2].item[5].item[0].item[5].linkId, "2.1.1.6")
self.assertEqual(inst.item[2].item[5].item[0].item[5].text, "Was this person adopted?")
self.assertEqual(inst.item[2].item[5].item[0].linkId, "2.1.1")
self.assertEqual(inst.item[2].item[5].linkId, "2.1")
self.assertEqual(inst.item[2].item[6].item[0].item[0].answer[0].valueCoding.code, "LA10425-9")
self.assertEqual(inst.item[2].item[6].item[0].item[0].answer[0].valueCoding.display, "Paternal Uncle")
self.assertEqual(inst.item[2].item[6].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[6].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54136-7")
self.assertEqual(inst.item[2].item[6].item[0].item[0].linkId, "2.1.1.1")
self.assertEqual(inst.item[2].item[6].item[0].item[0].text, "Relationship to you")
self.assertEqual(inst.item[2].item[6].item[0].item[1].answer[0].valueString, "Eric")
self.assertEqual(inst.item[2].item[6].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54138-3")
self.assertEqual(inst.item[2].item[6].item[0].item[1].linkId, "2.1.1.2")
self.assertEqual(inst.item[2].item[6].item[0].item[1].text, "Name")
self.assertEqual(inst.item[2].item[6].item[0].item[2].answer[0].valueCoding.code, "LA2-8")
self.assertEqual(inst.item[2].item[6].item[0].item[2].answer[0].valueCoding.display, "Male")
self.assertEqual(inst.item[2].item[6].item[0].item[2].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[6].item[0].item[2].definition, "http://loinc.org/fhir/DataElement/54123-5")
self.assertEqual(inst.item[2].item[6].item[0].item[2].linkId, "2.1.1.3")
self.assertEqual(inst.item[2].item[6].item[0].item[2].text, "Gender")
self.assertEqual(inst.item[2].item[6].item[0].item[3].answer[0].item[0].item[0].answer[0].valueDecimal, 56)
self.assertEqual(inst.item[2].item[6].item[0].item[3].answer[0].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54141-7")
self.assertEqual(inst.item[2].item[6].item[0].item[3].answer[0].item[0].item[0].linkId, "2.1.1.4.2.2")
self.assertEqual(inst.item[2].item[6].item[0].item[3].answer[0].item[0].item[0].text, "Age")
self.assertEqual(inst.item[2].item[6].item[0].item[3].answer[0].item[0].linkId, "2.1.1.4.2")
self.assertEqual(inst.item[2].item[6].item[0].item[3].answer[0].valueCoding.code, "LA33-6")
self.assertEqual(inst.item[2].item[6].item[0].item[3].answer[0].valueCoding.display, "Yes")
self.assertEqual(inst.item[2].item[6].item[0].item[3].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[6].item[0].item[3].definition, "http://loinc.org/fhir/DataElement/54139-1")
self.assertEqual(inst.item[2].item[6].item[0].item[3].linkId, "2.1.1.4")
self.assertEqual(inst.item[2].item[6].item[0].item[3].text, "Living?")
self.assertEqual(inst.item[2].item[6].item[0].item[4].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[2].item[6].item[0].item[4].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[2].item[6].item[0].item[4].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[6].item[0].item[4].definition, "http://loinc.org/fhir/DataElement/54121-9")
self.assertEqual(inst.item[2].item[6].item[0].item[4].linkId, "2.1.1.5")
self.assertEqual(inst.item[2].item[6].item[0].item[4].text, "Was this person born a twin?")
self.assertEqual(inst.item[2].item[6].item[0].item[5].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[2].item[6].item[0].item[5].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[2].item[6].item[0].item[5].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[6].item[0].item[5].definition, "http://loinc.org/fhir/DataElement/54122-7")
self.assertEqual(inst.item[2].item[6].item[0].item[5].linkId, "2.1.1.6")
self.assertEqual(inst.item[2].item[6].item[0].item[5].text, "Was this person adopted?")
self.assertEqual(inst.item[2].item[6].item[0].linkId, "2.1.1")
self.assertEqual(inst.item[2].item[6].linkId, "2.1")
self.assertEqual(inst.item[2].item[7].item[0].item[0].answer[0].valueCoding.code, "LA10421-8")
self.assertEqual(inst.item[2].item[7].item[0].item[0].answer[0].valueCoding.display, "Paternal Aunt")
self.assertEqual(inst.item[2].item[7].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[7].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54136-7")
self.assertEqual(inst.item[2].item[7].item[0].item[0].linkId, "2.1.1.1")
self.assertEqual(inst.item[2].item[7].item[0].item[0].text, "Relationship to you")
self.assertEqual(inst.item[2].item[7].item[0].item[1].answer[0].valueString, "Fiona")
self.assertEqual(inst.item[2].item[7].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54138-3")
self.assertEqual(inst.item[2].item[7].item[0].item[1].linkId, "2.1.1.2")
self.assertEqual(inst.item[2].item[7].item[0].item[1].text, "Name")
self.assertEqual(inst.item[2].item[7].item[0].item[2].answer[0].valueCoding.code, "LA3-6")
self.assertEqual(inst.item[2].item[7].item[0].item[2].answer[0].valueCoding.display, "Female")
self.assertEqual(inst.item[2].item[7].item[0].item[2].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[7].item[0].item[2].definition, "http://loinc.org/fhir/DataElement/54123-5")
self.assertEqual(inst.item[2].item[7].item[0].item[2].linkId, "2.1.1.3")
self.assertEqual(inst.item[2].item[7].item[0].item[2].text, "Gender")
self.assertEqual(inst.item[2].item[7].item[0].item[3].answer[0].item[0].item[0].answer[0].valueDecimal, 57)
self.assertEqual(inst.item[2].item[7].item[0].item[3].answer[0].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54141-7")
self.assertEqual(inst.item[2].item[7].item[0].item[3].answer[0].item[0].item[0].linkId, "2.1.1.4.2.2")
self.assertEqual(inst.item[2].item[7].item[0].item[3].answer[0].item[0].item[0].text, "Age")
self.assertEqual(inst.item[2].item[7].item[0].item[3].answer[0].item[0].linkId, "2.1.1.4.2")
self.assertEqual(inst.item[2].item[7].item[0].item[3].answer[0].valueCoding.code, "LA33-6")
self.assertEqual(inst.item[2].item[7].item[0].item[3].answer[0].valueCoding.display, "Yes")
self.assertEqual(inst.item[2].item[7].item[0].item[3].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[7].item[0].item[3].definition, "http://loinc.org/fhir/DataElement/54139-1")
self.assertEqual(inst.item[2].item[7].item[0].item[3].linkId, "2.1.1.4")
self.assertEqual(inst.item[2].item[7].item[0].item[3].text, "Living?")
self.assertEqual(inst.item[2].item[7].item[0].item[4].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[2].item[7].item[0].item[4].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[2].item[7].item[0].item[4].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[7].item[0].item[4].definition, "http://loinc.org/fhir/DataElement/54121-9")
self.assertEqual(inst.item[2].item[7].item[0].item[4].linkId, "2.1.1.5")
self.assertEqual(inst.item[2].item[7].item[0].item[4].text, "Was this person born a twin?")
self.assertEqual(inst.item[2].item[7].item[0].item[5].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[2].item[7].item[0].item[5].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[2].item[7].item[0].item[5].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[7].item[0].item[5].definition, "http://loinc.org/fhir/DataElement/54122-7")
self.assertEqual(inst.item[2].item[7].item[0].item[5].linkId, "2.1.1.6")
self.assertEqual(inst.item[2].item[7].item[0].item[5].text, "Was this person adopted?")
self.assertEqual(inst.item[2].item[7].item[0].linkId, "2.1.1")
self.assertEqual(inst.item[2].item[7].item[1].item[0].answer[0].valueCoding.code, "LA10543-9")
self.assertEqual(inst.item[2].item[7].item[1].item[0].answer[0].valueCoding.display, "-- Skin Cancer")
self.assertEqual(inst.item[2].item[7].item[1].item[0].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[7].item[1].item[0].linkId, "2.1.2.1")
self.assertEqual(inst.item[2].item[7].item[1].item[0].text, "Disease or Condition")
self.assertEqual(inst.item[2].item[7].item[1].linkId, "2.1.2")
self.assertEqual(inst.item[2].item[7].item[1].text, "This family member's history of disease")
self.assertEqual(inst.item[2].item[7].linkId, "2.1")
self.assertEqual(inst.item[2].item[8].item[0].item[0].answer[0].valueCoding.code, "LA10423-4")
self.assertEqual(inst.item[2].item[8].item[0].item[0].answer[0].valueCoding.display, "Paternal Grandfather")
self.assertEqual(inst.item[2].item[8].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[8].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54136-7")
self.assertEqual(inst.item[2].item[8].item[0].item[0].linkId, "2.1.1.1")
self.assertEqual(inst.item[2].item[8].item[0].item[0].text, "Relationship to you")
self.assertEqual(inst.item[2].item[8].item[0].item[1].answer[0].valueString, "Bob")
self.assertEqual(inst.item[2].item[8].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54138-3")
self.assertEqual(inst.item[2].item[8].item[0].item[1].linkId, "2.1.1.2")
self.assertEqual(inst.item[2].item[8].item[0].item[1].text, "Name")
self.assertEqual(inst.item[2].item[8].item[0].item[2].answer[0].valueCoding.code, "LA2-8")
self.assertEqual(inst.item[2].item[8].item[0].item[2].answer[0].valueCoding.display, "Male")
self.assertEqual(inst.item[2].item[8].item[0].item[2].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[8].item[0].item[2].definition, "http://loinc.org/fhir/DataElement/54123-5")
self.assertEqual(inst.item[2].item[8].item[0].item[2].linkId, "2.1.1.3")
self.assertEqual(inst.item[2].item[8].item[0].item[2].text, "Gender")
self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[0].answer[0].valueCoding.code, "LA10537-1")
self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[0].answer[0].valueCoding.display, "-- Colon Cancer")
self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54112-8")
self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[0].linkId, "2.1.1.4.1.1")
self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[0].text, "Cause of Death")
self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[1].answer[0].valueCoding.code, "LA10400-2")
self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[1].answer[0].valueCoding.display, "OVER 60")
self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[1].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54113-6")
self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[1].linkId, "2.1.1.4.1.2")
self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[1].text, "Age at Death")
self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].linkId, "2.1.1.4.1")
self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[8].item[0].item[3].definition, "http://loinc.org/fhir/DataElement/54139-1")
self.assertEqual(inst.item[2].item[8].item[0].item[3].linkId, "2.1.1.4")
self.assertEqual(inst.item[2].item[8].item[0].item[3].text, "Living?")
self.assertEqual(inst.item[2].item[8].item[0].item[4].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[2].item[8].item[0].item[4].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[2].item[8].item[0].item[4].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[8].item[0].item[4].definition, "http://loinc.org/fhir/DataElement/54121-9")
self.assertEqual(inst.item[2].item[8].item[0].item[4].linkId, "2.1.1.5")
self.assertEqual(inst.item[2].item[8].item[0].item[4].text, "Was this person born a twin?")
self.assertEqual(inst.item[2].item[8].item[0].item[5].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[2].item[8].item[0].item[5].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[2].item[8].item[0].item[5].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[8].item[0].item[5].definition, "http://loinc.org/fhir/DataElement/54122-7")
self.assertEqual(inst.item[2].item[8].item[0].item[5].linkId, "2.1.1.6")
self.assertEqual(inst.item[2].item[8].item[0].item[5].text, "Was this person adopted?")
self.assertEqual(inst.item[2].item[8].item[0].linkId, "2.1.1")
self.assertEqual(inst.item[2].item[8].item[1].item[0].answer[0].valueCoding.code, "LA10537-1")
self.assertEqual(inst.item[2].item[8].item[1].item[0].answer[0].valueCoding.display, "-- Colon Cancer")
self.assertEqual(inst.item[2].item[8].item[1].item[0].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[8].item[1].item[0].linkId, "2.1.2.1")
self.assertEqual(inst.item[2].item[8].item[1].item[0].text, "Disease or Condition")
self.assertEqual(inst.item[2].item[8].item[1].item[1].answer[0].valueCoding.code, "LA10400-2")
self.assertEqual(inst.item[2].item[8].item[1].item[1].answer[0].valueCoding.display, "OVER 60")
self.assertEqual(inst.item[2].item[8].item[1].item[1].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[8].item[1].item[1].linkId, "2.1.2.2")
self.assertEqual(inst.item[2].item[8].item[1].item[1].text, "Age at Diagnosis")
self.assertEqual(inst.item[2].item[8].item[1].linkId, "2.1.2")
self.assertEqual(inst.item[2].item[8].item[1].text, "This family member's history of disease")
self.assertEqual(inst.item[2].item[8].linkId, "2.1")
self.assertEqual(inst.item[2].item[9].item[0].item[0].answer[0].valueCoding.code, "LA10424-2")
self.assertEqual(inst.item[2].item[9].item[0].item[0].answer[0].valueCoding.display, "Paternal Grandmother")
self.assertEqual(inst.item[2].item[9].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[9].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54136-7")
self.assertEqual(inst.item[2].item[9].item[0].item[0].linkId, "2.1.1.1")
self.assertEqual(inst.item[2].item[9].item[0].item[0].text, "Relationship to you")
self.assertEqual(inst.item[2].item[9].item[0].item[1].answer[0].valueString, "Claire")
self.assertEqual(inst.item[2].item[9].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54138-3")
self.assertEqual(inst.item[2].item[9].item[0].item[1].linkId, "2.1.1.2")
self.assertEqual(inst.item[2].item[9].item[0].item[1].text, "Name")
self.assertEqual(inst.item[2].item[9].item[0].item[2].answer[0].valueCoding.code, "LA3-6")
self.assertEqual(inst.item[2].item[9].item[0].item[2].answer[0].valueCoding.display, "Female")
self.assertEqual(inst.item[2].item[9].item[0].item[2].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[9].item[0].item[2].definition, "http://loinc.org/fhir/DataElement/54123-5")
self.assertEqual(inst.item[2].item[9].item[0].item[2].linkId, "2.1.1.3")
self.assertEqual(inst.item[2].item[9].item[0].item[2].text, "Gender")
self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[0].answer[0].item[0].answer[0].valueString, "L<NAME>")
self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[0].answer[0].item[0].linkId, "2.1.1.4.1.1.1")
self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[0].answer[0].item[0].text, "Please specify")
self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[0].answer[0].valueCoding.code, "LA10589-2")
self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[0].answer[0].valueCoding.display, "-- Other/Unexpected")
self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54112-8")
self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[0].linkId, "2.1.1.4.1.1")
self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[0].text, "Cause of Death")
self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[1].answer[0].valueCoding.code, "LA10400-2")
self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[1].answer[0].valueCoding.display, "OVER 60")
self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[1].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54113-6")
self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[1].linkId, "2.1.1.4.1.2")
self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[1].text, "Age at Death")
self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].linkId, "2.1.1.4.1")
self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[9].item[0].item[3].definition, "http://loinc.org/fhir/DataElement/54139-1")
self.assertEqual(inst.item[2].item[9].item[0].item[3].linkId, "2.1.1.4")
self.assertEqual(inst.item[2].item[9].item[0].item[3].text, "Living?")
self.assertEqual(inst.item[2].item[9].item[0].item[4].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[2].item[9].item[0].item[4].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[2].item[9].item[0].item[4].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[9].item[0].item[4].definition, "http://loinc.org/fhir/DataElement/54121-9")
self.assertEqual(inst.item[2].item[9].item[0].item[4].linkId, "2.1.1.5")
self.assertEqual(inst.item[2].item[9].item[0].item[4].text, "Was this person born a twin?")
self.assertEqual(inst.item[2].item[9].item[0].item[5].answer[0].valueCoding.code, "LA32-8")
self.assertEqual(inst.item[2].item[9].item[0].item[5].answer[0].valueCoding.display, "No")
self.assertEqual(inst.item[2].item[9].item[0].item[5].answer[0].valueCoding.system, "http://loinc.org")
self.assertEqual(inst.item[2].item[9].item[0].item[5].definition, "http://loinc.org/fhir/DataElement/54122-7")
self.assertEqual(inst.item[2].item[9].item[0].item[5].linkId, "2.1.1.6")
self.assertEqual(inst.item[2].item[9].item[0].item[5].text, "Was this person adopted?")
self.assertEqual(inst.item[2].item[9].item[0].linkId, "2.1.1")
self.assertEqual(inst.item[2].item[9].linkId, "2.1")
self.assertEqual(inst.item[2].linkId, "2")
self.assertEqual(inst.item[2].text, "Family member health information")
self.assertEqual(inst.status, "in-progress")
self.assertEqual(inst.text.status, "generated")
def testQuestionnaireResponse5(self):
inst = self.instantiate_from("questionnaireresponse-example.json")
self.assertIsNotNone(inst, "Must have instantiated a QuestionnaireResponse instance")
self.implQuestionnaireResponse5(inst)
js = inst.as_json()
self.assertEqual("QuestionnaireResponse", js["resourceType"])
inst2 = questionnaireresponse.QuestionnaireResponse(js)
self.implQuestionnaireResponse5(inst2)
def implQuestionnaireResponse5(self, inst):
self.assertEqual(inst.authored.date, FHIRDate("2013-02-19T14:15:00-05:00").date)
self.assertEqual(inst.authored.as_json(), "2013-02-19T14:15:00-05:00")
self.assertEqual(inst.contained[0].id, "patsub")
self.assertEqual(inst.contained[1].id, "order")
self.assertEqual(inst.contained[2].id, "questauth")
self.assertEqual(inst.id, "3141")
self.assertEqual(inst.identifier.system, "http://example.org/fhir/NamingSystem/questionnaire-ids")
self.assertEqual(inst.identifier.value, "Q12349876")
self.assertEqual(inst.item[0].item[0].answer[0].item[0].item[0].answer[0].valueCoding.code, "1")
self.assertEqual(inst.item[0].item[0].answer[0].item[0].item[0].answer[0].valueCoding.system, "http://cancer.questionnaire.org/system/code/yesno")
self.assertEqual(inst.item[0].item[0].answer[0].item[0].item[0].linkId, "1.1.1.1")
self.assertEqual(inst.item[0].item[0].answer[0].item[0].item[1].answer[0].valueCoding.code, "1")
self.assertEqual(inst.item[0].item[0].answer[0].item[0].item[1].answer[0].valueCoding.system, "http://cancer.questionnaire.org/system/code/yesno")
self.assertEqual(inst.item[0].item[0].answer[0].item[0].item[1].linkId, "1.1.1.2")
self.assertEqual(inst.item[0].item[0].answer[0].item[0].item[2].answer[0].valueCoding.code, "0")
self.assertEqual(inst.item[0].item[0].answer[0].item[0].item[2].answer[0].valueCoding.system, "http://cancer.questionnaire.org/system/code/yesno")
self.assertEqual(inst.item[0].item[0].answer[0].item[0].item[2].linkId, "1.1.1.3")
self.assertEqual(inst.item[0].item[0].answer[0].item[0].linkId, "1.1.1")
self.assertEqual(inst.item[0].item[0].answer[0].valueCoding.code, "1")
self.assertEqual(inst.item[0].item[0].answer[0].valueCoding.display, "Yes")
self.assertEqual(inst.item[0].item[0].answer[0].valueCoding.system, "http://cancer.questionnaire.org/system/code/yesno")
self.assertEqual(inst.item[0].item[0].linkId, "1.1")
self.assertEqual(inst.item[0].linkId, "1")
self.assertEqual(inst.status, "completed")
self.assertEqual(inst.text.status, "generated")
|
ColiseumSoft786/Cropability | node_modules/ng2-archwizard/dist/navigation/navigation-mode.provider.js | import { FreeNavigationMode } from './free-navigation-mode';
import { SemiStrictNavigationMode } from './semi-strict-navigation-mode';
import { StrictNavigationMode } from './strict-navigation-mode';
/**
* A factory method used to create [[NavigationMode]] instances
*
* @param {WizardComponent} wizard The wizard, for which a navigation mode will be created
* @param {WizardState} wizardState The wizard state of the wizard
* @returns {NavigationMode} The created [[NavigationMode]]
*/
export function navigationModeFactory(navigationMode, wizardState) {
switch (navigationMode) {
case 'free':
return new FreeNavigationMode(wizardState);
case 'semi-strict':
return new SemiStrictNavigationMode(wizardState);
case 'strict':
default:
return new StrictNavigationMode(wizardState);
}
}
;
//# sourceMappingURL=navigation-mode.provider.js.map |
themlstudent/MasteringDataStructure | Coding Blocks/Remove_Duplicate_Frrom_String.cpp | #include<iostream>
#include<cstring>
using namespace std;
// remove consecutive duplicate characters from a string
//ccoooding ---> coding
void remove(char a[])
{
int l=strlen(a);
if(l==1 or l==0)
{
return;
}
int prev=0;
for (int current =1;current<l;current++)
{
if (a[current] !=a[prev])
{
prev++;
a[prev]=a[current];
}
}
a[prev+1]='\0';
return;
}
int main()
{
char a [100];
cin.getline(a,100);
remove(a);
cout<<a;
//return 0;
}
|
davidkeen/amee-platform | amee-platform-service/src/main/java/com/amee/service/locale/LocaleServiceImpl.java | package com.amee.service.locale;
import com.amee.base.transaction.TransactionEvent;
import com.amee.domain.*;
import com.amee.domain.data.DataCategory;
import com.amee.domain.data.ItemValueDefinition;
import com.amee.domain.data.LocaleName;
import com.amee.domain.item.BaseItemValue;
import com.amee.domain.item.data.DataItem;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Service;
import java.util.*;
@Service
public class LocaleServiceImpl implements LocaleService, ApplicationListener {
private final Logger log = LoggerFactory.getLogger(getClass());
@Autowired
private LocaleServiceDAO dao;
// A thread bound Map of LocaleNames keyed by entity identity.
private final ThreadLocal<Map<String, List<LocaleName>>> LOCALE_NAMES =
new ThreadLocal<Map<String, List<LocaleName>>>() {
protected Map<String, List<LocaleName>> initialValue() {
return new HashMap<String, List<LocaleName>>();
}
};
@Override
public void onApplicationEvent(ApplicationEvent e) {
if (e instanceof TransactionEvent) {
TransactionEvent te = (TransactionEvent) e;
switch (te.getType()) {
case BEFORE_BEGIN:
log.trace("onApplicationEvent() BEFORE_BEGIN");
// Reset thread bound data.
clearLocaleNames();
break;
case END:
log.trace("onApplicationEvent() END");
// Reset thread bound data.
clearLocaleNames();
break;
default:
// Do nothing!
}
}
}
@Override
public Map<String, LocaleName> getLocaleNames(IAMEEEntityReference entity) {
Map<String, LocaleName> localeNames = new HashMap<String, LocaleName>();
for (LocaleName localeName : getLocaleNameList(entity)) {
localeNames.put(localeName.getLocale(), localeName);
}
return localeNames;
}
private List<LocaleName> getLocaleNameList(IAMEEEntityReference entity) {
List<LocaleName> localeNames;
if (LOCALE_NAMES.get().containsKey(entity.toString())) {
// Return existing LocaleName list, or at least an empty list.
localeNames = LOCALE_NAMES.get().get(entity.toString());
if (localeNames == null) {
localeNames = new ArrayList<LocaleName>();
}
} else {
// Look up LocaleNames.
localeNames = dao.getLocaleNames(entity);
LOCALE_NAMES.get().put(entity.toString(), localeNames);
}
return localeNames;
}
@Override
public LocaleName getLocaleName(IAMEEEntityReference entity) {
return getLocaleName(entity, LocaleHolder.getLocale());
}
@Override
public LocaleName getLocaleName(IAMEEEntityReference entity, String locale) {
return getLocaleNames(entity).get(LocaleHolder.getLocale());
}
@Override
public void clearLocaleName(IAMEEEntityReference entity, String locale) {
// Is there an existing LocaleName?
LocaleName localeName = getLocaleName(entity, locale);
if (localeName != null) {
remove(localeName);
}
}
@Override
public void setLocaleName(IAMEEEntityReference entity, String locale, String name) {
// Is there an existing LocaleName?
LocaleName localeName = getLocaleName(entity, locale);
if (localeName != null) {
// Update existing LocaleName.
localeName.setName(name);
} else {
// Create new LocaleName.
localeName = new LocaleName(
entity,
LocaleConstants.AVAILABLE_LOCALES.get(locale),
name);
persist(localeName);
}
}
@Override
public void loadLocaleNamesForDataCategories(Collection<DataCategory> dataCategories) {
loadLocaleNames(ObjectType.DC, new HashSet<IAMEEEntityReference>(dataCategories));
}
@Override
public void loadLocaleNamesForDataCategoryReferences(Collection<IDataCategoryReference> dataCategories) {
loadLocaleNames(ObjectType.DC, new HashSet<IAMEEEntityReference>(dataCategories));
}
@Override
public void loadLocaleNamesForDataItems(Collection<DataItem> dataItems) {
loadLocaleNamesForDataItems(dataItems, null);
}
@Override
public void loadLocaleNamesForDataItems(Collection<DataItem> dataItems, Set<BaseItemValue> values) {
loadLocaleNames(ObjectType.DI, new HashSet<IAMEEEntityReference>(dataItems));
if ((values != null) && (!values.isEmpty())) {
Set<IAMEEEntityReference> itemValueRefs = new HashSet<IAMEEEntityReference>();
itemValueRefs.addAll(values);
loadLocaleNames(ObjectType.DITV, itemValueRefs);
loadLocaleNames(ObjectType.DITVH, itemValueRefs);
}
}
@Override
public void loadLocaleNamesForItemValueDefinitions(Collection<ItemValueDefinition> itemValueDefinitions) {
loadLocaleNames(ObjectType.IVD, new HashSet<IAMEEEntityReference>(itemValueDefinitions));
}
@Override
public void loadLocaleNames(ObjectType objectType, Collection<IAMEEEntityReference> entities) {
// A null entry for when there are no LocaleNames for the entity.
// Ensure a null entry exists for all entities.
for (IAMEEEntityReference entity : entities) {
if (!LOCALE_NAMES.get().containsKey(entity.toString())) {
LOCALE_NAMES.get().put(entity.toString(), null);
}
}
// Store LocaleNames against entities.
// If there are no LocaleNames for an entity the entry will remain null.
for (LocaleName localeName : dao.getLocaleNames(objectType, entities)) {
List<LocaleName> localeNames = LOCALE_NAMES.get().get(localeName.getEntityReference().toString());
if (localeNames == null) {
localeNames = new ArrayList<LocaleName>();
}
localeNames.add(localeName);
LOCALE_NAMES.get().put(localeName.getEntityReference().toString(), localeNames);
}
}
@Override
public void clearLocaleNames() {
LOCALE_NAMES.get().clear();
}
@Override
public void persist(LocaleName localeName) {
LOCALE_NAMES.get().remove(localeName.getEntityReference().toString());
dao.persist(localeName);
}
@Override
public void remove(LocaleName localeName) {
LOCALE_NAMES.get().remove(localeName.getEntityReference().toString());
dao.remove(localeName);
}
}
|
kdavisk6/feignx | core/src/main/java/feign/contract/TargetDefinition.java | /*
* Copyright 2019-2021 OpenFeign Contributors
*
* 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 feign.contract;
import feign.Contract;
import feign.Target;
import java.util.Collection;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;
import net.jcip.annotations.Immutable;
import net.jcip.annotations.ThreadSafe;
/**
* Definition for a Target interface. Used by {@link Contract} implementations to create new {@link
* Target} instances.
*/
@Immutable
@ThreadSafe
public final class TargetDefinition {
private final String targetPackageName;
private final String targetTypeName;
private final String fullyQualifiedTargetClassName;
private final Set<String> extensions;
private final Set<String> implementations;
private final Collection<TargetMethodDefinition> methodDefinitions;
public static TargetDefinitionBuilder builder() {
return new TargetDefinitionBuilder();
}
/**
* Create a new {@link TargetDefinition}.
*
* @param builder with the {@link TargetDefinition} properties.
*/
private TargetDefinition(TargetDefinitionBuilder builder) {
this.targetPackageName = builder.targetPackageName;
this.targetTypeName = builder.targetTypeName;
this.fullyQualifiedTargetClassName = builder.fullyQualifiedTargetClassName;
this.extensions = Set.copyOf(builder.extensions);
this.implementations = Set.copyOf(builder.implementations);
this.methodDefinitions = Set.copyOf(builder.methodDefinitions);
}
public String getTargetPackageName() {
return targetPackageName;
}
public String getTargetTypeName() {
return targetTypeName;
}
public String getFullyQualifiedTargetClassName() {
return this.fullyQualifiedTargetClassName;
}
public Set<String> getExtensions() {
return extensions;
}
public Set<String> getImplementations() {
return implementations;
}
public Collection<TargetMethodDefinition> getMethodDefinitions() {
return methodDefinitions;
}
/**
* {@link TargetDefinition} builder.
*/
@SuppressWarnings("UnusedReturnValue")
@ThreadSafe
public static class TargetDefinitionBuilder {
private String targetPackageName;
private String targetTypeName;
private String fullyQualifiedTargetClassName;
private final Set<String> extensions = new CopyOnWriteArraySet<>();
private final Set<String> implementations = new CopyOnWriteArraySet<>();
private final Collection<TargetMethodDefinition> methodDefinitions =
new CopyOnWriteArraySet<>();
private TargetDefinitionBuilder() {
super();
}
/**
* The fully qualified class name of the Target interface.
*
* @param targetClassName of the target.
* @return a builder instance for chaining.
*/
public TargetDefinitionBuilder setFullQualifiedTargetClassName(String targetClassName) {
this.fullyQualifiedTargetClassName = targetClassName;
return this;
}
/**
* The fully qualified package name where the Target interface resided. Ex {@code my.package}
*
* @param targetPackageName of the Target.
* @return a builder instance for chaining.
*/
public TargetDefinitionBuilder setTargetPackageName(String targetPackageName) {
this.targetPackageName = targetPackageName;
return this;
}
/**
* The simple type name of the Target interface. Ex: {@code MyInterface}.
*
* @param targetTypeName of the Target.
* @return a builder instance for chaining.
*/
public TargetDefinitionBuilder setTargetTypeName(String targetTypeName) {
this.targetTypeName = targetTypeName;
return this;
}
/**
* The fully qualified class name of any additional interfaces a Target extends that also are
* Feign Targets.
*
* @param fqdnSuperclassName of the extended interface.
* @return a builder instance for chaining.
*/
public TargetDefinitionBuilder withExtension(String fqdnSuperclassName) {
this.extensions.add(fqdnSuperclassName);
return this;
}
/**
* The fully qualified class name of any additional interfaces a Target extends that are
* <b>not Feign Targets.</b>.
*
* @param fqdnInterfaceName of the extended interface.
* @return a builder instance for chaining.
*/
public TargetDefinitionBuilder withImplementation(String fqdnInterfaceName) {
this.implementations.add(fqdnInterfaceName);
return this;
}
/**
* A {@link TargetMethodDefinition} from the Target interface.
*
* @param methodDefinition instance.
* @return a builder instance for chaining.
*/
public TargetDefinitionBuilder withTargetMethodDefinition(
TargetMethodDefinition methodDefinition) {
this.methodDefinitions.add(methodDefinition);
return this;
}
/**
* Create a new {@link TargetDefinition}.
*
* @return a new {@link TargetDefinition} instance.
*/
public TargetDefinition build() {
return new TargetDefinition(this);
}
}
}
|
YellowRainBoots/2.0 | homepairs/HomepairsApp/Apps/PropertyManagers/urls.py | from django.urls import path
from .views import LoginView, RegisterView, TenantControlView
urlpatterns = [
path('login/', LoginView.as_view(), name='pm_login'),
path('register/', RegisterView.as_view(), name='pm_register'),
path('tenantEdit/', TenantControlView.as_view(), name='ten_edit')
]
|
ADVRHumanoids/DrivingFramework | controllers/controllers/controllers_wheels/include/mgnss/controllers/devel/contact_point_zmp_v2.h | <reponame>ADVRHumanoids/DrivingFramework
#ifndef __MWOIBN_HIERARCHICAL_CONTROL_TASKS_CONTACT_POINT_ZMP_V2_H
#define __MWOIBN_HIERARCHICAL_CONTROL_TASKS_CONTACT_POINT_ZMP_V2_H
#include "mwoibn/hierarchical_control/tasks/contact_point_3D_rbdl_task.h"
#include "mwoibn/robot_points/point.h"
#include "mwoibn/robot_points/ground_wheel.h"
#include "mwoibn/robot_points/torus_model.h"
namespace mwoibn
{
namespace hierarchical_control
{
namespace tasks
{
/**
* @brief The CartesianWorld class Provides the inverse kinematics task
*to control the position of a point defined in one of a robot reference frames
*
*/
class ContactPointZMPV2 : public ContactPoint3DRbdl
{
public:
/**
* @param[in] ik the point handler mamber that defines which point is
*controlled by this task instance it makes a local copy of a point handler to
*prevent outside user from modifying a controlled point
*
*/
ContactPointZMPV2(const std::string& group, mwoibn::robot_class::Robot& robot, YAML::Node config, mwoibn::robot_points::Point& base_point, std::string base_link, double gain)
: ContactPoint3DRbdl(group, robot, config, base_point, base_link), _gain(gain)
{ _tracking = true;}
double forceFactor() {return 1-_force_factor;}
double comFactor() {return _force_factor;}
void tracking() { _tracking = true; }
// void balance(){ _tracking = false; _error.setZero();}
protected:
double _force_factor, _gain;
bool _tracking;
virtual void _updateError(){
// if(_tracking)
ContactPoint3DRbdl::_updateError();
// else { _error.setZero(); _full_error.setZero();}
// std::cout << "_tracking\n" << _tracking << std::endl;
}
virtual void _updateState(){
//
_robot.centerOfMass().update(true);
_base_point.update(true);
//
_force_factor = _robot.gravity().transpose()*_ground_normal;
_force_factor = 1 / _force_factor;
_force_factor = _gain/_robot.centerOfMass().mass()*_robot.centerOfMass().get()[2]*_force_factor;
_force_factor = 1 - _force_factor;
//std::cout << "_force_factor " << _force_factor << std::endl;
_base_point.multiplyJacobian(_force_factor);
ContactPointTracking::_updateState();
}
};
}
} // namespace package
} // namespace library
#endif
|
Diplomatiq/diplomatiq-backend | src/main/java/org/diplomatiq/diplomatiqbackend/repositories/UserDeviceRepository.java | <reponame>Diplomatiq/diplomatiq-backend<filename>src/main/java/org/diplomatiq/diplomatiqbackend/repositories/UserDeviceRepository.java
package org.diplomatiq.diplomatiqbackend.repositories;
import org.diplomatiq.diplomatiqbackend.domain.entities.concretes.UserDevice;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface UserDeviceRepository extends Neo4jRepository<UserDevice, String> {
}
|
gapatmej/trains | src/main/java/ec/com/gapatmej/entities/impl/Way.java | package ec.com.gapatmej.entities.impl;
import ec.com.gapatmej.entities.IWay;
public class Way<T> implements IWay<T> {
private final T startTown;
private final T endTown;
private final int distance;
public Way(T start, T end) {
this.startTown = start;
this.endTown = end;
this.distance = 0;
}
public Way(T start, T end, int distance) {
this.startTown = start;
this.endTown = end;
this.distance = distance;
}
@Override
public T getStartTown() {
return this.startTown;
}
@Override
public T getEndTown() {
return this.endTown;
}
@Override
public int getDistance() {
return this.distance;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + (endTown == null ? 0 : endTown.hashCode());
result = prime * result + (startTown == null ? 0 : startTown.hashCode());
return result;
}
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Way way = (Way) obj;
if (endTown == null) {
if (way.endTown != null) {
return false;
}
} else if (!endTown.equals(way.endTown)) {
return false;
}
if (startTown == null) {
if (way.startTown != null) {
return false;
}
} else if (!startTown.equals(way.startTown)) {
return false;
}
return true;
}
}
|
ZhangUranus/partner-fq | framework/base/src/org/ofbiz/base/util/collections/GenericMapValues.java | <filename>framework/base/src/org/ofbiz/base/util/collections/GenericMapValues.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.ofbiz.base.util.collections;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.ofbiz.base.util.UtilObject;
public abstract class GenericMapValues<K, V, M extends Map<K, V>> extends GenericMapCollection<K, V, M, V> {
public GenericMapValues(M source) {
super(source);
}
public boolean contains(Object item) {
Iterator<V> it = iterator(false);
while (it.hasNext()) {
if (UtilObject.equalsHelper(item, it.next())) return true;
}
return false;
}
public boolean equals(Object o) {
if (!(o instanceof Collection)) return false;
if (o instanceof List || o instanceof Set) return false;
Collection other = (Collection) o;
if (source.size() != other.size()) return false;
Iterator<V> it = iterator(false);
while (it.hasNext()) {
V item = it.next();
if (!other.contains(item)) return false;
}
return true;
}
public int hashCode() {
int h = 0;
Iterator<V> it = iterator(false);
while (it.hasNext()) {
V item = it.next();
if (item == null) continue;
h += item.hashCode();
}
return h;
}
public boolean remove(Object item) {
Iterator<V> it = iterator(false);
while (it.hasNext()) {
if (UtilObject.equalsHelper(item, it.next())) {
it.remove();
return true;
}
}
return false;
}
}
|
koifans/WALinuxAgent | azurelinuxagent/ga/exthandlers.py | # Microsoft Azure Linux Agent
#
# Copyright Microsoft Corporation
#
# 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.
#
# Requires Python 2.6+ and Openssl 1.0+
#
import datetime
import glob
import json
import operator
import os
import random
import re
import shutil
import signal
import stat
import sys
import tempfile
import time
import traceback
import zipfile
import azurelinuxagent.common.conf as conf
import azurelinuxagent.common.logger as logger
import azurelinuxagent.common.utils.fileutil as fileutil
import azurelinuxagent.common.version as version
from azurelinuxagent.common.cgroupconfigurator import CGroupConfigurator
from azurelinuxagent.common.errorstate import ErrorState, ERROR_STATE_DELTA_INSTALL
from azurelinuxagent.common.event import add_event, WALAEventOperation, elapsed_milliseconds, report_event
from azurelinuxagent.common.exception import ExtensionError, ProtocolError, ProtocolNotFoundError, \
ExtensionDownloadError, ExtensionOperationError, ExtensionErrorCodes
from azurelinuxagent.common.future import ustr
from azurelinuxagent.common.protocol import get_protocol_util
from azurelinuxagent.common.protocol.restapi import ExtHandlerStatus, \
ExtensionStatus, \
ExtensionSubStatus, \
VMStatus, ExtHandler, \
get_properties, \
set_properties
from azurelinuxagent.common.utils.flexible_version import FlexibleVersion
from azurelinuxagent.common.utils.processutil import read_output
from azurelinuxagent.common.version import AGENT_NAME, CURRENT_VERSION, GOAL_STATE_AGENT_VERSION, \
DISTRO_NAME, DISTRO_VERSION, PY_VERSION_MAJOR, PY_VERSION_MINOR, PY_VERSION_MICRO
# HandlerEnvironment.json schema version
HANDLER_ENVIRONMENT_VERSION = 1.0
EXTENSION_STATUS_ERROR = 'error'
EXTENSION_STATUS_SUCCESS = 'success'
VALID_EXTENSION_STATUS = ['transitioning', 'error', 'success', 'warning']
EXTENSION_TERMINAL_STATUSES = ['error', 'success']
VALID_HANDLER_STATUS = ['Ready', 'NotReady', "Installing", "Unresponsive"]
HANDLER_PATTERN = "^([^-]+)-(\d+(?:\.\d+)*)"
HANDLER_NAME_PATTERN = re.compile(HANDLER_PATTERN + "$", re.IGNORECASE)
HANDLER_PKG_EXT = ".zip"
HANDLER_PKG_PATTERN = re.compile(HANDLER_PATTERN + r"\.zip$", re.IGNORECASE)
DEFAULT_EXT_TIMEOUT_MINUTES = 90
AGENT_STATUS_FILE = "waagent_status.json"
NUMBER_OF_DOWNLOAD_RETRIES = 5
def get_traceback(e):
if sys.version_info[0] == 3:
return e.__traceback__
elif sys.version_info[0] == 2:
ex_type, ex, tb = sys.exc_info()
return tb
def validate_has_key(obj, key, fullname):
if key not in obj:
raise ExtensionError("Missing: {0}".format(fullname))
def validate_in_range(val, valid_range, name):
if val not in valid_range:
raise ExtensionError("Invalid {0}: {1}".format(name, val))
def parse_formatted_message(formatted_message):
if formatted_message is None:
return None
validate_has_key(formatted_message, 'lang', 'formattedMessage/lang')
validate_has_key(formatted_message, 'message', 'formattedMessage/message')
return formatted_message.get('message')
def parse_ext_substatus(substatus):
# Check extension sub status format
validate_has_key(substatus, 'status', 'substatus/status')
validate_in_range(substatus['status'], VALID_EXTENSION_STATUS,
'substatus/status')
status = ExtensionSubStatus()
status.name = substatus.get('name')
status.status = substatus.get('status')
status.code = substatus.get('code', 0)
formatted_message = substatus.get('formattedMessage')
status.message = parse_formatted_message(formatted_message)
return status
def parse_ext_status(ext_status, data):
if data is None or len(data) is None:
return
# Currently, only the first status will be reported
data = data[0]
# Check extension status format
validate_has_key(data, 'status', 'status')
status_data = data['status']
validate_has_key(status_data, 'status', 'status/status')
status = status_data['status']
if status not in VALID_EXTENSION_STATUS:
status = EXTENSION_STATUS_ERROR
applied_time = status_data.get('configurationAppliedTime')
ext_status.configurationAppliedTime = applied_time
ext_status.operation = status_data.get('operation')
ext_status.status = status
ext_status.code = status_data.get('code', 0)
formatted_message = status_data.get('formattedMessage')
ext_status.message = parse_formatted_message(formatted_message)
substatus_list = status_data.get('substatus', [])
# some extensions incorrectly report an empty substatus with a null value
if substatus_list is None:
substatus_list = []
for substatus in substatus_list:
if substatus is not None:
ext_status.substatusList.append(parse_ext_substatus(substatus))
def migrate_handler_state():
"""
Migrate handler state and status (if they exist) from an agent-owned directory into the
handler-owned config directory
Notes:
- The v2.0.x branch wrote all handler-related state into the handler-owned config
directory (e.g., /var/lib/waagent/Microsoft.Azure.Extensions.LinuxAsm-2.0.1/config).
- The v2.1.x branch original moved that state into an agent-owned handler
state directory (e.g., /var/lib/waagent/handler_state).
- This move can cause v2.1.x agents to multiply invoke a handler's install command. It also makes
clean-up more difficult since the agent must remove the state as well as the handler directory.
"""
handler_state_path = os.path.join(conf.get_lib_dir(), "handler_state")
if not os.path.isdir(handler_state_path):
return
for handler_path in glob.iglob(os.path.join(handler_state_path, "*")):
handler = os.path.basename(handler_path)
handler_config_path = os.path.join(conf.get_lib_dir(), handler, "config")
if os.path.isdir(handler_config_path):
for file in ("State", "Status"):
from_path = os.path.join(handler_state_path, handler, file.lower())
to_path = os.path.join(handler_config_path, "Handler" + file)
if os.path.isfile(from_path) and not os.path.isfile(to_path):
try:
shutil.move(from_path, to_path)
except Exception as e:
logger.warn(
"Exception occurred migrating {0} {1} file: {2}",
handler,
file,
str(e))
try:
shutil.rmtree(handler_state_path)
except Exception as e:
logger.warn("Exception occurred removing {0}: {1}", handler_state_path, str(e))
return
class ExtHandlerState(object):
NotInstalled = "NotInstalled"
Installed = "Installed"
Enabled = "Enabled"
Failed = "Failed"
def get_exthandlers_handler():
return ExtHandlersHandler()
class ExtHandlersHandler(object):
def __init__(self):
self.protocol_util = get_protocol_util()
self.protocol = None
self.ext_handlers = None
self.last_etag = None
self.log_report = False
self.log_etag = True
self.log_process = False
self.report_status_error_state = ErrorState()
self.get_artifact_error_state = ErrorState(min_timedelta=ERROR_STATE_DELTA_INSTALL)
def run(self):
self.ext_handlers, etag = None, None
try:
self.protocol = self.protocol_util.get_protocol()
self.ext_handlers, etag = self.protocol.get_ext_handlers()
self.get_artifact_error_state.reset()
except Exception as e:
msg = u"Exception retrieving extension handlers: {0}".format(ustr(e))
detailed_msg = '{0} {1}'.format(msg, traceback.extract_tb(get_traceback(e)))
self.get_artifact_error_state.incr()
if self.get_artifact_error_state.is_triggered():
add_event(AGENT_NAME,
version=CURRENT_VERSION,
op=WALAEventOperation.GetArtifactExtended,
is_success=False,
message="Failed to get extension artifact for over "
"{0}: {1}".format(self.get_artifact_error_state.min_timedelta, msg))
self.get_artifact_error_state.reset()
else:
logger.warn(msg)
add_event(AGENT_NAME,
version=CURRENT_VERSION,
op=WALAEventOperation.ExtensionProcessing,
is_success=False,
message=detailed_msg)
return
try:
msg = u"Handle extensions updates for incarnation {0}".format(etag)
logger.verbose(msg)
# Log status report success on new config
self.log_report = True
self.handle_ext_handlers(etag)
self.last_etag = etag
self.report_ext_handlers_status()
self.cleanup_outdated_handlers()
except Exception as e:
msg = u"Exception processing extension handlers: {0}".format(ustr(e))
detailed_msg = '{0} {1}'.format(msg, traceback.extract_tb(get_traceback(e)))
logger.warn(msg)
add_event(AGENT_NAME,
version=CURRENT_VERSION,
op=WALAEventOperation.ExtensionProcessing,
is_success=False,
message=detailed_msg)
return
def cleanup_outdated_handlers(self):
handlers = []
pkgs = []
# Build a collection of uninstalled handlers and orphaned packages
# Note:
# -- An orphaned package is one without a corresponding handler
# directory
for item in os.listdir(conf.get_lib_dir()):
path = os.path.join(conf.get_lib_dir(), item)
if version.is_agent_package(path) or version.is_agent_path(path):
continue
if os.path.isdir(path):
if re.match(HANDLER_NAME_PATTERN, item) is None:
continue
try:
eh = ExtHandler()
separator = item.rfind('-')
eh.name = item[0:separator]
eh.properties.version = str(FlexibleVersion(item[separator + 1:]))
handler = ExtHandlerInstance(eh, self.protocol)
except Exception:
continue
if handler.get_handler_state() != ExtHandlerState.NotInstalled:
continue
handlers.append(handler)
elif os.path.isfile(path) and \
not os.path.isdir(path[0:-len(HANDLER_PKG_EXT)]):
if not re.match(HANDLER_PKG_PATTERN, item):
continue
pkgs.append(path)
# Then, remove the orphaned packages
for pkg in pkgs:
try:
os.remove(pkg)
logger.verbose("Removed orphaned extension package {0}".format(pkg))
except OSError as e:
logger.warn("Failed to remove orphaned package {0}: {1}".format(pkg, e.strerror))
# Finally, remove the directories and packages of the
# uninstalled handlers
for handler in handlers:
handler.remove_ext_handler()
pkg = os.path.join(conf.get_lib_dir(), handler.get_full_name() + HANDLER_PKG_EXT)
if os.path.isfile(pkg):
try:
os.remove(pkg)
logger.verbose("Removed extension package {0}".format(pkg))
except OSError as e:
logger.warn("Failed to remove extension package {0}: {1}".format(pkg, e.strerror))
def handle_ext_handlers(self, etag=None):
if not conf.get_extensions_enabled():
logger.verbose("Extension handling is disabled")
return
if self.ext_handlers.extHandlers is None or \
len(self.ext_handlers.extHandlers) == 0:
logger.verbose("No extension handler config found")
return
if conf.get_enable_overprovisioning():
if not self.protocol.supports_overprovisioning():
logger.verbose("Overprovisioning is enabled but protocol does not support it.")
else:
artifacts_profile = self.protocol.get_artifacts_profile()
if artifacts_profile and artifacts_profile.is_on_hold():
logger.info("Extension handling is on hold")
return
wait_until = datetime.datetime.utcnow() + datetime.timedelta(minutes=DEFAULT_EXT_TIMEOUT_MINUTES)
max_dep_level = max([handler.sort_key() for handler in self.ext_handlers.extHandlers])
self.ext_handlers.extHandlers.sort(key=operator.methodcaller('sort_key'))
for ext_handler in self.ext_handlers.extHandlers:
self.handle_ext_handler(ext_handler, etag)
# Wait for the extension installation until it is handled.
# This is done for the install and enable. Not for the uninstallation.
# If handled successfully, proceed with the current handler.
# Otherwise, skip the rest of the extension installation.
dep_level = ext_handler.sort_key()
if dep_level >= 0 and dep_level < max_dep_level:
if not self.wait_for_handler_successful_completion(ext_handler, wait_until):
logger.warn("An extension failed or timed out, will skip processing the rest of the extensions")
break
def wait_for_handler_successful_completion(self, ext_handler, wait_until):
'''
Check the status of the extension being handled.
Wait until it has a terminal state or times out.
Return True if it is handled successfully. False if not.
'''
handler_i = ExtHandlerInstance(ext_handler, self.protocol)
for ext in ext_handler.properties.extensions:
ext_completed, status = handler_i.is_ext_handling_complete(ext)
# Keep polling for the extension status until it becomes success or times out
while not ext_completed and datetime.datetime.utcnow() <= wait_until:
time.sleep(5)
ext_completed, status = handler_i.is_ext_handling_complete(ext)
# In case of timeout or terminal error state, we log it and return false
# so that the extensions waiting on this one can be skipped processing
if datetime.datetime.utcnow() > wait_until:
msg = "Extension {0} did not reach a terminal state within the allowed timeout. Last status was {1}".format(
ext.name, status)
logger.warn(msg)
add_event(AGENT_NAME,
version=CURRENT_VERSION,
op=WALAEventOperation.ExtensionProcessing,
is_success=False,
message=msg)
return False
if status != EXTENSION_STATUS_SUCCESS:
msg = "Extension {0} did not succeed. Status was {1}".format(ext.name, status)
logger.warn(msg)
add_event(AGENT_NAME,
version=CURRENT_VERSION,
op=WALAEventOperation.ExtensionProcessing,
is_success=False,
message=msg)
return False
return True
def handle_ext_handler(self, ext_handler, etag):
ext_handler_i = ExtHandlerInstance(ext_handler, self.protocol)
try:
state = ext_handler.properties.state
if ext_handler_i.decide_version(target_state=state) is None:
version = ext_handler_i.ext_handler.properties.version
name = ext_handler_i.ext_handler.name
err_msg = "Unable to find version {0} in manifest for extension {1}".format(version, name)
ext_handler_i.set_operation(WALAEventOperation.Download)
ext_handler_i.set_handler_status(message=ustr(err_msg), code=-1)
ext_handler_i.report_event(message=ustr(err_msg), is_success=False)
return
self.get_artifact_error_state.reset()
if not ext_handler_i.is_upgrade and self.last_etag == etag:
if self.log_etag:
ext_handler_i.logger.verbose("Version {0} is current for etag {1}",
ext_handler_i.pkg.version,
etag)
self.log_etag = False
return
self.log_etag = True
ext_handler_i.logger.info("Target handler state: {0}", state)
if state == u"enabled":
self.handle_enable(ext_handler_i)
elif state == u"disabled":
self.handle_disable(ext_handler_i)
elif state == u"uninstall":
self.handle_uninstall(ext_handler_i)
else:
message = u"Unknown ext handler state:{0}".format(state)
raise ExtensionError(message)
except ExtensionOperationError as e:
self.handle_ext_handler_error(ext_handler_i, e, e.code)
except ExtensionDownloadError as e:
self.handle_ext_handler_download_error(ext_handler_i, e, e.code)
except ExtensionError as e:
self.handle_ext_handler_error(ext_handler_i, e, e.code)
except Exception as e:
self.handle_ext_handler_error(ext_handler_i, e)
def handle_ext_handler_error(self, ext_handler_i, e, code=-1):
msg = ustr(e)
ext_handler_i.set_handler_status(message=msg, code=code)
ext_handler_i.report_event(message=msg, is_success=False, log_event=True)
def handle_ext_handler_download_error(self, ext_handler_i, e, code=-1):
msg = ustr(e)
ext_handler_i.set_handler_status(message=msg, code=code)
self.get_artifact_error_state.incr()
if self.get_artifact_error_state.is_triggered():
report_event(op=WALAEventOperation.Download, is_success=False, log_event=True,
message="Failed to get artifact for over "
"{0}: {1}".format(self.get_artifact_error_state.min_timedelta, msg))
self.get_artifact_error_state.reset()
def handle_enable(self, ext_handler_i):
self.log_process = True
old_ext_handler_i = ext_handler_i.get_installed_ext_handler()
handler_state = ext_handler_i.get_handler_state()
ext_handler_i.logger.info("[Enable] current handler state is: {0}",
handler_state.lower())
if handler_state == ExtHandlerState.NotInstalled:
ext_handler_i.set_handler_state(ExtHandlerState.NotInstalled)
ext_handler_i.download()
ext_handler_i.initialize()
ext_handler_i.update_settings()
if old_ext_handler_i is None:
ext_handler_i.install()
elif ext_handler_i.version_ne(old_ext_handler_i):
old_ext_handler_i.disable()
ext_handler_i.copy_status_files(old_ext_handler_i)
if ext_handler_i.version_gt(old_ext_handler_i):
ext_handler_i.update()
else:
old_ext_handler_i.update(version=ext_handler_i.ext_handler.properties.version)
old_ext_handler_i.uninstall()
old_ext_handler_i.remove_ext_handler()
ext_handler_i.update_with_install()
else:
ext_handler_i.update_settings()
ext_handler_i.enable()
def handle_disable(self, ext_handler_i):
self.log_process = True
handler_state = ext_handler_i.get_handler_state()
ext_handler_i.logger.info("[Disable] current handler state is: {0}",
handler_state.lower())
if handler_state == ExtHandlerState.Enabled:
ext_handler_i.disable()
def handle_uninstall(self, ext_handler_i):
self.log_process = True
handler_state = ext_handler_i.get_handler_state()
ext_handler_i.logger.info("[Uninstall] current handler state is: {0}",
handler_state.lower())
if handler_state != ExtHandlerState.NotInstalled:
if handler_state == ExtHandlerState.Enabled:
ext_handler_i.disable()
ext_handler_i.uninstall()
ext_handler_i.remove_ext_handler()
def report_ext_handlers_status(self):
"""
Go through handler_state dir, collect and report status
"""
vm_status = VMStatus(status="Ready", message="Guest Agent is running")
if self.ext_handlers is not None:
for ext_handler in self.ext_handlers.extHandlers:
try:
self.report_ext_handler_status(vm_status, ext_handler)
except ExtensionError as e:
add_event(
AGENT_NAME,
version=CURRENT_VERSION,
op=WALAEventOperation.ExtensionProcessing,
is_success=False,
message=ustr(e))
logger.verbose("Report vm agent status")
try:
self.protocol.report_vm_status(vm_status)
if self.log_report:
logger.verbose("Completed vm agent status report")
self.report_status_error_state.reset()
except ProtocolNotFoundError as e:
self.report_status_error_state.incr()
message = "Failed to report vm agent status: {0}".format(e)
logger.verbose(message)
except ProtocolError as e:
self.report_status_error_state.incr()
message = "Failed to report vm agent status: {0}".format(e)
add_event(AGENT_NAME,
version=CURRENT_VERSION,
op=WALAEventOperation.ExtensionProcessing,
is_success=False,
message=message)
if self.report_status_error_state.is_triggered():
message = "Failed to report vm agent status for more than {0}" \
.format(self.report_status_error_state.min_timedelta)
add_event(AGENT_NAME,
version=CURRENT_VERSION,
op=WALAEventOperation.ReportStatusExtended,
is_success=False,
message=message)
self.report_status_error_state.reset()
self.write_ext_handlers_status_to_info_file(vm_status)
@staticmethod
def write_ext_handlers_status_to_info_file(vm_status):
status_path = os.path.join(conf.get_lib_dir(), AGENT_STATUS_FILE)
agent_details = {
"agent_name": AGENT_NAME,
"current_version": str(CURRENT_VERSION),
"goal_state_version": str(GOAL_STATE_AGENT_VERSION),
"distro_details": "{0}:{1}".format(DISTRO_NAME, DISTRO_VERSION),
"last_successful_status_upload_time": time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime()),
"python_version": "Python: {0}.{1}.{2}".format(PY_VERSION_MAJOR, PY_VERSION_MINOR, PY_VERSION_MICRO)
}
# Convert VMStatus class to Dict.
data = get_properties(vm_status)
# The above class contains vmAgent.extensionHandlers
# (more info: azurelinuxagent.common.protocol.restapi.VMAgentStatus)
handler_statuses = data['vmAgent']['extensionHandlers']
for handler_status in handler_statuses:
try:
handler_status.pop('code', None)
handler_status.pop('message', None)
handler_status.pop('extensions', None)
except KeyError:
pass
agent_details['extensions_status'] = handler_statuses
agent_details_json = json.dumps(agent_details)
fileutil.write_file(status_path, agent_details_json)
def report_ext_handler_status(self, vm_status, ext_handler):
ext_handler_i = ExtHandlerInstance(ext_handler, self.protocol)
handler_status = ext_handler_i.get_handler_status()
if handler_status is None:
return
handler_state = ext_handler_i.get_handler_state()
if handler_state != ExtHandlerState.NotInstalled:
try:
active_exts = ext_handler_i.report_ext_status()
handler_status.extensions.extend(active_exts)
except ExtensionError as e:
ext_handler_i.set_handler_status(message=ustr(e), code=e.code)
try:
heartbeat = ext_handler_i.collect_heartbeat()
if heartbeat is not None:
handler_status.status = heartbeat.get('status')
except ExtensionError as e:
ext_handler_i.set_handler_status(message=ustr(e), code=e.code)
vm_status.vmAgent.extensionHandlers.append(handler_status)
class ExtHandlerInstance(object):
def __init__(self, ext_handler, protocol):
self.ext_handler = ext_handler
self.protocol = protocol
self.operation = None
self.pkg = None
self.pkg_file = None
self.is_upgrade = False
self.logger = None
self.set_logger()
try:
fileutil.mkdir(self.get_log_dir(), mode=0o755)
except IOError as e:
self.logger.error(u"Failed to create extension log dir: {0}", e)
log_file = os.path.join(self.get_log_dir(), "CommandExecution.log")
self.logger.add_appender(logger.AppenderType.FILE,
logger.LogLevel.INFO, log_file)
def decide_version(self, target_state=None):
self.logger.verbose("Decide which version to use")
try:
pkg_list = self.protocol.get_ext_handler_pkgs(self.ext_handler)
except ProtocolError as e:
raise ExtensionError("Failed to get ext handler pkgs", e)
except ExtensionDownloadError:
self.set_operation(WALAEventOperation.Download)
raise
# Determine the desired and installed versions
requested_version = FlexibleVersion(str(self.ext_handler.properties.version))
installed_version_string = self.get_installed_version()
installed_version = requested_version \
if installed_version_string is None \
else FlexibleVersion(installed_version_string)
# Divide packages
# - Find the installed package (its version must exactly match)
# - Find the internal candidate (its version must exactly match)
# - Separate the public packages
selected_pkg = None
installed_pkg = None
pkg_list.versions.sort(key=lambda p: FlexibleVersion(p.version))
for pkg in pkg_list.versions:
pkg_version = FlexibleVersion(pkg.version)
if pkg_version == installed_version:
installed_pkg = pkg
if requested_version.matches(pkg_version):
selected_pkg = pkg
# Finally, update the version only if not downgrading
# Note:
# - A downgrade, which will be bound to the same major version,
# is allowed if the installed version is no longer available
if target_state == u"uninstall" or target_state == u"disabled":
if installed_pkg is None:
msg = "Failed to find installed version of {0} " \
"to uninstall".format(self.ext_handler.name)
self.logger.warn(msg)
self.pkg = installed_pkg
self.ext_handler.properties.version = str(installed_version) \
if installed_version is not None else None
else:
self.pkg = selected_pkg
if self.pkg is not None:
self.ext_handler.properties.version = str(selected_pkg.version)
# Note if the selected package is different than that installed
if installed_pkg is None \
or (
self.pkg is not None and FlexibleVersion(self.pkg.version) != FlexibleVersion(installed_pkg.version)):
self.is_upgrade = True
if self.pkg is not None:
self.logger.verbose("Use version: {0}", self.pkg.version)
self.set_logger()
return self.pkg
def set_logger(self):
prefix = "[{0}]".format(self.get_full_name())
self.logger = logger.Logger(logger.DEFAULT_LOGGER, prefix)
def version_gt(self, other):
self_version = self.ext_handler.properties.version
other_version = other.ext_handler.properties.version
return FlexibleVersion(self_version) > FlexibleVersion(other_version)
def version_ne(self, other):
self_version = self.ext_handler.properties.version
other_version = other.ext_handler.properties.version
return FlexibleVersion(self_version) != FlexibleVersion(other_version)
def get_installed_ext_handler(self):
lastest_version = self.get_installed_version()
if lastest_version is None:
return None
installed_handler = ExtHandler()
set_properties("ExtHandler", installed_handler, get_properties(self.ext_handler))
installed_handler.properties.version = lastest_version
return ExtHandlerInstance(installed_handler, self.protocol)
def get_installed_version(self):
lastest_version = None
for path in glob.iglob(os.path.join(conf.get_lib_dir(), self.ext_handler.name + "-*")):
if not os.path.isdir(path):
continue
separator = path.rfind('-')
version_from_path = FlexibleVersion(path[separator + 1:])
state_path = os.path.join(path, 'config', 'HandlerState')
if not os.path.exists(state_path) or \
fileutil.read_file(state_path) == \
ExtHandlerState.NotInstalled:
logger.verbose("Ignoring version of uninstalled extension: "
"{0}".format(path))
continue
if lastest_version is None or lastest_version < version_from_path:
lastest_version = version_from_path
return str(lastest_version) if lastest_version is not None else None
def copy_status_files(self, old_ext_handler_i):
self.logger.info("Copy status files from old plugin to new")
old_ext_dir = old_ext_handler_i.get_base_dir()
new_ext_dir = self.get_base_dir()
old_ext_mrseq_file = os.path.join(old_ext_dir, "mrseq")
if os.path.isfile(old_ext_mrseq_file):
shutil.copy2(old_ext_mrseq_file, new_ext_dir)
old_ext_status_dir = old_ext_handler_i.get_status_dir()
new_ext_status_dir = self.get_status_dir()
if os.path.isdir(old_ext_status_dir):
for status_file in os.listdir(old_ext_status_dir):
status_file = os.path.join(old_ext_status_dir, status_file)
if os.path.isfile(status_file):
shutil.copy2(status_file, new_ext_status_dir)
def set_operation(self, op):
self.operation = op
def report_event(self, message="", is_success=True, duration=0, log_event=True):
ext_handler_version = self.ext_handler.properties.version
add_event(name=self.ext_handler.name, version=ext_handler_version, message=message,
op=self.operation, is_success=is_success, duration=duration, log_event=log_event)
def _download_extension_package(self, source_uri, target_file):
self.logger.info("Downloading extension package: {0}", source_uri)
try:
if not self.protocol.download_ext_handler_pkg(source_uri, target_file):
raise Exception("Failed to download extension package - no error information is available")
except Exception as exception:
self.logger.info("Error downloading extension package: {0}", ustr(exception))
if os.path.exists(target_file):
os.remove(target_file)
return False
return True
def _unzip_extension_package(self, source_file, target_directory):
self.logger.info("Unzipping extension package: {0}", source_file)
try:
zipfile.ZipFile(source_file).extractall(target_directory)
except Exception as exception:
logger.info("Error while unzipping extension package: {0}", ustr(exception))
os.remove(source_file)
if os.path.exists(target_directory):
shutil.rmtree(target_directory)
return False
return True
def download(self):
begin_utc = datetime.datetime.utcnow()
self.set_operation(WALAEventOperation.Download)
if self.pkg is None or self.pkg.uris is None or len(self.pkg.uris) == 0:
raise ExtensionDownloadError("No package uri found")
destination = os.path.join(conf.get_lib_dir(), os.path.basename(self.pkg.uris[0].uri) + ".zip")
package_exists = False
if os.path.exists(destination):
self.logger.info("Using existing extension package: {0}", destination)
if self._unzip_extension_package(destination, self.get_base_dir()):
package_exists = True
else:
self.logger.info("The existing extension package is invalid, will ignore it.")
if not package_exists:
downloaded = False
i = 0
while i < NUMBER_OF_DOWNLOAD_RETRIES:
uris_shuffled = self.pkg.uris
random.shuffle(uris_shuffled)
for uri in uris_shuffled:
if not self._download_extension_package(uri.uri, destination):
continue
if self._unzip_extension_package(destination, self.get_base_dir()):
downloaded = True
break
if downloaded:
break
self.logger.info("Failed to download the extension package from all uris, will retry after a minute")
time.sleep(60)
i += 1
if not downloaded:
raise ExtensionDownloadError("Failed to download extension",
code=ExtensionErrorCodes.PluginManifestDownloadError)
duration = elapsed_milliseconds(begin_utc)
self.report_event(message="Download succeeded", duration=duration)
self.pkg_file = destination
def initialize(self):
self.logger.info("Initializing extension {0}".format(self.get_full_name()))
# Add user execute permission to all files under the base dir
for file in fileutil.get_all_files(self.get_base_dir()):
fileutil.chmod(file, os.stat(file).st_mode | stat.S_IXUSR)
# Save HandlerManifest.json
man_file = fileutil.search_file(self.get_base_dir(), 'HandlerManifest.json')
if man_file is None:
raise ExtensionDownloadError("HandlerManifest.json not found")
try:
man = fileutil.read_file(man_file, remove_bom=True)
fileutil.write_file(self.get_manifest_file(), man)
except IOError as e:
fileutil.clean_ioerror(e, paths=[self.get_base_dir(), self.pkg_file])
raise ExtensionDownloadError(u"Failed to save HandlerManifest.json", e)
# Create status and config dir
try:
status_dir = self.get_status_dir()
fileutil.mkdir(status_dir, mode=0o700)
seq_no, status_path = self.get_status_file_path()
if status_path is not None:
now = datetime.datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ")
status = {
"version": 1.0,
"timestampUTC": now,
"status": {
"name": self.ext_handler.name,
"operation": "Enabling Handler",
"status": "transitioning",
"code": 0
}
}
fileutil.write_file(status_path, json.dumps(status))
conf_dir = self.get_conf_dir()
fileutil.mkdir(conf_dir, mode=0o700)
except IOError as e:
fileutil.clean_ioerror(e, paths=[self.get_base_dir(), self.pkg_file])
raise ExtensionDownloadError(u"Failed to initialize extension '{0}'".format(self.get_full_name()), e)
# Create cgroups for the extension
CGroupConfigurator.get_instance().create_extension_cgroups(self.get_full_name())
# Save HandlerEnvironment.json
self.create_handler_env()
def enable(self):
self.set_operation(WALAEventOperation.Enable)
man = self.load_manifest()
enable_cmd = man.get_enable_command()
self.logger.info("Enable extension [{0}]".format(enable_cmd))
self.launch_command(enable_cmd, timeout=300,
extension_error_code=ExtensionErrorCodes.PluginEnableProcessingFailed)
self.set_handler_state(ExtHandlerState.Enabled)
self.set_handler_status(status="Ready", message="Plugin enabled")
def disable(self):
self.set_operation(WALAEventOperation.Disable)
man = self.load_manifest()
disable_cmd = man.get_disable_command()
self.logger.info("Disable extension [{0}]".format(disable_cmd))
self.launch_command(disable_cmd, timeout=900,
extension_error_code=ExtensionErrorCodes.PluginDisableProcessingFailed)
self.set_handler_state(ExtHandlerState.Installed)
self.set_handler_status(status="NotReady", message="Plugin disabled")
def install(self):
man = self.load_manifest()
install_cmd = man.get_install_command()
self.logger.info("Install extension [{0}]".format(install_cmd))
self.set_operation(WALAEventOperation.Install)
self.launch_command(install_cmd, timeout=900,
extension_error_code=ExtensionErrorCodes.PluginInstallProcessingFailed)
self.set_handler_state(ExtHandlerState.Installed)
def uninstall(self):
try:
self.set_operation(WALAEventOperation.UnInstall)
man = self.load_manifest()
uninstall_cmd = man.get_uninstall_command()
self.logger.info("Uninstall extension [{0}]".format(uninstall_cmd))
self.launch_command(uninstall_cmd)
except ExtensionError as e:
self.report_event(message=ustr(e), is_success=False)
def remove_ext_handler(self):
try:
zip_filename = "__".join(os.path.basename(self.get_base_dir()).split("-")) + ".zip"
destination = os.path.join(conf.get_lib_dir(), zip_filename)
if os.path.exists(destination):
self.pkg_file = destination
os.remove(self.pkg_file)
base_dir = self.get_base_dir()
if os.path.isdir(base_dir):
self.logger.info("Remove extension handler directory: {0}",
base_dir)
# some extensions uninstall asynchronously so ignore error 2 while removing them
def on_rmtree_error(_, __, exc_info):
_, exception, _ = exc_info
if not isinstance(exception, OSError) or exception.errno != 2: # [Errno 2] No such file or directory
raise exception
shutil.rmtree(base_dir, onerror=on_rmtree_error)
except IOError as e:
message = "Failed to remove extension handler directory: {0}".format(e)
self.report_event(message=message, is_success=False)
self.logger.warn(message)
# Also remove the cgroups for the extension
CGroupConfigurator.get_instance().remove_extension_cgroups(self.get_full_name())
def update(self, version=None):
if version is None:
version = self.ext_handler.properties.version
try:
self.set_operation(WALAEventOperation.Update)
man = self.load_manifest()
update_cmd = man.get_update_command()
self.logger.info("Update extension [{0}]".format(update_cmd))
self.launch_command(update_cmd,
timeout=900,
extension_error_code=ExtensionErrorCodes.PluginUpdateProcessingFailed,
env={'VERSION': version})
except ExtensionError:
# prevent the handler update from being retried
self.set_handler_state(ExtHandlerState.Failed)
raise
def update_with_install(self):
man = self.load_manifest()
if man.is_update_with_install():
self.install()
else:
self.logger.info("UpdateWithInstall not set. "
"Skip install during upgrade.")
self.set_handler_state(ExtHandlerState.Installed)
def get_largest_seq_no(self):
seq_no = -1
conf_dir = self.get_conf_dir()
for item in os.listdir(conf_dir):
item_path = os.path.join(conf_dir, item)
if os.path.isfile(item_path):
try:
separator = item.rfind(".")
if separator > 0 and item[separator + 1:] == 'settings':
curr_seq_no = int(item.split('.')[0])
if curr_seq_no > seq_no:
seq_no = curr_seq_no
except (ValueError, IndexError, TypeError):
self.logger.verbose("Failed to parse file name: {0}", item)
continue
return seq_no
def get_status_file_path(self, extension=None):
path = None
seq_no = self.get_largest_seq_no()
# Issue 1116: use the sequence number from goal state where possible
if extension is not None and extension.sequenceNumber is not None:
try:
gs_seq_no = int(extension.sequenceNumber)
if gs_seq_no != seq_no:
add_event(AGENT_NAME,
version=CURRENT_VERSION,
op=WALAEventOperation.SequenceNumberMismatch,
is_success=False,
message="Goal state: {0}, disk: {1}".format(gs_seq_no, seq_no),
log_event=False)
seq_no = gs_seq_no
except ValueError:
logger.error('Sequence number [{0}] does not appear to be valid'.format(extension.sequenceNumber))
if seq_no > -1:
path = os.path.join(
self.get_status_dir(),
"{0}.status".format(seq_no))
return seq_no, path
def collect_ext_status(self, ext):
self.logger.verbose("Collect extension status")
seq_no, ext_status_file = self.get_status_file_path(ext)
if seq_no == -1:
return None
ext_status = ExtensionStatus(seq_no=seq_no)
try:
data_str = fileutil.read_file(ext_status_file)
data = json.loads(data_str)
parse_ext_status(ext_status, data)
except IOError as e:
ext_status.message = u"Failed to get status file {0}".format(e)
ext_status.code = -1
ext_status.status = "error"
except ExtensionError as e:
ext_status.message = u"Malformed status file {0}".format(e)
ext_status.code = ExtensionErrorCodes.PluginSettingsStatusInvalid
ext_status.status = "error"
except ValueError as e:
ext_status.message = u"Malformed status file {0}".format(e)
ext_status.code = -1
ext_status.status = "error"
return ext_status
def get_ext_handling_status(self, ext):
seq_no, ext_status_file = self.get_status_file_path(ext)
if seq_no < 0 or ext_status_file is None:
return None
# Missing status file is considered a non-terminal state here
# so that extension sequencing can wait until it becomes existing
if not os.path.exists(ext_status_file):
status = "warning"
else:
ext_status = self.collect_ext_status(ext)
status = ext_status.status if ext_status is not None else None
return status
def is_ext_handling_complete(self, ext):
status = self.get_ext_handling_status(ext)
# when seq < 0 (i.e. no new user settings), the handling is complete and return None status
if status is None:
return (True, None)
# If not in terminal state, it is incomplete
if status not in EXTENSION_TERMINAL_STATUSES:
return (False, status)
# Extension completed, return its status
return (True, status)
def report_ext_status(self):
active_exts = []
# TODO Refactor or remove this common code pattern (for each extension subordinate to an ext_handler, do X).
for ext in self.ext_handler.properties.extensions:
ext_status = self.collect_ext_status(ext)
if ext_status is None:
continue
try:
self.protocol.report_ext_status(self.ext_handler.name, ext.name,
ext_status)
active_exts.append(ext.name)
except ProtocolError as e:
self.logger.error(u"Failed to report extension status: {0}", e)
return active_exts
def collect_heartbeat(self):
man = self.load_manifest()
if not man.is_report_heartbeat():
return
heartbeat_file = os.path.join(conf.get_lib_dir(),
self.get_heartbeat_file())
if not os.path.isfile(heartbeat_file):
raise ExtensionError("Failed to get heart beat file")
if not self.is_responsive(heartbeat_file):
return {
"status": "Unresponsive",
"code": -1,
"message": "Extension heartbeat is not responsive"
}
try:
heartbeat_json = fileutil.read_file(heartbeat_file)
heartbeat = json.loads(heartbeat_json)[0]['heartbeat']
except IOError as e:
raise ExtensionError("Failed to get heartbeat file:{0}".format(e))
except (ValueError, KeyError) as e:
raise ExtensionError("Malformed heartbeat file: {0}".format(e))
return heartbeat
@staticmethod
def is_responsive(heartbeat_file):
"""
Was heartbeat_file updated within the last ten (10) minutes?
:param heartbeat_file: str
:return: bool
"""
last_update = int(time.time() - os.stat(heartbeat_file).st_mtime)
return last_update <= 600
def launch_command(self, cmd, timeout=300, extension_error_code=ExtensionErrorCodes.PluginProcessingError,
env=None):
begin_utc = datetime.datetime.utcnow()
self.logger.verbose("Launch command: [{0}]", cmd)
base_dir = self.get_base_dir()
with tempfile.TemporaryFile(dir=base_dir, mode="w+b") as stdout:
with tempfile.TemporaryFile(dir=base_dir, mode="w+b") as stderr:
if env is None:
env = {}
env.update(os.environ)
try:
# Some extensions erroneously begin cmd with a slash; don't interpret those
# as root-relative. (Issue #1170)
full_path = os.path.join(base_dir, cmd.lstrip(os.path.sep))
process = CGroupConfigurator.get_instance().start_extension_command(
extension_name=self.get_full_name(),
command=full_path,
shell=True,
cwd=base_dir,
env=env,
stdout=stdout,
stderr=stderr)
except OSError as e:
raise ExtensionOperationError("Failed to launch '{0}': {1}".format(full_path, e.strerror),
code=extension_error_code)
msg = ExtHandlerInstance._capture_process_output(process, stdout, stderr, cmd, timeout,
extension_error_code)
duration = elapsed_milliseconds(begin_utc)
log_msg = "{0}\n{1}".format(cmd, "\n".join([line for line in msg.split('\n') if line != ""]))
self.logger.verbose(log_msg)
self.report_event(message=log_msg, duration=duration, log_event=False)
return msg
@staticmethod
def _capture_process_output(process, stdout_file, stderr_file, cmd, timeout,
code=ExtensionErrorCodes.PluginUnknownFailure):
retry = timeout
while retry > 0 and process.poll() is None:
time.sleep(1)
retry -= 1
# timeout expired
if retry == 0:
os.killpg(os.getpgid(process.pid), signal.SIGKILL)
raise ExtensionError("Timeout({0}): {1}\n{2}".format(timeout, cmd, read_output(stdout_file, stderr_file)),
code=ExtensionErrorCodes.PluginHandlerScriptTimedout)
# process completed or forked; sleep 1 sec to give the child process (if any) a chance to start
time.sleep(1)
return_code = process.wait()
if return_code != 0:
raise ExtensionError("Non-zero exit code: {0}, {1}\n{2}".format(return_code,
cmd,
read_output(stdout_file, stderr_file)),
code=code)
return read_output(stdout_file, stderr_file)
def load_manifest(self):
man_file = self.get_manifest_file()
try:
data = json.loads(fileutil.read_file(man_file))
except (IOError, OSError) as e:
raise ExtensionError('Failed to load manifest file ({0}): {1}'.format(man_file, e.strerror),
code=ExtensionErrorCodes.PluginHandlerManifestNotFound)
except ValueError:
raise ExtensionError('Malformed manifest file ({0}).'.format(man_file),
code=ExtensionErrorCodes.PluginHandlerManifestDeserializationError)
return HandlerManifest(data[0])
def update_settings_file(self, settings_file, settings):
settings_file = os.path.join(self.get_conf_dir(), settings_file)
try:
fileutil.write_file(settings_file, settings)
except IOError as e:
fileutil.clean_ioerror(e,
paths=[settings_file])
raise ExtensionError(u"Failed to update settings file", e)
def update_settings(self):
if self.ext_handler.properties.extensions is None or \
len(self.ext_handler.properties.extensions) == 0:
# This is the behavior of waagent 2.0.x
# The new agent has to be consistent with the old one.
self.logger.info("Extension has no settings, write empty 0.settings")
self.update_settings_file("0.settings", "")
return
for ext in self.ext_handler.properties.extensions:
settings = {
'publicSettings': ext.publicSettings,
'protectedSettings': ext.protectedSettings,
'protectedSettingsCertThumbprint': ext.certificateThumbprint
}
ext_settings = {
"runtimeSettings": [{
"handlerSettings": settings
}]
}
settings_file = "{0}.settings".format(ext.sequenceNumber)
self.logger.info("Update settings file: {0}", settings_file)
self.update_settings_file(settings_file, json.dumps(ext_settings))
def create_handler_env(self):
env = [{
"name": self.ext_handler.name,
"version": HANDLER_ENVIRONMENT_VERSION,
"handlerEnvironment": {
"logFolder": self.get_log_dir(),
"configFolder": self.get_conf_dir(),
"statusFolder": self.get_status_dir(),
"heartbeatFile": self.get_heartbeat_file()
}
}]
try:
fileutil.write_file(self.get_env_file(), json.dumps(env))
except IOError as e:
fileutil.clean_ioerror(e,
paths=[self.get_base_dir(), self.pkg_file])
raise ExtensionDownloadError(u"Failed to save handler environment", e)
def set_handler_state(self, handler_state):
state_dir = self.get_conf_dir()
state_file = os.path.join(state_dir, "HandlerState")
try:
if not os.path.exists(state_dir):
fileutil.mkdir(state_dir, mode=0o700)
fileutil.write_file(state_file, handler_state)
except IOError as e:
fileutil.clean_ioerror(e, paths=[state_file])
self.logger.error("Failed to set state: {0}", e)
def get_handler_state(self):
state_dir = self.get_conf_dir()
state_file = os.path.join(state_dir, "HandlerState")
if not os.path.isfile(state_file):
return ExtHandlerState.NotInstalled
try:
return fileutil.read_file(state_file)
except IOError as e:
self.logger.error("Failed to get state: {0}", e)
return ExtHandlerState.NotInstalled
def set_handler_status(self, status="NotReady", message="", code=0):
state_dir = self.get_conf_dir()
handler_status = ExtHandlerStatus()
handler_status.name = self.ext_handler.name
handler_status.version = str(self.ext_handler.properties.version)
handler_status.message = message
handler_status.code = code
handler_status.status = status
status_file = os.path.join(state_dir, "HandlerStatus")
try:
handler_status_json = json.dumps(get_properties(handler_status))
if handler_status_json is not None:
fileutil.write_file(status_file, handler_status_json)
else:
self.logger.error("Failed to create JSON document of handler status for {0} version {1}".format(
self.ext_handler.name,
self.ext_handler.properties.version))
except (IOError, ValueError, ProtocolError) as e:
fileutil.clean_ioerror(e, paths=[status_file])
self.logger.error("Failed to save handler status: {0}, {1}", ustr(e), traceback.format_exc())
def get_handler_status(self):
state_dir = self.get_conf_dir()
status_file = os.path.join(state_dir, "HandlerStatus")
if not os.path.isfile(status_file):
return None
try:
data = json.loads(fileutil.read_file(status_file))
handler_status = ExtHandlerStatus()
set_properties("ExtHandlerStatus", handler_status, data)
return handler_status
except (IOError, ValueError) as e:
self.logger.error("Failed to get handler status: {0}", e)
def get_full_name(self):
return "{0}-{1}".format(self.ext_handler.name,
self.ext_handler.properties.version)
def get_base_dir(self):
return os.path.join(conf.get_lib_dir(), self.get_full_name())
def get_status_dir(self):
return os.path.join(self.get_base_dir(), "status")
def get_conf_dir(self):
return os.path.join(self.get_base_dir(), 'config')
def get_heartbeat_file(self):
return os.path.join(self.get_base_dir(), 'heartbeat.log')
def get_manifest_file(self):
return os.path.join(self.get_base_dir(), 'HandlerManifest.json')
def get_env_file(self):
return os.path.join(self.get_base_dir(), 'HandlerEnvironment.json')
def get_log_dir(self):
return os.path.join(conf.get_ext_log_dir(), self.ext_handler.name)
class HandlerEnvironment(object):
def __init__(self, data):
self.data = data
def get_version(self):
return self.data["version"]
def get_log_dir(self):
return self.data["handlerEnvironment"]["logFolder"]
def get_conf_dir(self):
return self.data["handlerEnvironment"]["configFolder"]
def get_status_dir(self):
return self.data["handlerEnvironment"]["statusFolder"]
def get_heartbeat_file(self):
return self.data["handlerEnvironment"]["heartbeatFile"]
class HandlerManifest(object):
def __init__(self, data):
if data is None or data['handlerManifest'] is None:
raise ExtensionError('Malformed manifest file.')
self.data = data
def get_name(self):
return self.data["name"]
def get_version(self):
return self.data["version"]
def get_install_command(self):
return self.data['handlerManifest']["installCommand"]
def get_uninstall_command(self):
return self.data['handlerManifest']["uninstallCommand"]
def get_update_command(self):
return self.data['handlerManifest']["updateCommand"]
def get_enable_command(self):
return self.data['handlerManifest']["enableCommand"]
def get_disable_command(self):
return self.data['handlerManifest']["disableCommand"]
def is_report_heartbeat(self):
return self.data['handlerManifest'].get('reportHeartbeat', False)
def is_update_with_install(self):
update_mode = self.data['handlerManifest'].get('updateMode')
if update_mode is None:
return True
return update_mode.lower() == "updatewithinstall"
|
rs9899/Parsing-R-CNN | rcnn/modeling/fpn/FPN.py | <reponame>rs9899/Parsing-R-CNN
import torch
import torch.nn as nn
import torch.nn.functional as F
from models.imagenet.utils import convert_conv2convws_model
from utils.net import make_conv
from rcnn.core.config import cfg
from rcnn.modeling import registry
# ---------------------------------------------------------------------------- #
# Functions for bolting FPN onto a backbone architectures
# ---------------------------------------------------------------------------- #
@registry.FPN_BODY.register("fpn")
class fpn(nn.Module):
# dim_in = [256, 512, 1024, 2048]
# spatial_scale = [1/4, 1/8, 1/16, 1/32]
def __init__(self, dim_in, spatial_scale):
super().__init__()
self.dim_in = dim_in[-1] # 2048
self.spatial_scale = spatial_scale
fpn_dim = cfg.FPN.DIM # 256
use_lite = cfg.FPN.USE_LITE
use_bn = cfg.FPN.USE_BN
use_gn = cfg.FPN.USE_GN
min_level, max_level = get_min_max_levels() # 2, 6
self.num_backbone_stages = len(dim_in) - (
min_level - cfg.FPN.LOWEST_BACKBONE_LVL) # 4 (cfg.FPN.LOWEST_BACKBONE_LVL=2)
# P5 in
self.p5_in = make_conv(self.dim_in, fpn_dim, kernel=1, use_bn=use_bn, use_gn=use_gn)
# P5 out
self.p5_out = make_conv(fpn_dim, fpn_dim, kernel=3, use_dwconv=use_lite, use_bn=use_bn, use_gn=use_gn,
suffix_1x1=use_lite)
# fpn module
self.fpn_in = []
self.fpn_out = []
for i in range(self.num_backbone_stages - 1): # skip the top layer
px_in = make_conv(dim_in[-i - 2], fpn_dim, kernel=1, use_bn=use_bn, use_gn=use_gn) # from P4 to P2
px_out = make_conv(fpn_dim, fpn_dim, kernel=3, use_dwconv=use_lite, use_bn=use_bn, use_gn=use_gn,
suffix_1x1=use_lite)
self.fpn_in.append(px_in)
self.fpn_out.append(px_out)
self.fpn_in = nn.ModuleList(self.fpn_in) # [P4, P3, P2]
self.fpn_out = nn.ModuleList(self.fpn_out)
self.dim_in = fpn_dim
# P6. Original FPN P6 level implementation from CVPR'17 FPN paper.
if not cfg.FPN.EXTRA_CONV_LEVELS and max_level == cfg.FPN.HIGHEST_BACKBONE_LVL + 1:
self.maxpool_p6 = nn.MaxPool2d(kernel_size=1, stride=2, padding=0)
self.spatial_scale.append(self.spatial_scale[-1] * 0.5)
# Coarser FPN levels introduced for RetinaNet
if cfg.FPN.EXTRA_CONV_LEVELS and max_level > cfg.FPN.HIGHEST_BACKBONE_LVL:
self.extra_pyramid_modules = nn.ModuleList()
if cfg.FPN.USE_C5:
self.dim_in = dim_in[-1]
for i in range(cfg.FPN.HIGHEST_BACKBONE_LVL + 1, max_level + 1):
self.extra_pyramid_modules.append(
make_conv(self.dim_in, fpn_dim, kernel=3, stride=2, use_dwconv=use_lite, use_bn=use_bn,
use_gn=use_gn, suffix_1x1=use_lite)
)
self.dim_in = fpn_dim
self.spatial_scale.append(self.spatial_scale[-1] * 0.5)
# self.spatial_scale.reverse() # [1/64, 1/32, 1/16, 1/8, 1/4]
# self.dim_out = [self.dim_in]
num_roi_levels = cfg.FPN.ROI_MAX_LEVEL - cfg.FPN.ROI_MIN_LEVEL + 1
# Retain only the spatial scales that will be used for RoI heads. `self.spatial_scale`
# may include extra scales that are used for RPN proposals, but not for RoI heads.
self.spatial_scale = self.spatial_scale[:num_roi_levels]
self.dim_out = [self.dim_in for _ in range(num_roi_levels)]
if cfg.FPN.USE_WS:
self = convert_conv2convws_model(self)
self._init_weights()
def _init_weights(self):
# weight initialization
for m in self.modules():
if isinstance(m, nn.Conv2d):
nn.init.kaiming_uniform_(m.weight, a=1)
if m.bias is not None:
nn.init.zeros_(m.bias)
elif isinstance(m, (nn.BatchNorm2d, nn.GroupNorm)):
nn.init.constant_(m.weight, 1)
nn.init.constant_(m.bias, 0)
elif isinstance(m, nn.Linear):
nn.init.normal_(m.weight, 0, 0.01)
nn.init.constant_(m.bias, 0)
def forward(self, x):
c5_out = x[-1]
px = self.p5_in(c5_out)
fpn_output_blobs = [self.p5_out(px)] # [P5]
for i in range(self.num_backbone_stages - 1): # [P5 - P2]
cx_out = x[-i - 2] # C4, C3, C2
cx_out = self.fpn_in[i](cx_out) # lateral branch
if cx_out.size()[2:] != px.size()[2:]:
px = F.interpolate(px, scale_factor=2, mode='nearest')
px = cx_out + px
fpn_output_blobs.insert(0, self.fpn_out[i](px)) # [P2 - P5]
if hasattr(self, 'maxpool_p6'):
fpn_output_blobs.append(self.maxpool_p6(fpn_output_blobs[-1])) # [P2 - P6]
if hasattr(self, 'extra_pyramid_modules'):
if cfg.FPN.USE_C5:
p6_in = c5_out
else:
p6_in = fpn_output_blobs[-1]
fpn_output_blobs.append(self.extra_pyramid_modules[0](p6_in))
for module in self.extra_pyramid_modules[1:]:
fpn_output_blobs.append(module(F.relu(fpn_output_blobs[-1]))) # [P2 - P6, P7]
# use all levels
return fpn_output_blobs # [P2 - P6]
def get_min_max_levels():
"""The min and max FPN levels required for supporting RPN and/or RoI
transform operations on multiple FPN levels.
"""
min_level = cfg.FPN.LOWEST_BACKBONE_LVL
max_level = cfg.FPN.HIGHEST_BACKBONE_LVL
if cfg.FPN.MULTILEVEL_RPN and not cfg.FPN.MULTILEVEL_ROIS:
max_level = cfg.FPN.RPN_MAX_LEVEL
min_level = cfg.FPN.RPN_MIN_LEVEL
if not cfg.FPN.MULTILEVEL_RPN and cfg.FPN.MULTILEVEL_ROIS:
max_level = cfg.FPN.ROI_MAX_LEVEL
min_level = cfg.FPN.ROI_MIN_LEVEL
if cfg.FPN.MULTILEVEL_RPN and cfg.FPN.MULTILEVEL_ROIS:
max_level = max(cfg.FPN.RPN_MAX_LEVEL, cfg.FPN.ROI_MAX_LEVEL)
min_level = min(cfg.FPN.RPN_MIN_LEVEL, cfg.FPN.ROI_MIN_LEVEL)
return min_level, max_level
|
bIoTopeH2020project/O-MI | O-MI-Node/src/main/scala/types/Odf/parsing/StreamParser.scala | <filename>O-MI-Node/src/main/scala/types/Odf/parsing/StreamParser.scala<gh_stars>10-100
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2019 Aalto University. +
+ +
+ Licensed under the 4-clause BSD (the "License"); +
+ you may not use this file except in compliance with the License. +
+ You may obtain a copy of the License at top most directory of project. +
+ +
+ 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 types
package odf
package parsing
import scala.util.Try
import scala.concurrent.Future
import akka.NotUsed
import akka.util._
import akka.stream._
import akka.stream.stage._
import akka.stream.scaladsl._
import akka.stream.alpakka.xml._
import akka.stream.alpakka.xml.scaladsl._
import types._
import odf._
import utils._
/** Parser for data in O-DF format */
object ODFStreamParser {
def parse(filePath: java.nio.file.Path)(implicit mat: Materializer): Future[ODF] = stringParser(FileIO.fromPath(filePath).map(_.utf8String))
def parse(str: String)(implicit mat: Materializer): Future[ODF] = stringParser(Source.single(str))
def stringParser(source: Source[String, _])(implicit mat: Materializer): Future[ODF] =
source.via(parserFlow).runWith(Sink.fold[ODF,ODF](ImmutableODF())(_ union _))
def byteStringParser(source: Source[ByteString, _])(implicit mat: Materializer): Future[ODF] =
source.via(parserFlowByteString).runWith(Sink.fold[ODF,ODF](ImmutableODF())(_ union _))
def parserFlowByteString: Flow[ByteString,ODF,NotUsed] = Flow[ByteString]
.via(XmlParsing.parser)
.via(new ODFParserFlow)
def parserFlow: Flow[String,ODF,NotUsed] = Flow[String]
.map(ByteString(_))
.via(XmlParsing.parser)
.via(new ODFParserFlow)
class ODFParserFlow extends GraphStage[FlowShape[ParseEvent,ODF]] {
val in = Inlet[ParseEvent]("ODFParserFlowF.in")
val out = Outlet[ODF]("ODFParserFlow.out")
override val shape = FlowShape(in, out)
override def createLogic(inheritedAttributes: Attributes): GraphStageLogic = new GraphStageLogic(shape) {
private var state: EventBuilder[_] = new ODFEventBuilder(None,currentTimestamp)
private var done: Boolean = false
setHandler(in, new InHandler {
override def onPush(): Unit = {
val event: ParseEvent = grab(in)
state = state.parse(event)
Try{
state match {
case builder: ODFEventBuilder if builder.isComplete =>
if( !done ){
done = true
push(out,builder.build )
pull(in)
}
case other: EventBuilder[_] =>
if( other.isComplete )
failStage(ODFParserError("Non EnvelopeBuilder is complete"))
else
pull(in)
}
}.recover{
case error: ODFParserError =>
failStage( error)
case t: Throwable =>
failStage( t)
}
}
})
setHandler(out, new OutHandler {
override def onPull(): Unit = {
if( !done )
pull(in)
}
})
}
}
}
|
ServiceInnovationLab/feijoa | spec/features/home_spec.rb | <reponame>ServiceInnovationLab/feijoa<gh_stars>1-10
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe '/', type: :feature do
it 'shows a fancy fruit' do
visit root_path
expect(page).to have_text('Feijoa')
Percy.snapshot(page, name: 'homepage')
end
end
|
Jeremy-Chau/SJSU-Dev2 | firmware/library/L1_Drivers/test/pin_test.cpp | // Test for Pin class.
// Using a test by side effect on the LPC_IOCON register
#include "L0_LowLevel/LPC40xx.h"
#include "L1_Drivers/pin.hpp"
#include "L5_Testing/testing_frameworks.hpp"
TEST_CASE("Testing Pin", "[pin_configure]")
{
// Simulated local version of LPC_IOCON register to verify register
// manipulation by side effect of Pin method calls
LPC_IOCON_TypeDef local_iocon;
memset(&local_iocon, 0, sizeof(local_iocon));
// Substitute the memory mapped LPC_IOCON with the local_iocon test struture
// Redirects manipulation to the 'local_iocon'
Pin::pin_map = reinterpret_cast<Pin::PinMap_t *>(&local_iocon);
Pin test_subject00(0, 0);
Pin test_subject25(2, 5);
SECTION("Pin Function")
{
// Source: "UM10562 LPC408x/407x User manual" table 84 page 133
constexpr uint8_t kPort0Pin0Uart3Txd = 0b010;
constexpr uint8_t kPort2Pin5Pwm1Channel6 = 0b001;
test_subject00.SetPinFunction(kPort0Pin0Uart3Txd);
test_subject25.SetPinFunction(kPort2Pin5Pwm1Channel6);
// Check that mapped pin P0.0's first 3 bits are equal to the function
// U3_TXD
CHECK(kPort0Pin0Uart3Txd == (local_iocon.P0_0 & 0b111));
// Check that mapped pin P2.5's first 3 bits are equal to the function
// PWM1_6
CHECK(kPort2Pin5Pwm1Channel6 == (local_iocon.P2_5 & 0b111));
}
SECTION("Pin Mode")
{
// Source: "UM10562 LPC408x/407x User manual" table 83 page 132
constexpr uint8_t kModePosition = 3;
constexpr uint32_t kMask = 0b11 << kModePosition;
constexpr uint32_t kExpectedForInactive =
static_cast<uint8_t>(PinInterface::Mode::kInactive) << kModePosition;
constexpr uint32_t kExpectedForPullDown =
static_cast<uint8_t>(PinInterface::Mode::kPullDown) << kModePosition;
constexpr uint32_t kExpectedForPullUp =
static_cast<uint8_t>(PinInterface::Mode::kPullUp) << kModePosition;
constexpr uint32_t kExpectedForRepeater =
static_cast<uint8_t>(PinInterface::Mode::kRepeater) << kModePosition;
test_subject00.SetMode(PinInterface::Mode::kInactive);
test_subject25.SetMode(PinInterface::Mode::kInactive);
CHECK(kExpectedForInactive == (local_iocon.P0_0 & kMask));
CHECK(kExpectedForInactive == (local_iocon.P2_5 & kMask));
test_subject00.SetMode(PinInterface::Mode::kPullDown);
test_subject25.SetMode(PinInterface::Mode::kPullDown);
CHECK(kExpectedForPullDown == (local_iocon.P0_0 & kMask));
CHECK(kExpectedForPullDown == (local_iocon.P2_5 & kMask));
test_subject00.SetMode(PinInterface::Mode::kPullUp);
test_subject25.SetMode(PinInterface::Mode::kPullUp);
CHECK(kExpectedForPullUp == (local_iocon.P0_0 & kMask));
CHECK(kExpectedForPullUp == (local_iocon.P2_5 & kMask));
test_subject00.SetMode(PinInterface::Mode::kRepeater);
test_subject25.SetMode(PinInterface::Mode::kRepeater);
CHECK(kExpectedForRepeater == (local_iocon.P0_0 & kMask));
CHECK(kExpectedForRepeater == (local_iocon.P2_5 & kMask));
}
SECTION("Set and clear Hysteresis modes")
{
// Source: "UM10562 LPC408x/407x User manual" table 83 page 132
constexpr uint8_t kHysteresisPosition = 5;
constexpr uint32_t kMask = 0b1 << kHysteresisPosition;
test_subject00.EnableHysteresis(true);
test_subject25.EnableHysteresis(false);
CHECK(kMask == (local_iocon.P0_0 & kMask));
CHECK(0 == (local_iocon.P2_5 & kMask));
test_subject00.EnableHysteresis(false);
test_subject25.EnableHysteresis(true);
CHECK(0 == (local_iocon.P0_0 & kMask));
CHECK(kMask == (local_iocon.P2_5 & kMask));
}
SECTION("Set and clear Active level")
{
// Source: "UM10562 LPC408x/407x User manual" table 83 page 132
constexpr uint8_t kInvertPosition = 6;
constexpr uint32_t kMask = 0b1 << kInvertPosition;
test_subject00.SetAsActiveLow(true);
test_subject25.SetAsActiveLow(false);
CHECK(kMask == (local_iocon.P0_0 & kMask));
CHECK(0 == (local_iocon.P2_5 & kMask));
test_subject00.SetAsActiveLow(false);
test_subject25.SetAsActiveLow(true);
CHECK(0 == (local_iocon.P0_0 & kMask));
CHECK(kMask == (local_iocon.P2_5 & kMask));
}
SECTION("Set and Clear Analog Mode")
{
// Source: "UM10562 LPC408x/407x User manual" table 83 page 132
constexpr uint8_t kAdMode = 7;
constexpr uint32_t kMask = 0b1 << kAdMode;
test_subject00.SetAsAnalogMode(true);
test_subject25.SetAsAnalogMode(false);
// Digital filter is set with zero
CHECK(0 == (local_iocon.P0_0 & kMask));
CHECK(kMask == (local_iocon.P2_5 & kMask));
test_subject00.SetAsAnalogMode(false);
test_subject25.SetAsAnalogMode(true);
CHECK(kMask == (local_iocon.P0_0 & kMask));
CHECK(0 == (local_iocon.P2_5 & kMask));
}
SECTION("Enable and Disable Digital Filter")
{
// Source: "UM10562 LPC408x/407x User manual" table 83 page 132
constexpr uint8_t kDigitalFilter = 8;
constexpr uint32_t kMask = 0b1 << kDigitalFilter;
test_subject00.EnableDigitalFilter(true);
test_subject25.EnableDigitalFilter(false);
// Digital filter is set with zero
CHECK(0 == (local_iocon.P0_0 & kMask));
CHECK(kMask == (local_iocon.P2_5 & kMask));
test_subject00.EnableDigitalFilter(false);
test_subject25.EnableDigitalFilter(true);
CHECK(kMask == (local_iocon.P0_0 & kMask));
CHECK(0 == (local_iocon.P2_5 & kMask));
}
SECTION("Fast Mode Set")
{
// Source: "UM10562 LPC408x/407x User manual" table 83 page 132
constexpr uint8_t kSlewPosition = 9;
constexpr uint32_t kMask = 0b1 << kSlewPosition;
test_subject00.EnableFastMode(true);
test_subject25.EnableFastMode(false);
CHECK(kMask == (local_iocon.P0_0 & kMask));
CHECK(0 == (local_iocon.P2_5 & kMask));
test_subject00.EnableFastMode(false);
test_subject25.EnableFastMode(true);
CHECK(0 == (local_iocon.P0_0 & kMask));
CHECK(kMask == (local_iocon.P2_5 & kMask));
}
SECTION("Enable and Disable I2c High Speed Mode")
{
// Source: "UM10562 LPC408x/407x User manual" table 89 page 141
constexpr uint8_t kI2cHighSpeedMode = 8;
constexpr uint32_t kMask = 0b1 << kI2cHighSpeedMode;
test_subject00.EnableI2cHighSpeedMode(true);
test_subject25.EnableI2cHighSpeedMode(false);
// I2C Highspeed is set with zero
CHECK(0 == (local_iocon.P0_0 & kMask));
CHECK(kMask == (local_iocon.P2_5 & kMask));
test_subject00.EnableI2cHighSpeedMode(false);
test_subject25.EnableI2cHighSpeedMode(true);
CHECK(kMask == (local_iocon.P0_0 & kMask));
CHECK(0 == (local_iocon.P2_5 & kMask));
}
SECTION("Enable and disable high current drive")
{
// Source: "UM10562 LPC408x/407x User manual" table 89 page 141
constexpr uint8_t kHighCurrentDrive = 9;
constexpr uint32_t kMask = 0b1 << kHighCurrentDrive;
test_subject00.EnableI2cHighCurrentDrive(true);
test_subject25.EnableI2cHighCurrentDrive(false);
CHECK(kMask == (local_iocon.P0_0 & kMask));
CHECK(0 == (local_iocon.P2_5 & kMask));
test_subject00.EnableI2cHighCurrentDrive(false);
test_subject25.EnableI2cHighCurrentDrive(true);
CHECK(0 == (local_iocon.P0_0 & kMask));
CHECK(kMask == (local_iocon.P2_5 & kMask));
}
SECTION("Open Drain")
{
// Source: "UM10562 LPC408x/407x User manual" table 83 page 132
constexpr uint8_t kOpenDrainPosition = 10;
constexpr uint32_t kMask = 0b1 << kOpenDrainPosition;
test_subject00.SetAsOpenDrain(true);
test_subject25.SetAsOpenDrain(false);
CHECK(kMask == (local_iocon.P0_0 & kMask));
CHECK(0 == (local_iocon.P2_5 & kMask));
test_subject00.SetAsOpenDrain(false);
test_subject25.SetAsOpenDrain(true);
CHECK(0 == (local_iocon.P0_0 & kMask));
CHECK(kMask == (local_iocon.P2_5 & kMask));
}
SECTION("Enable Dac")
{
// Source: "UM10562 LPC408x/407x User manual" table 85 page 138
constexpr uint8_t kDac = 16;
constexpr uint32_t kMask = 0b1 << kDac;
test_subject00.EnableDac(true);
test_subject25.EnableDac(false);
CHECK(kMask == (local_iocon.P0_0 & kMask));
CHECK(0 == (local_iocon.P2_5 & kMask));
test_subject00.EnableDac(false);
test_subject25.EnableDac(true);
CHECK(0 == (local_iocon.P0_0 & kMask));
CHECK(kMask == (local_iocon.P2_5 & kMask));
}
Pin::pin_map = reinterpret_cast<Pin::PinMap_t *>(LPC_IOCON);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.