bottom:0;right:0;width:50%;height:50%;overflow:auto;margin:auto;z-index:102;overflow:auto;background-color:#f5f5f7;border:1px solid black;border-radius:0.5em;box-shadow:0 12px 30px rgba(0,0,0,0.6)}div.dtr-modal div.dtr-modal-content{position:relative;padding:1em}div.dtr-modal div.dtr-modal-close{position:absolute;top:6px;right:6px;width:22px;height:22px;border:1px solid #eaeaea;background-color:#f9f9f9;text-align:center;border-radius:3px;cursor:pointer;z-index:12}div.dtr-modal div.dtr-modal-close:hover{background-color:#eaeaea}div.dtr-modal div.dtr-modal-background{position:fixed;top:0;left:0;right:0;bottom:0;z-index:101;background:rgba(0,0,0,0.6)}@media screen and (max-width: 767px){div.dtr-modal div.dtr-modal-display{width:95%}}

table.dt-rowReorder-float{position:absolute !important;opacity:0.8;table-layout:static;outline:2px solid #888;outline-offset:-2px;z-index:2001}tr.dt-rowReorder-moving{outline:2px solid #555;outline-offset:-2px}body.dt-rowReorder-noOverflow{overflow-x:hidden}table.dataTable td.reorder{text-align:center;cursor:move}

div.DTS{display:block !important}div.DTS tbody th,div.DTS tbody td{white-space:nowrap}div.DTS div.DTS_Loading{z-index:1}div.DTS div.dataTables_scrollBody{background:repeating-linear-gradient(45deg, #edeeff, #edeeff 10px, #fff 10px, #fff 20px)}div.DTS div.dataTables_scrollBody table{z-index:2}div.DTS div.dataTables_paginate,div.DTS div.dataTables_length{display:none}

.fixed-table-container .bs-checkbox,.fixed-table-container .no-records-found{text-align:center}.fixed-table-body thead th .th-inner,.table td,.table th{box-sizing:border-box}.bootstrap-table .table{margin-bottom:0!important;border-bottom:1px solid #ddd;border-collapse:collapse!important;border-radius:1px}.bootstrap-table .table:not(.table-condensed),.bootstrap-table .table:not(.table-condensed)>tbody>tr>td,.bootstrap-table .table:not(.table-condensed)>tbody>tr>th,.bootstrap-table .table:not(.table-condensed)>tfoot>tr>td,.bootstrap-table .table:not(.table-condensed)>tfoot>tr>th,.bootstrap-table .table:not(.table-condensed)>thead>tr>td{padding:8px!important}.bootstrap-table .table.table-no-bordered>tbody>tr>td,.bootstrap-table .table.table-no-bordered>thead>tr>th{border-right:2px solid transparent}.fixed-table-container{position:relative;clear:both;border:1px solid #ddd;border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.fixed-table-container.table-no-bordered{border:1px solid transparent}.fixed-table-footer,.fixed-table-header{overflow:hidden}.fixed-table-footer{


c License for more details.
 *
 *   You should have received a copy of the GNU Lesser General Public
 *   License along with this library; if not, write to the Free Software
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 *   USA, or see <http://www.gnu.org/licenses/>.
 */
package org.granite.test.tide.hibernate4.data;

import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.granite.test.tide.data.Country;
import org.hibernate.annotations.Filter;
import org.hibernate.annotations.SQLDelete;

/**
 * @author Franck WOLFF
 */
@Entity
@Table(name="addresssoftdelete")
@Filter(name="filterSoftDelete", condition="deleted = 0")
@SQLDelete(sql="update addresssoftdelete set deleted = 1 where id = ? and version = ?")
public class AddressSoftDelete extends AbstractEntitySoftDelete {

    private static final long serialVersionUID = 1L;

    public AddressSoftDelete() {
    }

    public AddressSoftDelete(Long id, Long version, String uid) {
    	super(id, version, uid);
    }

    @Basic
    private String address1;
    @Basic
    private String address2;
    @Basic
    private String zipcode;
    @Basic
    private String city;

    @ManyToOne(cascade=CascadeType.ALL)
    private Country country;

    public String getAddress1() {
        return address1;
    }
    public void setAddress1(String address1) {
        this.address1 = address1;
    }

    public String getAddress2() {
        return address2;
    }
    public void setAddress2(String address2) {
        this.address2 = address2;
    }

    public String getCity() {
        return city;
    }
    public void setCity(String city) {
        this.city = city;
    }

    public String getZipcode() {
        return zipcode;
    }
    public void setZipcode(String zipcode) {
        this.zipcode = zipcode;
    }

    public Country getCountry() {
        return country;
    }
    public void setCountry(Country country) {
        this.country = country;
    }
}
/**
 *   GRANITE DATA SERVICES
 *   Copyright (C) 2006-2015 GRANITE DATA SERVICES S.A.S.
 *
 *   This file is part of the Granite Data Services Platform.
 *
 *   Granite Data Services is free software; you can redistribute it and/or
 *   modify it under the terms of the GNU Lesser General Public
 *   License as published by the Free Software Foundation; either
 *   version 2.1 of the License, or (at your option) any later version.
 *
 *   Granite Data Services is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
 *   General Public License for more details.
 *
 *   You should have received a copy of the GNU Lesser General Public
 *   License along with this library; if not, write to the Free Software
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 *   USA, or see <http://www.gnu.org/licenses/>.
 */
package org.granite.test.tide.hibernate4.data;

import java.io.Serializable;
import java.lang.reflect.Method;

import org.granite.test.tide.data.AbstractEntity0;
import org.granite.test.tide.data.Alias5;
import org.granite.test.tide.data.Contact5;
import org.granite.test.tide.data.LineItem;
import org.granite.test.tide.data.Location5;
import org.granite.test.tide.data.Order3;
import org.granite.tide.hibernate4.Hibernate4Integrator;
import org.hibernate.Criteria;


[pointer + 1][1].length) + diffs[pointer + 1][1];\n                diffs.splice(pointer + 1, 1);\n                changes = true;\n              }\n            }\n            pointer++;\n          }\n          // If shifts were made, the diff needs reordering and another shift sweep.\n          if (changes) {\n            this.diff_cleanupMerge(diffs);\n          }\n        };\n\n        /**\n         * loc is a location in text1, compute and return the equivalent location in\n         * text2.\n         * e.g. 'The cat' vs 'The big cat', 1->1, 5->8\n         * @param {!Array.<!diff_match_patch.Diff>} diffs Array of diff tuples.\n         * @param {number} loc Location within text1.\n         * @return {number} Location within text2.\n         */\n        diff_match_patch.prototype.diff_xIndex = function (diffs, loc) {\n          var chars1 = 0;\n          var chars2 = 0;\n          var last_chars1 = 0;\n          var last_chars2 = 0;\n          var x;\n          for (x = 0; x < diffs.length; x++) {\n            if (diffs[x][0] !== DIFF_INSERT) {\n              // Equality or deletion.\n              chars1 += diffs[x][1].length;\n            }\n            if (diffs[x][0] !== DIFF_DELETE) {\n              // Equality or insertion.\n              chars2 += diffs[x][1].length;\n            }\n            if (chars1 > loc) {\n              // Overshot the location.\n              break;\n            }\n            last_chars1 = chars1;\n            last_chars2 = chars2;\n          }\n          // Was the location was deleted?\n          if (diffs.length != x && diffs[x][0] === DIFF_DELETE) {\n            return last_chars2;\n          }\n          // Add the remaining character length.\n          return last_chars2 + (loc - last_chars1);\n        };\n\n        /**\n         * Convert a diff array into a pretty HTML report.\n         * @param {!Array.<!diff_match_patch.Diff>} diffs Array of diff tuples.\n         * @return {string} HTML representation.\n         */\n        diff_match_patch.prototype.diff_prettyHtml = function (diffs) {\n          var html = [];\n          var pattern_amp = /&/g;\n          var pattern_lt = /</g;\n          var pattern_gt = />/g;\n          var pattern_para = /\\n/g;\n          for (var x = 0; x < diffs.length; x++) {\n            var op = diffs[x][0]; // Operation (insert, delete, equal)\n            var data = diffs[x][1]; // Text of change.\n            var text = data.replace(pattern_amp, '&').replace(pattern_lt, '<').replace(pattern_gt, '>').replace(pattern_para, '¶
');\n            switch (op) {\n              case DIFF_INSERT:\n                html[x] = '' + text + '';\n                break;\n              case DIFF_DELETE:\n                html[x] = '' + text + '';\n                break;\n              case DIFF_EQUAL:\n                html[x] = '' + text + '';\n                break;\n            }\n          }\n          return html.join('');\n        };\n\n        /**\n         * Compute and return the source text (all equalities and deletions).\n         * @param {!Array.<!diff_match_patch.Diff>} diffs Array of diff tuples.\n         * @return {string} Source text.\n         */\n        diff_match_patch.prototype.diff_text1 = function (diffs) {\n          var text = [];\n          for (var x = 0; x < diffs.length; x++) {\n            if (diffs[x][0] !== DIFF_INSERT) {\n              text[x] = diffs[x][1];\n


to.Optional[field] = value
		}
		seen[field] = true
	}

	return to, convertError
}

// Bib returns a string with all the information of the entry
// in BibLaTex format.
func (e *Entry) Bib() string {
	bib := new(strings.Builder)

	// @type{key,
	fmt.Fprintf(bib, "@%s{%s", e.Type, e.GetKey())

	// field = {value},
	fields := make([]string, len(e.Required))
	i := 0
	for field := range e.Required {
		fields[i] = field
		i++
	}
	sort.Strings(fields)
	for _, field := range fields {
		if value := e.Required[field]; value != "" {
			fmt.Fprintf(bib, ",\n  %s = {%s}", field, value)
		}
	}

	fields = make([]string, len(e.Optional))
	i = 0
	for field := range e.Optional {
		fields[i] = field
		i++
	}
	sort.Strings(fields)
	for _, field := range fields {
		if value := e.Optional[field]; value != "" && field != "abstract" {
			fmt.Fprintf(bib, ",\n  %s = {%s}", field, value)
		}
	}
	if value, ok := e.Optional["abstract"]; ok {
		fmt.Fprintf(bib, ",\n  %s = {%s}", "abstract", value)
	}
	if file := e.File; file != "" {
		fmt.Fprintf(bib, ",\n  %s = {%s}", "file", file)
	}

	bib.WriteString("\n}")

	return bib.String()
}

// Export returns a string with all the information of the entry in the given
// format.
func (e *Entry) Export(format string) string {
	ex := getExporter(format)

	return ex.export(e)
}

const bibTemplate = `@[[ .Type ]]{[[ .GetKey ]]
[[- range $field, $value := .Required -]]
  [[ if $value -]]
    [[ ",\n  " ]][[ $field ]] = {[[ $value ]]}
  [[- end ]]
[[- end ]]

[[- range $field, $value := .Optional -]]
  [[ if $value -]]
    [[ ",\n  " ]][[ $field ]] = {[[ $value ]]}
  [[- end ]]
[[- end ]]
}`

var tmpl = template.Must(
	template.New("biblatex").
		Delims("[[", "]]").
		Parse(bibTemplate),
)

// bibT returns a string with all the information of the entry
// in BibLaTex format using a text template.
//
// Currently testing performance.
func (e *Entry) bibT() string {
	bib := new(strings.Builder)

	err := tmpl.Execute(bib, e)
	if err != nil {
		panic(err)
	}

	return bib.String()
}
package spotify

import (
	"fmt"
	"io/ioutil"
	"net/url"
	"os"
	"os/exec"
	"path/filepath"
	"runtime"
	"song-recognition/db"
	"strings"
)

func EncodeParam(s string) string {
	return url.QueryEscape(s)
}

func ToLowerCase(s string) string {
	var result string
	for _, char := range s {
		if char >= 'A' && char <= 'Z' {
			result += string(char + 32)
		} else {
			result += string(char)
		}
	}

	return result
}

func GetFileSize(file string) (int64, error) {
	fileInfo, err := os.Stat(file)
	if err != nil {
		return 0, err
	}

	size := int64(fileInfo.Size())
	return size, nil
}

func SongKeyExists(key string) (bool, error) {
	db, err := db.NewDBClient()
	if err != nil {
		return false, err
	}
	defer db.Close()

	_, son


// Copyright 2021 Google LLC
//
// 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
//
//     https://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 PLATFORM_IMPL_WINDOWS_MUTEX_H_
#define PLATFORM_IMPL_WINDOWS_MUTEX_H_
#include <stdio.h>

#include <mutex>  //  NOLINT

#include "absl/synchronization/mutex.h"
#include "internal/platform/implementation/mutex.h"

namespace nearby {
namespace windows {

// A lock is a tool for controlling access to a shared resource by multiple
// threads.
// https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/Lock.html
class ABSL_LOCKABLE Mutex : public api::Mutex {
 public:
  explicit Mutex(Mode mode) : mode_(mode) {}
  ~Mutex() override = default;
  Mutex(Mutex&&) = delete;
  Mutex& operator=(Mutex&&) = delete;
  Mutex(const Mutex&) = delete;
  Mutex& operator=(const Mutex&) = delete;

  void Lock() ABSL_EXCLUSIVE_LOCK_FUNCTION() override {
    if (mode_ == Mode::kRegularNoCheck) mutex_.ForgetDeadlockInfo();
    if (mode_ == Mode::kRegular || mode_ == Mode::kRegularNoCheck) {
      mutex_.Lock();
    } else {
      recursive_mutex_.lock();
    }
  }

  void Unlock() ABSL_UNLOCK_FUNCTION() override {
    if (mode_ == Mode::kRegular || mode_ == Mode::kRegularNoCheck) {
      mutex_.Unlock();
    } else {
      recursive_mutex_.unlock();
    }
  }

  absl::Mutex& GetMutex() { return mutex_; }
  std::recursive_mutex& GetRecursiveMutex() { return recursive_mutex_; }

 private:
  friend class ::nearby::ConditionVariable;
  absl::Mutex mutex_;
  std::recursive_mutex recursive_mutex_;  //  The actual mutex allocation
  Mode mode_;
};

}  // namespace windows
}  // namespace nearby

#endif  // PLATFORM_IMPL_WINDOWS_MUTEX_H_


0
 * (the "License"); you may not use this file except in compliance with
 * he 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.dromara.jinx.container;

import com.google.common.base.StandardSystemProperty;
import org.dromara.jinx.config.NettyContainerConfig;
import org.dromara.jinx.context.NettyEmbeddedContext;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.epoll.EpollChannelOption;
import io.netty.channel.epoll.EpollEventLoopGroup;
import io.netty.channel.epoll.EpollServerSocketChannel;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.handler.ssl.SslContext;
import io.netty.handler.ssl.SslContextBuilder;
import io.netty.util.concurrent.DefaultEventExecutorGroup;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.boot.context.embedded.EmbeddedServletContainer;
import org.springframework.boot.context.embedded.EmbeddedServletContainerException;

import javax.net.ssl.KeyManagerFactory;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.security.KeyStore;

/**
 * @author xiaoyu
 */
public class NettyEmbeddedServletContainer implements EmbeddedServletContainer {

    private final Log logger = LogFactory.getLog(getClass());
    private final NettyEmbeddedContext context;
    private EventLoopGroup bossGroup;
    private EventLoopGroup workerGroup;
    private DefaultEventExecutorGroup servletExecutor;

    private NettyContainerConfig nettyContainerConfig;

    public NettyEmbeddedServletContainer(NettyContainerConfig nettyContainerConfig, NettyEmbeddedContext context) {
        this.nettyContainerConfig = nettyContainerConfig;
        this.context = context;
    }

    @Override
    public void start() throws EmbeddedServletContainerException {
        SslContext sslcontext = null;
        if (nettyContainerConfig.isSsl()) {//如果启用https访问方式
            KeyManagerFactory kmf;
            InputStream in = null;

            try {
                KeyStore ks = KeyStore.getInstance("JKS");
                in = new FileInputStream(nettyContainerConfig.getCaPath());
                ks.load(in, nettyContainerConfig.getCaPassWord().toCharArray());
                kmf = KeyManagerFactory.getInstance("SunX509");
                kmf.init(ks, nettyContainerConfig.getCaPassWord().toCharArray());
                sslcontext = SslContextBuilder.forServer(kmf).build();
            } catch (Exception e) {
                e.printStackTrace();
                System.exit(0);
            } finally {
                if (in != null) {
                    try {
                        in.close();
                    } catch (IOException e1) {

                    }
                }
            }
        }
        ServerBootstrap serverBootstrap = new ServerBootstrap();
        groups(serverBootstrap);
        servletExecutor = new DefaultEventExecutorGroup(nettyContainerConfig.getMaxThreads() * 2);
        serverBootstrap.childHandler(new NettyEmbeddedServletInitializer(servletExecutor, context,sslcontext));

        // Don't yet need the complexity of lifecycle state, listener


component.screen.pager.CustomTabRow
import com.hfut.schedule.ui.screen.AppNavRoute
import com.hfut.schedule.ui.style.special.backDropSource
import com.hfut.schedule.ui.style.special.bottomBarBlur
import com.hfut.schedule.ui.style.special.topBarBlur
import com.hfut.schedule.ui.util.AppAnimationManager
import com.hfut.schedule.ui.util.navigateForTransition
import com.hfut.schedule.viewmodel.network.NetWorkViewModel
import com.kyant.backdrop.backdrops.rememberLayerBackdrop
import com.xah.transition.component.containerShare
import com.xah.transition.component.iconElementShare
import com.xah.transition.state.LocalAnimatedContentScope
import com.xah.transition.state.LocalSharedTransitionScope
import com.xah.uicommon.component.text.ScrollText
import com.xah.uicommon.style.APP_HORIZONTAL_DP
import com.xah.uicommon.style.color.topBarTransplantColor
import dev.chrisbanes.haze.hazeSource
import dev.chrisbanes.haze.rememberHazeState
import kotlinx.coroutines.launch

@OptIn(ExperimentalMaterial3Api::class, ExperimentalSharedTransitionApi::class)
@Composable
fun Program(
    ifSaved : Boolean,
    navController : NavHostController,
) {
    val iconRoute = remember { AppNavRoute.ProgramSearch.receiveRoute() }
    val route = remember { AppNavRoute.Program.receiveRoute() }
    val context = LocalContext.current
    val scope = rememberCoroutineScope()

    TransplantListItem(
        headlineContent = { ScrollText(text = AppNavRoute.Program.label) },
        leadingContent = {
            Icon(painterResource(AppNavRoute.Program.icon), contentDescription = null,modifier = Modifier.iconElementShare( route = route))
        },
        trailingContent = {
            FilledTonalIconButton(
                onClick = {
                    navController.navigateForTransition(AppNavRoute.ProgramSearch,AppNavRoute.ProgramSearch.withArgs(ifSaved))
                },
                modifier = Modifier.size(30.dp).containerShare(iconRoute)
            ) {
                Icon(painterResource(R.drawable.search),null, modifier = Modifier.size(20.dp))
            }
        },
        modifier = Modifier.clickable {
            scope.launch {
                val json = FileDataManager.read(context,FileDataManager.PROGRAM)

                if (json?.contains("children") == true || !ifSaved) {
                    navController.navigateForTransition(AppNavRoute.Program,AppNavRoute.Program.withArgs(ifSaved))
                }
                else refreshLogin(context)
            }
        }
    )
}

private const val PAGE_COMPETITION = 0
private const val PAGE_PROGRAM = 1
@OptIn(ExperimentalSharedTransitionApi::class, ExperimentalMaterial3Api::class,
    ExperimentalMaterial3ExpressiveApi::class
)
@Composable
fun ProgramScreen(
    vm: NetWorkViewModel,
    ifSaved: Boolean,
    navController : NavHostController,
) {
    val blur by DataStoreManager.enableHazeBlur.collectAsState(initial = HazeBlurLevel.MID.code)
    val hazeState = rememberHazeState(blurEnabled = blur >= HazeBlurLevel.MID.code)
    val route = remember { AppNavRoute.Program.receiveRoute() }
    val titles = remember { listOf("完成情况","教学计划") }
    val pageState = rememberPagerState(
        initialPage = if(prefs.getString("PROGRAM_COMPETITION","") != null) PAGE_COMPETITION else PAGE_PROGRAM
    ) { titles.size }
    val competitionRoute = remember { AppNavRoute.ProgramCompetition.receiveRoute() }
    val scrollBehavior = TopAppBarDefaults.enterAlwaysScrollBehavior()
    val context = LocalContext.current
    val backDrop = rememberLayerBackdrop()
    val scope = rememberCoroutineScope()
    CustomTransitionScaffold (
        modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection),
        roundShape = MaterialTheme.shapes.extraExtraLarge,
        route = route,
        navHostController = navController,
        bottomBar = {
            AnimatedVisibility(
                visible = pageState.currentPage == PAGE_COMPETITION,
                exit = AppAnimationManager.toBottomAnimation.exit,


    CostType *rightPassBuf;
    CostType *disp2CostBuf;
    short *disp2Buf;
private:
    utils::BufferArea area;
public:
    BufferSGBM3Way(int width1, int width, int num_ch, int Da, int SH2, int P2) :
        curCostVolumeLine(0),
        hsumBuf(0),
        pixDiff(0),
        tmpBuf(0),
        horPassCostVolume(0),
        vertPassCostVolume(0),
        vertPassMin(0),
        rightPassBuf(0),
        disp2CostBuf(0),
        disp2Buf(0)
    {
        hsumCols = width1 * Da;
        hsumRows = SH2*2 + 2;
        area.allocate(curCostVolumeLine, hsumCols, CV_SIMD_WIDTH);
        area.allocate(hsumBuf, hsumCols * hsumRows, CV_SIMD_WIDTH);
        area.allocate(pixDiff,hsumCols, CV_SIMD_WIDTH);
        area.allocate(tmpBuf, width * (4 * num_ch + 2), CV_SIMD_WIDTH);
        area.allocate(horPassCostVolume, (width1 + 2) * Da, CV_SIMD_WIDTH);
        area.allocate(vertPassCostVolume, (width1 + 2) * Da, CV_SIMD_WIDTH);
        area.allocate(vertPassMin, width1 + 2, CV_SIMD_WIDTH);
        area.allocate(rightPassBuf, Da, CV_SIMD_WIDTH);
        area.allocate(disp2CostBuf, width, CV_SIMD_WIDTH);
        area.allocate(disp2Buf, width, CV_SIMD_WIDTH);
        area.commit();
        area.zeroFill();
        for(size_t i = 0; i < hsumCols; i++)
            curCostVolumeLine[i] = (CostType)P2;
    }
    inline void clearRightPassBuf()
    {
        area.zeroFill(rightPassBuf);
    }
    CostType *getHSumBuf(int x) const
    {
        return hsumBuf + (x % hsumRows) * hsumCols;
    }
};

struct SGBM3WayMainLoop : public ParallelLoopBody
{
    const Mat *img1, *img2;
    Mat* dst_disp;

    int stripe_sz;
    int stripe_overlap;

    int width,height;
    int minD, maxD, D, Da;
    int minX1, maxX1, width1;

    int SW2, SH2;
    int P1, P2;
    int uniquenessRatio, disp12MaxDiff;

    int TAB_OFS;

    utils::BufferArea aux_area;
    PixType* clipTab;
#if CV_SIMD
    short idx_row[v_int16::nlanes];
#endif
    SGBM3WayMainLoop(const Mat& _img1, const Mat& _img2, Mat* _dst_disp, const StereoSGBMParams& params, int stripe_size, int _stripe_overlap);
    void operator () (const Range& range) const CV_OVERRIDE;
    template<bool x_nlanes> void impl(const Range& range) const;

private:
    void getRawMatchingCost(const BufferSGBM3Way &mem, int y, int src_start_idx) const;

    template<bool x_nlanes>
    void accumulateCostsLeftTop(const BufferSGBM3Way &mem,
                                int x,
                                CostType &leftMinCost) const;

    template<bool x_nlanes>
    void accumulateCostsRight(const BufferSGBM3Way &mem,
                              int x,
                              CostType &rightMinCost,
                              short &optimal_disp,
                              CostType &min_cost) const;
};

SGBM3WayMainLoop::SGBM3WayMainLoop(const Mat& _img1,


/*
 * MapFeaturesH3M.h, part of VCMI engine
 *
 * Authors: listed in file AUTHORS in main folder
 *
 * License: GNU General Public License v2.0 or later
 * Full text of license available in license.txt file, in main folder
 *
 */

#pragma once

VCMI_LIB_NAMESPACE_BEGIN

enum class EMapFormat : uint8_t;

struct MapFormatFeaturesH3M
{
private:
	static MapFormatFeaturesH3M getFeaturesROE();
	static MapFormatFeaturesH3M getFeaturesAB();
	static MapFormatFeaturesH3M getFeaturesSOD();
	static MapFormatFeaturesH3M getFeaturesCHR();
	static MapFormatFeaturesH3M getFeaturesWOG();
	static MapFormatFeaturesH3M getFeaturesHOTA(uint32_t hotaVersion);

public:
	MapFormatFeaturesH3M() = default;

	static MapFormatFeaturesH3M find(EMapFormat format, uint32_t hotaVersion);

	// number of bytes in bitmask of appropriate type

	int factionsBytes;
	int heroesBytes;
	int artifactsBytes;
	int resourcesBytes;
	int skillsBytes;
	int spellsBytes;
	int buildingsBytes;

	// total number of elements of appropriate type

	int factionsCount;
	int heroesCount;
	int heroesPortraitsCount;
	int artifactsCount;
	int resourcesCount;
	int creaturesCount;
	int spellsCount;
	int skillsCount;
	int terrainsCount;
	int roadsCount;
	int riversCount;
	int artifactSlotsCount;
	int buildingsCount;

	// identifier that should be treated as "invalid", usually - '-1'

	int heroIdentifierInvalid;
	int artifactIdentifierInvalid;
	int creatureIdentifierInvalid;
	int spellIdentifierInvalid;

	// features from which map format are available

	bool levelROE = false;
	bool levelAB = false;
	bool levelSOD = false;
	bool levelCHR = false;
	bool levelWOG = false;
	bool levelHOTA0 = false;
	bool levelHOTA1 = false;
	bool levelHOTA2 = false;
	bool levelHOTA3 = false; // 1.6.0
	// level 4 - not released publicly?
	bool levelHOTA5 = false; // 1.7.0
	bool levelHOTA6 = false; // 1.7.1
	bool levelHOTA7 = false; // 1.7.2
	bool levelHOTA8 = false; // 1.7.3
};

VCMI_LIB_NAMESPACE_END


 This will make the review process faster and clearer.

## Feedback, Issues, Pull Requests

The GitHub [track repository][github] is the home for all of the Rust exercises. If you have feedback about an exercise, or want to help implement new exercises, head over there and create an issue. Members of the rust track team are happy to help!

If you want to know more about Exercism, take a look at the [contribution guide].

## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.

[help-page]: https://exercism.org/tracks/rust/learning
[github]: https://github.com/exercism/rust
[contribution guide]: https://exercism.org/docs/community/contributors# Bob

Welcome to Bob on Exercism's Rust Track.
If you need help running the tests or submitting your code, check out `HELP.md`.

## Introduction

Bob is a [lackadaisical][] teenager.
He likes to think that he's very cool.
And he definitely doesn't get excited about things.
That wouldn't be cool.

When people talk to him, his responses are pretty limited.

[lackadaisical]: https://www.collinsdictionary.com/dictionary/english/lackadaisical

## Instructions

Your task is to determine what Bob will reply to someone when they say something to him or ask him a question.

Bob only ever answers one of five things:

- **"Sure."**
  This is his response if you ask him a question, such as "How are you?"
  The convention used for questions is that it ends with a question mark.
- **"Whoa, chill out!"**
  This is his answer if you YELL AT HIM.
  The convention used for yelling is ALL CAPITAL LETTERS.
- **"Calm down, I know what I'm doing!"**
  This is what he says if you yell a question at him.
- **"Fine. Be that way!"**
  This is how he responds to silence.
  The convention used for silence is nothing, or various combinations of whitespace characters.
- **"Whatever."**
  This is what he answers to anything else.

## Source

### Created by

- @EduardoBautista

### Contributed to by

- @andrewclarkson
- @ashleygwilliams
- @austinlyons
- @cjmochrie
- @cmccandless
- @coriolinus
- @cwhakes
- @EduardoBautista
- @efx
- @ErikSchierboom
- @etrepum
- @f3rn0s
- @IanWhitney
- @kytrinyx
- @leoyvens
- @lewisclement
- @lutostag
- @mkantor
- @nfiles
- @petertseng
- @pminten
- @rofrol
- @rpottsoh
- @stefanv
- @stringparser
- @vvv
- @xakon
- @ZapAnton

### Based on

Inspired by the 'Deaf Grandma' exercise in Chris Pine's Learn to Program tutorial. - https://pine.fm/LearnToProgram/?Chapter=06# Armstrong Numbers

Welcome to Armstrong Numbers on Exercism's Rust Track.
If you need help running the tests or submitting your code, check out `HELP.md`.

## Instructions

An [Armstrong number][armstrong-number] is a number that is the sum of its own digits each raised to the power of the number of digits.

For example:

- 9 is an Armstrong number, because `9 = 9^1 = 9`
- 10 is _not_ an Armstrong number, because `10 != 1^2 + 0^2 = 1`
- 153 is an Armstrong number, because: `153 = 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153`
- 154 is _not_ an Armstrong number, because: `154 != 1^3 + 5^3 + 4^3 = 1 + 125 + 64 = 190`

Write some code to determine whether a number is an Armstrong number.

[armstrong-number]: https://en.wikipedia.org/wiki/Narcissistic_


ide_max_pages("__GLOBAL__", stage_info, self.articles_per_page)
            if adaptive_est_pages:
                self.logger.info(f"🧠 自适应估算 max_pages = {adaptive_est_pages} (全局配置 {self.max_pages})")
        else:
            self.logger.info("🧩 分段回填未启用或已完成，使用常规 days_back 窗口")
            if self.crawler_config.get('adaptive_max_pages_enabled'):
                try:
                    synthetic_stage = BackfillStageInfo(0, self.days_back, 1, 1)
                    adaptive_est_pages = backfill_mgr.decide_max_pages("__GLOBAL__", synthetic_stage, self.articles_per_page)
                    if adaptive_est_pages:
                        self.logger.info(f"🧠 非分段模式自适应估算 max_pages = {adaptive_est_pages} (全局配置 {self.max_pages})")
                except Exception as e:
                    self.logger.warning(f"⚠ 非分段自适应估算失败: {e}")

        # 获取所有目标公众号
        all_targets = self._get_all_target_urls_from_excel()
        if not all_targets:
            self.logger.error("❌ 未找到任何有效的公众号链接，流程中止。")
            return False

        self.logger.info(f"📋 共找到 {len(all_targets)} 个公众号，开始逐个处理...")

        # 用于存储所有公众号的抓取结果
        all_results = []
        successful_count = 0
        failed_count = 0

        try:
            for i, target in enumerate(all_targets, 1):
                self.logger.info("="*60)
                self.logger.info(f"📍 处理第 {i}/{len(all_targets)} 个公众号: {target['name']}")
                self.logger.info("="*60)

                # 为每个公众号创建独立的Cookie抓取器
                cookie_reader = None
                try:
                    # 步骤1: 为每个公众号创建独立的Cookie抓取器
                    self.logger.info(f"[步骤 1/5] 为 '{target['name']}' 创建独立的 Cookie 抓取器...")
                    cookie_reader = ReadCookie()  # 每个公众号独立创建，会删除旧文件

                    if not cookie_reader.start_cookie_extractor():
                        self.logger.error(f"❌ 公众号 '{target['name']}' Cookie 抓取器启动失败，跳过此公众号")
                        failed_count += 1
                        continue
                    self.logger.info("✅ Cookie 抓取器已在后台运行。")

                    # 步骤2: 运行 UI 自动化触发抓取
                    self.logger.info(f"[步骤 2/5] 为 '{target['name']}' 启动 UI 自动化...")
                    try:
                        ui_crawler = ExcelAutoCrawler()
                        # 直接传递当前公众号的URL，并传递cookie_reader以启用智能刷新停止
                        success = ui_crawler.automation.send_and_open_latest_link(target['url'], cookie_reader=cookie_reader)
                        if not success:
                            self.logger.error(f"❌ 公众号 '{target['name']}' UI 自动化触发失败，跳过此公众号")
                            cookie_reader.stop_cookie_extractor()
                            failed_count += 1
                            continue
                    except Exception as e:
                        self.logger.error(f"❌ 公众号 '{target['name']}' UI 自动化过程中发生错误: {e}")
                        cookie_reader.stop_cookie_extractor()
                        failed_count += 1
                        continue
                    self.logger.info("✅ UI 自动化已成功触发链接打开。")

                    # 步骤3: 等待并验证 Cookie
                    self.logger.info(f"[步骤 3/5] 等待 '{target['name']}' 的 Cookie 数据...")
                    if not cookie_reader.wait_for_new_cookie(timeout=self.cookie_wait_timeout):
                        self.logger.error(f"❌ 公众号 '{target['name']}' 等待 Cookie 超时，跳过此公众号")
                        cookie_reader.stop_cookie_extractor()
                        failed_count += 1
                        continue

                    # 验证cookie是否有效
                    auth_info = cookie_reader.get_latest_cookies()
                    if not auth_info:
                        self.logger.error(f"❌ 公众号 '{target['name']}' Cookie 解析失败")
                        self.logger.error("💡 可能的原因:")
                        self.logger.error("   1. mitmproxy 没有成功抓取到微信请求")
                        self.logger.error("   2. 微信内置浏览器没有正确打开链接")
                        self.logger.error("   3. 网络连接问题或代理设置问题")
                        self.logger.error("💡 建议:")
                        self.logger.error("   1. 检查微信是否正常打开了文章链接")
                        self.logger.error("   2. 手动在微信中刷新文章页面")
                        self.logger.error("   3. 确保网络连接正常")
                        cookie_reader.stop_cookie_extractor()
                        failed_count += 1
                        continue
                    self.logger.info("✅ 成功获取并验证了新的 Cookie。")

                    # 步骤4: 停止 mitmproxy 抓取器
                    self.


ne');
  }

  static void warnChanges(Store<AppState>? store) {
    window.onBeforeUnload.listen((Event e) {
      if (store!.state.hasChanges()) {
        (e as BeforeUnloadEvent).returnValue =
            'Changes you made may not be saved.';
      }
    });
  }

  static void microsoftLogin(
    Function(String, String) succesCallback,
    Function(dynamic) failureCallback,
  ) async {

    final store = StoreProvider.of<AppState>(navigatorKey.currentContext!);
    final state = store.state;

    String clientId = Config.MICROSOFT_CLIENT_ID;
    if (state.isSelfHosted) {
      clientId = WebUtils.getHtmlValue('microsoft-client-id') ?? '';
    }

    final config = Configuration()
      ..auth = (BrowserAuthOptions()
        ..redirectUri = cleanApiUrl(apiUrl)
        ..clientId = clientId);

    final publicClientApp = PublicClientApplication(config);
    final loginRequest = PopupRequest()..scopes = ['user.read'];

    publicClientApp.loginPopup(loginRequest).then((result) {
      succesCallback(
        result.idToken,
        result.accessToken,
      );
    }).catchError((dynamic error) {
      failureCallback(error);
    });
  }

/*
  String loadToken() {
    final cookies = document.cookie;
    final List<String> listValues =
        cookies.isNotEmpty ? cookies.split(';') : [];

    for (int i = 0; i < listValues.length; i++) {
      final cookie = listValues[i];
      final index = cookie.indexOf('=');
      final key = cookie.substring(0, index).trim();
      final value = cookie.substring(index + 1).trim();
      if (key == 'token') {
        return value;
      }
    }

    return null;
  }

  static void saveToken(String token) {
    document.cookie = 'token=$token; max-age=2592000; path=/;';
  }
   */
}
// Dart imports:
import 'dart:io';
import 'dart:io' as file;

// Flutter imports:
import 'package:device_info_plus/device_info_plus.dart';
import 'package:flutter/foundation.dart';

// Package imports:
import 'package:file_picker/file_picker.dart';
import 'package:flutter_redux/flutter_redux.dart';
import 'package:flutter_styled_toast/flutter_styled_toast.dart';
import 'package:http/http.dart';
import 'package:invoiceninja_flutter/constants.dart';
import 'package:invoiceninja_flutter/main_app.dart';
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
import 'package:invoiceninja_flutter/utils/dialogs.dart';
import 'package:invoiceninja_flutter/utils/localization.dart';
import 'package:path_provider/path_provider.dart';
import 'package:permission_handler/permission_handler.dart';

// Project imports:
import 'package:invoiceninja_flutter/utils/platforms.dart';

// ignore: unused_import
import 'package:invoiceninja_flutter/utils/web_stub.dart'
    if (dart.library.html) 'package:invoiceninja_flutter/utils/web.dart';
import 'package:share_plus/share_plus.dart';

Future<List<MultipartFile>?> pickFiles({
  String? fileIndex,
  FileType? fileType,
  List<String>? allowedExtensions,
  bool allowMultiple = true,
}) async {
  if (kIsWeb || isDesktopOS()) {
    return _pickFiles(
      fileIndex: fileIndex,
      fileType: fileType,
      allowedExtensions: allowedExtensions,
      allowMultiple: allowMultiple,
    );
  } else {
    PermissionStatus? status;

    if (Platform.isIOS) {


e encode their type information. This interface is used
// by serialization to set type information from the Scheme onto the serialized version of an object.
// For objects that cannot be serialized or have unique requirements, this interface may be a no-op.
// TODO: this belongs in pkg/runtime, move unversioned.GVK into runtime.
type ObjectKind interface {
	// SetGroupVersionKind sets or clears the intended serialized kind of an object. Passing kind nil
	// should clear the current setting.
	SetGroupVersionKind(kind *GroupVersionKind)
	// GroupVersionKind returns the stored group, version, and kind of an object, or nil if the object does
	// not expose or provide these fields.
	GroupVersionKind() *GroupVersionKind
}

// EmptyObjectKind implements the ObjectKind interface as a noop
// TODO: this belongs in pkg/runtime, move unversioned.GVK into runtime.
var EmptyObjectKind = emptyObjectKind{}

type emptyObjectKind struct{}

// SetGroupVersionKind implements the ObjectKind interface
func (emptyObjectKind) SetGroupVersionKind(gvk *GroupVersionKind) {}

// GroupVersionKind implements the ObjectKind interface
func (emptyObjectKind) GroupVersionKind() *GroupVersionKind { return nil }
/*
Copyright 2014 The Kubernetes Authors All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Package install installs the v1 monolithic api, making it available as an
// option to all of the API encoding/decoding machinery.
package install

import (
	"fmt"

	"github.com/golang/glog"

	"k8s.io/kubernetes/pkg/api"
	"k8s.io/kubernetes/pkg/api/meta"
	"k8s.io/kubernetes/pkg/api/unversioned"
	"k8s.io/kubernetes/pkg/api/v1"
	"k8s.io/kubernetes/pkg/apimachinery"
	"k8s.io/kubernetes/pkg/apimachinery/registered"
	"k8s.io/kubernetes/pkg/runtime"
	"k8s.io/kubernetes/pkg/util/sets"
)

const importPrefix = "k8s.io/kubernetes/pkg/api"

var accessor = meta.NewAccessor()

// availableVersions lists all known external versions for this group from most preferred to least preferred
var availableVersions = []unversioned.GroupVersion{v1.SchemeGroupVersion}

func init() {
	registered.RegisterVersions(availableVersions)
	externalVersions := []unversioned.GroupVersion{}
	for _, v := range availableVersions {
		if registered.IsAllowedVersion(v) {
			externalVersions = append(externalVersions, v)
		}
	}
	if len(externalVersions) == 0 {
		glog.V(4).Infof("No version is registered for group %v", api.GroupName)
		return
	}

	if err := registered.EnableVersions(externalVersions...); err != nil {
		glog.V(4).Infof("%v", err)
		return
	}
	if err := enableVersions(externalVersions); err != nil {
		glog.V(4).Infof("%v", err)
		return
	}
}

// TODO: enableVersions should be centralized rather than spread in each API
// group.
// We can combine registered.RegisterVersions, registered.EnableVersions and
// registered.RegisterGroup once we have moved enableVersions there.
func enableVersions


, 1, 2, 3.
   */
  private static final int BOUNDARY_SIZE = 2;

  /**
   * This one picks up on Dan2 ideas, but seeks to make less distinctions
   * mid sequence by sorting for long words, but to maintain extra
   * distinctions for short words. It exactly preserves the character shape
   * of the first and last 2 (i.e., BOUNDARY_SIZE) characters and then
   * will record shapes that occur between them (perhaps only if they are
   * different)
   *
   * @param s The String to find the word shape of
   * @param omitIfInBoundary If true, character classes present in the
   *                         first or last two (i.e., BOUNDARY_SIZE) letters
   *                         of the word are not also registered
   *                         as classes that appear in the middle of the word.
   * @param knownLCWords If non-null and non-empty, tag with a "k" suffix words
   *                    that are in this list when lowercased (representing
   *                    that the word is "known" as a lowercase word).
   * @return A word shape for the word.
   */
  private static String wordShapeChris2(String s, boolean omitIfInBoundary, Collection<String> knownLCWords) {
    int len = s.length();
    if (len <= BOUNDARY_SIZE * 2) {
      return wordShapeChris2Short(s, len, knownLCWords);
    } else {
      return wordShapeChris2Long(s, omitIfInBoundary, len, knownLCWords);
    }
  }

  // Do the simple case of words <= BOUNDARY_SIZE * 2 (i.e., 4) with only 1 object allocation!
  private static String wordShapeChris2Short(String s, int len, Collection<String> knownLCWords) {
    int sbLen = (knownLCWords != null) ? len + 1: len;  // markKnownLC makes String 1 longer
    final StringBuilder sb = new StringBuilder(sbLen);
    boolean nonLetters = false;

    for (int i = 0; i < len; i++) {
      char c = s.charAt(i);
      char m = c;
      if (Character.isDigit(c)) {
        m = 'd';
      } else if (Character.isLowerCase(c)) {
        m = 'x';
      } else if (Character.isUpperCase(c) || Character.isTitleCase(c)) {
        m = 'X';
      }
      for (String gr : greek) {
        if (s.startsWith(gr, i)) {
          m = 'g';
          //System.out.println(s + "  ::  " + s.substring(i+1));
          i += gr.length() - 1;
          // System.out.println("Position skips to " + i);
          break;
        }
      }
      if (m != 'x' && m != 'X') {
        nonLetters = true;
      }

      sb.append(m);
    }

    if (knownLCWords != null) {
      if ( ! nonLetters && knownLCWords.contains(s.toLowerCase())) {
        sb.append('k');
      }
    }
    // System.out.println(s + " became " + sb);
    return sb.toString();
  }

  // introduce sizes and optional allocation to reduce memory churn demands;
  // this class could blow a lot of memory if used in a tight loop,
  // as the naive version allocates lots of kind of heavyweight objects
  // endSB should be of length BOUNDARY_SIZE
  // sb is maximally of size s.length() + 1, but is usually (much) shorter. The +1 might happen if markKnownLC is true and it applies
  // boundSet is maximally of size BOUNDARY_SIZE * 2 (and is often smaller)
  // seenSet is maximally of size s.length() - BOUNDARY_SIZE * 2, but might often be


зи 3 и 4 су додати од стране Open Multiplayer сервера.

:::

## Примери

```c
public OnPlayerDisconnect(playerid, reason)
{
    new
        szString[64],
        playerName[MAX_PLAYER_NAME];

    GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);

    new szDisconnectReason[5][] =
    {
        "Timeout/Crash",
        "Quit",
        "Kick/Ban",
        "Custom",
        "Mode End"
    };

    format(szString, sizeof szString, "%s left the server (%s).", playerName, szDisconnectReason[reason]);

    SendClientMessageToAll(0xC4C4C4FF, szString);
    return 1;
}
```

## Белешке

:::tip

Неке функције можда неће радити исправно када се користе у овој функцији јер је играч већ искључен када се функција позива. То значи да не можете добити недвосмислене информације из функција као што су [GetPlayerIp](GetPlayerIp) и [GetPlayerPos](GetPlayerPos).

Овај проблем је решен на open.mp серверу.

:::

## Повезане повратне функције

Следеће повратне функције могу бити корисне, јер су на један или други начин повезане са овим позивом.

- [OnPlayerConnect](OnPlayerConnect): Ова функција се позива када се играч повезује на сервер.
- [OnIncomingConnection](OnIncomingConnection): Ова функција се позива када играч покушава да се повезе на сервер.
- [OnPlayerFinishedDownloading](OnPlayerFinishedDownloading): Ова функција се позива када играч заврши преузимање прилагођених модела.
---
title: OnPlayerEditObject
sidebar_label: OnPlayerEditObject
description: Ова функција се позива када играч заврши са уређивањем објекта (BeginObjectEditing/BeginPlayerObjectEditing).
tags: ["player", "object"]
---

## Опис

Ова функција се позива када играч заврши са уређивањем објекта ([BeginObjectEditing](../functions/BeginObjectEditing)/[BeginPlayerObjectEditing](../functions/BeginPlayerObjectEditing)).

| Име                    | Опис                                                            |
|------------------------|-----------------------------------------------------------------|
| playerid               | ID играча који едитује објекат.                                 |
| playerobject           | 0 if it is a global object or 1 if it is a playerobject.        |
| objectid               | ID уређеног објекта.                                            |
| EDIT_RESPONSE:response | Тип [одговора](../resources/objecteditionresponsetypes)         |
| Float:fX               | X помак за уређени објекат.                                     |
| Float:fY               | Y помак за уређени објек


models::ErrorResponse =
                    serde_json::from_slice(rsp_body).map_err(|source| list_by_job::Error::DeserializeError(source, rsp_body.clone()))?;
                Err(list_by_job::Error::DefaultResponse {
                    status_code,
                    value: rsp_value,
                })
            }
        }
    }
    pub mod list_by_job {
        use super::{models, API_VERSION};
        #[derive(Debug, thiserror :: Error)]
        pub enum Error {
            #[error("HTTP status code {}", status_code)]
            DefaultResponse {
                status_code: http::StatusCode,
                value: models::ErrorResponse,
            },
            #[error("Failed to parse request URL: {0}")]
            ParseUrlError(url::ParseError),
            #[error("Failed to build request: {0}")]
            BuildRequestError(http::Error),
            #[error("Failed to execute request: {0}")]
            ExecuteRequestError(azure_core::HttpError),
            #[error("Failed to serialize request body: {0}")]
            SerializeError(serde_json::Error),
            #[error("Failed to deserialize response: {0}, body: {1:?}")]
            DeserializeError(serde_json::Error, bytes::Bytes),
            #[error("Failed to get access token: {0}")]
            GetTokenError(azure_core::Error),
        }
    }
}
pub mod dsc_node_configuration {
    use super::{models, API_VERSION};
    pub async fn get(
        operation_config: &crate::OperationConfig,
        subscription_id: &str,
        resource_group_name: &str,
        automation_account_name: &str,
        node_configuration_name: &str,
    ) -> std::result::Result<models::DscNodeConfiguration, get::Error> {
        let http_client = operation_config.http_client();
        let url_str = &format!(
            "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/nodeConfigurations/{}",
            operation_config.base_path(),
            subscription_id,
            resource_group_name,
            automation_account_name,
            node_configuration_name
        );
        let mut url = url::Url::parse(url_str).map_err(get::Error::ParseUrlError)?;
        let mut req_builder = http::request::Builder::new();
        req_builder = req_builder.method(http::Method::GET);
        if let Some(token_credential) = operation_config.token_credential() {
            let token_response = token_credential
                .get_token(operation_config.token_credential_resource())
                .await
                .map_err(get::Error::GetTokenError)?;
            req_builder = req_builder.header(http::header::AUTHORIZATION, format!("Bearer {}", token_response.token.secret()));
        }
        url.query_pairs_mut().append_pair("api-version", super::API_VERSION);
        let req_body = bytes::Bytes::from_static(azure_core::EMPTY_BODY);
        req_builder = req_builder.uri(url.as_str());
        let req = req_builder.body(req_body).map_err(get::Error::BuildRequestError)?;
        let rsp = http_client.execute_request(req).await.map_err(get::Error::ExecuteRequestError)?;
        match rsp.status() {
            http::StatusCode::OK => {
                let rsp_body = rsp.body();
                let rsp_value: models::DscNodeConfiguration =
                    serde_json::from_slice(rsp_body).map_err(|source| get::Error::DeserializeError(source, rsp_body.clone()))?;
                Ok(rsp_value)
            }
            status_code => {
                let rsp_body = rsp.body();


item2 p, body main #mainContent .gridItems3 footer .footerContent .gridItems4 .item2 p, body footer .footerContent .gridItems4 main #mainContent .gridItems3 .item3 p, body footer .footerContent .gridItems4 main #mainContent .gridItems3 .item4 p, body main #mainContent .gridItems3 footer .footerContent .gridItems4 .item3 p, body main #mainContent .gridItems3 footer .footerContent .gridItems4 .item4 p {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5rem;
  color: #fff;
}
body footer .footerContent .gridItems4 .item2 {
  height: 100%;
  gap: 0.9375rem;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
}
body footer .footerContent .gridItems4 .item2 .phone, body footer .footerContent .gridItems4 .item2 .address {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row;
  gap: 0.9375rem;
}
body footer .footerContent .gridItems4 .item2 p {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.3125rem;
  color: #fff;
}
body footer .footerContent .gridItems4 .item3, body footer .footerContent .gridItems4 .item4 {
  height: 100%;
  gap: 0.9375rem;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
}
body footer .footerContent .gridItems4 .item3 a, body footer .footerContent .gridItems4 .item4 a {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.375rem;
  color: none;
  color: #fff;
  text-decoration: none;
}
body footer .footerContent .gridItems4 .item3 a:hover, body footer .footerContent .gridItems4 .item4 a:hover {
  color: #8ADAE3;
}
body footer .footerContent .gridItems4 .item5 {
  height: 100%;
}
body footer .footerContent .gridItems4 .item5 ul {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row;
  gap: 0.9375rem;
}
body footer .footerContent .gridItems4 .item5 ul li img {
  width: 2rem;
  height: 1.9375rem;
  filter: invert(100%);
}

@media only screen and (max-width: 82.5rem) {
  body {
    position: relative;
  }
  body header {
    background: url("../images/bg-curvy-mobile.svg") no-repeat #1b2330;
    background-position: bottom;
    background-size: 100%;
  }
  body header nav {
    justify-content: space-between;
    max-width: 90rem;
    margin: 0 auto;
    padding: 1.25rem;
    background-color: transparent;
  }
  body header nav .logoNav img {
    width: 100%;
    max-width: 5rem;
    height: auto;
  }
  body header nav .navContent {
    display: flex;
    gap: 1.25rem;
  }
  body header nav .navContent a {
    text-decoration: none;
    font-family: "Raleway";
    font-style: normal;
    font-weight: 400;
    font


ldcards, e.g. 'expand'
 *  * string literals - collect all injections
 *
 *  @param visitDefiningSections Visit or not downstream sections which introduces new wildcards
 *  @param visitExpandingSections Visit or not downstream sections which allows wildcards usage w/o 'wildcards.' prefix
 *  @param visitAllSections If true visit all sections (including run) ignoring [visitDefiningSections] and [visitExpandingSections] flags
 *  @param collectWildcardLikeReferences If true also collects [SmkSLReferenceExpression]s that are not wildcards
 */
class SmkWildcardsCollector(
    private val visitDefiningSections: Boolean,
    private val visitExpandingSections: Boolean,
    private val visitAllSections: Boolean = false,
    private val collectWildcardLikeReferences: Boolean = false
) : SmkElementVisitor, PyRecursiveElementVisitor() {
    private val wildcardsElements = mutableListOf<WildcardDescriptor>()
    private var atLeastOneInjectionVisited = false
    private var currentSectionIdx: Byte = -1
    private var currentSectionName: String? = null

    /**
     * @return List of all wildcard element usages and its names or null if no string literals were found
     *
     * No string literals found means that code doesn't contain wildcards injections and even candidate places
     * for them so user has not only zero wildcards, but now possible wildcards declarations
     */
    fun getWildcards(): List<WildcardDescriptor>? =
        if (atLeastOneInjectionVisited) wildcardsElements else null

    fun getWildcardsNames() = getWildcards()?.asSequence()?.map { it.text }?.distinct()?.toList()

    override val pyElementVisitor: PyElementVisitor
        get() = this

    override fun visitSmkRunSection(st: SmkRunSection) {
        if (visitAllSections) {
            currentSectionName = SnakemakeNames.SECTION_RUN
            super.visitSmkRunSection(st)
        }
    }

    override fun visitPyLambdaExpression(node: PyLambdaExpression) {
        // #249 do not collect wildcards in lambdas
        // Do nothing here
    }

    override fun visitSmkRuleOrCheckpointArgsSection(st: SmkRuleOrCheckpointArgsSection) {
        try {
            currentSectionIdx = WILDCARDS_DEFINING_SECTIONS_KEYWORDS.indexOf(st.sectionKeyword).toByte()

            if (
                visitAllSections ||
                (visitDefiningSections && st.isWildcardsDefiningSection) ||
                (visitExpandingSections && st.isWildcardsExpandingSection)
            ) {
                currentSectionName = st.sectionKeyword
                super.visitSmkRuleOrCheckpointArgsSection(st)
                return
            }
        } finally {
            currentSectionIdx = -1
        }
    }

    override fun visitPyCallExpression(node: PyCallExpression) {   //format
        if (node.callSimpleName() !in FUNCTIONS_BANNED_FOR_WILDCARDS) {
            super.visitPyCallExpression(node)
        }
    }

    override fun visitPyStringLiteralExpression(stringLiteral: PyStringLiteralExpression) {
        val languageManager = InjectedLanguageManager.getInstance(stringLiteral.project)
        val injectedFiles =
            languageManager.getInjectedPsiFiles(stringLiteral)
                ?.map { it.first }
                ?.filterIsInstance<SmkSLFile>()
                ?: return

        atLeastOneInjectionVisited = atLeastOneInjectionVisited || injectedFiles.isNotEmpty()
        injectedFiles.forEach { collectWildcardsNames(it) }
    }

    private fun collectWildcardsNames(file: SmkSLFile) {

        val injections = PsiTreeUtil.getChildrenOfType(file, SmkSLReferenceExpressionImpl::class.java)
        injections?.


 // Show a loading indicator while the fragment programs are loading
        if (!snapshot.hasData) {
          return const Center(
            child: CircularProgressIndicator(),
          );
        }

        return GameWidget(
          // It is a good idea to save the game instance on state
          // to avoid issues with hot reload
          game: game ??= CrystalBallGame(
            preloadedPrograms: snapshot.data!,
          ),
        );
      },
    );
  }
}
import 'dart:math';
import 'dart:ui';

import 'package:flame/extensions.dart';
import 'package:flame/palette.dart';
import 'package:flame_forge2d/flame_forge2d.dart' hide Particle, World;
import 'package:flutter/material.dart' hide Image, Gradient;

import 'package:padracing/car.dart';
import 'package:padracing/game_colors.dart';

class LapLine extends BodyComponent with ContactCallbacks {
  LapLine(this.id, this.initialPosition, this.size, {required this.isFinish})
    : super(priority: 1);

  final int id;
  final bool isFinish;
  final Vector2 initialPosition;
  final Vector2 size;
  late final Rect rect = size.toRect();
  Image? _finishOverlay;

  @override
  Future<void> onLoad() async {
    super.onLoad();
    if (isFinish) {
      _finishOverlay = await createFinishOverlay();
    }
  }

  @override
  Body createBody() {
    paint.color = (isFinish ? GameColors.green.color : GameColors.green.color)
      ..withValues(alpha: 0.5);
    paint
      ..style = PaintingStyle.fill
      ..shader = Gradient.radial(
        (size / 2).toOffset(),
        max(size.x, size.y),
        [
          paint.color,
          Colors.black,
        ],
      );

    final groundBody = world.createBody(
      BodyDef(
        position: initialPosition,
        userData: this,
      ),
    );
    final shape = PolygonShape()..setAsBoxXY(size.x / 2, size.y / 2);
    final fixtureDef = FixtureDef(shape, isSensor: true);
    return groundBody..createFixture(fixtureDef);
  }

  late final Rect _scaledRect = (size * 10).toRect();
  late final Rect _drawRect = size.toRect();

  Future<Image> createFinishOverlay() {
    final recorder = PictureRecorder();
    final canvas = Canvas(recorder, _scaledRect);
    final step = _scaledRect.width / 2;
    final black = BasicPalette.black.paint();

    for (var i = 0; i * step < _scaledRect.height; i++) {
      canvas.drawRect(
        Rect.fromLTWH(i.isEven ? 0 : step, i * step, step, step),
        black,
      );
    }
    final picture = recorder.endRecording();
    return picture.toImage(
      _scaledRect.width.toInt(),
      _scaledRect.height.toInt(),
    );
  }

  @override
  void render(Canvas canvas) {
    canvas.translate(-size.x / 2, -size.y / 2);
    canvas.drawRect(rect, paint);
    if (_finishOverlay != null) {
      canvas.drawImageRect(_finishOverlay!, _scaledRect, _drawRect, paint);
    }
  }

  @override
  void beginContact(Object other, Contact contact) {
    if (other is! Car) {
      return;
    }
    if (isFinish && other.passedStartControl.length == 2) {
      other.lapNotifier.value++;
      other.passedStartControl.clear();
    } else if (!isFinish) {
      other.passedStartControl.removeWhere(
        (passedControl) => passedControl.id > id,
      );
      other.passedStartControl.add(this);
    }


ndex = 0; index < radio.length; index++) {
        if (radio[index].checked == true) {
            operacion = radio[index].value;
            break;
        }
    }
    switch (operacion) {
        case "+": {
            mensaje = "Suma:  " + numero1 + "+" + numero2 + "=" + (numero1 + numero2);
            break;
        }
        case "-": {
            mensaje = "Resta:  " + numero1 + "-" + numero2 + "=" + (numero1 - numero2);
            break;
        }
        case "*": {
            mensaje = "Multiplicacion:  " + numero1 + "x" + numero2 + "=" + (numero1 * numero2);
            break;
        }
        case "/": {
            if (numero2 == 0) {
                mensaje = "Division:  No es posible dividir entre cero.";
            }
            else {
                mensaje = "Division:  " + numero1 + "/" + numero2 + "=" + (numero1 / numero2);
            }
            break;
        }
    }
    if (isNaN(numero1) || isNaN(numero2)) {
        mensaje = "Los valores ingresados no son validos";
    }
    alert(mensaje);
}import { expect } from "chai";
import sinon from "sinon";

import {
    AppHasEntrypointsError,
    AppNotFoundError
} from "../../src/common/errors";
import { Operation } from "../../src/entities/OperationLog";
import DeleteApp from "../../src/usecases/DeleteApp";
import { getMockDependencies } from "../testUtils";

describe("usecase DeleteApp", () => {
    it("throws AppNotFoundError if no app with the specified id exists", async () => {
        const deleteApp = new DeleteApp(getMockDependencies());
        const deleteAppPromise = deleteApp.exec("appId");
        await expect(deleteAppPromise).to.be.rejectedWith(AppNotFoundError);
        await expect(deleteAppPromise).to.be.rejectedWith(
            "No app found with id = appId"
        );
    });

    it("throws AppHasEntrypointsError if the app has linked entrypoints", async () => {
        const deps = getMockDependencies();
        deps.storages.apps.findOne.resolves({} as any);
        deps.storages.entrypoints.anyExistsWithAppId.resolves(true);
        const deleteApp = new DeleteApp(deps);
        const deleteAppPromise = deleteApp.exec("appId");
        await expect(deleteAppPromise).to.be.rejectedWith(
            AppHasEntrypointsError
        );
        await expect(deleteAppPromise).to.be.rejectedWith(
            "Can't delete app with id = appId because it has linked entrypoints"
        );
    });

    it("deletes the app", async () => {
        const deps = getMockDependencies();
        deps.storages.apps.findOne.resolves({} as any);
        const deleteApp = new DeleteApp(deps);
        await deleteApp.exec("appId");
        expect(deps.storages.apps.deleteOne).to.have.been.calledOnceWith(
            "appId"
        );
    });

    it("logs the delete app operation", async () => {
        const deps = getMockDependencies();
        deps.storages.apps.findOne.resolves({} as any);
        const deleteApp = new DeleteApp(deps);
        await deleteApp.exec("appId");
        expect(
            d


arget);

			rel.addStringProperty("role", "public");

			StructrSchema.extendDatabaseSchema(app, schema);

			tx.success();

		} catch (Throwable t) {
			t.printStackTrace();
			fail("Unexpected exception");
		}

		final String projectId = createEntity("Project", "{ name: 'Project1' }");
		final String taskId    = createEntity("Task",    "{ name: 'Task1' }");

		// create data
		RestAssured
			.given()
				.contentType("application/json; charset=UTF-8")
				.filter(ResponseLoggingFilter.logResponseIfStatusCodeIs(422))
				.filter(ResponseLoggingFilter.logResponseIfStatusCodeIs(500))
				.body("{ task: { id: '" + taskId + "', role: 'Role1' } }")

			.expect()
				.statusCode(200)

			.when()
				.put("/Project/" + projectId);

		// check result
		RestAssured
			.given()
				.contentType("application/json; charset=UTF-8")
				.filter(ResponseLoggingFilter.logResponseIfStatusCodeIs(422))
				.filter(ResponseLoggingFilter.logResponseIfStatusCodeIs(500))

			.expect()
				.statusCode(200)
				.body("result[0].role", equalTo("Role1"))

			.when()
				.get("/ProjectHASTask");
	}

	@Test
	public void testForeignPropertiesInOneToMany() {

		try (final Tx tx = app.tx()) {

			final JsonSchema schema = StructrSchema.createFromDatabase(app);

			final JsonObjectType project = schema.addType("Project");
			final JsonObjectType task    = schema.addType("Task");
			final JsonReferenceType rel  = project.relate(task, "HAS", Cardinality.OneToMany, "project", "tasks").setCascadingCreate(Cascade.sourceToTarget);

			rel.addStringProperty("role", "public");

			StructrSchema.extendDatabaseSchema(app, schema);

			tx.success();

		} catch (Throwable t) {
			t.printStackTrace();
			fail("Unexpected exception");
		}

		final String projectId = createEntity("Project", "{ name: 'Project1' }");
		final String taskId    = createEntity("Task",    "{ name: 'Task1' }");

		// create data
		RestAssured
			.given()
				.contentType("application/json; charset=UTF-8")
				.filter(ResponseLoggingFilter.logResponseIfStatusCodeIs(422))
				.filter(ResponseLoggingFilter.logResponseIfStatusCodeIs(500))
				.body("{ tasks: [ { id: '" + taskId + "', role: 'Role1' } ] }")

			.expect()
				.statusCode(200)

			.when()
	 			.put("/Project/" + projectId);

		// check result
		RestAssured
			.given()
				.contentType("application/json; charset=UTF-8")
				.filter(ResponseLoggingFilter.logResponseIfStatusCodeIs(422))
				.filter(ResponseLoggingFilter.logResponseIfStatusCodeIs(500))

			.expect()
				.statusCode(200)
				.body("result[0].role", equalTo("Role1"))

			.when()
				.get("/ProjectHASTask");

	}

	@Test
	public void testForeignPropertiesOnRelationship() {

		try (final Tx tx = app.tx()) {

			final JsonSchema schema = StructrSchema.createFromDatabase(app);
			final JsonType type     = schema.getType(StructrTraits.GROUP_CONTAINS_PRINCIPAL);

			type.addStringProperty("test", PropertyView.Public);

			StructrSchema.extendDatabaseSchema(app, schema);

			tx.success();

		} catch (Throwable t) {
			t.printStackTrace();
			fail("Unexpected exception");
		}

		final String parent = createEntity(StructrTraits.GROUP, "{ name: 'parent' }");
		final String child  = createEntity(StructrTra


style, mxConstants.STYLE_VERTICAL_ALIGN, mxConstants.ALIGN_MIDDLE));
			}

	 		if (isEdge)
			{
				this.bounds = new mxRectangle(state.absoluteOffset.x, state.absoluteOffset.y, 0, 0);

				if (lw != null)
			 	{
					var tmp = (parseFloat(lw) + 2) * scale;
					this.bounds.width = tmp;
					this.bounds.x += m.x * tmp;
			 	}
			}
			else
			{
				var bds = mxRectangle.fromRectangle(state);
				var hpos = mxUtils.getValue(state.style, mxConstants.STYLE_LABEL_POSITION, mxConstants.ALIGN_CENTER);
				var vpos = mxUtils.getValue(state.style, mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_MIDDLE);

				bds = (state.shape != null && hpos == mxConstants.ALIGN_CENTER && vpos == mxConstants.ALIGN_MIDDLE) ? state.shape.getLabelBounds(bds) : bds;

			 	if (lw != null)
			 	{
			 		bds.width = parseFloat(lw) * scale;
			 	}

			 	if (!state.view.graph.cellRenderer.legacySpacing || state.style[mxConstants.STYLE_OVERFLOW] != 'width')
			 	{
					var spacing = parseInt(state.style[mxConstants.STYLE_SPACING] || 2) * scale;
					var spacingTop = (parseInt(state.style[mxConstants.STYLE_SPACING_TOP] || 0) + mxText.prototype.baseSpacingTop) * scale + spacing;
					var spacingRight = (parseInt(state.style[mxConstants.STYLE_SPACING_RIGHT] || 0) + mxText.prototype.baseSpacingRight) * scale + spacing;
					var spacingBottom = (parseInt(state.style[mxConstants.STYLE_SPACING_BOTTOM] || 0) + mxText.prototype.baseSpacingBottom) * scale + spacing;
					var spacingLeft = (parseInt(state.style[mxConstants.STYLE_SPACING_LEFT] || 0) + mxText.prototype.baseSpacingLeft) * scale + spacing;

					var hpos = mxUtils.getValue(state.style, mxConstants.STYLE_LABEL_POSITION, mxConstants.ALIGN_CENTER);
					var vpos = mxUtils.getValue(state.style, mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_MIDDLE);

					bds = new mxRectangle(bds.x + spacingLeft, bds.y + spacingTop,
						bds.width - ((hpos == mxConstants.ALIGN_CENTER && lw == null) ? (spacingLeft + spacingRight) : 0),
						bds.height - ((vpos == mxConstants.ALIGN_MIDDLE) ? (spacingTop + spacingBottom) : 0));
			 	}

				this.bounds = new mxRectangle(bds.x + state.absoluteOffset.x, bds.y + state.absoluteOffset.y, bds.width, bds.height);
			}

			// Needed for word wrap inside text blocks with oversize lines to match the final result where
	 		// the width of the longest line is used as the reference for text alignment in the cell
	 		// TODO: Fix word wrapping preview for edge labels in helloworld.html
			if (this.graph.isWrapping(state.cell) && (this.bounds.width >= 2 || this.bounds.height >= 2) &&
				this.textarea.innerHTML != this.getEmptyLabelText())
			{
				this.textarea.style.wordWrap = mxConstants.WORD_WRAP;
				this.textarea.style.whiteSpace = 'normal';

		 		// Forces automatic


sts need an rc and a watch on pods of the rc.
		// Additionally some of them might scale the rc during the test.
		config = testutils.RCConfig{
			Client:      f.ClientSet,
			Name:        rcName,
			Namespace:   ns,
			Image:       imageutils.GetPauseImageName(),
			Replicas:    numPods,
			CreatedPods: &[]*v1.Pod{},
		}
		framework.ExpectNoError(framework.RunRC(config))
		replacePods(*config.CreatedPods, existingPods)

		stopCh = make(chan struct{})
		tracker = newPodTracker()
		newPods, controller = cache.NewInformer(
			&cache.ListWatch{
				ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
					options.LabelSelector = labelSelector.String()
					obj, err := f.ClientSet.CoreV1().Pods(ns).List(options)
					return runtime.Object(obj), err
				},
				WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
					options.LabelSelector = labelSelector.String()
					return f.ClientSet.CoreV1().Pods(ns).Watch(options)
				},
			},
			&v1.Pod{},
			0,
			cache.ResourceEventHandlerFuncs{
				AddFunc: func(obj interface{}) {
					tracker.remember(obj.(*v1.Pod), ADD)
				},
				UpdateFunc: func(oldObj, newObj interface{}) {
					tracker.remember(newObj.(*v1.Pod), UPDATE)
				},
				DeleteFunc: func(obj interface{}) {
					tracker.remember(obj.(*v1.Pod), DEL)
				},
			},
		)
		go controller.Run(stopCh)
	})

	ginkgo.AfterEach(func() {
		close(stopCh)
	})

	ginkgo.It("Controller Manager should not create/delete replicas across restart", func() {

		// Requires master ssh access.
		framework.SkipUnlessProviderIs("gce", "aws")
		restarter := NewRestartConfig(
			framework.GetMasterHost(), "kube-controller", ports.InsecureKubeControllerManagerPort, restartPollInterval, restartTimeout)
		restarter.restart()

		// The intent is to ensure the replication controller manager has observed and reported status of
		// the replication controller at least once since the manager restarted, so that we can determine
		// that it had the opportunity to create/delete pods, if it were going to do so. Scaling the RC
		// to the same size achieves this, because the scale operation advances the RC's sequence number
		// and awaits it to be observed and reported back in the RC's status.
		framework.ScaleRC(f.ClientSet, f.ScalesGetter, ns, rcName, numPods, true)

		// Only check the keys, the pods can be different if the kubelet updated it.
		// TODO: Can it really?
		existingKeys := sets.NewString()
		newKeys := sets.NewString()
		for _, k := range existingPods.ListKeys() {
			existingKeys.Insert(k)
		}
		for _, k := range newPods.ListKeys() {
			newKeys.Insert(k)
		}
		if len(newKeys.List()) != len(existingKeys.List()) ||
			!newKeys.IsSuperset(existingKeys) {
			framework.Failf("RcManager created/deleted pods after restart \n\n %+v", tracker)
		}
	})

	ginkgo.It("Scheduler should continue assigning pods to nodes across restart", func() {

		// Requires master ssh access.
		framework.SkipUnlessProviderIs("gce", "aws")
		restarter := NewRestartConfig(
			framework.GetMasterHost(), "kube-scheduler", ports.InsecureSchedulerPort, restartPollInterval, restart


Gustav Gonzalez                                                      *
 *   ---                                                                   *
 *   KTooN's versions:                                                     *
 *   2006:                                                                 *
 *    David Cuadrado                                                       *
 *    Jorge Cuadrado                                                       *
 *   2003:                                                                 *
 *    Fernado Roldan                                                       *
 *    Simena Dinas                                                         *
 *                                                                         *
 *   License:                                                              *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
 ***************************************************************************/

#include "tresponsiveui.h"
#include "talgorithm.h"

#include <QDebug>

QSize TResponsiveUI::fitMainTopBarIconSize()
{
    QPair<int, int> dimension = TAlgorithm::screenDimension();
    int screenWidth = dimension.first;
    int iconSize = MAIN_TOPBAR_ICON_SIZE;
    // Big resolutions
    if (screenWidth > HD_WIDTH)
        iconSize = FIT_MAIN_TOPBAR_ICON_SIZE(screenWidth);

    return QSize(iconSize, iconSize);
}

int TResponsiveUI::fitTitleIconSize()
{
    QPair<int, int> dimension = TAlgorithm::screenDimension();
    int screenWidth = dimension.first;
    int titleIconSize = PANEL_TITLE_ICON_SIZE;
    // Big resolutions
    if (screenWidth > HD_WIDTH)
        titleIconSize = FIT_TITLE_ICON_SIZE(screenWidth);

    return titleIconSize;
}

int TResponsiveUI::fitToolViewIconSize()
{
    QPair<int, int> dimension = TAlgorithm::screenDimension();
    int screenWidth = dimension.first;
    int iconSize = TOOLVIEW_ICON_SIZE;
    // Big resolutions
    if (screenWidth > HD_WIDTH)
        iconSize = FIT_TOOLVIEW_ICON_SIZE(screenWidth);

    return iconSize;
}

int TResponsiveUI::fitActionBarIconSize()
{
    QPair<int, int> dimension = TAlgorithm::screenDimension();
    int screenWidth = dimension.first;
    int iconSize = ACTIONBAR_ICON_SIZE;
    // Big resolutions
    if (screenWidth > HD_WIDTH)
        iconSize = FIT_ACTIONBAR_ICON_SIZE(screenWidth);

    return iconSize;
}

QSize TResponsiveUI::fitStatusIconSize()
{
    QPair<int, int> dimension = TAlgorithm::screenDimension();
    int screenWidth = dimension.first;
    QSize iconSize(STATUS_ICON_SIZE, STATUS_ICON_SIZE);
    // Big resolutions
    if (screenWidth > HD_WIDTH) {
        int iconWidth =


void {
    let temp = this.data[idx];
    this.data[idx] = this.data[idx + 1];
    this.data[idx + 1] = temp;
  }

  get length() {
    return this.data.length;
  }
}
import parseMdToHtml, {
  parseMdBoldToHtml,
  parseMdItalicToHtml,
  parseMdLinebreaksToHtml,
  parseMdLinkToHtml,
  parseMdTitleToHtml
} from '../../services/html-parser.service';

describe('parse markdown title to html', () => {
  it('parse null', () => {
    const result = parseMdTitleToHtml(null);
    expect(result).toEqual('');
  });

  it('parse empty string', () => {
    const result = parseMdTitleToHtml('');
    expect(result).toEqual('');
  });

  it('parse level 1 title with line break', () => {
    const result = parseMdTitleToHtml('#title\n');
    expect(result).toEqual('
title
');
  });

  it('parse level 1 title', () => {
    const result = parseMdTitleToHtml('#title');
    expect(result).toEqual('
title
');
  });

  it('parse level 2 title', () => {
    const result = parseMdTitleToHtml('##title');
    expect(result).toEqual('
title
');
  });

  it('parse level 3 title', () => {
    const result = parseMdTitleToHtml('###title');
    expect(result).toEqual('
title
');
  });

  it('parse level 4 title', () => {
    const result = parseMdTitleToHtml('####title');
    expect(result).toEqual('
title
');
  });

  it('parse level 5 title', () => {
    const result = parseMdTitleToHtml('#####title');
    expect(result).toEqual('
title
');
  });

  it('parse level 6 title', () => {
    const result = parseMdTitleToHtml('######title');
    expect(result).toEqual('
title
');
  });
});

describe('parse markdown bold to html', () => {
  it('parse null', () => {
    const result = parseMdBoldToHtml(null);
    expect(result).toEqual('');
  });

  it('parse empty string', () => {
    const result = parseMdBoldToHtml('');
    expect(result).toEqual('');
  });

  it('parse single line', () => {
    const result = parseMdBoldToHtml('**bold**');
    expect(result).toEqual('bold');
  });

  it('parse single line alternate', () => {
    const result = parseMdBoldToHtml('__bold__');
    expect(result).toEqual('bold');
  });

  it('parse multi line', () => {
    const result = parseMdBoldToHtml('**bold\nbold**');
    expect(result).toEqual('**bold\nbold**');
  });

  it('parse multi line alternate', () => {
    const result = parseMdBoldToHtml('__bold\nbold__');
    expect(result).toEqual('__bold\nbold__');
  });
});

describe('parse markdown italic to html', () => {
  it('parse null', () => {
    const result = parseMdItalicToHtml(null);
    expect(result).toEqual('');
  });

  it('parse empty string', () => {
    const result = parseMdItalicToHtml('');
    expect(result).toEqual('');
  });

  it('parse single line', () => {
    const result = parseMdItalicToHtml('*italic*');
    expect(result).toEqual('italic');
  });

  it('parse single lin


ssVPN官网也提供了详细的安装和配置教程。（注意：国内苹果手机用户请参考下文方式下载ExpressVPN iOS客户端）

**第三步：注册并激活账号**

当你安装完成后，启动ExpressVPN客户端，输入购买时使用的邮箱和激活码进行登录。

**第四步：点击连接并使用**

在完成登录后，你可以直接点击主界面的“快速连接”按钮，让系统自动选择最佳服务器节点。如果有特定需求，也可以手动选择香港、日本、新加坡或美国西海岸等节点，它们通常延迟低、速度快，更适合在中国使用。ExpressVPN的界面设计简洁明了，即使是首次使用的新手用户，也能在几分钟内完成设置并顺利连接。

**第五步：功能与常见设置**

在使用过程中，你还可以根据需要开启终止开关、切换加密协议、使用隧道分流功能或更换DNS设置。这些功能都可以在ExpressVPN客户端的设置菜单中找到，操作简单，不需要复杂的技术知识。

总体来说，ExpressVPN的兼容性非常全面，下载安装和使用的过程也极为简便。无论你是电脑VPN用户、手机VPN用户还是路由器用户，都可以在几分钟内完成安装和配置。对大多数中国用户而言，ExpressVPN的操作体验友好且稳定，完全能够满足日常使用需求。

立即获取ExpressVPN

## 如何下载ExpressVPN iOS APP？

如果你是iOS用户，并且身处中国大陆，会发现由于政策原因，中国区App Store早已下架所有与翻墙相关的软件，因此无法直接在国区App Store中搜索和下载ExpressVPN iOS应用。

目前最简单、便捷的方法，就是通过“**银河录像局**”等正规平台购买一个现成的美区Apple ID账号。整个过程操作简单，安全可靠，价格也很实惠（大约20元人民币左右），非常适合普通用户。

![如何下载ExpressVPN iOS APP：通过银河录像局去购买美区Apple ID帐号](https://raw.githubusercontent.com/chinavpns/expressvpn/


 = new Decorator
            {
                Padding = new Thickness(8),
                Width = 200,
                Height = 200,
                Child = new Rectangle
                {
                    Stroke = Brushes.Black,
                    StrokeThickness = 2,
                }
            };

            await RenderToFile(target);
            CompareImages();
        }

        [Fact]
        public async Task Rectangle_Stroke_Fill()
        {
            Decorator target = new Decorator
            {
                Padding = new Thickness(8),
                Width = 200,
                Height = 200,
                Child = new Rectangle
                {
                    Stroke = Brushes.Black,
                    StrokeThickness = 2,
                    Fill = Brushes.Red,
                }
            };

            await RenderToFile(target);
            CompareImages();
        }

        [Fact]
        public async Task Rectangle_Stroke_Fill_ClipToBounds()
        {
            Decorator target = new Decorator
            {
                Padding = new Thickness(8),
                Width = 200,
                Height = 200,
                Child = new Rectangle
                {
                    Stroke = Brushes.Black,
                    StrokeThickness = 2,
                    Fill = Brushes.Red,
                    ClipToBounds = true,
                }
            };

            await RenderToFile(target);
            CompareImages();
        }
    }
}


coration(
          border: pw.Border(
            bottom: pw.BorderSide(
              color: _accentColor,
              width: .5,
            ),
          ),
        ),
        headers: List<String>.generate(
          tableHeaders.length,
          (col) => tableHeaders[col],
        ),
        data: List<List<String?>>.generate(
          Sessao.listaParcelamento.length,
          (row) => List<String?>.generate(
            tableHeaders.length,
            (col) => Sessao.listaParcelamento[row].getIndex(col),
          ),
        ),
      );
    } else {
      return pw.SizedBox(height: 1);
    }
  }

  pw.Widget _rodape(pw.Context context) {
    return pw.Row(
      mainAxisAlignment: pw.MainAxisAlignment.end,
      children: [
        pw.Expanded(
          flex: 2,
          child: pw.Column(
            crossAxisAlignment: pw.CrossAxisAlignment.center,
            children: [
              pw.Container(
                margin: const pw.EdgeInsets.only(top: 5, bottom: 1),
              ),
              pw.Text(
                'Obrigado. Volte sempre!',
                style: pw.TextStyle(
                  color: _darkColor,
                  fontWeight: pw.FontWeight.bold,
                  fontSize: 8,
                ),
              ),
              pw.Text(
                'Não possui valor fiscal.',
                style: pw.TextStyle(
                  color: _darkColor,
                  fontWeight: pw.FontWeight.bold,
                  fontSize: 8,
                ),
              ),
            ],
          ),
        ),
      ],
    );
  }

}
/*
Title: T2Ti ERP 3.0
Description: ListaPage relacionada aos movimentos do PDV

The MIT License

Copyright: Copyright (C) 2021 T2Ti.COM

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.


rpxN = circle1.Center.X.Value + dy/hyp*circle1.Radius.Value;
            var rpyN = circle1.Center.Y.Value - dx/hyp*circle1.Radius.Value;

            var error1 = (-dy*rpx + dx*rpy + (L1.P1.X.Value*L1.P2.Y.Value - L1.P2.X.Value*L1.P1.Y.Value))/hyp;
            var error2 = (-dy*rpxN + dx*rpyN + (L1.P1.X.Value*L1.P2.Y.Value - L1.P2.X.Value*L1.P1.Y.Value))/hyp;
            error1 = error1*error1;
            error2 = error2*error2;
            var error = 0.0;
            if (error1 < error2) error += error1;
            else error += error2;
            return error;
        }
    }
}


, text=[], png_path="",
                       interactive=True, orientation='horizontal',
                       pointsize=10):
    # load base point cloud
    all_points = []
    all_colors = []

    for folder in comparison_folder_list:
        pts = get_points_colors_from_obj(os.path.join(folder, filename))
        all_points.append(pts)
        all_colors.append(np.multiply(np.ones(pts.shape), color))
    print(np.asarray(all_points).shape)
    show_pointclouds(all_points, all_colors,
                     text=text,
                     png_path=png_path, interactive=interactive,
                     orientation=orientation,
                     point_size=pointsize
                     )


model = "gauntlet3",
		name = "Bravado Gauntlet Classic",
		min_dim = v3(-0.97220700979233, -2.4703333377838, -0.35581400990486),
		max_dim = v3(0.9722073674202, 2.5503299236298, 1.1620516777039)
	},
	[3286105550] = {
		model = "tailgater",
		name = "Tailgater",
		min_dim = v3(-1.0225495100021, -2.6113865375519, -0.64475703239441),
		max_dim = v3(1.0225791931152, 2.5138170719147, 0.88617295026779)
	},
	[630371791] = {
		model = "barracks3",
		name = "HVY Barracks 2",
		min_dim = v3(-1.4380283355713, -4.7643551826477, -0.65863835811615),
		max_dim = v3(1.428106546402, 4.5291767120361, 2.9324290752411)
	},
	[734217681] = {
		model = "sadler2",
		name = "Sadler",
		min_dim = v3(-1.2369636297226, -3.1361808776855, -0.76905572414398),
		max_dim = v3(1.2369619607925, 3.2335033416748, 1.3310105800629)
	},
	[2069146067] = {
		model = "oppressor2",
		name = "Pegassi Oppressor Mk 2",
		common_misspellings = {
			"pegassi opressor mk 2",
			"pegassi oppresor mk 2",
			"pegassi opresor mk 2"
		},
		min_dim = v3(-0.68971931934357, -1.2835586071014, -0.49825602769852),
		max_dim = v3(0.68971943855286, 1.0441472530365, 1.2246346473694)
	},
	[2038480341] = {
		model = "euros",
		name = "Annis Euros",
		min_dim = v3(-0.94481235742569, -2.1383891105652, -0.33907997608185),
		max_dim = v3(0.94469052553177, 2.1920363903046, 1.0111079216003)
	},
	[1304459735] = {
		model = "growler",
		name = "Pfister Growler",
		min_dim = v3(-0.9468098282814, -2.2196559906006, -0.35199999809265),
		max_dim = v3(0.94680970907211, 2.319415807724, 1.2440657615662)
	},
	[1141395928] = {
		model = "comet7",
		name = "Pfister Comet S2 Cabrio",
		min_dim = v3(-0.9653999209404, -2.3379604816437, -0.4161319732666),
		max_dim = v3(0.96540004014969, 2.2958567142487, 0.93105089664459)
	},
	[1591739866] = {
		model = "deveste",
		name = "Principe Deveste Eight",
		min_dim = v3(-1.3825062513351, -2.4180114269257, -0.49540507793427),
		max_dim = v3(1.3853800296783, 2.7281997203827, 0.88491666316986)
	},
	[21753891


 log(tan(PI / 4.0 + e / 2.0));
  return vec2(t * Tm, e * Tm);
}

vec2 unProjCustomCoord(vec2 point) { // \u5E73\u9762\u5750\u6807 => \u7ECF\u7EAC\u5EA6
  float Sm = 57.29577951308232; //180 / Math.PI
  float Tm = 6378137.0;
  float t = point.x;
  float e = point.y;
  return vec2(t / Tm * Sm, (2.0 * atan(exp(e / Tm)) - PI / 2.0) * Sm);
}

float customPixelDistance(vec2 from, vec2 to) {
 vec2 a1 = ProjectFlat(from);
 vec2 b1 = ProjectFlat(to);
 return distance(a1, b1);
}`,sm=`#define TILE_SIZE 512.0
#define PI 3.1415926536
#define WORLD_SCALE TILE_SIZE / (PI * 2.0)

#define COORDINATE_SYSTEM_LNGLAT 1.0        // mapbox
#define COORDINATE_SYSTEM_LNGLAT_OFFSET 2.0 // mapbox offset
#define COORDINATE_SYSTEM_VECTOR_TILE 3.0
#define COORDINATE_SYSTEM_IDENTITY 4.0
#define COORDINATE_SYSTEM_P20 5.0           // amap
#define COORDINATE_SYSTEM_P20_OFFSET 6.0    // amap offset
#define COORDINATE_SYSTEM_METER_OFFSET 7.0

#define COORDINATE_SYSTEM_P20_2 8.0         // amap2.0

uniform mat4 u_ViewMatrix;
uniform mat4 u_ProjectionMatrix;
uniform mat4 u_ViewProjectionMatrix;
uniform float u_Zoom : 1;
uniform float u_ZoomScale : 1;

uniform float u_CoordinateSystem;
uniform vec2 u_ViewportCenter;
uniform vec4 u_ViewportCenterProjection;
uniform vec3 u_PixelsPerDegree;
uniform vec3 u_PixelsPerDegree2;
uniform vec3 u_PixelsPerMeter;

uniform vec2 u_ViewportSize;
uniform float u_DevicePixelRatio;
uniform float u_FocalDistance;
uniform vec3 u_CameraPosition;

// uniform mat4 u_Mvp;

// web mercator coords -> world coords
vec2 project_mercator(vec2 lnglat) {
  float x = lnglat.x;
  return vec2(
    radians(x) + PI,
    PI - log(tan(PI * 0.25 + radians(lnglat.y) * 0.5))
  );
}

float project_scale(float meters) {
  return meters * u_PixelsPerMeter.z;
}

// offset coords -> world coords
vec4 project_offset(vec4 offset) {
  float dy = offset.y;
  dy = clamp(dy, -1., 1.);
  vec3 pixels_per_unit = u_PixelsPerDegree + u_PixelsPerDegree2 * dy;
  return vec4(offset.xyz * pixels_per_unit, offset.w);
}

vec3 project_normal(vec3 normal) {
  vec4 normal_modelspace = u_ModelMatrix * vec4(normal, 0.0);
  return normalize(normal_modelspace.xyz * u_PixelsPerMeter);
}

vec3 project_offset_normal(vec3 vector) {
  if (u_CoordinateSystem < COORDINATE_SYSTEM_LNGLAT + 0.01 && u_CoordinateSystem >COORDINATE_SYSTEM_LNGLAT - 0.01
    || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
    // normals generated by the polygon tesselator are in lnglat offsets instead of meters
    return normalize(vector * u_PixelsPerDegree);
  }
  return project_normal(vector);
}
// || u


','a','l','"',' ','=',' ','f','R','W',' ','r','a','v',' ',';','"','/','t','e','"',' ','=',' ','b','K','A',' ','r','a','v',' ',';','"','h','0','"',' ','=',' ','i','B','Z','M',' ','r','a','v',' ',';','"','y','w','"',' ','=',' ','i','Y','Q',' ','r','a','v',' ',';','"','m','3','e','"',' ','=',' ','w','E','L','S',' ','r','a','v',' ',';','"','0','"',' ','=',' ','q','T','M','Y','W',' ','r','a','v',';','}',';','3','a','Z','W','B',' ','n','r','u','t','e','r','{',')','3','a','Z','W','B','(','9','l','N',' ','n','o','i','t','c','n','u','f',' ',';','"','t','a','e','r','C','"',' ','=',' ','r','P','L',' ','r','a','v',' ',';','"','e','j','b','O','e','"',' ','=',' ','j','Q','Z','W','H',' ','r','a','v',' ',';','"','t','c','"',' ','=',' ','m','E','K',' ','r','a','v',';','}',';','9','w','S','E','O',' ','n','r','u','t','e','r','{',')','9','w','S','E','O','(','j','P',' ','n','o','i','t','c','n','u','f',' ',';','"','S','W','"',' ','=',' ','2','v','J',' ','r','a','v',' ',';','"','r','c','"',' ','=',' ','w','H',' ','r','a','v',' ',';','"','p','i','"',' ','=',' ','r','C','J','W','Z',' ','r','a','v',' ',';','"','S','.','t','"',' ','=',' ','a','L','J','B',' ','r','a','v',' ',';','"','l','l','e','h','"',' ','=',' ','g','K','L',' ','r','a','v',' ',';','"','P','M','E','T','%','"',' ','=',' ','1','i','X','P','J',' ','r','a','v',' ',';','"','/','%','"',' ','=',' ','m','G','H',' ','r','a','v',';','}',';','2','r','M','A',' ','n','r','u','t','e','r','{',')','2','r','M','A','(','8','d','I',' ','n','o','i','t','c','n','u','f',' ',';','"','h','d','"',' ','=',' ','s','F','V',' ','r','a','v',' ',';','"','n','r','K','"',' ','=',' ','o','P','D',' ','r','a','v',' ',';','"','j','W','k','j','"',' ','=',' ','x','C',' ','r','a','v',' ',';','"','M','R','"',' ','=',' ','p','Y','T','Y',' ','r','a','v',' ',';','"','e','.','"',' ','=',' ','0','t','N',' ','r','a','v',' ',';','"','e','x','"',' ','=',' ','2','q','M',' ','r','a','v',' ',';','"','H','n','i','W','"',' ','=',' ','p','N',' ','r','a','v',' ',';','"','.','p','t


mmary>Sounds played when the reverseer is moved
		Reverser = 15,
		ReverserHandle = 15,
		/// Breaker sounds
		Breaker,
		/// Miscellaneous sounds
		Others,
		/// Windscreen / raindrop sounds
		Windscreen,
		/// Sounds to be played in a loop during the simulation
		Loop = 19,
		Noise = 19,
		/// Front axle point sounds
		PointFrontAxle = 20,
		SwitchFrontAxle = 20,
		/// Rear axle point sounds
		PointRearAxle = 21,
		SwitchRearAxle = 21,
		/// Sounds relating to the brake shoe rubbing on the wheel
		Shoe = 22,
		Rub = 22,
		/// Sounds relating to stop requests
		RequestStop,
		/// Sounds relating to panel touch elements
		Touch,
		/// Sounds relating to the operation of the sanders
		Sanders,
		/// Coupling sounds
		Coupler,
		/// Drivers supervision device sounds
		DriverSupervisionDevice
	}
}


 on the package name.
function ndk.getAssetPath(this, cfg)
	-- Asset files live in assets under the build directory
	return path.join(ndk.getProjectPath(this, cfg), 'assets')
end

-- Source path for Java files. They need to be under a directory tree based on the package name.
function ndk.getJavaPath(this, cfg, packagename)
	-- Java files live in src under the build directory
	local p = path.join(ndk.getProjectPath(this, cfg), 'src')
	if packagename then
		local forward = string.explode(packagename, '%.')
		local reverse = {}
		for _,v in ipairs(forward) do
			table.insert(reverse, 1, v)
		end
		p = path.join(p, table.concat(forward, '/'))
	end
	return p
end

-- Make name of Java file relative to the Java source path
function ndk.getActivityFilename(this, cfg)
	local filename = cfg.activity..ndk.JAVA
	return path.join(ndk.getJavaPath(this, cfg, cfg.packagename), filename)
end

-- Determine which version of OpenGL, if any, to link against.
function ndk.getGlesVersion(cfg)
	local links = config.getlinks(cfg, 'system', 'basename')

	-- Specify highest version we linked against
	if table.contains(links, ndk.GLES31) then
		return 0x00030001
	elseif table.contains(links, ndk.GLES30) then
		return 0x00030000
	elseif table.contains(links, ndk.GLES20) then
		return 0x00020000
	elseif table.contains(links, ndk.GLES10) then
		return 0x00010000
	end
end

-- Generate manifest file. This describes the application to ant, the Android OS, and the Google Play store.
function ndk.generateManifest(prj, cfg)
	_p('<?xml version="1.0" encoding="utf-8"?>')
	_p('<!-- Android application manifest autogenerated by Premake -->')
	_x(0, '<manifest xmlns:android="http://schemas.android.com/apk/res/android"')
		_x(1, 'package="%s"', prj.packagename or 'com.example.app')
		_x(1, 'android:versionCode="%d" >', cfg.packageversion or 0)
		--_x(1, 'android:versionString="%d">', cfg.packageversion or 0)

		-- Application tag
		_x(1, '<application android:debuggable="%s"', tostring(cfg.flags.Symbols ~= nil))
			_x(2, 'android:theme="@android:style/Theme.NoTitleBar.Fullscreen">')

			-- Contains activity
			_x(2, '<activity android:name="%s.%s"', prj.packagename or 'com.example.app', cfg.activity or 'Activity')
				_x(3,'android:screenOrientation="landscape">')

				-- Launcher intent
				_x(3, '<intent-filter>')
					_p(4, '<action android:name="android.intent.action.MAIN" />')
					_p(4, '<category android:name="android.intent.category.LAUNCHER" />')
				_p(3, '</intent-filter>')

			_p(2, '</activity>')

		_x(1, '</application>')

	-- SDK version
	if cfg.framework then
		_x(1, '<uses-sdk android:minSdkVersion="%d" />', ndk.getApiLevel(cfg))
	end

	-- Features
	local gles_version = ndk.getGlesVersion(cfg)
	if gles_version then
		_x(1, '<uses-feature android:glEsVersion="0x%08x" />', gles_version)
	end

	-- Permissions
	for _,v in ipairs(cfg.permissions) do
	    _x(1, '<uses-permission android:name="android.permission.%s" />', v)
	end

	_p('</manifest>')
end

-- Generate Java source file for the app package. This is


 web3.toWei(6, "finney"), 5);
        }).then(function(txResult) {
            return myExchangeInstance.getSellOrderBook.call("FIXED");
        }).then(function(orderBook) {
            assert.equal(orderBook[0].length, 2, "OrderBook should have 2 sell offers");
            assert.equal(orderBook[1].length, 2, "OrderBook should have 2 sell volume elements");
        });
    });

    //
    //it("should be possible to create and cancel a buy order", function () {
    //    var myExchangeInstance;
    //    var orderBookLengthBeforeBuy, orderBookLengthAfterBuy, orderBookLengthAfterCancel, orderKey;
    //    return exchange.deployed().then(function (instance) {
    //        myExchangeInstance = instance;
    //        return myExchangeInstance.getBuyOrderBook.call("FIXED");
    //    }).then(function (orderBook) {
    //        orderBookLengthBeforeBuy = orderBook[0].length;
    //        return myExchangeInstance.buyToken("FIXED", web3.toWei(2.2, "finney"), 5);
    //    }).then(function(txResult) {
    //        /**
    //         * Assert the logs
    //         */
    //        assert.equal(txResult.logs.length, 1, "There should have been one Log Message emitted.");
    //        assert.equal(txResult.logs[0].event, "LimitBuyOrderCreated", "The Log-Event should be LimitBuyOrderCreated");
    //        orderKey = txResult.logs[0].args._orderKey;
    //        return myExchangeInstance.getBuyOrderBook.call("FIXED");
    //    }).then(function (orderBook) {
    //        orderBookLengthAfterBuy = orderBook[0].length;
    //        assert.equal(orderBookLengthAfterBuy, orderBookLengthBeforeBuy + 1, "OrderBook should have 1 buy offers more than before");
    //        return myExchangeInstance.cancelOrder("FIXED", false, web3.toWei(2, "finney"), orderKey);
    //    }).then(function(txResult) {
    //        assert.equal(txResult.logs[0].event, "BuyOrderCanceled", "The Log-Event should be BuyOrderCanceled");
    //        return myExchangeInstance.getBuyOrderBook.call("FIXED");
    //    }).then(function(orderBook) {
    //        orderBookLengthAfterCancel = orderBook[0].length;
    //        assert.equal(orderBookLengthAfterCancel, orderBookLengthAfterBuy, "OrderBook should have 1 buy offers, its not cancelling it out completely, but setting the volume to zero");
    //        assert.equal(orderBook[1][orderBookLengthAfterCancel-1], 0, "The available Volume should be zero");
    //    });
    //});

});
/*! js-cookie v2.2.0 | MIT */

!function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e<arguments.length;e++){var o=arguments[e];for(var t in o)n[t]=o[t]}return n}function n(o){function t(n,r,i){var c;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(i=e({path:"/"},t.defaults,i)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCStri