:0; padding-bottom:0 }
 .opscript {margin-left: 3%; margin-right: 3%; }
 .opscript p { margin-top: 0.7em}
 .navbar {background: black; color: white; font-weight: bold}
 -->
 </style>

Full version, Basic version, Tiny version

Specification link: 20.3 The 'font' element

				fonts-elem-02-t ←
				index
				→ fonts-elem-06-t

fonts-elem-05-t

							SVG Image

							PNG Image

						  <object data="../svggen/fonts-elem-05-t.svg" type="image/svg+xml"
						          width="480" height="360">

						  </object>

				fonts-elem-02-t ←
				index
				→ fonts-elem-06-t

<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC  "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
 <meta name="keywords" content=


它的作用就已经全部发挥完毕，“Why” 也许只不过是多余的解释，而 “How” 或者不言自明，或者因人而异，需要读者自己摸索……

这类知识注定属于少数人。除了之前已经说过的原因之外，还有另外一个重要的原因：人们只愿传播自己相信的知识──哪怕那所谓的知识根本就是错的。重要的不是对错，重要的是感觉。尽管 “觉得正确” 和 “正确” 相差可能十万八千里，但对大多数人来说根本就是一回事儿，起码，他们情愿那就是一回事儿。所以，容易传递的是那些 “很自然地就令人相信（感觉）是正确的”，而不是 “事实上正确的” 事情。

前些年我写《把时间当作朋友》的时候，多少对它的传播是悲观的，因为我知道那些文字里所传递的绝大多数是这种道理、这类知识──它们的本质决定了其传播的困难程度。所以，那时候，我觉得只要有零星那么几个人能够被那些文字所改变，就已经万幸了。互联网时代充满了奇迹，那些文字在网上以每个月几万点击的数量被浏览。而 2009 年印刷成书出版后，竟然可以在一年之内重印 11 次，再次出乎我的意料。哪怕真正接受那些道理的读者比率再低，由于基数巨大，我知道我还是结结实实地改变了很多人的。

正是这样的动力，使我甘心、耐心地写下这本书里的文字。知道它们无论如何都会再次改变一些人──尽管我自己永远没办法知道最终改变的究竟是哪些人。生活中充满了无奈，然而有些人幸运如我，毕竟能够改变点什么。于是，那些无奈，那些不幸，就多少淡了一些。

事实上，这本书也是《把时间当做朋友》的具体延续。《把时间当做朋友》的主旨很简单：时间不会听从我们的管理，我们最多只能与时间做朋友；与时间做朋友的方法只不过是 “用正确的方式做正确的事情”。而这本书，只不过是 把 “正确的事情” 聚焦在 “用英语” 上而已，而后再看看可能的 “正确的方式” 究竟是什么。

### 李笑来

* 2010 年春于上海初稿
* 2010 年冬于北京修改
* 2015 年于北京重新制作网络开放版本
* 2019 年于北京上传至 GitHub

[[#Table of Contents|返回目录]]

--


039 7.5 7.5c0 4.2002 -3.40039 7.5 -7.5 7.5h-21.9004v21.9004c0 4.19922 -3.40039 7.5 -7.5 7.5s-7.5 -3.40039 -7.5 -7.5v-21.9004h-21.9004c-4.09961 0 -7.5 -3.40039 -7.5 -7.5c0 -4.2002 3.40039 -7.5 7.5 -7.5h21.9004v-21.9004
c0 -4.19922 3.40039 -7.5 7.5 -7.5c4.2002 0 7.5 3.40039 7.5 7.5v21.9004h21.9004z" />
    <glyph glyph-name="creative-commons-share" unicode="" horiz-adv-x="496"
d="M247.6 440c141.801 0 248.4 -110.1 248.4 -248c0 -147.1 -118.5 -248 -248.4 -248c-134 0 -247.6 109.5 -247.6 248c0 132.9 104.7 248 247.6 248zM248.4 395.3c-118.2 0 -203.7 -97.8994 -203.7 -203.3c0 -109.8 91.2002 -202.8 203.7 -202.8
c103.199 0 202.8 81.0996 202.8 202.8c0.0996094 113.8 -90.2002 203.3 -202.8 203.3zM349.4 262.9c7.7998 0 13.6992 -6.10059 13.6992 -13.7002v-182.5c0 -7.7002 -6.09961 -13.7002 -13.6992 -13.7002h-135.101c-7.7002 0 -13.7002 6 -13.7002 13.7002v54h-54
c-7.7998 0 -13.6992 6 -13.6992 13.7002v182.5c0 8.19922 6.59961 12.6992 12.3994 13.6992h136.4c7.7002 0 13.7002 -6 13.7002 -13.6992v-54h54zM159.9 147.7h40.6992v101.399c0 7.40039 5.80078 12.6006 12 13.7002h55.8008v40.2998h-108.5v-155.399zM336.1 235.8h-108.5
v-155.399h108.5v155.399z" />
    <glyph glyph-name="creative-commons-zero" unicode="" horiz-adv-x="496"
d="M247.6 440c141.801 0 248.4 -110.1 248.4 -248c0 -147.1 -118.5 -248 -248.4 -248c-134 0 -247.6 109.5 -247.6 248c0 132.9 104.7 248 247.6 248zM248.4 395.3c-118.2 0 -203.7 -97.8994 -203.7 -203.3c0 -109.8 91.2002 -202.8 203.7 -202.8
c103.199 0 202.8 81.0996 202.8 202.8c0.0996094 113.8 -90.2002 203.3 -202.8 203.3zM248 334.8c81.9004 0 102.5 -77.2998 102.5 -142.8s-20.5996 -142.8 -102.5 -142.8s-102.5 77.2998 -102.5 142.8s20.5996 142.8 102.5 142.8zM248 280.9
c-42.0996 0 -44.0996 -60.1006 -44.0996 -88.9004c0 -9.2998 0.199219 -21.7002 1.89941 -34.4004l54.5 100.2c5.7002 9.7998 2.7998 16.7998 -3.


end(png_ptr, info_ptr);
	png_destroy_write_struct(&png_ptr, &info_ptr);

	free(rowp);

	fclose(fp);

	printf("Image saved to [ %s ].\n", pngfilename );
}

void save_image_png_cb(Fl_Menu_*w, void *arg)
{
    (void)w;
    (void)arg;

    savePNGFile( "output.png",
                 guiGLView->image,
                 guiGLView->imageWidth,
                 guiGLView->imageHeight );

}

void get_grpname(char *dst, char *str)
{
    int len;

    // skip whitespace
    while ( ((*str) == '\t') || ((*str) == ' ') ) {
        str++;
    }

    len = strlen(str);

    if (str[len - 1] == '\n') { // LF
        str[len - 1] = '\0';
    } else if (str[len - 1] == '\r') {  // CR
        str[len - 1] = '\0';
    } else if ((len > 2) && str[len - 2] == '\r') { // CR + LF
        str[len - 2] = '\0';
    }

    strcpy(dst, str);
}

ri_geom_t *
parse_geom(
    const GLMgroup *grp,
    const GLMmodel *model)
{
    /*
     * do right hand -> left hand conversion
     * 1. z = -z
     * 2. index = reverse
     * 3. normal = -normal
     */
    unsigned int i;
    unsigned int tid;
    unsigned int id[3];

    float        v[3];

    ri_geom_t   *geom;

    ri_vector_t    *vertices;
    ri_vector_t    *normals;
    unsigned int   *indices;

    geom     = ri_geom_new();
    vertices = (ri_vector_t *)ri_mem_alloc(sizeof(ri_vector_t) * grp->numtriangles * 3);
    normals = (ri_vector_t *)ri_mem_alloc(sizeof(ri_vector_t) * grp->numtriangles * 3);
    indices  = (unsigned int *)ri_mem_alloc(sizeof(unsigned int ) * grp->numtriangles * 3);

    for (i = 0; i < grp->numtriangles; i++) {
        tid = grp->triangles[i];

        id[0] = model->triangles[tid].vindices[0];
        id[1] = model->triangles[tid].vindices[1];
        id[2] = model->triangles[tid].vindices[2];

        indices[ 3 * i + 0 ] = 3 * i + 0;
        indices[ 3 * i + 1 ] = 3 * i + 1;
        indices[ 3 * i + 2 ] = 3 * i + 2;

        v[0] = model->vertices[3 * id[0] + 0];
        v[1] = model->vertices[3 * id[0] + 1];
        v[2] = model->vertices[3 * id[0] + 2];

        vertices[3 * i + 0][0] = v[0];
        vertices[3 * i + 0][1] = v[1];
        vertices[3 * i + 0][2] = v[2];

        v[0] = model->vertices[3 * id[1] + 0];
        v[1] = model->vertices[3 * id[1] + 1];
        v[2] = model->vertices[3 * id[1] + 2];

        vertices[3 * i + 1][0] = v[0];
        vertices[3 * i + 1][1] = v[1];
        vertices[3 * i + 1][2] = v[2];

        v[0] = model->vertices[3 * id[2] + 0];
        v[1] = model->vertices[3 * id[2] + 1];
        v[2] = model->vertices[3


return 6;
     }

     // 删除本地指针
     env->DeleteLocalRef(jTextModel);

    // 初始化超链接

    // 初始化 toc

    // 获取 TextModel 文本，并设置给 BookModel
    // shared_ptr<TextModel> textModel = bookModel->getTextModel();
    // footnotes ==> 注脚是啥东西
    // 字体设置

    return 0;
}*/

static std::map<int, std::shared_ptr<FormatPlugin>> sPluginMap;
static int sPluginIndex = 1; // 假设默认从 1 开始，之后搞一个唯一 id，通过 md5

static const std::string TAG = "JNINativeFormatPlugin";

extern "C"
JNIEXPORT jint JNICALL
Java_com_newbiechen_nbreader_ui_component_book_plugin_NativeFormatPlugin_createFormatPluginNative(
        JNIEnv *env, jobject thiz, jstring format_type) {

    // 获取调用该方法的 NativePlugin 对应的 type
    std::string formatTypeStr = AndroidUtil::toCString(env, format_type);

    // 根据 type 查找并返回数据
    std::shared_ptr<FormatPlugin> pluginPtr = PluginManager::createFormatPlugin(formatTypeStr);

    int pluginIndex = sPluginIndex;

    // 插入到 map 中缓存
    sPluginMap.insert(std::pair<int, std::shared_ptr<FormatPlugin>>(pluginIndex, pluginPtr));

    sPluginIndex++;

    return pluginIndex;
}

extern "C"
JNIEXPORT void JNICALL
Java_com_newbiechen_nbreader_ui_component_book_plugin_NativeFormatPlugin_releaseFormatPluginNative(
        JNIEnv *env, jobject thiz, jint plugin_desc) {
    // 释放 plugin 对象
    sPluginMap.erase(plugin_desc);
}

extern "C"
JNIEXPORT void JNICALL
Java_com_newbiechen_nbreader_ui_component_book_plugin_NativeFormatPlugin_setConfigureNative(
        JNIEnv *env, jobject thiz, jint plugin_desc,
        jstring cache_path, jstring chapter_pattern, jstring chapter_prologue_title) {
    auto pluginPtr = sPluginMap[plugin_desc];
    if (pluginPtr != nullptr) {
        std::string cachePath = AndroidUtil::toCString(env, cache_path);
        std::string chapterPattern = AndroidUtil::toCString(env, chapter_pattern);
        std::string chapterPrologueTitle = AndroidUtil::toCString(env, chapter_prologue_title);
        pluginPtr->setConfigure(cachePath, chapterPattern, chapterPrologueTitle);
    }
}

extern "C"
JNIEXPORT void JNICALL
Java_com_newbiechen_nbreader_ui_component_book_plugin_NativeFormatPlugin_setBookSourceNative(
        JNIEnv *env, jobject thiz, jint plugin_desc, jstring book_path) {

    auto pluginPtr = sPluginMap[plugin_desc];
    if (pluginPtr != nullptr) {
        std::string bookPath = AndroidUtil::toCString(env, book_path);
        pluginPtr->setBookResource(bookPath);
    }
}

extern "C"
JNIEXPORT jstring JNICALL
Java_com_newbiechen_nbreader_ui_component_book_plugin_NativeFormatPlugin_getEncodingNative(
        JNIEnv *env, jobject thiz, jint plugin_desc) {
    auto pluginPtr = sPluginMap[plugin_desc];
    std::string encoding("");
    if (pluginPtr != nullptr) {
        pluginPtr->readEncoding(encoding);
    }
    return AndroidUtil::toJString(env, encoding);
}

extern "C"
JNIEXPORT jstring JNICALL
Java_com_newbiechen_nbreader_ui_component_book_plugin_NativeFormatPlugin_getLanguageNative(
        JNIEnv *env, jobject thiz, jint plugin_desc) {
    auto pluginPtr = sPluginMap[plugin_desc];
    std::string lang("");
    if (plugin


ations(txId: TxId): Int? = tryWithLogs {
        val confirmedAtBlockHeight = getTransactionMerkleProof(txId)?.block_height
        val currentBlockHeight = getBlockTipHeight()
        when {
            confirmedAtBlockHeight != null && currentBlockHeight != null -> currentBlockHeight - confirmedAtBlockHeight + 1
            else -> null
        }
    }

    override suspend fun getFeerates(): Feerates? = tryWithLogs {
        val res: MempoolSpaceRecommendedFeerates = client.get("api/v1/fees/recommended").body()
        Feerates(
            minimum = FeeratePerByte(res.minimumFee.sat),
            slow = FeeratePerByte(res.economyFee.sat),
            medium = FeeratePerByte(res.hourFee.sat),
            fast = FeeratePerByte(res.halfHourFee.sat),
            fastest = FeeratePerByte(res.fastestFee.sat),
        )
    }

    companion object {
        val OfficialMempoolMainnet = Url("https://mempool.space")
        val OfficialMempoolTestnet3 = Url("https://mempool.space/testnet/")
        val OfficialMempoolTestnet4 = Url("https://mempool.space/testnet4/")
    }
}

@Serializable
data class MempoolSpaceOutspendResponse(
    val spent: Boolean,
    val txid: String?,
    val vin: Int?,
)

@Serializable
data class MempoolSpaceTransactionMerkleProofResponse(
    val block_height: Int,
    val pos: Int
)

@Serializable
data class MempoolSpaceRecommendedFeerates(
    val fastestFee: Int,
    val halfHourFee: Int,
    val hourFee: Int,
    val economyFee: Int,
    val minimumFee: Int
)package fr.acinq.lightning.blockchain.electrum

import fr.acinq.bitcoin.ByteVector32
import fr.acinq.bitcoin.Transaction
import fr.acinq.lightning.blockchain.*
import fr.acinq.lightning.logging.LoggerFactory
import fr.acinq.lightning.logging.debug
import fr.acinq.lightning.logging.info
import fr.acinq.lightning.transactions.Scripts
import fr.acinq.lightning.utils.currentTimestampMillis
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.BufferOverflow
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.asSharedFlow
import kotlinx.coroutines.flow.consumeAsFlow
import kotlin.math.max

class ElectrumWatcher(val client: IElectrumClient, val scope: CoroutineScope, loggerFactory: LoggerFactory) : IWatcher, CoroutineScope by scope {

    private val logger = loggerFactory.newLogger(this::class)
    private val mailbox = Channel<WatcherCommand>(Channel.BUFFERED)

    private val _notificationsFlow = MutableSharedFlow<WatchTriggered>(replay = 0, extraBufferCapacity = 64, onBufferOverflow = BufferOverflow.SUSPEND)
    override fun openWatchNotificationsFlow(): Flow<WatchTriggered> = _notificationsFlow.asSharedFlow()

    // this is used by a Swift watch-tower module in the Phoenix iOS app to tell when the watcher is up-to-date
    // the value that is emitted in the time elapsed (in milliseconds) since the watcher is ready and idle
    private val _uptodateFlow = MutableSharedFlow<Long>(replay = 0, extraBufferCapacity = 64, onBufferOverflow = BufferOverflow.SUSPEND)
    fun openUpToDateFlow(): Flow<Long> = _uptodateFlow.asSharedFlow()

    override suspend fun watch(watch: Watch) {
        mailbox.send(WatcherCommand.AddWatch(watch))
    }

    override suspend fun publish(tx: Transaction) {
        mailbox.send(WatcherCommand.Publish(tx))
    }

    private sealed interface WatcherCommand {
        data class AddWatch(val watch: Watch) : WatcherCommand
        data class ProcessNotification(val notification: ElectrumResponse) : WatcherCommand
        data class ProcessConnectionStatus(


            x[1] == x.length -> false
            """);
  }

  @Test
  public void testPrimitiveWidening() {
    doTest(() -> 2.0 + 2 == 4, """
            2.0 + (double)2 -> 4.0
            2.0 + (double)2 == (double)4 -> true
            """);
  }

  @Test
  public void testArrayCreation() {
    doTest(() -> new int[10][5].length == 10, """
            new int[10][5] -> [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], ...]
            new int[10][5].length -> 10
            new int[10][5].length == 10 -> true
            """);
  }

  static final class Point {
    public final int x;
    public final int y;

    Point(int x, int y) {
      this.x = x;
      this.y = y;
    }

    void check() {
      doTest(() -> x == y, """
              this -> [1; 3]
              this.x -> 1
              this -> [1; 3]
              this.y -> 3
              this.x == this.y -> false
              """);
    }

    @Override
    public String toString() {
      return "[" + x + "; " + y + "]";
    }
  }

  @Test
  public void testFieldAccess() {
    Point point = new Point(1, 3);
    doTest(() -> point.x == point.y - 2, """
            point -> [1; 3]
            point.x -> 1
            point -> [1; 3]
            point.y -> 3
            point.y - 2 -> 1
            point.x == point.y - 2 -> true
            """);
    point.check();
  }

  @Test
  public void testList() {
    doTest(() -> List.of("a", "b", "c", "d").contains("e"), "List.of(\"a\",\"b\",\"c\",\"d\") -> [\"a\", \"b\", \"c\", \"d\"]\n" +
            "List.of(\"a\",\"b\",\"c\",\"d\").contains(\"e\") -> false\n");
  }

  @Test
  public void testConditionalAndOr() {
    doTest(() -> 2 < 3 && 4 > 5, """
            2 < 3 -> true
            4 > 5 -> false
            2 < 3 && 4 > 5 -> false
            """);
    doTest(() -> 2 < 3 || 4 > 5, """
            2 < 3 -> true
            2 < 3 || 4 > 5 -> true
            """);
  }

  @Test
  public void testInstanceOf() {
    Object obj = "Hello";
    doTest(() -> obj instanceof String, """
            obj -> "Hello"
            obj instanceof String -> true
            """);
  }

  @Test
  public void testCast() {
    Object obj = "Hello";
    doTest(() -> ((String)obj).length() == 5, """
            obj -> "Hello"
            (String)obj -> "Hello"
            ((String)obj).length() -> 5
            ((String)obj).length() == 5 -> true
            """);
    record LocalClass(int x) {}
    Object obj2 = new LocalClass(1);
    doTest(() -> ((LocalClass) obj2).x() == 1, """
            obj2 -> LocalClass[x=1]
            (LocalClass)obj2 -> LocalClass[x=1]
            ((LocalClass)obj2).x() -> 1
            ((LocalClass)obj2).x() == 1 -> true
            """);
  }


2*t2;
  xB=Frobenius(inverse(f3x2),X,3);
  t3=t0*xB;
  xB=inverse(f3x2);
  t0=t3*xB;
  t4=t3*t4;
  xB=Frobenius(inverse(f3x3),X,3);
  t0=t0*xB;
  t3=t0*t2;
  xB=Frobenius(inverse(f3x3),X,2)*Frobenius(f3x0,X,5);
  t2=t3*xB;
  t3=t3*t5;
  t5=t3*t2;
  xB=inverse(f3x3);
  t2=t2*xB;
  xA=Frobenius(inverse(f3x6),X,3);
  //xB=inverse(f3x3);
  t3=xA*xB;
  t2=t2*t2;
  t4=t2*t4;
  xB=Frobenius(f3x3,X,1);
  t2=t1*xB;
  xA=xB; //xA=Frobenius(f3x3,X,1);
  xB=Frobenius(inverse(f3x2),X,3);
  t1=xA*xB;
  t6=t2*t4;
  xB=Frobenius(f3x4,X,1);
  t4=t2*xB;
  xB=Frobenius(f3x3,X,4);
  t2=t6*xB;
  xB=Frobenius(inverse(f3x5),X,3)*Frobenius(f3x5,X,4);
  t7=t6*xB;
  t4=t2*t4;
  xB=Frobenius(f3x6,X,1);
  t2=t2*xB;
  t4=t4*t4;
  t4=t4*t5;
  xA=inverse(f3x4);
  xB=Frobenius(inverse(f3x4),X,3);
  t5=xA*xB;
//  xB=Frobenius(inverse(f3x4),X,3);
  t3=t3*xB;
  xA=Frobenius(f3x5,X,1);
  xB=xA; //xB=Frobenius(f3x5,X,1);
  t6=xA*xB;
  t7=t6*t7;
  xB=Frobenius(f3x0,X,3);
  t6=t5*xB;
  t4=t6*t4;
  xB=Frobenius(inverse(f3x7),X,3);
  t6=t6*xB;
  t0=t4*t0;
  xB=Frobenius(f3x6,X,4);
  t4=t4*xB;
  t0=t0*t0;
  xB=inverse(f3x5);
  t0=t0*xB;
  t1=t7*t1;
  t4=t4*t7;
  t1=t1*t1;
  t2=t1*t2;
  t1=t0*t3;
  xB=Frobenius(inverse(f3x3),X,3);
  t0=t1*xB;
  t1=t1*t6;
  t0=t0*t0;
  t0=t0*t5;
  xB=inverse(f3x6);
  t2=t2*xB;
  t2=t2*t2;
  t2=t2*t4;
  t0=t0*t0;
  t0=t0*t3;
  t1=t2*t1;
  t0=t1*t0;
//  xB=inverse(f3x6);
  t1=t1*xB;
  t0=t0*t0;
  t0=t0*t2;
  xB=f3x0*inverse(f3x7);
  t0=t0*xB;
//  xB=f3x0*inverse(f3x7);
  t1=t1*xB;
  t0=t0*t0;
  t0=t0*t1;

  return t0;
}

//
// R-ate Pairing - note denominator elimination has been applied
//
// P is a point of order q. Q(x


uted() const
    {
        BOOL mute = 0;
        return endpointVolume != nullptr
                 && check (endpointVolume->GetMute (&mute)) && mute != 0;
    }

    bool setMuted (bool shouldMute) const
    {
        return endpointVolume != nullptr
                && check (endpointVolume->SetMute (shouldMute, nullptr));
    }

    ComSmartPtr<IAudioEndpointVolume> endpointVolume;

    JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MMDeviceMasterVolume)
};

}

//==============================================================================
AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_WASAPI()
{
    if (SystemStats::getOperatingSystemType() >= SystemStats::WinVista)
        return new WasapiClasses::WASAPIAudioIODeviceType();

    return nullptr;
}

//==============================================================================
#define JUCE_SYSTEMAUDIOVOL_IMPLEMENTED 1
float JUCE_CALLTYPE SystemAudioVolume::getGain()              { return WasapiClasses::MMDeviceMasterVolume().getGain(); }
bool  JUCE_CALLTYPE SystemAudioVolume::setGain (float gain)   { return WasapiClasses::MMDeviceMasterVolume().setGain (gain); }
bool  JUCE_CALLTYPE SystemAudioVolume::isMuted()              { return WasapiClasses::MMDeviceMasterVolume().isMuted(); }
bool  JUCE_CALLTYPE SystemAudioVolume::setMuted (bool mute)   { return WasapiClasses::MMDeviceMasterVolume().setMuted (mute); }
/*
  ==============================================================================

   This file is part of the JUCE library.
   Copyright (c) 2013 - Raw Material Software Ltd.

   Permission is granted to use this software under the terms of either:
   a) the GPL v2 (or any later version)
   b) the Affero GPL v3

   Details of these licenses can be found at: www.gnu.org/licenses

   JUCE 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.

   ------------------------------------------------------------------------------

   To release a closed-source product which uses JUCE, commercial licenses are
   available: visit www.juce.com for more information.

  ==============================================================================
*/

ChannelRemappingAudioSource::ChannelRemappingAudioSource (AudioSource* const source_,
                                                          const bool deleteSourceWhenDeleted)
   : source (source_, deleteSourceWhenDeleted),
     requiredNumberOfChannels (2),
     buffer (2, 16)
{
    remappedInfo.buffer = &buffer;
    remappedInfo.startSample = 0;
}

ChannelRemappingAudioSource::~ChannelRemappingAudioSource() {}

//==============================================================================
void ChannelRemappingAudioSource::setNumberOfChannelsToProduce (const int requiredNumberOfChannels_)
{
    const ScopedLock sl (lock);
    requiredNumberOfChannels = requiredNumberOfChannels_;
}

void ChannelRemappingAudioSource::clearAllMappings()
{
    const ScopedLock sl (lock);

    remappedInputs.clear();
    remappedOutputs.clear();
}

void ChannelRemappingAudioSource::setInputChannelMapping (const int destIndex, const int sourceIndex)
{
    const ScopedLock sl (lock);

    while (remappedInputs.size() < destIndex)
        remappedInputs.add (-1);

    remappedInputs.set (destIndex, sourceIndex);
}

void ChannelRemappingAudioSource::setOutputChannelMapping (const int sourceIndex, const int destIndex)
{
    const ScopedLock sl (lock);

    while (remappedOutputs.size() < sourceIndex)
        remappedOutputs.add (-1);

    remappedOutputs.set (sourceIndex, destIndex);
}

int ChannelRemappingAudi


中获取用户进程传递的参数。

下面给出一个更具体的例子。在我们的移植工作中，我们需要测试用户进程的运行，使其向屏幕进行输出。
但当时用户态尚未支持`printf`函数，我们便通过系统调用，在S态进行一些输出。
为此，我们需要添加一个`test_proc`函数，其需要一个整型参数。

首先，我们在xv6-user/user.h文件中添加函数声明，为用户程序添加调用接口：
```C
int test_proc(int);
```
在xv6-user/usys.pl中添加行:
```perl
entry("test_proc");
```
随后修改内核，在kernel/include/syscall.h中添加调用号，调用号可以自行选择，这里我们选择22，表示第22个系统调用。
```C
#define SYS_test_proc 22
```
最后，在kernel/include/syscall.c中修改系统调用表，以及添加函数`sys_test_proc`。注意，这里需要声明为无参数类型。
```C
extern uint64 sys_test_proc(void);

static uint64 (*syscalls[])(void) = {
    ......
    [SYS_test_proc]    sys_test_proc,
};
```
函数的实现如下。其中`argint`函数可以从进程的保护现场中取得参数，第一个参数表示系统调用的第几个参数，从0开始编号。
```C
uint64 sys_test_proc(void) {
    int n;
    argint(0, &n);
    printf("hello world from proc %d, hart %d, arg %d\n", myproc()->pid, r_tp(), n);
    return 0;
}
```
至此，我们就已经成功添加了一个系统调用。在用户程序中可以使用这个系统调用，例如以下的用户程序实例：
```C
#include "kernel/include/types.h"
#include "kernel/include/sntat.h"
#include "xv6-user/user.h"

int main()
{
    int n = 5;
    while (n--) {
        test_proc(n);
    }
    exit(0);
}
```
编译运行后的结果如下图所示（编译用户程序的方法详见[此处](./fs.md)）：

![](/img/syscall_test.png)

---
marp: true
---

# **xv6-k210 移植报告**
+ 报告人： 车春池
+ 华中科技大学本科三年级
+ 时间： 2020-12-26
+ 地点： 北京中科院计算所

```
 (`-')           (`-')                   <-.(`-')
 (OO )_.->      _(OO )                    __( OO)
 (_| \_)--.,--.(_/,-.\  ,--.    (`-')    '-'. ,--.  .----.   .--.   .


))
    }

    fn struct_variant<V>(mut self, _fields: &'static [&'static str], visitor: V) -> Result<V::Value>
    where
        V: serde::de::Visitor<'de>,
    {
        self.read(|s| s.root_deserializer.deserialize_map(visitor))
    }
}

/// Deserializer used specifically for deserializing a document's cstring keys.
struct DocumentKeyDeserializer<'d, 'de> {
    root_deserializer: &'d mut Deserializer<'de>,
}

impl<'d, 'de> serde::de::Deserializer<'de> for DocumentKeyDeserializer<'d, 'de> {
    type Error = Error;

    fn deserialize_any<V>(self, visitor: V) -> Result<V::Value>
    where
        V: serde::de::Visitor<'de>,
    {
        let s = self.root_deserializer.deserialize_cstr()?;
        match s {
            Cow::Borrowed(b) => visitor.visit_borrowed_str(b),
            Cow::Owned(string) => visitor.visit_string(string),
        }
    }

    fn deserialize_newtype_struct<V>(self, _name: &'static str, visitor: V) -> Result<V::Value>
    where
        V: serde::de::Visitor<'de>,
    {
        visitor.visit_newtype_struct(self)
    }

    fn is_human_readable(&self) -> bool {
        false
    }

    forward_to_deserialize_any! {
        bool char str bytes byte_buf option unit unit_struct string
        identifier seq tuple tuple_struct struct map enum
        ignored_any i8 i16 i32 i64 u8 u16 u32 u64 f32 f64
    }
}

/// Deserializer used to deserialize the given field name without any copies.
struct FieldDeserializer {
    field_name: &'static str,
}

impl<'de> serde::de::Deserializer<'de> for FieldDeserializer {
    type Error = Error;

    fn deserialize_any<V>(self, visitor: V) -> Result<V::Value>
    where
        V: serde::de::Visitor<'de>,
    {
        visitor.visit_borrowed_str(self.field_name)
    }

    fn deserialize_newtype_struct<V>(self, _name: &'static str, visitor: V) -> Result<V::Value>
    where
        V: serde::de::Visitor<'de>,
    {
        visitor.visit_newtype_struct(self)
    }

    fn is_human_readable(&self) -> bool {
        false
    }

    serde::forward_to_deserialize_any! {
        bool u8 u16 u32 u64 i8 i16 i32 i64 f32 f64 char str string seq
        bytes byte_buf map struct option unit
        ignored_any unit_struct tuple_struct tuple enum identifier
    }
}

/// A `MapAccess` used to deserialize entire documents as chunks of bytes without deserializing
/// the individual key/value pairs.
struct RawDocumentAccess<'d> {
    deserializer: RawDocumentDeserializer<'d>,

    /// Whether the first key has been deserialized yet or not.
    deserialized_first: bool,

    /// Whether or not this document being deserialized is for an array or not.
    array: bool,
}

impl<'de> RawDocumentAccess<'de> {
    fn new(doc: &'de RawDocument) -> Self {
        Self {
            deserializer: RawDocumentDeserializer { raw_doc: doc },
            deserialized_first: false,
            array: false,
        }
    }

    fn for_array(doc: &'de RawDocument) -> Self {
        Self {
            des


, CalciteAssert.SchemaSpec schemaSpec,
      SqlToRelConverter.Config sqlToRelConf, Program... programs) {
    final SchemaPlus rootSchema = Frameworks.createRootSchema(true);
    final FrameworkConfig config = Frameworks.newConfigBuilder()
        .parserConfig(parserConfig)
        .defaultSchema(CalciteAssert.addSchema(rootSchema, schemaSpec))
        .traitDefs(traitDefs)
        .sqlToRelConverterConfig(sqlToRelConf)
        .programs(programs)
        .build();
    return Frameworks.getPlanner(config);
  }

  private static MysqlSqlDialect mySqlDialect(NullCollation nullCollation) {
    return new MysqlSqlDialect(SqlDialect.EMPTY_CONTEXT
        .withDatabaseProduct(SqlDialect.DatabaseProduct.MYSQL)
        .withIdentifierQuoteString("`")
        .withNullCollation(nullCollation));
  }

  @Test public void testSimpleSelectStarFromProductTable() {
    String query = "select * from \"product\"";
    sql(query).ok("SELECT *\nFROM \"foodmart\".\"product\"");
  }

  @Test public void testSimpleSelectQueryFromProductTable() {
    String query = "select \"product_id\", \"product_class_id\" from \"product\"";
    final String expected = "SELECT \"product_id\", \"product_class_id\"\n"
        + "FROM \"foodmart\".\"product\"";
    sql(query).ok(expected);
  }

  @Test public void testSelectQueryWithWhereClauseOfLessThan() {
    String query =
        "select \"product_id\", \"shelf_width\"  from \"product\" where \"product_id\" < 10";
    final String expected = "SELECT \"product_id\", \"shelf_width\"\n"
        + "FROM \"foodmart\".\"product\"\n"
        + "WHERE \"product_id\" < 10";
    sql(query).ok(expected);
  }

  @Test public void testSelectQueryWithWhereClauseOfBasicOperators() {
    String query = "select * from \"product\" "
        + "where (\"product_id\" = 10 OR \"product_id\" <= 5) "
        + "AND (80 >= \"shelf_width\" OR \"shelf_width\" > 30)";
    final String expected = "SELECT *\n"
        + "FROM \"foodmart\".\"product\"\n"
        + "WHERE (\"product_id\" = 10 OR \"product_id\" <= 5) "
        + "AND (80 >= \"shelf_width\" OR \"shelf_width\" > 30)";
    sql(query).ok(expected);
  }

  @Test public void testSelectQueryWithGroupBy() {
    String query = "select count(*) from \"product\" group by \"product_class_id\", \"product_id\"";
    final String expected = "SELECT COUNT(*)\n"
        + "FROM \"foodmart\".\"product\"\n"
        + "GROUP BY \"product_class_id\", \"product_id\"";
    sql(query).ok(expected);
  }

  @Test public void testSelectQueryWithMinAggregateFunction() {
    String query = "select min(\"net_weight\") from \"product\" group by \"product_class_id\" ";
    final String expected = "SELECT MIN(\"net_weight\")\n"
        + "FROM \"foodmart\".\"product\"\n"
        + "GROUP BY \"product_class_id\"";
    sql(query).ok(expected);
  }

  @Test public void testSelectQueryWithMinAggregateFunction1() {
    String query = "select \"product_class_id\", min(\"net_weight\") from"
        + " \"product\" group by \"product_class_id\"";
    final String expected = "SELECT \"product_class_id\", MIN(\"net_weight\")\n"
        + "FROM \"foodmart\".\"product\"\n"
        + "GROUP B


 várias linhas, cada uma com uma string.
O valor de cada caracter é computado como segue:
Valor = (Posição no alfabeto) + (Elemento de entrada) + (Posição do elemento)
As posições iniciam em zero. 'A' tem posição 0 no alfabeto, ‘C' tem posição 2 no alfabeto, ...
O cálculo de hash retornado é a soma de todos os caracteres da entrada. Por exemplo, se a entrada for:
CBA
DDD
então cada caractere deverá ser computado como segue:
2 = 2 + 0 + 0 : 'C' no elemento 0 posição 0
2 = 1 + 0 + 1 : 'B' no elemento 0 posição 1
2 = 0 + 0 + 2 : 'A' no elemento 0 posição 2
4 = 3 + 1 + 0 : 'D' no elemento 1 posição 0
5 = 3 + 1 + 1 : 'D' no elemento 1 posição 1
6 = 3 + 1 + 2 : 'D' no elemento 1 posição 2
O cálculo final de hash será 2+2+2+4+5+6 = 21.

//### Entrada
A entrada contém vários casos de teste. A primeira linha de entrada contém um inteiro N que indica a quantidade de casos de teste.
Cada caso de teste inicia com um inteiro L (1 ≤ L ≤ 100) que indica a quantidade de linhas que vem a seguir. Cada uma destas L linhas
contém uma string com até 50 letras maiúsculas ('A' - 'Z').

//### Saída
Para cada caso de teste imprima o valor de hash que é calculado conforme o exemplo apresentado acima.
|---------------------------------------|
| Exemplo de Entrada | Exemplo de Saída |
|--------------------|------------------|
| 1                  | 594              |
| 2                  |                  |
| OSADOISAJDSAOIDJA  |                  |
| ASOIJDOSAJDASOIDJA |                  |
|---------------------------------------|
*/

//Código do desafio:
const inputs = [ //para uso local
  '2',
  '2',
  'OSADaaaOISAJDSAOIDJA',
  'ASOIJDOnnnSAJDASOIDJA',
  '2',
  'CBA',
  'DDD'
] //para uso local
let index = 1 //para uso local

const regexLine = /[A-Z]/g

// let nCase = parseInt(gets()); //para uso na DIO
let nCase = parseInt(inputs[0]); //para uso local
let L = 0;
let value;
let lines;

while (nCase > 0) {
  nCase--
  lines = []
  value = 0
  // L = parseInt(gets()) //para uso na DIO
  L = parseInt(inputs[index++]) //para uso local

  if (L < 1 || L > 100) {
    index += L; //para uso local
    for (let i = 0; i < L; i++) { gets(); } //para uso na DIO
    continue;
  }

  for (let i = 0; i < L; i++) {
    // lines = [...lines, gets()] //para uso na DIO
    lines = [...lines, inputs[i + index]] //para uso local
  }

  for (const [i, line] of lines.entries()) {
    value += line.match(regexLine).slice(0, 50).reduce((acc, curr, elementPosition, array) => {
      const alphabetPosition = parseInt(curr, 36) - 10;
      const elementInput = i;

      return acc + alphabetPosition + elementInput + elementPosition
    }, 0)
  }

  console.log(value);
  index += L //para uso local
}/*
//### Desafio - Ordenando Números Pares e Ímpares
Crie um programa onde você receberá valores inteiros não negativos como entrada.
Ordene estes valores de acordo com o seguinte critério:
•	Primeiro os Pares
•	Depois os Ímpares
Você deve exibir os pares em ordem crescente


demo 只是针对九宫图的性能研究
/// 如果你需要使用此功能，可能样式还需要调整一下，或在pub上找找。

class NineImageEditorState extends WidgetState implements ImageWidgetChangeListener {

  NineImageVM? nineImageVM ;

  @override
  void initState() {
    nineImageVM = NineImageVM(this);
    super.initState();
  }

  @override
  void dispose() {
    nineImageVM!.clearAllData();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        Container(
          width: getWidthPx(750),height: getHeightPx(700),
          child: ProviderWidget<NineImageVM?>(
            model: nineImageVM,
            onModelReady: (model){
              nineImageVM!.addImageData();
            },
            builder: (ctx,model,child){

              return flowWay();
            },
          ),
        )
      ],
    );
  }
  // ignore: deprecated_member_use
  /// * 性能要优于 [gridWay]

  final List<LayoutId> children = [];
  Widget flowWay(){

    return CustomMultiChildLayout(
      delegate: NineFlowDelegate(children),
      children: children.length > 9 ? children.sublist(0,9):children,
    );
  }

  ///接口相关

  @override
  void addChildWidget(ImageDataWrapper dataWrapper) {
    children.insert(0, LayoutId(child: RepaintBoundary(child: buildItem(dataWrapper)),id: dataWrapper.asset.name!,));

  }

  @override
  void addChildrenWidget(List<ImageDataWrapper> datas) {

    for(ImageDataWrapper data in datas){
      final RepaintBoundary repaintBoundary = RepaintBoundary(child: buildItem(data),);
      final LayoutId layoutId = LayoutId(child: repaintBoundary,id: data.asset.name!,);
      children.insert(0, layoutId);
    }

  }

  @override
  void removeChildWidget(ImageDataWrapper dataWrapper) {
    // TODO: implement removeChildWidget
    children.removeWhere((element) => element.id == dataWrapper.asset.name);
  }

  ///过渡绘制
  /// * 如果使用此方法，需要调整 [NineImageVM]的代码
  @Deprecated('low quality performance')
  Widget gridWay(){
    return Container(
      color: Color.fromRGBO(238, 238, 238, 1),
      margin: EdgeInsets.symmetric(horizontal: getWidthPx(40)),
      //constraints: BoxConstraints().tighten(width: getWidthPx(670),height: getWidthPx(170)),
      height: getWidthPx(nineImageVM!.row/3 * 520),
      child: GridView.count(
        crossAxisCount: 3,childAspectRatio: 168/121,
        crossAxisSpacing: getWidthPx(15),mainAxisSpacing: getWidthPx(20),
        padding: const EdgeInsets.all(0),
        children: nineImageVM!.imageList.map<Widget>((e) => buildItem(e)).toList(),),
    );
  }

  Widget buildItem(ImageDataWrapper data){
    if(data.asset.name == nineImageVM!.tag){
      return GestureDetector(
        onTap: (){
          checkPermission();
        },
        child: Container(
          width: getWidthPx(180),height: getWidthPx(180),
          margin: EdgeInsets.only(right: getWidthPx(20)),
          alignment: Alignment.center,
          decoration: BoxDecoration(
              color: Colors.white,
              border: Border.all(color: Color.fromRGBO(153, 153, 153, 1),
                  width: getWidthPx(2)),
              borderRadius: BorderRadius.circular(getWidthPx(


ss;
            return result;
        }

        private void Cleanup(DDS.DomainParticipantFactory f, DDS.IDomainParticipant p)
        {
            if (p != null)
            {
                p.DeleteContainedEntities();
            }
            if (f != null)
            {
                f.DeleteParticipant(p);
            }
        }
    }
}


t { "1" } else { "0" });
        if req.no_peer_id {
            qps.push("no_peer_id", "1");
        }
        if let Some(ev) = req.event.str() {
            qps.push("event", ev);
        }
        if let Some(ref ip) = req.ip {
            qps.push("ip", ip);
        }
        if let Some(numwant) = req.numwant {
            qps.push_num("numwant", numwant);
        }
        if let Some(ref key) = req.key {
            qps.push("key", key);
        }
        if let Some(ref tracker_id) = req.tracker_id {
            qps.push("trackerid", tracker_id);
        }

        let mut url = self.url.clone();
        qps.apply(&mut url);

        let http_req = self.client
            .get(url)
            .header(hyper::header::UserAgent(self.user_agent.clone()));
        Ok(http_req)
    }

    fn parse_res(&self, http_res: &mut hyper::client::response::Response) -> Result<TrackerResponse> {
        if http_res.status != hyper::status::StatusCode::Ok {
            bail!("tracker returned non-200: {}", http_res.status);
        }
        let mut buf = Vec::new();
        http_res.read_to_end(&mut buf)?;
        let b = BencodeRef::decode(buf.as_slice(), BDecodeOpt::default())?;
        let bd = b.dict().ok_or("response bencoding not a dict")?;
        Ok(TrackerResponse {
               failure_reason: lookup_str(bd, "failure reason".as_bytes())?,
               warning_message: lookup_str(bd, "warning message".as_bytes())?,
               interval: lookup_i64(bd, "interval".as_bytes())?
                   .ok_or("missing 'interval'")?,
               min_interval: lookup_i64(bd, "min interval".as_bytes())?,
               tracker_id: lookup_str(bd, "tracker id".as_bytes())?,
               complete: lookup_i64(bd, "complete".as_bytes())?,
               incomplete: lookup_i64(bd, "incomplete".as_bytes())?,
               peers: self.parse_peers(bd)?, // TODO
           })
    }

    /// Parse the peers list from a complete tracker response bdict.
    fn parse_peers(&self, bd: &BDictAccess<BencodeRef>) -> Result<Vec<Peer>> {
        let peers = bd.lookup("peers".as_bytes()).ok_or("missing 'peers'")?;
        if let Some(_) = peers.dict() {
            bail!("Reading peers as 'dict' not implemented");
        }
        if let Some(_) = peers.str() {
            bail!("Reading peers as 'str' not implemented");
        }
        if let Some(_) = peers.list() {
            bail!("Reading peers as 'list' not implemented");
        }
        if let Some(peers) = peers.bytes() {
            // peers: (binary model)
            // multiples of 6 bytes.
            // First 4 bytes are the IP address and last 2 bytes are the port number.
            // All in network (big endian) notation.
            if peers.len() % 6 != 0 {
                bail!("Peers 'byte' representation not 6*n bytes");
            }
            return Ok(peers
                          .chunks(6)
                          .map(|chunk| {
                let (bytes_ip, bytes_port) = chunk.split_at(4);
                let port = BigEndian::read_u16(bytes_port);
                let ip = net::Ipv4Addr::new(bytes_ip[0], bytes_ip[1], bytes_ip[2], bytes_ip[3]);
                Peer {
                    peer_id: None,
                    address: net::SocketAddr::V4(net::


#language {
  background: #00b093;
  color: #740864;
  padding: 0 5px;
  margin: 0 5px;
  min-width: 16px;
}

#keyboard-state {
  background: #97e1ad;
  color: #000000;
  padding: 0 0px;
  margin: 0 5px;
  min-width: 16px;
}

#keyboard-state > label {
  padding: 0 5px;
}

#custom-spotify {
  padding: 0 10px;
  margin: 0 4px;
  /* background-color: #1db954; */
  color: #abb2bf;
}

#keyboard-state > label.locked {
  background: rgba(0, 0, 0, 0.2);
}
@charset "UTF-8";

@import "DYNAMIC CSS PLACEHOLDER";

blockquote {
  margin:0 0 10pt 0;
}

.attribution{
  margin:0;
  font-style:normal;
}

blockquote p{
  text-align:right;
}

blockquote p:first-child{
  font-style:italic;
}

/*--------Put Your Custom CSS Rules Below--------*/

/*----Uncomment to turn on automatic code wrapping

pre.programlisting, pre.screen, pre.literallayout {
  white-space: pre-wrap;
  word-wrap: break-word;
}
----*/

/*----Uncomment to change the TOC start page (set
the number to one page _after_ the one you want;
so 6 to start on v, 8 to start on vii, etc.)

@page tableofcontents:first {
  counter-reset: page 6;
}
----*/

/*----Uncomment to fix a bad break in the title
      (increase padding value to push down, decrease
      value to pull up)

div.book div.booktitlepage h1.title {
  padding-left: 1.5in;
}
----*/

/*----Uncomment to fix a bad break in the subtitle
      (increase padding value to push down, decrease
      value to pull up)

div.book div.booktitlepage h2.subtitle {
  padding-left: 1in;
}
----*/

/*----Uncomment to fix a bad break in the author names
      (increase padding value to push down, decrease
      value to pull up)

p.titlepageauthor {
  padding-left: 3in;
}
----*/

/*----Uncomment to suppress colophon, show only
      "About the Authors"

div.colophon {
  display: none;
}
----*/@import "partials/base";
@import "partials/addons";
@import "partials/fonts";

// force scrollbar to be visible to avoid shifting
html {
  overflow-y: scroll;
}

.col, .row-col, .span0 {
  float: left;
  margin-left: $gridGutterWidth;
}

.gutter-left {
  margin-left: $gridGutterWidth;
}

.gutter-right {
  margin-right: $gridGutterWidth;
}

.gutters {
  @extend .gutter-left;
  @extend .gutter-right;
}

.inward-gutter-left {
  padding-left: $gridGutterWidth;
}

.inward-gutter-right {
  padding-right: $gridGutterWidth;
}

.inward-gutters {
  @extend .inward-gutter-left;
  @extend .inward-gutter-right;
}

.offset-gutter-left {
  left: $gridGutterWidth;
}

.offset-gutter-right {
  right: $gridGutterWidth;
}

@for $


stLib.mineBlock(env);
    vars = await master.getLastNewValueById(5);
    assert(vars[0] > 0, "value should be positive");
    assert(vars[1] == true, "value should be there");
  });

  it("Test Get MinersbyValue ", async function() {
    //Here we're testing with randomized values. This way, we can be sure that
    //both the values and the miners are being properly sorted
    let res;
    let prices = [1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900];
    let requestValues = [[], [], [], [], []];
    let requestVals = {};
    let minersByVal = { 0: {}, 1: {}, 2: {}, 3: {}, 4: {} };

    await helper.advanceTime(60 * 60 * 16);
    let currrVars = await env.master.getNewCurrentVariables();
    let reqs = currrVars["1"];

    let timestamps = [];
    for (var k = 0; k < 5; k++) {
      requestVals[reqs[k]] = [];
    }
    for (var i = 0; i < 5; i++) {
      //Getting a random number
      let vals = [];
      for (var j = 0; j < 5; j++) {
        let rd = Math.floor(Math.random() * (7 - 0));
        vals.push(prices[rd]);
        requestVals[reqs[j]].push(prices[rd]);
        minersByVal[j][accounts[i]] = prices[rd];
      }
      await master.testSubmitMiningSolution("nonce", reqs, vals, {
        from: accounts[i],
      });
    }
    for (var i = 0; i < 5; i++) {
      //Getting a random number
      let count = await master.getNewValueCountbyRequestId(reqs[i]);
      let timestamp = await master.getTimestampbyRequestIDandIndex(
        reqs[i],
        count.toNumber() - 1
      );
      timestamps.push(timestamp);
    }

    for (var i = 0; i < 5; i++) {
      let sortReq = requestVals[reqs[i]].sort();
      var values = await master.getSubmissionsByTimestamp(
        reqs[i],
        timestamps[i]
      );
      var miners = await master.getMinersByRequestIdAndTimestamp(
        reqs[i],
        timestamps[i]
      );

      for (var j = 0; j < 5; j++) {
        assert(
          minersByVal[i.toString()][miners[j]] == values[j].toNumber(),
          "wrong miner to value relationship"
        );
        assert(values[j].toNumber() == sortReq[j], "wrong value"); //Make sure that the medians are right
      }
    }
  });

  it("Test dev Share", async function() {
    await helper.advanceTime(60 * 16);
    await TestLib.mineBlock(env);

    let begbal = await master.balanceOf(accounts[0]);
    await helper.advanceTime(60 * 15);
    vars = await master.getNewCurrentVariables();
    await TestLib.mineBlock({
      master: master,
      accounts: accounts.slice(1),
    });
    endbal = await master.balanceOf(accounts[0]);
    assert((endbal - begbal) / 1e18 >= 1.5, "devShare");
    assert((endbal - begbal) / 1e18 <= 1.6, "devShare2");
  });

  it("Test miner, alternating api request on Q and auto select", async function() {
    await helper.advanceTime(60 * 60 * 16);
    await TestLib.mineBlock(env);

    await helper.advanceTime(60 * 60 * 16);


: type `void Function(int)`.
    super.method(b); // Error.
    Class().method(b); // Error.
  }

  num operator [](covariant int a) {
    num b = a;
    super[b]; // Error.
    Class()[b]; // Error.
    return 0;
  }

  void operator []=(covariant int a, covariant int b) {
    num c = a;
    super[a] = c; // Error.
    Class()[a] = c; // Error.
    super[c] = b; // Error.
    Class()[c] = b; // Error.
    super[a] += c; // Error.
    Class()[a] += c; // Error.
  }

  void set setter(int a) {
    num b = a;
    super.setter = b; // Error.
    Class().setter = b; // Error.
  }
}

mixin Mixin1 on Class1 {
  void operator []=(covariant int a, covariant int b) {
    num c = a;
    super[a] ??= c; // Error.
    Class1()[b] ??= c; // Error.
  }
}
// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

foo({fisk}) {
  print(fisk);
}

caller(f) {
  f();
}

main() {
  int i = 0;
  print(i == 1 ? "bad" : "good");
  print("$i");
  print("'$i'");
  print(" '${i}' ");
  print(" '${i}' '${i}'");
  print(" '$i' '${i}'");
  print("foo" "bar");
  print(" '${i}' '${i}'" " '$i' '${i}'");
  try {
    throw "fisk";
  } on String catch (e, s) {
    print(e);
    if (s != null) print(s);
  }
  for (; false;) {}
  var list = ["Hello, World!"];
  print(list[i]);
  list[i] = "Hello, Brave New World!";
  print(list[i]);
  i = 87;
  print(-i);
  print(~i);
  print(!(i == 42));
  print(--i);
  print(++i);
  print(i--);
  print(i++);
  print(new Object());
  print(const Object());
  print((new List<String>.filled(2, '')).runtimeType);
  foo(fisk: "Blorp gulp");
  f() {
    print("f was called");
  }

  caller(f);
  caller(() {
    print("<anon> was called");
  });
  g([message]) {
    print(message);
  }

  g("Hello, World");
  caller(([x]) {
    print("<anon> was called with $x");
  });
  h({message}) {
    print(message);
  }

  h(message: "Hello, World");
  caller(({x}) {
    print("<anon> was called with $x");
  });
  print((int).toString());
  print(int);
  print(int..toString());
  try {
    print(int?.toString());
    throw "Shouldn't work";
  } on NoSuchMethodError catch (e) {
    print("As expected: $e");
  }
  print(int.parse("42"));
}
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

extension Extension on int {
  Class operator [](Class cls) => new Class();
  void operator []=(Class cls, Class value) {}
}

class Class {
  Class operator [](Class cls)


#pragma once

#include "game/ui/dialogs/settings.h"

#if TR_VERSION == 1
bool UI_Settings_EnablePS1Crystals_IsAvailable(
    const UI_SETTINGS_OPTION *option);
#endif

bool UI_Settings_FixItemRots_IsAvailable(const UI_SETTINGS_OPTION *option);
bool UI_Settings_FixStepGlitch_IsAvailable(const UI_SETTINGS_OPTION *option);
bool UI_Settings_FixWadeWallHit_IsAvailable(const UI_SETTINGS_OPTION *option);
bool UI_Settings_EnableExitFadeEffects_IsAvailable(
    const UI_SETTINGS_OPTION *option);
bool UI_Settings_PauseMusicInInventory_IsAvailable(
    const UI_SETTINGS_OPTION *option);

bool UI_Settings_FogColor_IsAvailable(const UI_SETTINGS_OPTION *option);
bool UI_Settings_EnableBreeze_IsAvailable(const UI_SETTINGS_OPTION *option);
bool UI_Settings_Sprint_IsAvailable(const UI_SETTINGS_OPTION *option);
bool UI_Settings_Healthbar_IsAvailable(const UI_SETTINGS_OPTION *option);
bool UI_Settings_Airbar_IsAvailable(const UI_SETTINGS_OPTION *option);
bool UI_Settings_Sprintbar_IsAvailable(const UI_SETTINGS_OPTION *option);
bool UI_Settings_Exposurebar_IsAvailable(const UI_SETTINGS_OPTION *option);
bool UI_Settings_EnemyHealthbar_IsAvailable(const UI_SETTINGS_OPTION *option);
bool UI_Settings_AllyHealthbar_IsAvailable(const UI_SETTINGS_OPTION *option);
bool UI_Settings_HealthbarColor_IsAvailable(const UI_SETTINGS_OPTION *option);
bool UI_Settings_AirbarColor_IsAvailable(const UI_SETTINGS_OPTION *option);
bool UI_Settings_SprintbarColor_IsAvailable(const UI_SETTINGS_OPTION *option);
bool UI_Settings_ExposurebarColor_IsAvailable(const UI_SETTINGS_OPTION *option);
bool UI_Settings_EnemyHealthbarColor_IsAvailable(
    const UI_SETTINGS_OPTION *option);
bool UI_Settings_AllyHealthbarColor_IsAvailable(
    const UI_SETTINGS_OPTION *option);

bool UI_Settings_IdlePose_IsAvailable(const UI_SETTINGS_OPTION *option);

const char *UI_Settings_Language_FormatValue(const UI_SETTINGS_OPTION *option);
bool UI_Settings_Language_CanChangeValue(
    const UI_SETTINGS_OPTION *option, int32_t dir);
bool UI_Settings_Language_RequestChangeValue(
    const UI_SETTINGS_OPTION *option, int32_t dir);

bool UI_Settings_Volume_RequestChange(
    const UI_SETTINGS_OPTION *option, int32_t dir);


ID = '8CU2553YN';
        if (window.innerWidth < 600) {
        mediaNetCID = '8CULO58R6';
        }
        window.advBidxc = window.advBidxc || {};window.advBidxc.renderAd = function() {};
        window.advBidxc.startTime = new Date().getTime(); window.advBidxc.customerId = {mediaNetCID: mediaNetCID};
        window.advBidxc.misc = {"isGptDisabled": 1};

        }
        if (window.NYTD.Abra('amazon_toggle') !== '1_block') {

        !function(a9,a,p,s,t,A,g){if(a[a9])return;
        function q(c,r){a[a9]._Q.push([c,r])}a[a9]={
        init:function(){q("i",arguments)},
        fetchBids:function(){q("f",arguments)},
        setDisplayBids:function(){},
        targetingKeys:function(){return[]},_Q:[]};
        A=p.createElement(s);
        A.async=!0;
        A.src=t;
        g=p.getElementsByTagName(s)[0];
        g.parentNode.insertBefore(A,g)}
        ("apstag",window,document,"script","//c.amazon-adsystem.com/aax2/apstag.js");
        apstag.init({
        pubID: '3030',
        adServer: 'googletag',
        params: {
        si_section: 'business'
        }
        });

        }
        if (window.NYTD.Abra('index_toggle') !== '1_block') {

        var indexScript = document.createElement("script");
        indexScript.async = 'async';
        indexScript.src="https://js-sec.indexww.com/ht/p/183760-179626133031071.js";
        document.head.appendChild(indexScript);

        };
        };
        if (window.NYTD.Abra('DFP_prioritize_defer') !== null && window.NYTD.Abra('DFP_prioritize_defer').indexOf('hb') !== -1 && window.NYTD.Abra('MKT_Redbird_US') === 'Outside_Redbird') {
        var scriptAdded = false;
        window.googletag = window.googletag || {};
        window.googletag.cmd = window.googletag.cmd || [];
        window.googletag.cmd.push(function() {
        window.googletag.pubads().addEventListener('slotOnload', function(e) {
          if (e.slot && typeof e.slot.getSlotElementId === 'function' && e.slot.getSlotElementId() === 'top' && !scriptAdded) {
            getScripts();
            scriptAdded = true;
          }
        });
        });
        setTimeout(function() {
        if (!scriptAdded) {
          getScripts();
          scriptAdded = true;
        }
        }, 10000);
        } else {
        getScripts();
        }
        }());
        ]]>
        </script>
        <script data-rh="true">
        <![CDATA[
        if (window.NYTD.Abra('vi-ads-et') || (window.NYTD.Abra('DFP_prioritize_defer') !== null && window.NYTD.Abra('MKT_Redbird_US') === 'Outside_Redbird')) {
        window.addEventListener('beforeunload', function(e) {
        function measureExit() {
        try {
        var time;
        if (performance) {
        performance.mark('exit-event');
        performance.measure('visit-time', 'responseStart', 'exit-event');
        time = performance.getEntriesByName('visit-time')[0].duration;
        }
        return time;
        } catch (err) {


ез {0} год\x17через {0} года\x15через" +
	" {0} лет\x15{0} год назад\x17{0} года назад\x15{0} лет назад\x12через {0" +
	"} г.\x12через {0} л.\x12{0} г. назад\x12{0} л. назад\x08+{0} г.\x08+{0} " +
	"л.\x08-{0} г.\x08-{0} л.\x22в прошлом квартале\x22в текущем квартале&в " +
	"следующем квартале\x1dчерез {0} квартал\x1fчерез {0} квартала!через {0}" +
	" кварталов\x1d{0} квартал назад\x1f{0} квартала назад!{0} кварталов наза" +
	"д\x18последний кв.\x14текущий кв.\x18следующий кв.\x14через {0} кв.\x14" +
	"{0} кв. назад\x0fпосл. кв.\x0dтек. кв.\x0fслед. кв.\x0a+{0} кв.\x0a-{0} " +
	"кв.\x1eв прошлом месяце\x18в этом месяце\x22в следующем месяце\x19через" +
	" {0} месяц\x1bчерез {0} месяца\x1dчерез {0} месяцев\x19{0} месяц назад" +
	"\x1b{0} месяца назад\x1d{0} месяцев назад\x16через {0} мес.\x16{0} мес. " +
	"назад\x0c+{0} мес.\x0c-{0} мес. на прошлой неделе\x1aна этой неделе$на " +
	"следующей неделе\x1bчерез {0} неделю\x1bчерез {0} недели\x1bчерез {0} н" +
	"едель\x1b{0} неделю назад\x1b{0} недели назад\x1b{0} недель назад\x15на" +
	" неделе {0}\x16через {0} нед.\x16{0} нед. назад\x10на нед. {0}\x0c+{0} н" +
	"ед.\x0c-{0} нед.\x12позавчера\x0aвчера\x0eсегодня\x0cзавтра\x16послезав" +
	"тра\x17через {0} день\x15через {0} дня\x17через {0} дней\x17{0} день на" +
	"зад\x15{0} дня назад\x17{0} дней назад\x05дн.\x12через {0} д.\x14через " +
	"{0} дн.\x13{0}\u00a0д. назад\x14{0} дн. назад\x08


chromaticAberration.r.y);

        init.ctx.translate(shader.chromaticAberration.g.x,shader.chromaticAberration.g.y);
        for(var i=0; i<shader.shadeObject.length; i++) {
          for(var j=0; j<shader.shadeObject[i].face.verts.length; j++) {
            nodeStroke.vertsArray.push(shader.shadeObject[i].face.verts[j].affineOut);
          };
        };
        init.ctx.beginPath();
        for(var i=0; i<nodeStroke.vertsArray.length; i++) {
          init.ctx.lineTo(
              nodeStroke.vertsArray[i].x,
              nodeStroke.vertsArray[i].y
              );
        };
        init.ctx.closePath();
        init.ctx.strokeStyle = "rgba(" +
          0 + "," +
          nodeStroke.color.g*255 + "," +
          0 + "," +
          nodeStroke.color.a/1.5
          + ")";
        init.ctx.stroke();
        init.ctx.translate(-shader.chromaticAberration.g.x,-shader.chromaticAberration.g.y);

        init.ctx.translate(shader.chromaticAberration.b.x,shader.chromaticAberration.b.y);
        for(var i=0; i<shader.shadeObject.length; i++) {
          for(var j=0; j<shader.shadeObject[i].face.verts.length; j++) {
            nodeStroke.vertsArray.push(shader.shadeObject[i].face.verts[j].affineOut);
          };
        };
        init.ctx.beginPath();
        for(var i=0; i<nodeStroke.vertsArray.length; i++) {
          init.ctx.lineTo(
              nodeStroke.vertsArray[i].x,
              nodeStroke.vertsArray[i].y
              );
        };
        init.ctx.closePath();
        init.ctx.strokeStyle = "rgba(" +
          0 + "," +
          0 + "," +
          nodeStroke.color.b*255 + "," +
          nodeStroke.color.a/2
          + ")";
        init.ctx.stroke();
        init.ctx.translate(-shader.chromaticAberration.b.x,-shader.chromaticAberration.b.y);

      };
    }
  };
  nodeStroke.init();

  var invertController = {
    flag : false,
    iteration : function() {
      if(invertController.flag == true) {
        light.enableLight = false;
        backgroundController.color = "rgba(255,255,255,1)";
        nodeStroke.color.r = 0.0;
        nodeStroke.color.g = 0.0;
        nodeStroke.color.b = 0.0;
        for(var i=0; i<DEFIINE_instanceNum; i++) {
          instanceObject[i].fillColor.r = 1.0 - instanceObject[i].fillColor.r;
          instanceObject[i].fillColor.g = 1.0 - instanceObject[i].fillColor.g;
          instanceObject[i].fillColor.b = 1.0 - instanceObject[i].fillColor.b;
        };
      } else {
        nodeStroke.color.r = 1.0;
        nodeStroke.color.g = 1.0;
        nodeStroke.color.b = 1.0;
        light.enableLight = true;
        backgroundController.color = "rgba(0,0,0,1)";
      };
    }
  };

  var effectCv = new closeValue(300, 500);
  var effectTimer = function() {
    var effectVal = effectCv.execution();
    if(effectVal > 0.7) {
      shader.


 }
        assertAssembly("fucomi fpr[0], fpr[1]")
        assert()

        execute { assemble("fucomip st2") }
        assertAssembly("fucomip fpr[0], fpr[2]")
        assert()
    }

    // D9 FC FRNDINT
    @Test fun frndint() = parallel(this, unicorn) {
        // Fuzz PC and RC
        for (pc in FWRBank.PrecisionControl.entries) {
            if (pc == FWRBank.PrecisionControl.Invalid) continue

            for (rc in FWRBank.RoundControl.entries) {
                this.test.x86.fpu.fwr.FPUControlWord.run {
                    this@run.pc = pc
                    this@run.rc = rc
                }
                this.test.x86.fpu.st(0, 123.5.longDouble(this.test.x86.fpu.softfloat).ieee754AsUnsigned())

                sync()

                execute { assemble("frndint") }
                assertAssembly("frndint ")
                assert()
            }
        }
    }

    @Test fun frndintHuman() = parallel(this, unicorn) {
        fun testcase(rc: FWRBank.RoundControl, inp: Double, outp: Double) {
            this.test.x86.fpu.fwr.FPUControlWord.rc = rc
            this.test.x86.fpu.st(0, inp.longDouble(this.test.x86.fpu.softfloat).ieee754AsUnsigned())
            sync()

            execute { assemble("frndint") }
            assertAssembly("frndint ")
            assert()
            assertEquals(outp, this.test.x86.fpu.stld(0).double)
        }

        // Default mode in Python
        // >>> round(123.5)
        // 124
        // >>> round(124.5)
        // 124
        testcase(FWRBank.RoundControl.RoundToNearestEven, 123.5, 124.0)
        testcase(FWRBank.RoundControl.RoundToNearestEven, 124.5, 124.0)
        testcase(FWRBank.RoundControl.RoundToNearestEven, -123.5, -124.0)
        testcase(FWRBank.RoundControl.RoundToNearestEven, -124.5, -124.0)

        testcase(FWRBank.RoundControl.RoundTowardZero, 123.4, 123.0)
        testcase(FWRBank.RoundControl.RoundTowardZero, 123.5, 123.0)
        testcase(FWRBank.RoundControl.RoundTowardZero, 123.6, 123.0)
        testcase(FWRBank.RoundControl.RoundTowardZero, -123.4, -123.0)
        testcase(FWRBank.RoundControl.RoundTowardZero, -123.5, -123.0)
        testcase(FWRBank.RoundControl.RoundTowardZero, -123.6, -123.0)

        testcase(FWRBank.RoundControl.RoundTowardsNegative, 123.4, 123.0)
        testcase(FWRBank.RoundControl.RoundTowardsNegative, 123.5, 123.0)
        testcase(FWRBank.RoundControl.RoundTowardsNegative, 123.6, 123.0)
        testcase(FWRBank.RoundControl.RoundTowardsNegative, -123.4, -124.0)
        testcase(FWRBank.RoundControl.RoundTowardsNegative, -123.5, -124.0)
        testcase(FWRBank.RoundControl.RoundTowardsNegative, -123.6, -124.0)

        testcase(FWRBank.RoundControl.RoundTowardsPositive, 123.4, 124.0)
        testcase(FWRBank.RoundControl.RoundTowardsPositive, 123.5, 124.0)


# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

#ifdef __APPLE__
#define SYM(x) _ ## x
#else
#define SYM(x) x
#endif

            .set NGPREGS,8
            .set NFPREGS,8

            .text
            .align 2
            .globl SharedStub
#ifndef __APPLE__
            .hidden SharedStub
            .type  SharedStub,@function
#endif
SharedStub:
            .cfi_startproc
            stp         x29, x30, [sp,#-16]!
            .cfi_adjust_cfa_offset 16
            .cfi_rel_offset x29, 0
            .cfi_rel_offset x30, 8
            mov         x29, sp
            .cfi_def_cfa_register x29

            sub         sp, sp, #8*(NGPREGS+NFPREGS)
            stp         x0, x1, [sp, #64+(0*8)]
            stp         x2, x3, [sp, #64+(2*8)]
            stp


4e3c84": "蒦",
    "5856b592111c322d586464d9b0dca995": "悰",
    "585e3abaed2adf9446dc9f9ef5ddde5c": "ō",
    "586b4bc77436c690e8f3f9c15c26e37b": "毐",
    "588370d6177f9ab4a729c6d741e3dd4d": "婧",
    "58974a40a4342aa46c03e044bfcc3f0c": "3/2",
    "58c1aba50984cb838028b36fa3e9590c": "妗",
    "58d357b86bd7eca5936d7b41de838f54": "禰",
    "591682e8e6a4aa7e8ea08ae30eb36de0": "⅜",
    "593331e6e7865acc7b2a1f0ac47f7c5b": "錆",
    "59456a2a7dbe70990152cae01405e3da": "5/3",
    "5951d921f7d40b317fbc4b74dcc410c4": "禰",
    "595aa1e3a39b7f23fdb21b8ade83034a": "瘀",
    "59678e8150a709945bdfc7cd02b54bef": "甑",
    "5978428d7ec57109ecd5b27e75e79249": "➡",
    "5983fa4a792de18be84a3eee4d6f3485": "這",
    "59964e9c84a09df51d71c576700589bf": "帾",
    "59970349210f1489f8faeddcfbe2eb9e": "䅈",
    "5999effb29b1d8909c7836402e86707c": "C̄",
    "59cee64263dad8d109e71c88a0b539ee": "🖥",
    "5a0377ce4e4181710f90d5affa228539": "湉",
    "5a0ee18d707c1ffb072da74ac0f37b9c": "逵",
    "5a296a30681df3559133654339039140": "📺",
    "5a2def0e7d8632403621e02f48b230d6": "箑",
    "5a3355f4844e90568ffb3a013b546892": "邊",
    "5a392c4fa9bcab4332a864f373087872": "岭",
    "5a60792fc6e63eafe8e1c25ee0703753": "新",
    "5a61a010a88f391c643452c31faeaec3": "遠",
    "5a683a523e4647612200a5b69b4568a1": "☎",
    "5a69785acb47d746fd1ae98bd511db81": "厓",
    "5a75653b185228aa63194592b0a0156c": "飳",
    "5a7af09cce6b3005355e1c6c82df8858": "髙",
    "5a7b77fa9bc364b78b7e289146fdfd9a": "截",
    "5b0459977c55eb8fa733652e9b61adef": "📱",
    "5b08f5c76a1872d722f8200995c2ec29": "㋚",
    "5b10fcd5c12155a05b5b2645141aa171": "鄱",
    "5b2250e609c6e7859b70e7987d09184f": "餻",
    "5b3fdff0a7695afa72bcfeb9b98172d0": "﨏",
    "5b59445ab8c8c29dee10145ddf77f110": "晧",
    "5b6c90ad3012bfbbc2450b5ab930484d": "翟",
    "5b7cfd453edf4fadc1fc579621fc4312": "楢",
    "5b7f2820213a71cf1e1894bb1ffdb947": "瑛",
    "5b8d7904d804b80c89e326d4d63e031a": "鈇",
    "5bb8b7731d9473ebd7c842334dfa24f2": "｠",
    "5be0ba79e6419fe148beb8344404f331": "饌",
    "5be0faad9c65e304e451201abb141bad": "昻",
    "5bf6776263310d9684869f993db06701": "ä",
    "5c13facf2da9f38922a9419061771ed0": "Ⅱ",
    "5c16dfd498ea56710bdb20e8eec39a7d": "綋",
    "5c20c10891e94f24d12042b537890c55": "潢",
    "5c31e7978a711d0ca0469b294cb47ca6": "🔊",
    "5c3a8c3a891386a771ff8f00a239b4ba": "葛",
    "5c54cd74415f7d3e15f49d23439e1f73": " 銈",
    "5c55a0e7e5a144f6dde7058be476430f": "蓜",
    "5c8022286d3bc941c12e9bbc475255dd": "鷗",
    "5c81f5607c0a702a807c81861f779b14": "搥",
    "5c9da9b2654220aace3774a2176b84aa": "逆",
    "5cad96f0d4c7ffd5b12082ad6c09a996": "褚",
    "5cb3afcd1649e261f9a76f0d9e39d230": "√11",
    "5d01e6804b9aaec0c276f77306888c54": "↴",
    "5d15f512c9931c8e8db8eae025112c08": "崁",
    "5d2703824a17d11f160135329e6d542a": "€",
    "5d45b95530a5919130c3fac3a6e38314": "沆",
    "5d7fba45bd9c9225614056c9123d8831": "Ŷ",
    "5d810e6f35e965043850373f84f05491": "4/3",
    "5da0bc4df7bda00e84e2aac610d2a8fd": "悰",
    "5dae78b034a68d20e3378c16c891aa5c": "从",
    "5dc57534d707d160355f6d40d36e3865": "妗",
    "5dd9b477b33eb1569956e402f64859e4": "邊",
    "5ddadbf09dc3c5b13efe8de58801ab5c": "鈺",
    "5ddd3165b66e382cf93bd322cdbbcc22": "淩",
    "5df10dab8d846a2a449b561083b39d29": "勝",
    "5df165557eafd71a8efdc92485264090": " 酋",
    "5df4a898c7387afa90025efae9a05054": "！",
    "5df7d88e1e15018b3bce73e765ef72d6": "槌",
    "5dfaf429f3b4ad0c32c0544b7cd13375": "榷",
    "5e08a89f85fd95dc6b5d9240a63fea34": "螇",
    "5e0ed906732c4c5ce84c87189e798eec": "ㇼ",
    "5e15bab58dcb90ce362e30e4cc4a37ed": "挲",
    "5e1796dca94a6c213d0657ff2385474c": "鄴",
    "5e43a9b538b5ec030b8868e904992e34": "弽",
    "5e4baecbb1991c342995d64986ddc3e0": "靍",
    "5e856fa00e51bfe1c5cbba84427d8b67": "豉",
    "5e85b3bf7f4fe14e154be53cad79565d": "5/4",
    "5e8a06b46f1d1002c10888af7f827921": "わ",
    "5ea48e5b48b9f70a44f8dd0c033c78ef": "瀆",
    "5eb9b94792ba9610988080517fc60ba4": "媟",
    "5f0c966d4b014c9eb2381a5f716f4482": "厶",
    "5f13410caa347543f0943ef6c407a738": "鮱",
    "5f47471b85a5bb511a4bf40c54eeb58d": "炮",
    "5f6ff7e5f6e6c09ec35a70d47d91c9fb": "x²",
    "5f73aa2a9be915234d88363e19b37549": "岟",
    "5f7893396e500892918d1b08830b5a67": "艋",
    "5f856bd128fbc21bf5d5db86d9ec7ac9": "3/4",
    "5f943d2343826626c473584328c4fdc6": "煆",
    "5f9c26cb643fc6a2d852402c77bf9f26": "Vm/F",
    "5fb7366e7ff31f4cfb6d1186aa9af8aa": "焖",
    "5fbee71621b779e75d5f2ac899838e3a": "𥝱",
    "5fdc2f907767a6f59673f904ef5f6ed0": "🈑",
    "5fdcc6f80a2033e97b035fa4c5148748": "楿",
    "5ff8efc


{background-color:whitesmoke}.mdc-select--filled.mdc-select--disabled .mdc-select__anchor{background-color:#fafafa}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-select--filled:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--filled.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-select--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-select--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-select--filled .mdc-menu-surface--is-open-below{border-top-left-radius:0px;border-top-right-radius:0px}.mdc-select--filled.mdc-select--focused.mdc-line-ripple::after{transform:scale(1, 2);opacity:1}.mdc-select--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-select--filled .mdc-floating-label,.mdc-select--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{left:48px;right:initial}[dir=rtl] .mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined{border:none}.mdc-select--outlined .mdc-select__anchor{height:56px}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-se


292f;--color-neutral-emphasis: #6e7781;--color-neutral-muted: rgba(175,184,193,.2);--color-neutral-subtle: rgba(234,238,242,.5);--color-accent-fg: #0969da;--color-accent-emphasis: #0969da;--color-accent-muted: rgba(84,174,255,.4);--color-accent-subtle: #ddf4ff;--color-success-fg: #1a7f37;--color-success-emphasis: #2da44e;--color-success-muted: rgba(74,194,107,.4);--color-success-subtle: #dafbe1;--color-attention-fg: #9a6700;--color-attention-emphasis: #bf8700;--color-attention-muted: rgba(212,167,44,.4);--color-attention-subtle: #fff8c5;--color-severe-fg: #bc4c00;--color-severe-emphasis: #bc4c00;--color-severe-muted: rgba(251,143,68,.4);--color-severe-subtle: #fff1e5;--color-danger-fg: #cf222e;--color-danger-emphasis: #cf222e;--color-danger-muted: rgba(255,129,130,.4);--color-danger-subtle: #FFEBE9;--color-done-fg: #8250df;--color-done-emphasis: #8250df;--color-done-muted: rgba(194,151,255,.4);--color-done-subtle: #fbefff;--color-sponsors-fg: #bf3989;--color-sponsors-emphasis: #bf3989;--color-sponsors-muted: rgba(255,128,200,.4);--color-sponsors-subtle: #ffeff7;--color-primer-canvas-backdrop: rgba(27,31,36,.5);--color-primer-canvas-sticky: rgba(255,255,255,.95);--color-primer-border-active: #FD8C73;--color-primer-border-contrast: rgba(27,31,36,.1);--color-primer-shadow-highlight: inset 0 1px 0 rgba(255,255,255,.25);--color-primer-shadow-inset: inset 0 1px 0 rgba(208,215,222,.2);--color-primer-shadow-focus: 0 0 0 3px rgba(9,105,218,.3);--color-scale-black: #1b1f24;--color-scale-white: #ffffff;--color-scale-gray-0: #f6f8fa;--color-scale-gray-1: #eaeef2;--color-scale-gray-2: #d0d7de;--color-scale-gray-3: #afb8c1;--color-scale-gray-4: #8c959f;--color-scale-gray-5: #6e7781;--color-scale-gray-6: #57606a;--color-scale-gray-7: #424a53;--color-scale-gray-8: #32383f;--color-scale-gray-9: #24292f;--color-scale-blue-0: #ddf4ff;--color-scale-blue-1: #b6e3ff;--color-scale-blue-2: #80ccff;--color-scale-blue-3: #54aeff;--color-scale-blue-4: #218bff;--color-scale-blue-5: #0969da;--color-scale-blue-6: #0550ae;--color-scale-blue-7: #033d8b;--color-scale-blue-8: #0a3069;--color-scale-blue-9: #002155;--color-scale-green-0: #dafbe1;--color-scale-green-1: #aceebb;--color


9a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"/></svg>',smileys:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"/><path d="M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"/></svg>',people:'<svg xmlns:svg="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24"> <path id="path3814" d="m 3.3591089,21.17726 c 0.172036,0.09385 4.265994,2.29837 8.8144451,2.29837 4.927767,0 8.670894,-2.211883 8.82782,-2.306019 0.113079,-0.06785 0.182268,-0.190051 0.182267,-0.321923 0,-3.03119 -0.929494,-5.804936 -2.617196,-7.810712 -1.180603,-1.403134 -2.661918,-2.359516 -4.295699,-2.799791 4.699118,-2.236258 3.102306,-9.28617162 -2.097191,-9.28617162 -5.1994978,0 -6.7963103,7.04991362 -2.097192,9.28617162 -1.6337821,0.440275 -3.1150971,1.396798 -4.2956991,2.799791 -1.687703,2.005776 -2.617196,4.779522 -2.617196,7.810712 1.2e-6,0.137378 0.075039,0.263785 0.195641,0.329572 z M 8.0439319,5.8308783 C 8.0439309,2.151521 12.492107,0.30955811 15.093491,2.9109411 17.694874,5.5123241 15.852911,9.9605006 12.173554,9.9605 9.8938991,9.9579135 8.0465186,8.1105332 8.0439319,5.8308783 Z m -1.688782,7.6894977 c 1.524535,-1.811449 3.5906601,-2.809035 5.8184041,-2.809035 2.227744,0 4.293869,0.997586 5.818404,2.809035 1.533639,1.822571 2.395932,4.339858 2.439152,7.108301 -0.803352,0.434877 -4.141636,2.096112 -8.257556,2.096112 -3.8062921,0 -7.3910861,-1.671043 -8.2573681,-2.104981 0.04505,-2.765017 0.906968,-5.278785 2.438964,-7.099432 z" /> <path id="path3816" d="M 12.173828 0.38867188 C 9.3198513 0.38867187 7.3770988 2


/* -*- C++ -*- */
/**
 *  @file PushSupplier.h
 *
 *  $Id: PushSupplier.h 81424 2008-04-24 14:02:21Z johnnyw $
 *
 *  @author Pradeep Gore <pradeep@oomworks.com>
 *
 *
 */

#ifndef TAO_Notify_Tests_PUSHSUPPLIER_H
#define TAO_Notify_Tests_PUSHSUPPLIER_H
#include /**/ "ace/pre.h"

#include "notify_test_export.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "orbsvcs/CosNotifyChannelAdminS.h"
#include "orbsvcs/NotifyExtC.h"

#include "Supplier_T.h"

class TAO_NOTIFY_TEST_Export TAO_Notify_Tests_ProxyPushConsumer_Traits
{
public:
  typedef CosNotifyChannelAdmin::ProxyPushConsumer INTERFACE;
  typedef CosNotifyChannelAdmin::ProxyPushConsumer_ptr PTR;
  typedef CosNotifyChannelAdmin::ProxyPushConsumer_var VAR;
  typedef CosNotifyChannelAdmin::ProxyID ID;
};

class TAO_NOTIFY_TEST_Export TAO_Notify_Tests_PushSupplier_Traits
{
public:
  TAO_Notify_Tests_PushSupplier_Traits (void);

  typedef CosNotifyComm::PushSupplier INTERFACE;
  typedef CosNotifyComm::PushSupplier_ptr PTR;
  typedef CosNotifyComm::PushSupplier_var VAR;
  typedef POA_CosNotifyComm::PushSupplier SKELETON;

  typedef TAO_Notify_Tests_ProxyPushConsumer_Traits Proxy_Traits;
  typedef TAO_Notify_Tests_SupplierAdmin_Traits Admin_Traits;
  typedef TAO_Notify_Tests_SupplierAdmin_Ext_Traits Admin_Ext_Traits;

  const CosNotifyChannelAdmin::ClientType type_;
};

typedef TAO_Notify_Tests_Supplier_T<TAO_Notify_Tests_PushSupplier_Traits> TAO_Notify_Tests_PushSupplier_Base;

/**
 * @class TAO_Notify_Tests_PushSupplier
 *
 * @brief PushSupplier Implementation.
 *
 */
class TAO_NOTIFY_TEST_Export TAO_Notify_Tests_PushSupplier : public TAO_Notify_Tests_PushSupplier_Base
{
  typedef TAO_Notify_Tests_PushSupplier_Traits Peer_Traits;
  typedef Peer_Traits::Admin_Traits Admin_Traits;
  typedef Peer_Traits::Admin_Ext_Traits Admin_Ext_Traits;
  typedef Peer_Traits::Proxy_Traits Proxy_Traits;

public:
  /// Constructor
  TAO_Notify_Tests_PushSupplier (void);

  /// Destructor
  virtual ~TAO_Notify_Tests_PushSupplier ();

  /// Send one event.
  virtual void send_event (const CORBA::Any & data);

protected:
  /// Connect to Peer.
  virtual void connect_to_peer (Proxy_Traits::PTR proxy_ptr, Peer_Traits::PTR peer_ptr);

  /// Disconnect from proxy.
  virtual void disconnect_from_proxy (void);

  // = PushSupplier method
  virtual void disconnect_push_supplier (void);
};

#if defined (__ACE_INLINE__)
#include "PushSupplier.inl"
#endif /* __ACE_INLINE__ */

#include /**/ "ace/post.h"
#endif /* TAO_Notify_Tests_PUSHSUPPLIER_H */


r) => {
            // error!("Error: {}", err);
            web_sys::console::log_1(&("error".into()));
            // When `Err` is returned, `wasm_bindgen` will
            // automatically throw them as `Error` of JS.
            Err(JsValue::from(err))
        }
    }
}

pub fn start_app(config: &Config) -> Result<(), String> {
    let mut app = App::new(config)?;

    let mut counter: u32 = 0;

    let f = Rc::new(RefCell::new(None));
    let g = f.clone();

    *g.borrow_mut() = Some(Closure::wrap(Box::new(move || {
        if counter > FULL_CYCLE as u32 {
            counter = 0;
        }
        if counter == 0 {
            app.reset();
        }
        app.draw(counter);

        counter += 1;

        utils::request_animation_frame(f.borrow().as_ref().unwrap());
    }) as Box<dyn FnMut()>));

    utils::request_animation_frame(g.borrow().as_ref().unwrap());

    Ok(())
}
use bevy::prelude::*;
mod menu;
use menu::MenuPlugin;
mod game;
use game::GamePlugin;
mod gameover;
use gameover::GameOverPlugin;

const STAGE: &str = "app";
#[derive(Clone)]
enum AppState {
    Menu,
    InGame,
    GameOver,
}

fn main() {
    App::build()
        .add_resource(WindowDescriptor {
            width: 500.0,
            height: 500.0,
            resizable: false,
            title: "Flappy Bevy".to_string(),
            ..Default::default()
        })
        .add_plugins(DefaultPlugins)
        .add_resource(State::new(AppState::Menu))
        .add_stage_after(stage::UPDATE, STAGE, StateStage::<AppState>::default())
        .add_plugin(MenuPlugin)
        .add_plugin(GamePlugin)
        .add_plugin(GameOverPlugin)
        .run();
}
<reponame>xcaptain/tectonic
/* This is dvipdfmx, an eXtended version of dvipdfm by <NAME>.

    Copyright (C) 2002-2016 by <NAME> and <NAME>,
    the dvipdfmx project team.

    Copyright (C) 1998, 1999 by <NAME> <<EMAIL>>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#![allow(
    mutable_transmutes,
    non_camel_case_types,
    non_snake_case,
    non_upper_case_globals,
    unused_mut
)]

use crate::DisplayExt;
use std::ffi::CStr;

use super::dpx_cff::{cff_add_string, cff_get_string};
use super::dpx_mem::{new, renew};
use super::dpx_mfileio::work_buffer;
use crate::mfree;
use crate::shims::sprintf;
use crate::streq_ptr;
use crate::stub_errno as errno;
use crate::warn;
use libc::{free, memset, strcmp, strtod};

pub type l_offset = u32;
pub type s_SID = u16;
/* CFF Data Types */
/* SID SID number */
/* offset(0) */
/* size offset(0) */
/* 1-byte unsigned number */
/* 2-byte unsigned number */
/* 1-byte unsigned number specifies the size
of an Offset field or fields, range 1-4


ustomAttributes[0].value);
        }

        [Test]
        public void TestModifyingCustomAttributesMadeLineNotBeSaved() {
            ShopifyBuy.Init(new MockLoader());

            Cart cart = ShopifyBuy.Client().Cart();
            string variantId = "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8yMDc1NjEyOTE1NQ==";
            var variant = CreateProductVariant(variantId);
            Dictionary<string,object> dataCheckoutLineItem = new Dictionary<string,object>() {
                {"id", "a-checkout-id"},
                {
                    "variant", new Dictionary<string, object>() {
                        {"id", "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8yMDc1NjEyOTE1NQ=="},
                        {"price", "1.00"},
                    }
                }
            };
            List<CheckoutLineItem> checkoutLineItems = new List<CheckoutLineItem>() {
                { new CheckoutLineItem(dataCheckoutLineItem) }
            };

            cart.LineItems.AddOrUpdate(variant, 33, new Dictionary<string, string>() {
                {"fun", "things"}
            });

            Assert.IsFalse(cart.LineItems.IsSaved, "initially is not saved");

            cart.LineItems.Get(variantId).GetCheckoutLineItemUpdateInput();

            cart.LineItems.UpdateLineItemsFromCheckoutLineItems(checkoutLineItems);

            Assert.IsTrue(cart.LineItems.IsSaved, "after get input is saved");

            cart.LineItems.Get(variantId).CustomAttributes["fun"] = "stuff";

            Assert.IsFalse(cart.LineItems.IsSaved, "after change is not saved");
        }

        [Test]
        public void TestGetCheckoutLink() {
            ShopifyBuy.Init(new MockLoader());

            Cart cart = ShopifyBuy.Client().Cart();
            string responseURL = null;
            ShopifyError error = null;

            cart.LineItems.AddOrUpdate(CreateProductVariant("Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8yMDc1NjEyOTE1NQ=="), 33);
            cart.LineItems.AddOrUpdate(CreateProductVariant("Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8yMDc1NjEyOTM0Nw=="), 2);

            cart.GetWebCheckoutLink(
                success: (url) => {
                    responseURL = url;
                },
                failure: (shopError) => {
                    error = shopError;
                }
            );

            Assert.IsNull(error);
            Assert.AreEqual("http://shopify.com/checkout-no-poll", responseURL, "weblink was correct");
            Assert.AreEqual("line-item-id1", cart.LineItems.All()[0].ID, "Line item 1 has the correct ID set");
            Assert.AreEqual("line-item-id2", cart.LineItems.All()[1].ID, "Line item 2 has the correct ID set");
        }

        [Test]
        public void ModifyLineItems() {
            ShopifyBuy.Init(new MockLoader());

            string variantId1 = "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8yMDc1NjEyOTE1NQ==";
            var variant1 = CreateProductVariant(variantId1);

            string variantId2 = "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFud


brief Sets the LPTMR compare value.
 *
 * @param baseAddr The LPTMR peripheral base address.
 * @param compareValue Specifies LPTMR compare value, less than 0xFFFFU
 */
static inline void LPTMR_HAL_SetCompareValue(uint32_t baseAddr,  uint32_t compareValue)
{
    BW_LPTMR_CMR_COMPARE(baseAddr, compareValue & 0xFFFFU);
}

/*!
 * @brief Gets the LPTMR compare value.
 *
 * @param baseAddr The LPTMR peripheral base address.
 * @return Current LPTMR compare value
 */
static inline uint32_t LPTMR_HAL_GetCompareValue(uint32_t baseAddr)
{
    return (uint32_t)(BR_LPTMR_CMR_COMPARE(baseAddr) & 0xFFFFU);
}

/*!
 * @brief Gets the LPTMR counter value.
 *
 * @param baseAddr The LPTMR peripheral base address.
 * @return Current LPTMR counter value
 */
static inline uint32_t LPTMR_HAL_GetCounterValue(uint32_t baseAddr)
{
    BW_LPTMR_CNR_COUNTER(baseAddr, 0);  /* Must first write to the CNR with any value */
    return (uint32_t)(BR_LPTMR_CNR_COUNTER(baseAddr) & 0xFFFFU);
}

/*!
 * @brief Restores the LPTMR module to reset state.
 *
 * @param baseAddr The LPTMR peripheral base address
 */
void LPTMR_HAL_Init(uint32_t baseAddr);

/*@}*/

#if defined(__cplusplus)
}
#endif

/*! @}*/

#endif /* __FSL_LPTMR_HAL_H__*/
/*******************************************************************************
 * EOF
 *******************************************************************************/


/*
 * Copyright (c) 2014-2019 Jim Tremblay
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

    RSEG    CODE:CODE(2)
    thumb

    EXTERN nOS_runningThread
    EXTERN nOS_highPrioThread

    PUBLIC PendSV_Handler

PendSV_Handler:
    /* Disable interrupts */
    CPSID       I
    ISB

    /* Save PSP before doing anything, PendSV_Handler already running on MSP */
    MRS         R0,         PSP

    /* Get the location of nOS_runningThread */
    LDR         R3,         =nOS_runningThread
    LDR         R2,         [R3]

    /* Push remaining registers on thr


/Jeremiah 9#^verse-9|Jer. 9:9]] ^note-1b

2a. [[Old Testament/1 Kings/1 Kings 8#^verse-46|1 Kgs. 8:46]]; [[Book of Mormon/Mosiah/Mosiah 11#^verse-21|Mosiah 11:21]]; [[Book of Mormon/Mosiah/Mosiah 20#^verse-21|20:21]] ^note-2a

2b. [[Old Testament/Lamentations/Lamentations 3#^verse-30|Lam. 3:30]]; [[Book of Mormon/Mosiah/Mosiah 21#^verse-3|Mosiah 21:3 (3-4, 13)]] ^note-2b

2c. [[Old Testament/Deuteronomy/Deuteronomy 28#^verse-26|Deut. 28:26]] ^note-2c

3a. [[Old Testament/Amos/Amos 7#^verse-11|Amos 7:11 (10-11)]]; [[Book of Mormon/Mosiah/Mosiah 12#^verse-10|Mosiah 12:10 (10-12)]] ^note-3a

3b. [[Book of Mormon/Mosiah/Mosiah 19#^verse-20|Mosiah 19:20]] ^note-3b

4a. [[New Testament/Luke/Luke 21#^verse-11|Luke 21:11 (10-13)]]; [[Book of Mormon/2 Nephi/2 Nephi 6#^verse-15|2 Ne. 6:15]]; [[Doctrine and Covenants/Doctrine and Covenants/Doctrine and Covenants 97#^verse-26|D&C 97:26 (22-26)]] ^note-4a

4b. [[Book of Mormon/Mosiah/Mosiah 21#^verse-9|Mosiah 21:9 (1-15)]] ^note-4b

5a. [[Book of Mormon/Mosiah/Mosiah 21#^verse-3|Mosiah 21:3]] ^note-5a

6a. [[Old Testament/Exodus/Exodus 9#^verse-18|Ex. 9:18 (13-35)]]; [[Old Testament/Ezekiel/Ezekiel 13#^verse-13|Ezek. 13:13]] ^note-6a

6b. [[Old Testament/Jeremiah/Jeremiah 18#^verse-17|Jer. 18:17]]; [[Old Testament/Ezekiel/Ezekiel 27#^verse-26|Ezek. 27:26]]; [[Book of Mormon/Mosiah/Mosiah 7#^verse-31|Mosiah 7:31]] ^note-6b

6c. [[Old Testament/Exodus/Exodus 10#^verse-4|Ex. 10:4 (1-12)]] ^note-6c

7a. [[Doctrine and Covenants/Doctrine and Covenants/Doctrine and Covenants 3#^verse-18|D&C 3:18]] ^note-7a

8a. [[Old Testament/Genesis/Genesis 6#^verse-13|Gen. 6:13]]; [[Old Testament/Isaiah/Isaiah 42#^verse-14|Isa. 42:14 (14-15)]]; [[Book of Mormon/2 Nephi/2 Nephi 26#^verse-10|2 Ne. 26:10 (10-11)]]; [[Book of Mormon/Alma/Alma 45#^verse-11|Alma 45:11 (9-14)]] ^note-8a

8b. [[Book of Mormon/Mormon/Mormon 8#^verse-14|Morm. 8:14 (14-16)]] ^note-8b

10a. [[Old Testament/Amos/Amos 7#^verse-11|Amos 7:11 (10-11)]]; [[Book of Mormon/Mosiah/Mosiah 12#^verse-3|Mosiah 12:3]] ^note-10a

13a. [[Book of Mormon/Mosiah/Mosiah 11#^verse-27|Mosiah 11:27]] ^note-13a

14a. [[Old Testament/Jeremiah/Jeremiah 2#^verse-35|Jer. 2:35]]; [[Book of Mormon/Alma/Alma 21#^verse-6|Alma 21:6]] ^note-14a

14b. [[Book of Mormon/Helaman/Helaman 13#^verse-26|Hel. 13:26 (24-28)]] ^note-14b

17a. [[Book of Mormon/Mosiah/Mosiah 11#^verse-11|Mosiah 11:11]] ^note-17a

19a. [[New Testament/John/John 8#^verse-6|John 8:6]] ^note-19a

19b. [[Doctrine and Covenants/Doctrine and Covenants/Doctrine and Covenants 100#^verse-5|D&C 100:5 (5-6)]]


eryableImpl.from([{ foo: 1 }, { foo: 2 }, { foo: 3 }]).average(),
            );
        });

        it("correctly calculates the average using key func", async () => {
            const res = AsyncQueryableImpl.from([{ foo: 1 }, { foo: 2 }, { foo: 3 }]);
            assert.deepEqual(await res.average(x => x.foo), 2);
            assert.deepEqual(await res.average(x => x.foo), 2);
        });
    });

    describe("aggregate", () => {
        it("throws for empty lists", async () => {
            const res = AsyncQueryableImpl.from<number>([]);
            assert.deepEqual(await res.aggregate(0, acc => acc + 13), 0);
            assert.deepEqual(await res.aggregate(0, acc => acc + 13), 0);
        });

        it("aggregates (+) over array of numbers", async () => {
            let res = AsyncQueryableImpl.from<any>([1]);
            assert.deepEqual(await res.aggregate(0, (acc, i) => acc + i), 1);
            assert.deepEqual(await res.aggregate(0, (acc, i) => acc + i), 1);

            res = AsyncQueryableImpl.from([1, -1]);
            assert.deepEqual(await res.aggregate(0, (acc, i) => acc + i), 0);
            assert.deepEqual(await res.aggregate(0, (acc, i) => acc + i), 0);

            res = AsyncQueryableImpl.from([{ foo: 1 }, { foo: 2 }, { foo: 3 }]);
            assert.deepEqual(await res.aggregate(0, (acc, o) => acc + o.foo), 6);
            assert.deepEqual(await res.aggregate(0, (acc, o) => acc + o.foo), 6);
        });
    });
});

describe("IterablePromise eval operators", () => {
    describe("toArray", () => {
        it("returns empty array for empty enumerable", async () => {
            const xs = AsyncQueryableImpl.from([]);
            assert.deepEqual(await xs.toArray(), []);
            assert.deepEqual(await xs.toArray(), []);
        });
    });
});

describe("IterablePromise iterable interop operators", () => {
    describe("pipe", () => {
        it("allows composition of multiple async iterators", async () => {
            const xs = AsyncQueryableImpl.from([1, 2, 3, 4]).pipe(
                async function*(source) {
                    for await (const t of source) {
                        if (t > 2) {
                            yield t;
                        }
                    }
                },
                async function*(source) {
                    for await (const t of source) {
                        yield t + 2;
                    }
                },
            );
            assert.deepEqual(await xs.toArray(), [5, 6]);
            assert.deepEqual(await xs.toArray(), [5, 6]);
        });
    });
});
(function () {
  /*
    abstract 定义抽象类,该类只能供别人继承,不能自己直接new 创建对象
     抽象类可以添加抽象方法
  */
  abstract class Animal {
    name: string
    age: number
    constructor(name: string, age: number) {
      this.name = name
      this.age = age
    }
    say() {
      console.log('动物在叫')
    }
    /*
    定义一个抽象方法,该方法相当于子类必须重写的方法,
    抽象方法使用abstract开头

     */
  }
  class Dog extends Animal {

    say() {
      console.log('汪汪汪')
    }
  }
  class Cat extends Animal {
    say() {
      console.log('喵喵喵')
    }
  }
  const dog1 = new Dog('小黄', 20)
  console.log(dog1)
  dog1.say()
  const cat = new Cat('小猫', 200)
  console.log(cat)
  cat.say()
}())// tslint:disable-next-line: no-


   original_pixel_values = transformations(image).unsqueeze(0)  # insert batch dimension

    processor = BitImageProcessor(
        size={"shortest_edge": 256},
        resample=PILImageResampling.BICUBIC,
        image_mean=IMAGENET_DEFAULT_MEAN,
        image_std=IMAGENET_DEFAULT_STD,
    )
    pixel_values = processor(image, return_tensors="pt").pixel_values

    assert torch.allclose(original_pixel_values, pixel_values)

    with torch.no_grad():
        outputs = model(pixel_values, output_hidden_states=True)
        original_outputs = original_model(pixel_values)

    # assert values
    if image_classifier:
        print("Predicted class:")
        class_idx = outputs.logits.argmax(-1).item()
        print(model.config.id2label[class_idx])
    else:
        assert outputs.last_hidden_state[:, 0].shape == original_outputs.shape
        assert torch.allclose(outputs.last_hidden_state[:, 0], original_outputs, atol=1e-3)
    print("Looks ok!")

    if pytorch_dump_folder_path is not None:
        Path(pytorch_dump_folder_path).mkdir(exist_ok=True)
        print(f"Saving model {model_name} to {pytorch_dump_folder_path}")
        model.save_pretrained(pytorch_dump_folder_path)
        print(f"Saving image processor to {pytorch_dump_folder_path}")
        processor.save_pretrained(pytorch_dump_folder_path)

    if push_to_hub:
        model_name_to_hf_name = {
            "dinov2_vits14": "dinov2-small",
            "dinov2_vitb14": "dinov2-base",
            "dinov2_vitl14": "dinov2-large",
            "dinov2_vitg14": "dinov2-giant",
            "dinov2_vits14_1layer": "dinov2-small-imagenet1k-1-layer",
            "dinov2_vitb14_1layer": "dinov2-base-imagenet1k-1-layer",
            "dinov2_vitl14_1layer": "dinov2-large-imagenet1k-1-layer",
            "dinov2_vitg14_1layer": "dinov2-giant-imagenet1k-1-layer",
        }

        name = model_name_to_hf_name[model_name]
        model.push_to_hub(f"facebook/{name}")
        processor.push_to_hub(f"facebook/{name}")

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    # Required parameters
    parser.add_argument(
        "--model_name",
        default="dinov2_vitb14",
        type=str,
        choices=[
            "dinov2_vits14",
            "dinov2_vitb14",
            "dinov2_vitl14",
            "dinov2_vitg14",
            "dinov2_vits14_1layer",
            "dinov2_vitb14_1layer",
            "dinov2_vitl14_1layer",
            "dinov2_vitg14_1layer",
        ],
        help="Name of the model you'd like to convert.",
    )
    parser.add_argument(
        "--pytorch_dump_folder_path", default=None, type=str, help="Path to the output PyTorch model directory."
    )
    parser.add_argument(
        "--push_to_hub", action="store_true", help="Whether or not to push the converted model to the 🤗 hub."
    )

    args = parser.parse_args()
    convert_dinov2_checkpoint(args.model_name, args.pytorch_dump_folder_path, args.push_to_hub)


; ==================================================================================================
; ENEMY_SEEDS_ON_TREE
;
; Variables:
;   var03: Child "PART_SEED_ON_TREE" objects write here when Link touches them?
; ==================================================================================================
enemyCode5a:
	ld e,Enemy.state
	ld a,(de)
	or a
	jr nz,@state1

; Initialization
@state0:
	ld a,$01
	ld (de),a ; [state]

.ifdef ROM_AGES
	; Locate tree
	ld a,TILEINDEX_MYSTICAL_TREE_TL
	call findTileInRoom
	jp nz,interactionDelete ; BUG: Wrong function call! (see below)

	; Move to that position
	ld c,l
	ld h,d
	ld l,Enemy.yh
	call setShortPosition_paramC
	ld bc,$0808
	call objectCopyPositionWithOffset

	ld e,Enemy.subid
	ld a,(de)
	and $0f
	ld hl,wSeedTreeRefilledBitset
	call checkFlag
	jp z,interactionDelete

	; BUG: Above function call is wrong! Should be "enemyDelete"!
	; If a seed tree's seeds are exhausted, instead of deleting this object, it will
	; try to delete the interaction in the corresponding spot!
	; This is not be very noticeable, because often this will be in slot $d0, which
	; for interactions, is reserved for items from chests and stuff like that. But
	; that can be manipulated by digging up enemies from the ground...

	ld a,(de)
	swap a
	and $0f
	ldh (<hFF8B),a
.else
	ld e,Enemy.subid
	ld a,(de)
	ld b,a
	add a
	add b
	ld hl,@treeDataTable
	rst_addAToHl
	ldi a,(hl)
	ldh


ib\\Fbo.java",
                              "lib\\Foo.class", "lib\\Foo.jar", "lib\\Foo.java");

        checkArgumentWildcard("lib\\?*", "lib\\Fbo.class", "lib\\Fbo.java",
                "lib\\Foo.class", "lib\\Foo.jar", "lib\\Foo.java");

        checkArgumentWildcard("lib\\?", "lib\\?");

        // test for basic expansion
        checkArgumentWildcard("lib\\*java", "lib\\Fbo.java", "lib\\Foo.java");

        // basic expansion in quotes
        checkArgumentWildcard("\"lib\\*.java\"", "lib\\*.java");

        // suffix expansion
        checkArgumentWildcard("lib\\*.class", "lib\\Fbo.class", "lib\\Foo.class");

        // suffix expansion in quotes
        checkArgumentWildcard("\"lib\\*.class\"", "lib\\*.class");

        // check for ? expansion now
        checkArgumentWildcard("lib\\F?o.java", "lib\\Fbo.java", "lib\\Foo.java");

        // check ? in quotes
        checkArgumentWildcard("\"lib\\F?o.java\"", "lib\\F?o.java");

        // check ? as suffixes
        checkArgumentWildcard("lib\\F?o.????", "lib\\Fbo.java", "lib\\Foo.java");

        // check ? in a leading role
        checkArgumentWildcard("lib\\???.java", "lib\\Fbo.java", "lib\\Foo.java");
        checkArgumentWildcard("\"lib\\???.java\"", "lib\\???.java");

        // check ? prefixed with -
        checkArgumentWildcard("-?", "-?");

        // check * prefixed with -
        checkArgumentWildcard("-*", "-*");

        // check on empty directory
        checkArgumentWildcard("empty\\*", "empty\\*");
        checkArgumentWildcard("empty\\**", "empty\\**");
        checkArgumentWildcard("empty\\?", "empty\\?");
        checkArgumentWildcard("empty\\??", "empty\\??");
        checkArgumentWildcard("empty\\*?", "empty\\*?");
        checkArgumentWildcard("empty\\?*", "empty\\?*");

        // 8132379: java should not filter out -J options for application
        String[] args = { "-J-one", "-Jtwo", "lib\\???.java", "-J-Dsomething",
           "a", "-J-Dlast.arg" };
        String[] expected = { "-J-one", "-Jtwo", "lib\\Fbo.java",
           "lib\\Foo.java", "-J-Dsomething", "a", "-J-Dlast.arg" };
        checkArgumentWildcard(args, expected);
    }

    void doArgumentCheck(String inArgs, String... expArgs) {
        Map<String, String> env = new HashMap<>();
        env.put(JLDEBUG_KEY, "true");
        TestResult tr = doExec(env, javaCmd, inArgs);
        System.out.println(tr);
        int sindex = tr.testOutput.indexOf("Command line args:");
        if (sindex < 0) {
            System.out.println(tr);
            throw new RuntimeException("Error: no output");
        }
        sindex++; // skip over the tag
        List<String> gotList = new ArrayList<>();
        for (String x : tr.testOutput.subList(sindex, sindex + expArgs.length)) {
            String a[] = x.split("=");
            gotList.add(a[a.length - 1].trim());
        }
        List<String> expList = Arrays.asList(expArgs);
        if (!gotList.equals(expList)) {
            System.out.println(tr);
            System.out.println("Expected args:");
            System.out.println(expList);
            System.out.println("Obtained args:");
            System.out.println(gotList);
            throw new RuntimeException("Error: args do not match");
        }
    }

    /*
     * These tests are usually run on non-existent targets to check error results
     */
    @Test
    void testBasicErrorMessages() {
        // Tests for 5030233
        Test


= Label(self.root, text='NLP APP', bg='black', fg='#25F6D8')
        app_title.pack(pady=(60, 20))
        app_title.configure(font=('Georgia', 60, 'bold'))

        app_title = Label(self.root, text='EMOTION DETECTION', bg='black', fg='#25F6D8')
        app_title.pack(pady=(60, 20))
        app_title.configure(font=('Georgia', 30))

        lable1 = Label(self.root, text='Enter the text', bg='black', font=('Times New Roman', 24))
        lable1.pack(pady=(20, 20))

        self.emotion_input = ttk.Entry(self.root, width=50)
        self.emotion_input.pack(pady=(20, 20), ipady=10)

        emotion_btn = Button(self.root, text='Submit', background='blue', fg='grey',
                         font=('Times New Roman', 15), command=self.do_emotion)
        emotion_btn.pack(pady=(10, 10))

        self.emotion_result = Label(self.root, text='', bg='black', fg='white', font=('Times New Roman', 24))
        self.emotion_result.pack(pady=(20, 20))
        self.emotion_result.configure(font=('Georgia', 16))

        back_btn = Button(self.root, text='Back', background='blue', fg='grey', font=('Times New Roman', 15),
                          command=self.Home_gui)
        back_btn.pack(pady=(10, 10))

    def do_emotion(self):
        text = self.emotion_input.get()
        result = self.apio.emotion(text)
        #
        # for i in result['scored_labels']:
        #     print(i,result['scored_labels']['label'])
        self.emotion_result['text'] = result

obj = NLPApp()


resf2",
                    "divmodsi4",
                    "modsi3",
                    "switch16",
                    "switch32",
                    "switch8",
                    "switchu8",
                    "udivmodsi4",
                    "umodsi3",
                ],
            );

            // But use some generic implementations where possible
            sources.extend(&["clzdi2.c", "clzsi2.c"])
        }

        if llvm_target[0] == "thumbv7m" || llvm_target[0] == "thumbv7em" {
            sources.remove(&["aeabi_cdcmp", "aeabi_cfcmp"]);
        }

        let root = if env::var_os("CARGO_FEATURE_RUSTBUILD").is_some() {
            Path::new("../../libcompiler_builtins")
        } else {
            Path::new(".")
        };

        let src_dir = root.join("compiler-rt/lib/builtins");
        for src in sources.map.values() {
            let src = src_dir.join(src);
            cfg.file(&src);
            println!("cargo:rerun-if-changed={}", src.display());
        }

        cfg.compile("libcompiler-rt.a");
    }
}
<gh_stars>10-100
//! Vertex buffer filters
//!
//! These functions can be used to filter output of [decode_vertex_buffer](crate::vertex::buffer::decode_vertex_buffer) in-place.
//!
//! Mainly useful in combination with the `EXT_meshopt_compression` glTF extension.

use crate::util::as_mut_bytes;

macro_rules! from_bytes_oct {
	($e:ident, 4) => {
		(
			i8::from_ne_bytes([$e[0]]) as f32,
			i8::from_ne_bytes([$e[1]]) as f32,
			i8::from_ne_bytes([$e[2]]) as f32,
		)
	};
	($e:ident, 8) => {
		(
			i16::from_ne_bytes([$e[0], $e[1]]) as f32,
			i16::from_ne_bytes([$e[2], $e[3]]) as f32,
			i16::from_ne_bytes([$e[4], $e[5]]) as f32,
		)
	};
}

macro_rules! to_bytes_oct {
	($e:ident, $x:ident, $y:ident, $z:ident, 4) => {{
		$e[0] = $x.to_ne_bytes()[0];
		$e[1] = $y.to_ne_bytes()[0];
		$e[2] = $z.to_ne_bytes()[0];
	}};
	($e:ident, $x:ident, $y:ident, $z:ident, 8) => {{
		$e[0] = $x.to_ne_bytes()[0];
		$e[1] = $x.to_ne_bytes()[1];
		$e[2] = $y.to_ne_bytes()[0];
		$e[3] = $y.to_ne_bytes()[1];
		$e[4] = $z.to_ne_bytes()[0];
		$e[5] = $z.to_ne_bytes()[1];
	}};
}

fn decode_filter_oct_scalar(data: &mut [u8], stride: usize) {
	let max = ((1 << (stride / 4 * 8 - 1)) - 1) as f32;

	for bytes in data.chunks_exact_mut(stride) {
		// convert x and y to floats and reconstruct z; this assumes zf encodes 1.0 at the same bit count
		let (mut x, mut y, mut z) = match stride {
			4 => from_bytes_oct!(bytes, 4),
			8 => from_bytes_oct!(bytes, 8),
			_ => unreachable!("")
		};

		z = z - x.abs() - y.abs();

		// fixup octahedral coordinates for z<0
		let t = z.min(0.0);

		x += if x >= 0.0 { t } else { -t };
		y += if y >= 0.0 { t } else { -t };

		// compute normal length & scale
		let l = (x * x + y * y + z * z).sqrt();
		let s = max / l;

		// rounded signed float->int
		let xf = (x * s + if x >= 0.0 { 0.5 } else { -0.5 }) as i32;