ssage(Message::Text(text)) {
                    Ok(_) => server.senders.push(sender),
                    Err(error) => println!("Send error on sync: {}", error),
                };
            }

            // an existing client has sent a new message
            ServerEvent::Change(input_bytes) => {
                // TODO we throw cbor in here to avoid https://github.com/rust-lang/rustc-serialize/issues/113
                let mut decoder = cbor::Decoder::from_bytes(&input_bytes[..]);
                let cbor = decoder.items().next().unwrap().unwrap();
                let json = cbor.to_json();
                let event = FromJson::from_json(&json);
                handle_event(&mut server, event, json, saves_dir);
            }
        }
    }
}
<filename>src/main.rs
#[macro_use]
extern crate libasm;

lasm! {
    "x86_64-unknown-linux-gnu"
    fn add2 {
        mov %rax, %rdi
        add %rax, %rsi
    }

    "x86_64-pc-windows-msvc"
    fn add2 {
        mov rax, rcx
        add rax, rdx
    }
}

extern "C" {
    fn add2(a: u64, b: u64) -> u64;
}

fn main() {
    let x = unsafe { add2(3, 4) };
    println!("Hello, world! 3 + 4 = {}", x);
}
pub mod builder;
pub mod container;
pub mod error;
pub mod parser;

mod ffi;

pub use ffi::*;
<reponame>Svetlitski/ripgrep
use std::io;

use termcolor;

use crate::is_tty_stdout;

/// A writer that supports coloring with either line or block buffering.
pub struct StandardStream(StandardStreamKind);

/// Returns a possibly buffered writer to stdout for the given color choice.
///
/// The writer returned is either line buffered or block buffered. The decision
/// between these two is made automatically based on whether a tty is attached
/// to stdout or not. If a tty is attached, then line buffering is used.
/// Otherwise, block buffering is used. In general, block buffering is more
/// efficient, but may increase the time it takes for the end user to see the
/// first bits of output.
///
/// If you need more fine grained control over the buffering mode, then use one
/// of `stdout_buffered_line` or `stdout_buffered_block`.
///
/// The color choice given is passed along to the underlying writer. To
/// completely disable colors in all cases, use `ColorChoice::Never`.
pub fn stdout(color_choice: termcolor::ColorChoice) -> StandardStream {
    if is_tty_stdout() {
        stdout_buffered_line(color_choice)
    } else {
        stdout_buffered_block(color_choice)
    }
}

/// Returns a line buffered writer to stdout for the given color choice.
///
/// This writer is useful when printing results directly to a tty such that
/// users see output as soon as it's written. The downside of this approach
/// is that it can be slower, especially when there is a lot of output.
///
/// You might consider using
/// [`stdout`](fn.stdout.html)
/// instead, which chooses the buffering strategy automatically based on
/// whether stdout is connected to a tty.
pub fn stdout_buffered_line(
    color_choice: termcolor::ColorChoice,
) -> StandardStream {
    let out = termcolor::StandardStream::stdout(color_choice);
    StandardStream(StandardStreamKind::LineBuffered(out))
}

/// Returns a block buffered writer to stdout for the given color choice.
///
/// This writer is useful when printing results to a file since it amortizes
/// the cost of writing data. The downside of this approach is that it can
/// increase the latency of display output when writing to a tty.
///
/// You might consider using
/// [`stdout`](fn.stdout.html)
/// instead, which chooses the buffering strategy automatically based on
/// whether stdout is connected to a tty.
pub fn


     Map<String, Integer> topicCountMap = new HashMap<String, Integer>();
        topicCountMap.put(topic, 1);
        Map<String, List<KafkaStream<byte[], byte[]>>> consumerMap = consumer.createMessageStreams(topicCountMap);
        List<KafkaStream<byte[], byte[]>> streams = consumerMap.get(topic);

        for(final KafkaStream<byte[], byte[]> kafkaStream : streams){
            new Thread(new Runnable() {
                @Override
                public void run() {
                    for(MessageAndMetadata<byte[], byte[]> mm : kafkaStream){
                        String msg = new String(mm.message());
                        System.out.println(msg);
                    }
                }

            }).start();

        }
    }
}

```

启动 ZooKeeper 服务器。

```
$ /bin/zookeeper-server-start.sh config/zookeeper.properties &

```

![此处输入图片的描述](https://dn-anything-about-doc.qbox.me/document-uid214292labid2666timestamp1489721411456.png/wm)

接下来，启动 kafka 服务器。

```
$bin/kafka-server-start.sh config/server.properties &

```

![此处输入图片的描述](https://dn-anything-about-doc.qbox.me/document-uid214292labid2666timestamp1489721570739.png/wm)

上节课我们创建了 test 主题，并且 `ProducerDemo.java` 里指定了主题 test，所以可以直接使用。

![此处输入图片的描述](https://dn-anything-about-doc.qbox.me/document-uid214292labid2666timestamp1489721817899.png/wm)

若没有 test 主题，可以使用以下方式创建 (若存在主题，跳过此步)。

```
$ bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test

```

### 2.4 测试

用一个 comsumer 从 test 主题中读取信息

```
$ bin/kafka-console-consumer.sh --zookeeper localhost:2181 --from-beginning --topic test

```

![此处输入图片的描述](https://dn-anything-about-doc.qbox.me/document-uid214292labid2666timestamp1489722522209.png/wm)

运行写好的 `ProducerDemo.java`，同时观察消费者端的变化。

![此处输入图片的描述](https://dn-anything-about-doc.qbox.me/document-uid214292labid2666timestamp1489722902625.png/wm)

消费者 Xfce 终端不断消费消息。

![此处输入图片的描述](https://dn-anything-about-doc.qbox.me/document-uid214292labid2666timestamp1489723053470.png/wm)

停掉`ProducerDemo.java`，先运行`ConsumerDemo.java`。

![此处输入图片的描述](https://dn-anything-about-doc.qbox.me/document-uid214292labid2666timestamp1489723434744.png/wm)

等待接收信息。

![此处输入图片的描述](https://dn-anything-about-doc.qbox.me/document-uid214292labid2666timestamp1489723880395.png/wm)

查看 Eclipse 的 ConsumerDemo 的 Console 及消费者 Xfce 终端

再次运行 `ProducerDemo.java`。

![此处输入图片的描述](https://dn-anything-about-doc.qbox.me/document-uid214292labid2666timestamp1489723951086.png/wm)

观察结果。

![此处输入图片的描述](https://dn-anything-about-doc.qbox.me/document-uid214


 end
    end
    return new_input
end

function RNNModel:forward(input, target, seq_length, eval)
    local eval = eval or false
    local rnn_state = {[0] = clone_list(self.init_state)}
    local output = {}
    local loss = 0
    for t=1,seq_length do
        if eval then
            self.clones.rnn[t]:evaluate()
        else
            self.clones.rnn[t]:training()
        end

        local inputs = self:extract_input(input, t)
        for k, v in ipairs(rnn_state[t-1]) do
            table.insert(inputs, v)
        end
        local lst = self.clones.rnn[t]:forward{unpack(inputs)}

        -- extract the state, without output
        rnn_state[t] = {}
        for i=1,#self.init_state do
            table.insert(rnn_state[t], lst[i])
        end

        -- extract outputs (assuming there's only one output--the last element)
        output[t] = lst[#lst]

        loss = loss + self.clones.criterion[t]:forward(output[t], target[{{}, t}])
    end
    return output, rnn_state, loss / seq_length
end

function RNNModel:backward(input, target, output, rnn_state, seq_length)
    local drnn_state = {[seq_length] = clone_list(self.init_state, true)} -- true also zeros the clones
    for t=seq_length,1,-1 do
        -- backprop through loss, and softmax/linear
        local doutput_t = self.clones.criterion[t]:backward(output[t], target[{{}, t}])
        table.insert(drnn_state[t], doutput_t)
        local inputs = self:extract_input(input, t)
        for k, v in ipairs(rnn_state[t-1]) do
            table.insert(inputs, v)
        end
        local dlst = self.clones.rnn[t]:backward(inputs, drnn_state[t])
        drnn_state[t-1] = {}
        for k,v in ipairs(dlst) do
            -- k == 1 is gradient on x, which we dont need
            if k > #input then
                drnn_state[t-1][k-#input] = v
            end
        end
    end
end


 < K; ++k1)
      {
         int const dstRow0 = k1*P;
         for (int k2 = 0; k2 < K; ++k2)
         {
            int const dstCol0 = k2*P;

            makeZeroMatrix(accum);

            for (int i = 0; i < N; ++i)
            {
               scaleMatrix(UCUt[i], Vt[k1][i]*Vt[k2][i], UCiUt);
               addMatricesIP(UCiUt, accum);
            } // end for (i)
            copyMatrixSlice(accum, 0, 0, P, P, dst, dstRow0, dstCol0);
         } // end for (k2)
      } // end for (k1)
   } // end multiply_VtxU_C_VxUt()

   template <typename Elem, typename MatV, typename MatDst>
   inline void
   multiply_VtxI_C_VxI(MatV const& Vt, BlockDiagonalMatrix<Elem> const& C, MatDst& dst)
   {
      int const N = C.getCount();
      int const P = C.getM();
      int const K = Vt.num_rows();

      assert(P == C.getN());
      assert(Vt.num_cols() == N);

      // dst has KxK PxP blocks
      assert(dst.num_rows() == K*P);
      assert(dst.num_cols() == K*P);

      Matrix<Elem> UCiUt(P, P);
      Matrix<Elem> accum(P, P);

      for (int k1 = 0; k1 < K; ++k1)
      {
         int const dstRow0 = k1*P;
         for (int k2 = 0; k2 < K; ++k2)
         {
            int const dstCol0 = k2*P;

            makeZeroMatrix(accum);

            for (int i = 0; i < N; ++i)
            {
               Matrix<Elem> const& Ci = C.getBlock(i);
               scaleMatrix(Ci, Vt[k1][i]*Vt[k2][i], UCiUt);
               addMatricesIP(UCiUt, accum);
            } // end for (i)
            copyMatrixSlice(accum, 0, 0, P, P, dst, dstRow0, dstCol0);
         } // end for (k2)
      } // end for (k1)
   } // end multiply_VtxI_C_VxI()

   template <typename Elem, typename MatU, typename MatV, typename MatDst>
   inline void
   multiply_VtxU_C(MatU const& U, MatV const& Vt, BlockDiagonalMatrix<Elem> const& C, MatDst& dst)
   {
      int const N = C.getCount();
      int const P = U.num_rows();
      int const K = U.num_cols();

      assert(Vt.num_rows() == K);
      assert(Vt.num_cols() == N);

      assert(C.getN() == K);
      assert(C.getM() == K);

      Matrix<Elem> UCi(P, K);

      MatrixArray<Elem> UC(N, P, K);

      for (int i = 0; i < N; ++i)
         multiply_A_B(U, C.getBlock(i), UC[i]);

      for (int k = 0; k < K; ++k)
      {
         int const dstRow0 = k*P;
         for (int i = 0; i < N; ++i)
         {
            int const dstCol0 = i*K;

            copyMatrix(UC[i], UCi);
            scaleMatrixIP(Vt[k][i], UCi);
            copyMatrixSlice(UCi, 0, 0, P, K, dst, dstRow0, dstCol0);
         } // end for (i)
      } // end for (k)
   } // end multiply_VtxU_C_VxUt()

} // end namespace V3D

#endif


"))

  fun testViewChildrenDecoratorHtml() =
    doLookupTest(Angular2TestModule.ANGULAR_CORE_17_3_0, extension = "ts", dir = true,
                 locations = listOf("@ViewChild('<caret>area')", "@ViewChildren('<caret>area')"))

  fun testViewChildrenSignal() =
    doLookupTest(Angular2TestModule.ANGULAR_CORE_17_3_0, extension = "ts",
                 locations = (1..6).map { "\"<caret>area$it\"" })

  fun testTemplateBindingsNgIf() =
    doLookupTest(Angular2TestModule.ANGULAR_CORE_17_3_0, Angular2TestModule.ANGULAR_COMMON_17_3_0, extension = "ts",
                 lookupItemFilter = { it.priority > 0 && it.lookupString != "Component" },
                 locations = listOf(
                   "<div *ngIf=\"<caret>true as foo; else foo as sss; let car = ngIf\">
",
                   "<div *ngIf=\"true as <caret>foo; else foo as sss; let car = ngIf\">
",
                   "<div *ngIf=\"true as foo; <caret>else foo as sss; let car = ngIf\">
",
                   "<div *ngIf=\"true as foo; else <caret>foo as sss; let car = ngIf\">
",
                   "<div *ngIf=\"true as foo; else foo as <caret>sss; let car = ngIf\">
",
                   "<div *ngIf=\"true as foo; else foo as sss; <caret>let car = ngIf\">
",
                   "<div *ngIf=\"true as foo; else foo as sss; let <caret>car = ngIf\">
",
                   "<div *ngIf=\"true as foo; else foo as sss; let car = <caret>ngIf\">
",
                 ))

  fun testTemplateBindingsNgFor() =
    doLookupTest(Angular2TestModule.ANGULAR_CORE_17_3_0, Angular2TestModule.ANGULAR_COMMON_17_3_0, extension = "ts",
                 lookupItemFilter = { it.priority > 0 && it.lookupString != "Component" },
                 locations = listOf(
                   "<div *ngFor=\"<caret>let foo of [1,2,3]; trackBy: trackByFn; let index = index\">
",
                   "<div *ngFor=\"let <caret>foo of [1,2,3]; trackBy: trackByFn; let index = index\">
",
                   "<div *ngFor=\"let foo <caret>of [1,2,3]; trackBy: trackByFn; let index = index\">
",
                   "<div *ngFor=\"let foo of <caret>[1,2,3]; trackBy: trackByFn; let index = index\">
",
                   "<div *ngFor=\"let foo of [1,2,3]; <caret>trackBy: trackByFn; let index = index\">
",
                   "<div *ngFor=\"let foo of [1,2,3]; trackBy: <caret>trackByFn; let index = index\">
",
                   "<div *ngFor=\"let foo of [1,2,3]; trackBy: trackByFn; <caret>let index = index\">
",
                   "<div *ngFor=\"let foo of [1,2,3]; trackBy: trackByFn; let <caret>index = index\">
",
                   "<div *ngFor=\"let foo of [1,2,3]; trackBy: trackByFn; let index = <caret>index\">
",
                 ))

  fun testTemplateBindingsNgForContextDocumentation() =
    doLookupTest(Angular2TestModule.ANGULAR_CORE_18_2_1, Angular2TestModule.ANGULAR_COMMON_18_2_1, extension = "ts",
                 lookupItemFilter = { it.lookupString == "index" || it.lookupString == "last" || it.lookupString == "ngForOf" },
                 checkDocumentation = t


    for option in dom.xpath('//form[@name="settings"]//select[@name="search_results_region"]/option'):
        sp_region_names.append(option.get('value'))

    for eng_tag in sp_region_names:
        if eng_tag == 'all':
            continue
        babel_region_tag = {'no_NO': 'nb_NO'}.get(eng_tag, eng_tag)  # norway

        if '-' in babel_region_tag:
            l, r = babel_region_tag.split('-')
            r = r.split('_')[-1]
            sxng_tag = region_tag(babel.Locale.parse(l + '_' + r, sep='_'))

        else:
            try:
                sxng_tag = region_tag(babel.Locale.parse(babel_region_tag, sep='_'))

            except babel.UnknownLocaleError:
                print("ERROR: can't determine babel locale of startpage's locale %s" % eng_tag)
                continue

        conflict = engine_traits.regions.get(sxng_tag)
        if conflict:
            if conflict != eng_tag:
                print("CONFLICT: babel %s --> %s, %s" % (sxng_tag, conflict, eng_tag))
            continue
        engine_traits.regions[sxng_tag] = eng_tag

    # languages

    catalog_engine2code = {name.lower(): lang_code for lang_code, name in babel.Locale('en').languages.items()}

    # get the native name of every language known by babel

    for lang_code in filter(
        lambda lang_code: lang_code.find('_') == -1, babel.localedata.locale_identifiers()  # type: ignore
    ):
        native_name = babel.Locale(lang_code).get_language_name().lower()  # type: ignore
        # add native name exactly as it is
        catalog_engine2code[native_name] = lang_code

        # add "normalized" language name (i.e. français becomes francais and español becomes espanol)
        unaccented_name = ''.join(filter(lambda c: not combining(c), normalize('NFKD', native_name)))
        if len(unaccented_name) == len(unaccented_name.encode()):
            # add only if result is ascii (otherwise "normalization" didn't work)
            catalog_engine2code[unaccented_name] = lang_code

    # values that can't be determined by babel's languages names

    catalog_engine2code.update(
        {
            # traditional chinese used in ..
            'fantizhengwen': 'zh_Hant',
            # Korean alphabet
            'hangul': 'ko',
            # Malayalam is one of 22 scheduled languages of India.
            'malayam': 'ml',
            'norsk': 'nb',
            'sinhalese': 'si',
        }
    )

    skip_eng_tags = {
        'english_uk',  # SearXNG lang 'en' already maps to 'english'
    }

    for option in dom.xpath('//form[@name="settings"]//select[@name="language"]/option'):

        eng_tag = option.get('value')
        if eng_tag in skip_eng_tags:
            continue
        name = extract_text(option).lower()  # type: ignore

        sxng_tag = catalog_engine2code.get(eng_tag)
        if sxng_tag is None:
            sxng_tag = catalog_engine2code[name]

        conflict = engine_traits.languages.get(sxng_tag)
        if conflict:
            if conflict != eng_tag:
                print("CONFLICT: babel %s --> %s, %s" % (sxng_tag, conflict, eng_tag))
            continue
        engine_traits.languages[sxng_tag] = eng_tag


   ret.push('_');
        } else {
            ret.push_str("0x");
            ret.push_str(product);
        }
        ret.push_str(", ");
        if ver == "xxxx" {
            ret.push('_');
        } else {
            ret.push_str("0x");
            ret.push_str(ver);
        }
        ret.push_str(") => &PadDescriptor {\n");
        let map: format::PadMapping =
            toml::from_slice(&fs::read(entry).unwrap()).unwrap();
        ret.push_str("            name: \"");
        ret.push_str(&map.name);
        ret.push_str("\",\n");
        ret.push_str("            deadzone: ");
        ret.push_str(&format!("{:?}", map.deadzone));
        ret.push_str(",\n");
        ret.push_str("            buttons: &[\n");
        let mut tb = String::new();
        if let Some(buttons) = map.button {
            for format::Button { code, event } in buttons {
                if event.starts_with("Action")
                    && event.chars().last().unwrap().is_ascii_digit()
                {
                    ret.push_str("                (&|p| Event::Action(");
                    ret.push_str(&event[6..]);
                    ret.push_str(", p), ");
                    ret.push_str(&code.to_string());
                    ret.push_str("),\n");
                } else if event.starts_with("Trigger")
                    || event == "JoyX"
                    || event == "JoyY"
                    || event == "CamX"
                    || event == "CamY"
                {
                    tb.push_str("                (&Event::");
                    tb.push_str(&event);
                    tb.push_str(", ");
                    tb.push_str(&code.to_string());
                    tb.push_str("),\n");
                } else {
                    ret.push_str("                (&Event::");
                    ret.push_str(&event);
                    ret.push_str(", ");
                    ret.push_str(&code.to_string());
                    ret.push_str("),\n");
                }
            }
        }
        ret.push_str("            ],\n");
        ret.push_str("            trigbtns: &[\n");
        ret.push_str(&tb);
        ret.push_str("            ],\n");
        ret.push_str("            axes: &[\n");
        if let Some(axes) = map.axis {
            for format::Axis { code, event, max } in axes {
                ret.push_str("                (&");
                match event.as_str() {
                    "Slew" | "Throttle" | "ThrottleL" | "ThrottleR"
                    | "TriggerL" | "TriggerR" => {
                        // Axes can be negative, and these events may not be,
                        // so move into range 0-1
                        ret.push_str("|p| Event::");
                        ret.push_str(&event);
                        ret.push_str("(p * 0.5 + 0.5)");
                    }
                    _ => {
                        ret.push_str("Event::");
                        ret.push_str(&event);
                    }
                }
                ret.push_str(", ");
                ret.push_str(&code.to_string());


Structure(land);

    // In order for equal numbers of each common to exist, the average booster must contain:
    // 3.27 A commons (36 / 11)
    // 2.18 B commons (24 / 11)
    // 2.73 C1 commons (30 / 11, or 60 / 11 in each C1 booster)
    // 1.82 C2 commons (20 / 11, or 40 / 11 in each C2 booster)
    // These numbers are the same for all sets with 101 commons in A/B/C1/C2 print runs
    // and with 10 common slots per booster
    private final RarityConfiguration commonRuns = new RarityConfiguration(
            AABBC1C1C1C1C1C1,
            AABBC1C1C1C1C1C1,
            AABBC1C1C1C1C1C1,
            AABBC1C1C1C1C1C1,
            AABBC1C1C1C1C1C1,
            AAABBC1C1C1C1C1,
            AAABBC1C1C1C1C1,
            AAABBC1C1C1C1C1,
            AAABBC1C1C1C1C1,
            AAABBC1C1C1C1C1,
            AAABBC1C1C1C1C1,

            AAAABBC2C2C2C2,
            AAAABBC2C2C2C2,
            AAAABBC2C2C2C2,
            AAAABBC2C2C2C2,
            AAAABBC2C2C2C2,
            AAAABBC2C2C2C2,
            AAAABBC2C2C2C2,
            AAAABBC2C2C2C2,
            AAAABBBC2C2C2,
            AAAABBBC2C2C2,
            AAAABBBBC2C2
    );
    private final RarityConfiguration uncommonRuns = new RarityConfiguration(AAB, ABB);
    private final RarityConfiguration rareRuns = new RarityConfiguration(R1);
    private final RarityConfiguration landRuns = new RarityConfiguration(L1);

    @Override
    public List<String> makeBooster() {
        List<String> booster = new ArrayList<>();
        booster.addAll(commonRuns.getNext().makeRun());
        booster.addAll(uncommonRuns.getNext().makeRun());
        booster.addAll(rareRuns.getNext().makeRun());
        booster.addAll(landRuns.getNext().makeRun());
        return booster;
    }
}
package mage.sets;

import mage.cards.ExpansionSet;
import mage.constants.Rarity;
import mage.constants.SetType;

/**
 * https://scryfall.com/sets/f11
 */
public class FridayNightMagic2011 extends ExpansionSet {

    private static final FridayNightMagic2011 instance = new FridayNightMagic2011();

    public static FridayNightMagic2011 getInstance() {
        return instance;
    }

    private FridayNightMagic2011() {
        super("Friday Night Magic 2011", "F11", ExpansionSet.buildDate(2011, 1, 1), SetType.PROMOTIONAL);
        this.hasBoosters = false;
        this.hasBasicLands = false;

        cards.add(new SetCardInfo("Artisan of Kozilek", 4, Rarity.RARE, mage.cards.a.ArtisanOfKozilek.class));
        cards.add(new SetCardInfo("Contagion Clasp", 10, Rarity.RARE, mage.cards.c.ContagionClasp.class));
        cards.add(new SetCardInfo("Cultivate", 8, Rarity.RARE, mage.cards.c.Cultivate.class));
        cards.add(new SetCardInfo("Everflowing Chalice", 1, Rarity.RARE, mage.cards.e.EverflowingChalice.class));
        cards.


163483347/1CLiNzi4jlxXK1-lVr7MTQ/thumb.png?1599726214, oimg:https://s3.amazonaws.com/files.d20.io/images/172770377/8mwvwLN9seLq_vtotNAAyg/thumb.png?1603532308, ns:1],[cl:MI,items:Spellbook]{{GM Info=The GM can change its images, locks and traps, and set variables to alter its behaviour by selecting the token and using the [Token Setup] GM button or using the **!cmd --token-img command**.}}{{Use=By default, only one item can be stored in this container, which generally would be a Spellbook item. A Character can\'t pick up the container, but can loot the Spellbook contained in it. Resetting the spell book container closes it again and resets the locks and traps.}}{{desc=This spellbook can have locks and traps placed on it, or left unlocked and/or untrapped. Generally, it only holds a lootable spell book, the spell book that the container represents. Once the spell book is looted, the GM should delete the container.}}'},
						{name:'Table',type:'Container',ct:'0',charge:'uncharged',cost:'0',body:'\\amp{template:'+fields.defaultTemplate+'}{{title=Table}}{{subtitle=Container}}Specs=[Table,Container,0H,Container]{{Size=6ft x 2ft x 2ft 6ins, capacity 100lbs}}{{Slots=This table has 40 stackable slots, but generally has no lock}}RaceData=[w:Table, slots:40, lock:No-Lock, trap:No-Trap, cattr:ac=7|hp=40, cimg:https://s3.amazonaws.com/files.d20.io/images/356731433/O7FScnFkVDcsWGFbttNcmQ/thumb.png?1693321948|140|70, oimg:https://s3.amazonaws.com/files.d20.io/images/356731433/O7FScnFkVDcsWGFbttNcmQ/thumb.png?1693321948|140|70], [cl:MI,%:30],[cl:MI,%:70,items:random:1d3]{{GM Info=Generally, a table does not have any form of lock, but could be trapped (e.g. if the weight on the table changes, the trap might go off). Use the GM\'s [Token Setup] button, or the **!cmd --token-img** command to change the token\'s images, locks \\amp traps, and set variables to vary behaviour.\nItems can be added to the container by using the GM\'s [Add Items] button, or the **!magic --gm-edit-mi** command, or by Characters *storing* items.\nLocks and traps can be reset by using the **!cmd --reset-chest** command or the GM\'s [Reset-Chest] button}}{{Use=Items can be stored on the table by Characters, NPCs or creatures *storing* items on it}}{{desc=This is an ordinary table, which can be configured to have traps (though less often to have a lock). When searched, after locks and traps have been overcome, it will open and list its contents. Using the container\'s [Close] action button (which available to all players) will close it but not reset any traps.}}'},
					]},
	Locks_Traps_DB:	{bio:'
Lock & Trap Macros
v1.10  07/06/2024

A database of Lock & Trap Macros that can be added to a character sheet by the Drag & Drop Container system, to support objects & creatures that are part of locked and/or trapped cont


/*
 * MIT License
 *
 * Copyright (C) 2024, DragonDreams GmbH (info@dragondreams.ch)
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

#ifndef _AECLIPBOARDDATACONTROLLER_H_
#define _AECLIPBOARDDATACONTROLLER_H_

#include "../animator/controller/aeControllerList.h"

#include <deigde/clipboard/igdeClipboardData.h>

/**
 * Controller clipboard data.
 */
class aeClipboardDataController : public igdeClipboardData{
public:
	/** Type name. */
	static const char * const TYPE_NAME;

private:
	aeControllerList pControllers;

public:
	/** \name Constructors and Destructors */
	/*@{*/
	/** Create a new clipboard data. */
	aeClipboardDataController( aeController *controller );

	/** Create a new clipboard data. */
	aeClipboardDataController( const aeControllerList &controllers );

protected:
	/**
	 * Clean up object.
	 * \note Subclasses should set their destructor protected too to avoid users
	 *       accidently deleting a reference counted object through the object
	 *       pointer. Only FreeReference() is allowed to delete the object.
	 */
	virtual ~aeClipboardDataController();
	/*@}*/

public:
	/** \name Management */
	/*@{*/
	/** Controllers. */
	inline const aeControllerList &GetControllers() const{ return pControllers; }
	/*@}*/
};

#endif


 is line 5 in file 2"), stream2->getLine());
    CPPUNIT_ASSERT_EQUAL(String("this is line 6 in file 2"), stream2->getLine());
    CPPUNIT_ASSERT_EQUAL(BLANKSTRING, stream2->getLine()); // blank at end of file
    CPPUNIT_ASSERT(stream2->eof());
}
//--------------------------------------------------------------------------
void FileSystemArchiveTests::testCreateAndRemoveFile()
{
    UnitTestSuite::getSingletonPtr()->startTestMethod(__FUNCTION__);

    FileSystemArchive arch("./", "FileSystem", false);
    arch.load();

    CPPUNIT_ASSERT(!arch.isReadOnly());

    String fileName = "a_test_file.txt";
    DataStreamPtr stream = arch.create(fileName);

    String testString = "Some text here";
    size_t written = stream->write((void*)testString.c_str(), testString.size());
    CPPUNIT_ASSERT_EQUAL(testString.size(), written);

    stream->close();

    arch.remove(fileName);

    CPPUNIT_ASSERT(!arch.exists(fileName));
}
//--------------------------------------------------------------------------
/*
  This source code is a part of IKAN.
  Copyright (c) 2000 University of Pennsylvania
  Center for Human Modeling and Simulation
  All Rights Reserved.

  IN NO EVENT SHALL THE UNIVERSITY OF PENNSYLVANIA BE LIABLE TO ANY
  PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
  DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS
  SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF PENNSYLVANIA
  HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

  Permission to use, copy, modify and distribute this software and its
  documentation for educational, research and non-profit purposes,
  without fee, and without a written agreement is hereby granted,
  provided that the above copyright notice and the following three
  paragraphs appear in all copies. For for-profit purposes, please
  contact University of Pennsylvania
 (http://hms.upenn.edu/software/ik/ik.html) for the software license
  agreement.

  THE UNIVERSITY OF PENNSYLVANIA SPECIFICALLY DISCLAIM ANY
  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS"
  BASIS, AND THE UNIVERSITY OF PENNSYLVANIA HAS NO OBLIGATION
  TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
  MODIFICATIONS.

 */

#include "StdAfx.h"
#include "limb.h"

constexpr float phInfinity = std::numeric_limits<float>::infinity();

enum
{
    SolvePosOnly = 1,
    SolvePosAndOrientation = 2
};

//
// Initialize the limb ik object with the T and S matrices
// the Euler extraction routines for the two spherical joints,
// the projection axis, and the min and max joint limits
//
void Limb::init(const Matrix T, const Matrix S, int s1, int s2, const float* proj_axis, const float* pos_axis, const float* mmin, const float* mmax)
{
    euler1 = short(s1);
    euler2 = short(s2);
    check_limits = 0;


ocalLogErrors = default(string), string masterLogErrors = default(string), string localLogErrorsMaxLength = default(string), string masterLogErrorsMaxLength = default(string))
            : base(id, name, type, kind)
        {
            LocalLogErrors = localLogErrors;
            MasterLogErrors = masterLogErrors;
            LocalLogErrorsMaxLength = localLogErrorsMaxLength;
            MasterLogErrorsMaxLength = masterLogErrorsMaxLength;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// Gets or sets local log_errors setting.
        /// </summary>
        [JsonProperty(PropertyName = "properties.localLogErrors")]
        public string LocalLogErrors { get; set; }

        /// <summary>
        /// Gets or sets master log_errors setting.
        /// </summary>
        [JsonProperty(PropertyName = "properties.masterLogErrors")]
        public string MasterLogErrors { get; set; }

        /// <summary>
        /// Gets or sets local log_errors_max_len setting.
        /// </summary>
        [JsonProperty(PropertyName = "properties.localLogErrorsMaxLength")]
        public string LocalLogErrorsMaxLength { get; set; }

        /// <summary>
        /// Gets or sets master log_errors_max_len setting.
        /// </summary>
        [JsonProperty(PropertyName = "properties.masterLogErrorsMaxLength")]
        public string MasterLogErrorsMaxLength { get; set; }

    }
}


}

        /// <summary>
        /// 获取反弹Shell列表
        /// </summary>
        /// <param name="req"><see cref="DescribeReverseShellEventsRequest"/></param>
        /// <returns><see cref="DescribeReverseShellEventsResponse"/></returns>
        public Task<DescribeReverseShellEventsResponse> DescribeReverseShellEvents(DescribeReverseShellEventsRequest req)
        {
            return InternalRequestAsync<DescribeReverseShellEventsResponse>(req, "DescribeReverseShellEvents");
        }

        /// <summary>
        /// 获取反弹Shell列表
        /// </summary>
        /// <param name="req"><see cref="DescribeReverseShellEventsRequest"/></param>
        /// <returns><see cref="DescribeReverseShellEventsResponse"/></returns>
        public DescribeReverseShellEventsResponse DescribeReverseShellEventsSync(DescribeReverseShellEventsRequest req)
        {
            return InternalRequestAsync<DescribeReverseShellEventsResponse>(req, "DescribeReverseShellEvents")
                .ConfigureAwait(false).GetAwaiter().GetResult();
        }

        /// <summary>
        /// 获取反弹Shell规则列表
        /// </summary>
        /// <param name="req"><see cref="DescribeReverseShellRulesRequest"/></param>
        /// <returns><see cref="DescribeReverseShellRulesResponse"/></returns>
        public Task<DescribeReverseShellRulesResponse> DescribeReverseShellRules(DescribeReverseShellRulesRequest req)
        {
            return InternalRequestAsync<DescribeReverseShellRulesResponse>(req, "DescribeReverseShellRules");
        }

        /// <summary>
        /// 获取反弹Shell规则列表
        /// </summary>
        /// <param name="req"><see cref="DescribeReverseShellRulesRequest"/></param>
        /// <returns><see cref="DescribeReverseShellRulesResponse"/></returns>
        public DescribeReverseShellRulesResponse DescribeReverseShellRulesSync(DescribeReverseShellRulesRequest req)
        {
            return InternalRequestAsync<DescribeReverseShellRulesResponse>(req, "DescribeReverseShellRules")
                .ConfigureAwait(false).GetAwaiter().GetResult();
        }

        /// <summary>
        /// 本接口 (DescribeSecurityDynamics) 用于获取安全事件消息数据。
        /// </summary>
        /// <param name="req"><see cref="DescribeSecurityDynamicsRequest"/></param>
        /// <returns><see cref="DescribeSecurityDynamicsResponse"/></returns>
        public Task<DescribeSecurityDynamicsResponse> DescribeSecurityDynamics(DescribeSecurityDynamicsRequest req)
        {
            return InternalRequestAsync<DescribeSecurityDynamicsResponse>(req, "DescribeSecurityDynamics");
        }

        /// <summary>
        /// 本接口 (DescribeSecurityDynamics) 用于获取安全事件消息数据。
        /// </summary>
        /// <param name="req"><see cref="DescribeSecurityDynamicsRequest"/></param>
        /// <returns><see cref="DescribeSecurityDynamicsResponse"/></returns>
        public DescribeSecurityDynamicsResponse DescribeSecurityDynamicsSync(DescribeSecurityDynamicsRequest req)
        {
            return InternalRequestAsync<DescribeSecurityDynamicsResponse>(req, "DescribeSecurityDynamics")
                .ConfigureAwait(false).GetAwaiter().GetResult();
        }

        /// <summary>
        /// 本接口 (DescribeSecurityTrends) 用于获取安全事件统计数据。
        /// </summary>
        /// <param name="req"><see cref="DescribeSecurityTrendsRequest"/></param>
        /// <returns><see cref="DescribeSecurityTrendsResponse"/></returns>
        public Task<DescribeSecurityTrendsResponse> DescribeSecurityTrends(DescribeSecurityTrendsRequest req)
        {
            return InternalRe


box--compact__body">

Man killed in Gage Park shooting

Alberto Fayre-Estrada was shot in the abdomen in the 5500 block of South Fairfield Avenue, authorities said.

        By

            Sun-Times Wire

    <div c


maturity_options = game->maturity_options;
    modio_game->date_added = game->date_added;
    modio_game->date_updated = game->date_updated;
    modio_game->presentation_option = game->presentation_option;
    modio_game->date_live = game->date_live;
    modio_game->community_options = game->community_options;
    modio_game->submission_option = game->submission_option;
    modio_game->curation_option = game->curation_option;
    modio_game->revenue_options = game->revenue_options;
    modio_game->api_access_options = game->api_access_options;

    modio_game->ugc_name = new char[game->ugc_name.size() + 1];
    strcpy(modio_game->ugc_name, game->ugc_name.c_str());

    modio_game->instructions_url = new char[game->instructions_url.size() + 1];
    strcpy(modio_game->instructions_url, game->instructions_url.c_str());

    modio_game->name = new char[game->name.size() + 1];
    strcpy(modio_game->name, game->name.c_str());

    modio_game->name_id = new char[game->name_id.size() + 1];
    strcpy(modio_game->name_id, game->name_id.c_str());

    modio_game->summary = new char[game->summary.size() + 1];
    strcpy(modio_game->summary, game->summary.c_str());

    modio_game->instructions = new char[game->instructions.size() + 1];
    strcpy(modio_game->instructions, game->instructions.c_str());

    modio_game->profile_url = new char[game->profile_url.size() + 1];
    strcpy(modio_game->profile_url, game->profile_url.c_str());

    modioInitUserCpp(&(modio_game->submitted_by), &(game->submitted_by));
    modioInitIconCpp(&(modio_game->icon), &(game->icon));
    modioInitLogoCpp(&(modio_game->logo), &(game->logo));
    modioInitHeaderCpp(&(modio_game->header), &(game->header));
  }

  void modioFreeGame(ModioGame* game)
  {
    if(game)
    {
      if(game->ugc_name)
        delete[] game->ugc_name;

      if(game->instructions_url)
        delete[] game->instructions_url;

      if(game->name)
        delete[] game->name;

      if(game->name_id)
        delete[] game->name_id;

      if(game->summary)
        delete[] game->summary;

      if(game->instructions)
        delete[] game->instructions;

      if(game->profile_url)
        delete[] game->profile_url;

      modioFreeUser(&(game->submitted_by));
      modioFreeIcon(&(game->icon));
      modioFreeLogo(&(game->logo));
      modioFreeHeader(&(game->header));

      for(u32 i=0; i<game->game_tag_option_array_size; i++)
      {
        modioFreeGameTagOption(&(game->game_tag_option_array[i]));
      }

      if(game->game_tag_option_array)
      {
        delete[] game->game_tag_option_array;
      }
    }
  }
}
#include "c/schemas/ModioMod.h"
#include "Utility.h"                    // for hasKey
#include "c/ModioC.h"                   // for ModioDownload
#include "c/schemas/ModioLogo.h"        // for modioInitLog


style.borderRadius = '50%';
                light.style.top = Math.random() * 100 + '%';
                light.style.left = Math.random() * 100 + '%';
                light.style.animation = `moveLight ${Math.random() * 20 + 10}s linear infinite`;
                light.style.animationDelay = Math.random() * 5 + 's';
                overlay.appendChild(light);

                // 添加动画关键帧
                const style = document.createElement('style');
                style.textContent = `
                    @keyframes moveLight {
                        0% { transform: translate(0, 0); opacity: 0.3; }
                        25% { transform: translate(${Math.random() * 200 - 100}px, ${Math.random() * 200 - 100}px); opacity: 0.7; }
                        50% { transform: translate(${Math.random() * 200 - 100}px, ${Math.random() * 200 - 100}px); opacity: 0.5; }
                        75% { transform: translate(${Math.random() * 200 - 100}px, ${Math.random() * 200 - 100}px); opacity: 0.8; }
                        100% { transform: translate(0, 0); opacity: 0.3; }
                    }
                `;
                document.head.appendChild(style);
            }
        }

        // 主题切换功能
        document.addEventListener('DOMContentLoaded', function() {
            const themeToggle = document.getElementById('themeToggle');
            const icon = themeToggle.querySelector('i');
            const musicToggle = document.getElementById('musicToggle');
            const musicIcon = musicToggle.querySelector('i');
            const bgMusic = document.getElementById('bgMusic');

            // 初始化金光动画
            createGoldenLight();

            // 检查本地存储的主题偏好
            const savedTheme = localStorage.getItem('theme');
            if (savedTheme === 'dark') {
                document.body.classList.add('dark-mode');
                icon.classList.replace('fa-moon', 'fa-sun');
            }

            // 检查本地存储的音乐设置
            const savedMusic = localStorage.getItem('music');
            if (savedMusic === 'on') {
                bgMusic.play().catch(e => console.log('自动播放被阻止:', e));
                musicIcon.classList.replace('fa-music', 'fa-volume-up');
            }

            // 切换主题
            themeToggle.addEventListener('click', function() {
                document.body.classList.toggle('dark-mode');

                if (document.body.classList.contains('dark-mode')) {
                    icon.classList.replace('fa-moon', 'fa-sun');
                    localStorage.setItem('theme', 'dark');
                } else {
                    icon.classList.replace('fa-sun', 'fa-moon');
                    localStorage.setItem('theme', 'light');
                }
            });

            // 切换音乐
            musicToggle.addEventListener('click', function() {
                if (bgMusic.paused) {
                    bgMusic.play();
                    musicIcon.classList.replace('fa-music', 'fa-volume-up');
                    localStorage.setItem('music', 'on');
                } else {
                    bgMusic.pause();
                    musicIcon.classList.replace('fa-volume-up', 'fa-music');
                    localStorage.setItem('music', 'off');
                }
            });

            // 尝试自动播放音乐（需要用户交互后才能工作）
            document.addEventListener


];

        const cellXInPixels = 1 + x * 2;
        const cellYInPixels = 1 + y * 2;

        if (cell.left) {
          this.rows[cellYInPixels - 1][cellXInPixels - 1] = true;
          this.rows[cellYInPixels - 0][cellXInPixels - 1] = true;
          this.rows[cellYInPixels + 1][cellXInPixels - 1] = true;
        }

        if (cell.right) {
          this.rows[cellYInPixels - 1][cellXInPixels + 1] = true;
          this.rows[cellYInPixels - 0][cellXInPixels + 1] = true;
          this.rows[cellYInPixels + 1][cellXInPixels + 1] = true;
        }

        if (cell.top) {
          this.rows[cellYInPixels - 1][cellXInPixels - 1] = true;
          this.rows[cellYInPixels - 1][cellXInPixels + 0] = true;
          this.rows[cellYInPixels - 1][cellXInPixels + 1] = true;
        }

        if (cell.bottom) {
          this.rows[cellYInPixels + 1][cellXInPixels - 1] = true;
          this.rows[cellYInPixels + 1][cellXInPixels + 0] = true;
          this.rows[cellYInPixels + 1][cellXInPixels + 1] = true;
        }
      }
    }

    // Now hack the right hand side of the maze to open it
  }

  mazeToPixelPosition(mazePosition: Point2D) {
    const cellXInPixels = 1 + mazePosition.x * 2;
    const cellYInPixels = 1 + mazePosition.y * 2;
    return new Point2D(cellXInPixels, cellYInPixels);
  }

  getIsWall(pos: Point2D) {
    const row = this.rows[pos.y];
    if (!row) throw new Error(`pos out of Y bounds '${pos}'`);
    const cell = row[pos.x];
    if (cell == undefined) throw new Error(`pos out of X bounds '${pos}'`);
    return cell == true;
  }

  public shootRay(from: Point2D, direction: Point2D) {
    const positions = [];
    let pos = from;
    while (!this.getIsWall(pos)) {
      positions.push(pos);
      pos = pos.sum(direction);
    }
    return positions;
  }

  canPass(fromPos: Point2D, velocity: Point2D) {
    const nextPos = fromPos.sum(velocity);
    if (this.isOutOfBounds(nextPos)) return false;

    return !this.getIsWall(nextPos);
  }

  isOutOfBounds(pos: Point2D) {
    if (pos.x < 0 || pos.x >= this.width) return true;
    if (pos.y < 0 || pos.y >= this.height) return true;
    return false;
  }

  getPossibleDirections(fromPos: Point2D): Point2D[] {
    return Point2D.directions.filter((d) => this.canPass(fromPos, d));
  }

  enumerateCells = () =>
    narray(this.height)
      .map((y) =>
        narray(this.width).map((x) => {
          const pos = new Point2D(x, y);
          return { pos, isWall: this.getIsWall(pos) };
        })
      )
      .flat();
}

import {Observable, of} from "rxjs";
import { map} from "rxjs/operators";
import {Employee} from "../model/employee.interface";

export class EmployeeAdaptor {
  private static age: string;

  static getEmployees(data: Observable<any>): Observable<Employee[]> {
        return data.pipe(map(data => {
      return data.map(item => {
        return {
          id: item.id,
          first_name: item.first_name,
          last_name: item.last_name,
          age: item.age,
          is_active: item.is_active
        }
      })
    })) as Observable<Employee[]>;
  }

}
export type Item = {
    console: string;
    is_


OMPILER_VC10			0x01000090
#define GLM_COMPILER_VC11			0x010000A0
#define GLM_COMPILER_VC12			0x010000B0

// GCC defines
#define GLM_COMPILER_GCC			0x02000000
#define GLM_COMPILER_GCC34			0x02000050
#define GLM_COMPILER_GCC35			0x02000060
#define GLM_COMPILER_GCC40			0x02000070
#define GLM_COMPILER_GCC41			0x02000080
#define GLM_COMPILER_GCC42			0x02000090
#define GLM_COMPILER_GCC43			0x020000A0
#define GLM_COMPILER_GCC44			0x020000B0
#define GLM_COMPILER_GCC45			0x020000C0
#define GLM_COMPILER_GCC46			0x020000D0
#define GLM_COMPILER_GCC47			0x020000E0
#define GLM_COMPILER_GCC48			0x020000F0
#define GLM_COMPILER_GCC49			0x02000100

// Borland C++
#define GLM_COMPILER_BC				0x04000000

// CodeWarrior
#define GLM_COMPILER_CODEWARRIOR	0x08000000

// CUDA
#define GLM_COMPILER_CUDA			0x10000000
#define GLM_COMPILER_CUDA30			0x10000010
#define GLM_COMPILER_CUDA31			0x10000020
#define GLM_COMPILER_CUDA32			0x10000030
#define GLM_COMPILER_CUDA40			0x10000040
#define GLM_COMPILER_CUDA41			0x10000050
#define GLM_COMPILER_CUDA42			0x10000060

// Clang
#define GLM_COMPILER_CLANG			0x20000000
#define GLM_COMPILER_CLANG26		0x20000010
#define GLM_COMPILER_CLANG27		0x20000020
#define GLM_COMPILER_CLANG28		0x20000030
#define GLM_COMPILER_CLANG29		0x20000040
#define GLM_COMPILER_CLANG30		0x20000050
#define GLM_COMPILER_CLANG31		0x20000060
#define GLM_COMPILER_CLANG32		0x20000070
#define GLM_COMPILER_CLANG33		0x20000080
#define GLM_COMPILER_CLANG40		0x20000090
#define GLM_COMPILER_CLANG41		0x200000A0
#define GLM_COMPILER_CLANG42		0x200000B0
#define GLM_COMPILER_CLANG43		0x200000C0
#define GLM_COMPILER_CLANG50		0x200000D0

// LLVM GCC
#define GLM_COMPILER_LLVM_GCC		0x40000000

// Build model
#define GLM_MODEL_32				0x00000010
#define GLM_MODEL_64				0x00000020

// Force generic C++ compiler
#ifdef GLM_FORCE_COMPILER_UNKNOWN
#	define GLM_COMPILER GLM_COMPILER_UNKNOWN

#elif defined(__INTEL_COMPILER)
#	if __INTEL_COMPILER == 900
#		define GLM_COMPILER GLM_COMPILER_INTEL9
#	elif __INTEL_COMPILER == 1000
#		define GLM_COMPILER GLM_COMPILER_INTEL10_0
#	elif __INTEL_COMPILER == 1010
#		define GLM_COMPILER GLM_COMPILER_INTEL10_1
#	elif __INTEL_COMPILER == 1100
#		define GLM_COMPILER GLM_COMPILER_INTEL11_0
#	elif __INTEL_COMPILER == 1110
#		define GLM_COMPILER GLM_COMPILER


#kc-totp-supported-apps {
    margin-bottom: 10px;
}

#kc-totp-secret-qr-code {
    max-width:150px;
    max-height:150px;
}

#kc-totp-secret-key {
    background-color: #fff;
    color: #333333;
    font-size: 16px;
    padding: 10px 0;
}

/* OAuth */

#kc-oauth h3 {
    margin-top: 0;
}

#kc-oauth ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#kc-oauth ul li {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    padding: 10px 0;
}

#kc-oauth ul li:first-of-type {
    border-top: 0;
}

#kc-oauth .kc-role {
    display: inline-block;
    width: 50%;
}

/* Code */
#kc-code textarea {
    width: 100%;
    height: 8em;
}

/* Social */
.kc-social-links {
    margin-top: 20px;
}

.kc-social-provider-logo {
    font-size: 23px;
    width: 30px;
    height: 25px;
    float: left;
}

.kc-social-gray {
    color: var(--pf-global--Color--200);
}

.kc-social-item {
    margin-bottom: var(--pf-global--spacer--sm);
    font-size: 15px;
    text-align: center;
}

.kc-social-provider-name {
    position: relative;
    top: 3px;
}

.kc-social-icon-text {
    left: -15px;
}

.kc-social-grid {
    display:grid;
    grid-column-gap: 10px;
    grid-row-gap: 5px;
    grid-column-end: span 6;
    --pf-l-grid__item--GridColumnEnd: span 6;
}

.kc-social-grid .kc-social-icon-text {
    left: -10px;
}

.kc-login-tooltip {
    position: relative;
    display: inline-block;
}

.kc-social-section {
    text-align: center;
}

.kc-social-section hr{
    margin-bottom: 10px
}

.kc-login-tooltip .kc-tooltip-text{
    top:-3px;
    left:160%;
    background-color: black;
    visibility: hidden;
    color: #fff;

    min-width:130px;
    text-align: center;
    border-radius: 2px;
    box-shadow:0 1px 8px rgba(0,0,0,0.6);
    padding: 5px;

    position: absolute;
    opacity:0;
    transition:opacity 0.5s;
}

/* Show tooltip */
.kc-login-tooltip:hover .kc-tooltip-text {
    visibility: visible;
    opacity:0.7;
}

/* Arrow for tooltip */
.kc-login-tooltip .kc-tooltip-text::after {
    content: " ";
    position: absolute;
    top: 15px;
    right: 100%;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent black transparent transparent;
}

@media (min-width: 768px) {
    #kc-container-wrapper {
        position: absolute;
        width: 100%;
    }

    .login-pf .container {
        padding-right: 80px;
    }

    #kc-locale {
        position: relative;
        text-align: right;
        z-index: 9


rByPayloadType(uint8_t payload_type,
                           CodecInst* codec) const;

  //
  // Enable NACK and set the maximum size of the NACK list. If NACK is already
  // enabled then the maximum NACK list size is modified accordingly.
  //
  // Input:
  //    -max_nack_list_size  : maximum NACK list size
  //                           should be positive (none zero) and less than or
  //                           equal to |Nack::kNackListSizeLimit|
  // Return value
  //                         : 0 if succeeded.
  //                          -1 if failed
  //
  int EnableNack(size_t max_nack_list_size);

  // Disable NACK.
  void DisableNack();

  //
  // Get a list of packets to be retransmitted.
  //
  // Input:
  //    -round_trip_time_ms : estimate of the round-trip-time (in milliseconds).
  // Return value           : list of packets to be retransmitted.
  //
  std::vector<uint16_t> GetNackList(int64_t round_trip_time_ms) const;

  //
  // Get statistics of calls to GetAudio().
  void GetDecodingCallStatistics(AudioDecodingCallStats* stats) const;

 private:
  bool GetSilence(int desired_sample_rate_hz, AudioFrame* frame)
      EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);

  int GetNumSyncPacketToInsert(uint16_t received_squence_number);

  const Decoder* RtpHeaderToDecoder(const RTPHeader& rtp_header,
                                    const uint8_t* payload) const
      EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);

  uint32_t NowInTimestamp(int decoder_sampling_rate) const;

  void InsertStreamOfSyncPackets(InitialDelayManager::SyncStream* sync_stream);

  rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
  int id_;  // TODO(henrik.lundin) Make const.
  const Decoder* last_audio_decoder_ GUARDED_BY(crit_sect_);
  AudioFrame::VADActivity previous_audio_activity_ GUARDED_BY(crit_sect_);
  int current_sample_rate_hz_ GUARDED_BY(crit_sect_);
  ACMResampler resampler_ GUARDED_BY(crit_sect_);
  // Used in GetAudio, declared as member to avoid allocating every 10ms.
  // TODO(henrik.lundin) Stack-allocate in GetAudio instead?
  rtc::scoped_ptr<int16_t[]> audio_buffer_ GUARDED_BY(crit_sect_);
  rtc::scoped_ptr<int16_t[]> last_audio_buffer_ GUARDED_BY(crit_sect_);
  rtc::scoped_ptr<Nack> nack_ GUARDED_BY(crit_sect_);
  bool nack_enabled_ GUARDED_BY(crit_sect_);
  CallStatistics call_stats_ GUARDED_BY(crit_sect_);
  NetEq* neteq_;
  // Decoders map is keyed by payload type
  std::map<uint8_t, Decoder> decoders_ GUARDED_BY(crit_sect_);
  bool vad_enabled_;
  Clock* clock_;  // TODO(henrik.lundin) Make const if possible.
  bool resampled_last_output_frame_ GUARDED_BY(crit_sect_);

  // Indicates if a non-zero initial delay is set, and the receiver is in
  // AV-sync mode.
  bool av_sync_;
  rtc::scoped_ptr<InitialDelayManager> initial_delay_manager_;

  // The following are defined as members to avoid creating them in every
  // iteration. |missing_packets_sync_stream_| is *ONLY* used in InsertPacket().
  // |late_packets_sync_stream_| is only used in GetAudio(). Both of these
  // member variables are allocated only when we AV-sync is enabled, i.e.
  // initial delay is set.
  rtc::scoped_ptr<InitialDelayManager::SyncStream> missing_packets_sync_stream_;
  rtc::scoped_ptr<InitialDelayManager::SyncStream> late_packets_sync_stream_;
};

}  // namespace acm2

}  // namespace webrtc

#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RECEIVER_H_


           Description = nameof(OptionsDisplayStrings.DisplayAttributeDescription_ConsoleFormatterOptions_IncludeScopes))]
        public bool IncludeScopes { get; set; }

        [Display(
            ResourceType = typeof(OptionsDisplayStrings),
            Description = nameof(OptionsDisplayStrings.DisplayAttributeDescription_ConsoleFormatterOptions_TimestampFormat))]
        [DefaultValue(null)]
        public string? TimestampFormat { get; set; }

        [Display(
            ResourceType = typeof(OptionsDisplayStrings),
            Description = nameof(OptionsDisplayStrings.DisplayAttributeDescription_ConsoleFormatterOptions_UseUtcTimestamp))]
        [DefaultValue(false)]
        public bool UseUtcTimestamp { get; set; }
    }
}


्रुद्धः शरैः काञ्चनभूषणैः।
    चिच्छेद पाणिपादोरून् वानराणां महाहवे ।। ६.९८.९ ।।

###Slōka 10/ श्लोक १०###

    ततस्ते वानराः सर्वे राक्षसैरर्दिता भृशम्।
    दिशो दश द्रुताः केचित् केचित् सुग्रीवमाश्रिताः ।। ६.९८.१० ।।

###Slōka 11/ श्लोक ११###

    प्रभग्नां समरे दृष्ट्वा वानराणां महाचमूम्।
    अभिदुद्राव सुग्रीवो महोदरमनन्तरम् ।। ६.९८.११ ।।

###Slōka 12/ श्लोक १२###

    प्रगृह्य विपुलां घोरां महीधरसमां शिलाम्।
    चिक्षेप च महातेजास्तद्वधाय हरीस्वरः ।। ६.९८.१२ ।।

###Slōka 13/ श्लोक १३###

    तामापतन्तीं सहसा शिलां दृष्ट्वा महोदरः।
    असम्भ्रान्तस्ततो बाणैर्निर्बिभेद दुरासदाम् ।। ६.९८.१३ ।।

###Slōka 14/ श्लोक १४###

    रक्षसा तेन बाणौघैर्निकृत्ता सा सहस्रधा।
    निपपात शिला भूमौ गृध्रचक्रमिवाकुलम् ।। ६.९८.१४ ।।

###Slōka 15/ श्लोक १५###

    तां तु भिन्नां शिलां दृष्ट्वा सुग्रीवः क्रोधमूर्च्छितः।
    सालमुत्पाट्य चिक्षेप राक्षसे रणमूर्धनि ।। ६.९८.१५ ।।

###Slōka 16/ श्लोक १६###

    शरैश्च विददारैनं शूरः परपुरञ्जयः ।
    । ६.९८.१६ ।।्च्छितः।


e.material.ExperimentalMaterialApi",
            "-opt-in=androidx.compose.material3.ExperimentalMaterial3Api",
            "-Xcontext-receivers",
            "-P",
            "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=${buildDir.resolve("report").absolutePath}",
        )
    }

    buildFeatures {
        compose = true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
    }

    androidComponents {
        onVariants(selector().withBuildType("release")) {
            it.packaging.resources.excludes.apply {
                // Debug metadata
                add("/**/*.version")
                add("/kotlin-tooling-metadata.json")
                // Kotlin debugging (https://github.com/Kotlin/kotlinx.coroutines/issues/2274)
                add("/DebugProbesKt.bin")
            }
        }
    }

    packagingOptions {
        resources {
            // Lombok
            excludes += "/AUTHORS"
            excludes += "/latestchanges.html"
            excludes += "/release-timestamp.txt"
            excludes += "/changelog.txt"
            excludes += "/README.md"
            excludes += "/lombok/**"
            excludes += "/**/*.lombok"

            // Reflection symbol list (https://stackoverflow.com/a/41073782/13964629)
            excludes += "/**/*.kotlin_builtins"

            // okhttp3 is used by some lib (no cookies so publicsuffixes.gz can be dropped)
            excludes += "/okhttp3/**"
        }
    }

    sourceSets {
        applicationVariants.all {
            getByName(name) {
                kotlin.srcDir("build/generated/ksp/$name/kotlin")
            }
        }
    }

    lint {
        disable += "MissingTranslation"
        disable += "ExtraTranslation"
    }
}

java {
    toolchain {
        languageVersion.set(JavaLanguageVersion.of(11))
    }
}

dependencies {
    implementation(project(":simpleast-compose"))

    // Use java.time.* on Android <= 8
    // https://developer.android.com/studio/write/java8-support#library-desugaring-versions
    coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.3")

    implementation(libs.bundles.androidx.core)
    implementation(libs.bundles.androidx.compose)
    implementation(libs.bundles.androidx.room)
    implementation(libs.bundles.androidx.paging)
    implementation(libs.bundles.androidx.media3)
    implementation(libs.bundles.accompanist)
    implementation(libs.bundles.coil)
    implementation(libs.bundles.materii)
    implementation(libs.bundles.kotlinx)
    implementation(libs.bundles.ktor)
    implementation(libs.koin.compose)
    implementation(libs.navreimagined)
    implementation(libs.hcaptcha)
    implementation(libs.shimmer)

    ksp(libs.materii.partial.ksp)
    ksp(libs.materii.enumutil.ksp)
    ksp(libs.androidx.room.compiler)
}
package com.xinto.opencord.provider

import com.xinto.opencord.gateway.dto.IdentificationProperties
import com.xinto.opencord.rest.body.XSuperProperties

interface PropertyProvider {
    val xSuperProperties: XSuperProperties
    val identificationProperties: IdentificationProperties
}

class PropertyProviderImpl(
    telemetryProvider


return;
                }
            }
        }
        let watcher = {
            target: target,
            handler: handler,
            key: targetKey,
            weekWatch: false
        }
        this._keyHash.get(targetKey).push(watcher);
        this._handlerKeys[targetKey] = true;
        if (target) {
            handler.call(target, this._data[targetKey], null);
        } else {
            handler(this._data[targetKey], null);
        }
        delete this._handlerKeys[targetKey];
    }
    /**
         * 观察属性变化
         * @param targetKey 观察的属性值，如果该值data当中未定义则会报错。
         * @param handler 属性变化回调，注意，调用watch方法，handler将自动执行一次。
         * @param target 观察回调对象
         */
    watch(targetKey: string, handler: (newvalue: any, oldvalue: any) => void, target: any = null) {
        if (!this._data.hasOwnProperty(targetKey)) {
            cc.error("错误调用，ViewModel没有该属性！", targetKey);
            return;
        }
        let watchers = this._keyHash.get(targetKey)
        if (!watchers) {
            watchers = [];
            this._keyHash.set(targetKey, watchers)
        } else {
            for (let i = 0; i < watchers.length; i++) {
                let $target = watchers[i].target;
                let $handler = watchers[i].handler;
                if (target === $target && handler === $handler) {
                    cc.warn("MVVM 已经注册")
                    return;
                }
            }
        }
        let watcher = {
            target: target,
            handler: handler,
            key: targetKey,
            weekWatch: true
        }
        this._keyHash.get(targetKey).push(watcher);
        this._handlerKeys[targetKey] = true;
        if (target) {
            handler.call(target, this._data[targetKey], null);
        } else {
            handler(this._data[targetKey], null);
        }
        delete this._handlerKeys[targetKey];
    }
    /**
     * 取消data的属性变化监听
     * @param targetKey 观察的属性值
     * @param target 观察回调对象
     */
    unwatch(targetKey: string, target: any = null) {
        let watchers = this._keyHash.get(targetKey)
        if (watchers) {
            for (let i = 0; i < watchers.length; i++) {
                let $target = watchers[i].target;
                if ($target === target) {
                    watchers.splice(i, 1);
                }
            }
        }
    }
    /**
     * 取消data的属性变化监听
     * @param target 观察回调对象
     */
    unwatchTargetAll(target: any = null) {
        this._keyHash.forEach((watchers) => {
            for (let i = 0; i < watchers.length; i++) {
                let $target = watchers[i].target;
                if ($target === target) {
                    watchers.splice(i, 1);
                }
            }
        })
    }
    /**
     * 是否Mvvm实例
     */
    release() {
        this._keyHash.clear();
        this._keyHash = null;
        this.observer.release();
        this.observer = null;
        this._data = null;
    }
}
import { db } from './db';
import { Assembly, ChromRange, SNP } from '../types';

export async function snptable(
    assembly: Assembly,
    range: ChromRange | undefined,
    id: string | unde


        }
        log(TAG, "getWeatherDataLocality = $city")
        return city
    }

    protected fun getDay(i: Int): String {
        val calendar = Calendar.getInstance()
        if (i > 0) {
            calendar.add(Calendar.DATE, i)
        }
        return dayFormat.format(calendar.time)
    }

    companion object {
        private const val TAG = "AbstractWeatherProvider"
        private const val DEBUG = false
        private val dayFormat = SimpleDateFormat("yyyy-MM-dd", Locale.US)
        private const val URL_PLACES =
            "https://secure.geonames.org/searchJSON?name_startsWith=%s&lang=%s&username=omnijaws&maxRows=20"
        private const val URL_LOCALITY =
            "https://secure.geonames.org/extendedFindNearbyJSON?lat=%f&lng=%f&lang=%s&username=omnijaws"
        const val PART_COORDINATES: String = "lat=%f&lon=%f"
        private var response = ""
    }
}package com.drdisagree.iconify.utils.overlay.compiler

import android.util.Log
import com.drdisagree.iconify.data.common.Const.FRAMEWORK_PACKAGE
import com.drdisagree.iconify.data.common.Const.SYSTEMUI_PACKAGE
import com.drdisagree.iconify.data.common.Dynamic.DATA_DIR
import com.drdisagree.iconify.data.common.Resources
import com.drdisagree.iconify.data.common.Resources.BACKUP_DIR
import com.drdisagree.iconify.data.common.Resources.OVERLAY_DIR
import com.drdisagree.iconify.data.common.Resources.SIGNED_DIR
import com.drdisagree.iconify.data.common.Resources.SYSTEM_OVERLAY_DIR
import com.drdisagree.iconify.data.common.Resources.TEMP_DIR
import com.drdisagree.iconify.data.common.Resources.TEMP_OVERLAY_DIR
import com.drdisagree.iconify.data.common.Resources.UNSIGNED_DIR
import com.drdisagree.iconify.data.common.Resources.UNSIGNED_UNALIGNED_DIR
import com.drdisagree.iconify.utils.FileUtils.copyAssets
import com.drdisagree.iconify.utils.RootUtils.setPermissions
import com.drdisagree.iconify.utils.SystemUtils.mountRO
import com.drdisagree.iconify.utils.SystemUtils.mountRW
import com.drdisagree.iconify.utils.helper.BinaryInstaller.symLinkBinaries
import com.drdisagree.iconify.utils.helper.Logger.writeLog
import com.drdisagree.iconify.utils.overlay.OverlayUtils.disableOverlays
import com.drdisagree.iconify.utils.overlay.OverlayUtils.enableOverlays
import com.topjohnwu.superuser.Shell
import java.io.IOException

object RoundnessCompiler {

    private val TAG = RoundnessCompiler::class.java.simpleName
    private val mPackages = arrayOf(FRAMEWORK_PACKAGE, SYSTEMUI_PACKAGE)
    private val mOverlayName = arrayOf("CR1", "CR2")
    private var mForce = false

    @Throws(IOException::class)
    fun buildOverlay(resources: Array<String>, force: Boolean): Boolean {
        mForce = force
        preExecute()

        for (i in 0..1) {
            // Create AndroidManifest.xml
            if (OverlayCompiler.createManifest(
                    mOverlayName[i],
                    mPackages[i],
                    DATA_DIR + "/Overlays/" + mPackages[i] + "/" + mOverlayName[i]
                )
            ) {
                Log.e(TAG, "Failed to create Manifest for " + mOverlayName[i] + "! Exiting...")
                postExecute(true)
                return true
            }

            // Write resources
            if (writeResources(
                    DATA_DIR + "/Overlays/" + mPackages[i] + "/" + mOverlayName[i],
                    resources[i]
                )
            ) {
                Log.e(TAG, "Failed to write resource for " + mOverlayName[i] + "! Exiting...")
                postExecute(true)
                return true
            }

            // Build APK using AAPT
            if (OverlayCompiler.runAapt(
                    DATA


ortant}.btn-check:active+.btn-yahoo:focus,.btn-check:checked+.btn-yahoo:focus,.btn-check:focus+.btn-yahoo,.btn-yahoo.active:focus,.btn-yahoo:active:focus,.btn-yahoo:focus,.show>.btn-yahoo.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(255,255,255,.5)}.btn-yahoo{background-color:#720E9E;color:#FFF!important;border:none}.btn-check:focus+.btn-yahoo,.btn-yahoo:focus,.btn-yahoo:hover{background-color:#610C86;border-color:rgba(0,0,0,.2);color:#FFF}.btn-check:active+.btn-yahoo,.btn-check:checked+.btn-yahoo,.btn-yahoo.active,.btn-yahoo:active,.show>.btn-yahoo.dropdown-toggle{color:#FFF;background-color:#5B0B7E;border-color:rgba(0,0,0,.25)}.btn-yahoo.disabled,.btn-yahoo:disabled{color:#FFF;background-color:#720E9E;border-color:transparent}.btn-yahoo:focus{box-shadow:none!important}.btn-outline-adn{border:1px solid #D87A68!important;color:#D87A68}.btn-outline-bitbucket{border:1px solid #205081!important;color:#205081}.btn-outline-dropbox{border:1px solid #1087DD!important;color:#1087DD}.btn-outline-facebook{border:1px solid #3B5998!important;color:#3B5998}.btn-outline-flickr{border:1px solid #FF0084!important;color:#FF0084}.btn-outline-foursquare{border:1px solid #F94877!important;color:#F94877}.btn-outline-github{border:1px solid #444!important;color:#444}.btn-outline-google{border:1px solid #DD4B39!important;color:#DD4B39}.btn-outline-instagram{border:1px solid #3F729B!important;color:#3F729B}.btn-outline-linkedin{border:1px solid #007BB6!important;color:#007BB6}.btn-outline-microsoft{border:1px solid #2672EC!important;color:#2672EC}.btn-outline-odnoklassniki{border:1px solid #F4731C!important;color:#F4731C}.btn-outline-openid{border:1px solid #F7931E!important;color:#F7931E}.btn-outline-pinterest{border:1px solid #CB2027!important;color:#CB2027}.btn-outline-reddit{border:1px solid #FF4500!important;color:#FF4500}.btn-outline-soundcloud{border:1px solid #F50!important;color:#F50}.btn-outline-tumblr{border:1px solid #2C4762!important;color:#2C4762}.btn-outline-twitter{border:1px solid #55ACEE!important;color:#55ACEE}.btn-outline-vimeo{border:1px solid #1AB7EA!important;color:#1AB7EA}.btn-outline-vk{border:1px solid #587EA3!important;color:#587EA3}.btn-outline-yahoo{border:1px solid #720E9E!important;color:#720E9E}.btn-outline-adn:hover{color:#AD6253;border:1px solid #AD6253!important}.btn-outline-bitbucket:hover{color:#1A4067;border:1px solid #1A4067!important}.btn-outline-dropbox:hover{color:#0D6CB1;border:1px solid #0D6CB1!important}.btn-outline-facebook:hover{color:#2F477A;border:1px solid #2F477A!important}.btn-outline-flickr:hover{color:#CC006A;border:1px solid #CC006A!important}.btn-outline-


80c10028b377643da169e52e5be7">idt.cpp

isr17() : idt.cpp

isr18() : idt.cpp

isr2() : idt.cpp

isr3() : idt.cpp

isr4() : idt.cpp

isr5() : idt.cpp

isr6() : idt.cpp

isr7() : idt.cpp

isr8() : idt.cpp

isr9() : idt.cpp

isr96() : idt.cpp

ISR_ALIGNMENT_CHECK : hal.cpp

ISR_BOUNDS : hal.cpp

ISR_BREAKPOINT : hal.cpp

ISR_COPROCESSOR_SEGMENT_OVERRUN : hal.cpp

ISR_DEBUG : hal.cpp

ISR_DEVICE_NOT_AVAILABLE :&#


 to the FORTRAN code: */

/*        CALL INVERT (M1, M1) */

/*     then M1 will be set to be: */

/*             | 0    2    0 | */
/*        M1 = |-1    0    0 | */
/*             | 0    0    1 | */

/* $ Restrictions */

/*     The input matrix must be such that generating the cofactors will */
/*     not cause a floating point overflow or underflow.  The strictness */
/*     of this condition depends, of course, on the computer */
/*     installation and the resultant maximum and minimum values of */
/*     double precision numbers. */

/* $ Literature_References */

/*     None. */

/* $ Author_and_Institution */

/*     W.M. Owen       (JPL) */

/* $ Version */

/* -    SPICELIB Version 1.0.2, 22-APR-2010 (NJB) */

/*        Header correction: assertions that the output */
/*        can overwrite the input have been removed. */

/* -    SPICELIB Version 1.0.1, 10-MAR-1992 (WLT) */

/*        Comment section for permuted index source lines was added */
/*        following the header. */

/* -    SPICELIB Version 1.0.0, 31-JAN-1990 (WMO) */

/* -& */
/* $ Index_Entries */

/*     invert a 3x3_matrix */

/* -& */

/*  Find the determinant of M1 and check for singularity */

    mdet = det_(m1);
    if (abs(mdet) < 1e-16) {
	filld_(&c_b2, &c__9, mout);
	return 0;
    }

/*  Get the cofactors of each element of M1 */

    mtemp[0] = m1[4] * m1[8] - m1[5] * m1[7];
    mtemp[3] = -(m1[3] * m1[8] - m1[5] * m1[6]);
    mtemp[6] = m1[3] * m1[7] - m1[4] * m1[6];
    mtemp[1] = -(m1[1] * m1[8] - m1[2] * m1[7]);
    mtemp[4] = m1[0] * m1[8] - m1[2] * m1[6];
    mtemp[7] = -(m1[0] * m1[7] - m1[1] * m1[6]);
    mtemp[2] = m1[1] * m1[5] - m1[2] * m1[4];
    mtemp[5] = -(m1[0] * m1[5] - m1[2] * m1[3]);
    mtemp[8] = m1[0] * m1[4] - m1[1] * m1[3];

/*  Multiply the cofactor matrix by 1/MDET to obtain the inverse */

    invdet = 1. / mdet;
    vsclg_(&invdet, mtemp, &c__9, mout);

    return 0;
} /* invert_ */


, aborting node removal.",
                LOG_PREFIX
            )),
            Ok,
        )
        .unwrap();

    decode_registry_value::<SubnetListRecord>(subnet_list_record_vec.to_vec())
}

pub fn get_node_operator_id_for_node(
    registry: &Registry,
    node_id: NodeId,
) -> Result<PrincipalId, String> {
    let node_key = make_node_record_key(node_id);
    registry
        .get(node_key.as_bytes(), registry.latest_version())
        .map_or(
            Err(format!("Node Id {:} not found in the registry", node_id)),
            |result| {
                PrincipalId::try_from(
                    decode_registry_value::<NodeRecord>(result.value.to_vec()).node_operator_id,
                )
                .map_err(|_| {
                    format!(
                        "Could not decode node_record's node_operator_id for Node Id {}",
                        node_id
                    )
                })
            },
        )
}

pub fn get_node_operator_record(
    registry: &Registry,
    node_operator_id: PrincipalId,
) -> Result<NodeOperatorRecord, String> {
    let node_operator_key = make_node_operator_record_key(node_operator_id);
    registry
        .get(node_operator_key.as_bytes(), registry.latest_version())
        .map_or(
            Err(format!(
                "Node Operator Id {:} not found in the registry.",
                node_operator_key
            )),
            |result| {
                let decoded = decode_registry_value::<NodeOperatorRecord>(result.value.to_vec());
                Ok(decoded)
            },
        )
}
<filename>tests/table_source_test.rs
use std::collections::HashMap;

extern crate log;

use martin::dev;
use martin::source::{Source, Xyz};
use martin::table_source::get_table_sources;

fn init() {
    let _ = env_logger::builder().is_test(true).try_init();
}

#[actix_rt::test]
async fn test_get_table_sources_ok() {
    init();

    let mut connection = dev::make_pool().get().unwrap();
    let table_sources = get_table_sources(&mut connection, &None).unwrap();

    log::info!("table_sources = {:#?}", table_sources);

    assert!(!table_sources.is_empty());
    assert!(table_sources.contains_key("public.table_source"));

    let table_source = table_sources.get("public.table_source").unwrap();
    assert_eq!(table_source.schema, "public");
    assert_eq!(table_source.table, "table_source");
    assert_eq!(table_source.srid, 4326);
    assert_eq!(table_source.geometry_column, "geom");
    assert_eq!(table_source.id_column, None);
    assert_eq!(table_source.minzoom, None);
    assert_eq!(table_source.maxzoom, None);
    assert!(table_source.bounds.is_some());
    assert_eq!(table_source.extent, Some(4096));
    assert_eq!(table_source.buffer, Some(64));
    assert_eq!(table_source.clip_geom, Some(true));
    assert_eq!(table_source.geometry_type, Some("GEOMETRY".to_owned()));

    let mut properties = HashMap::new();
    properties.insert("gid".to_owned(), "int4".to_owned());
    assert_eq!(table_source.properties, properties);
}

#[actix_rt::test]
async fn test_table_source_tilejson_ok() {
    init();

    let mut connection = dev::make_pool().get


 - 1, halfImageWidth +1, halfImageWidth)
		elseif self.props.hasRoundBottom then
			imageRectSize = Vector2.new(imageWidth, halfImageWidth)
			imageRectOffset = imageOffset + Vector2.new(0, halfImageWidth)
			sliceCenter = Rect.new(halfImageWidth - 1, 0, halfImageWidth + 1, 1)
		else
			imageRectSize = Vector2.new(1, 1)
			imageRectOffset = imageOffset + Vector2.new(halfImageWidth, halfImageWidth)
			sliceCenter = Rect.new(0, 0, 0, 0)
		end

		return imageRectSize, imageRectOffset, sliceCenter
	end

	function cellComponent:render()
		return withStyle(function(stylePalette)
			local theme = stylePalette.Theme
			local font = stylePalette.Font

			local leftPadding = TEXT_ONLY_PADDING
			if self.props.icon then
				leftPadding = ELEMENT_PADDING
			end
			local rightPadding = 0
			if self.props.keyCodeLabel then
				rightPadding = KEYLABEL_PADDING
			elseif self.props.selected then
				rightPadding = SELECTED_ICON_PADDING
			end

			local overlayTheme = {
				Color = Color3.new(1, 1, 1),
				Transparency = 1,
			}

			if self.state.controlState == ControlState.Pressed then
				overlayTheme = theme.BackgroundOnPress
			elseif self.state.controlState == ControlState.Hover then
				overlayTheme = theme.BackgroundOnHover
			end

			local imageRectSize, imageRectOffset, sliceCenter = self:getImageProperties()

			local textLengthOffset = 0
			local textOnly = true
			if self.props.icon then
				textOnly = false
				leftPadding = ELEMENT_PADDING
				textLengthOffset = ELEMENT_PADDING + ICON_SIZE
			end

			if self.props.selected then
				textOnly = false
				textLengthOffset = textLengthOffset + SELECTED_ICON_SIZE + SELECTED_ICON_PADDING
			end

			if self.props.keyCodeLabel then
				textOnly = false
				textLengthOffset = textLengthOffset + KEYLABEL_PADDING + self.state.keyLabelWidth
			end

			-- Add start and end padding for text.
			if textOnly then
				textLengthOffset = textLengthOffset + TEXT_ONLY_PADDING * 2
			else
				textLengthOffset = textLengthOffset + ELEMENT_PADDING * 2
			end

			local textTheme = theme.TextEmphasis
			if self.props.textColorOverride then
				textTheme = {
					Color = self.props.textColorOverride,
					Transparency = theme.TextEmphasis.Transparency
				}
			end
			if self.state.controlState == ControlState.Pressed or self.props.disabled then
				textTheme = {
					Color = textTheme.Color,
					Transparency = divideTransparency(theme.TextEmphasis.Transparency, 2)
				}
			end

			local cellStyle = theme[backgroundThemeKey]

			return Roact.createElement(Controllable, {
				controlComponent = {
					component = "ImageButton",
					props = {
						Size = UDim2.new(1, 0, 0, self.props.elementHeight),
						BackgroundTransparency = 1,

						Image = CELL_BACKGROUND_ASSET.Image,
						ScaleType = Enum.ScaleType.Slice,
						SliceCenter = sliceCenter,
						ImageRectSize = imageRectSize,
						ImageRectOffset = imageRectOffset,
						SliceScale = 1 / Images.ImagesResolutionScale,

						ImageTransparency = cellStyle.Transparency,
						ImageColor3 = cellStyle.Color,
						AutoButtonColor = false,
						LayoutOrder = self.props.layoutOrder,
						BorderSizePixel = 0,
						[Roact.Ref] = self.props.setButtonRef,
						[Roact.Event.Activated] = self.props.onActivated,
					},
					children = {
						Divider


Schema.MEDIA_ITEMS_ITEM_ID_COL_NAME + " = @ITEM_ID" +
          " FROM " + _miaManagement.GetMIATableName(VideoStreamAspect.Metadata) +
          " WHERE " + _miaManagement.GetMIAAttributeColumnName(VideoStreamAspect.ATTR_VIDEO_PART) + " >= 0" +
          ") AND NOT EXISTS(" +
          " SELECT " + MediaLibrary_SubSchema.MEDIA_ITEMS_ITEM_ID_COL_NAME +
          " FROM " + _miaManagement.GetMIATableName(ProviderResourceAspect.Metadata) +
          " WHERE " + MediaLibrary_SubSchema.MEDIA_ITEMS_ITEM_ID_COL_NAME + " = @ITEM_ID" +
          " AND " + _miaManagement.GetMIAAttributeColumnName(ProviderResourceAspect.ATTR_TYPE) + " IN (" +
          ProviderResourceAspect.TYPE_PRIMARY + "," + ProviderResourceAspect.TYPE_STUB + ")" +
          " GROUP BY " + MediaLibrary_SubSchema.MEDIA_ITEMS_ITEM_ID_COL_NAME + " HAVING COUNT(*) > 1" +
          ")";
        return _updateSetsForIdSQL;
      }
    }

    public string UpdateUserPlayDataFromIdSQL
    {
      get
      {
        if (_updateUserPlayDataFromIdSQL == null)
          _updateUserPlayDataFromIdSQL = "UPDATE " + UserProfileDataManagement_SubSchema.USER_MEDIA_ITEM_DATA_TABLE_NAME +


    k0 = unpack32(kByteData, kOff, Endian.little);
    k1 = unpack32(kByteData, kOff + 4, Endian.little);
    k2 = unpack32(kByteData, kOff + 8, Endian.little);
    k3 = unpack32(kByteData, kOff + 12, Endian.little);
  }

  @override
  void updateByte(final int inp) {
    singleByte[0] = inp;
    update(singleByte, 0, 1);
  }

  @override
  void update(final Uint8List inp, final int inOff, final int len) {
    var copied = 0;
    while (len > copied) {
      if (currentBlockOffset == BLOCK_SIZE) {
        processBlock();
        currentBlockOffset = 0;
      }

      var toCopy = (len - copied) > (BLOCK_SIZE - currentBlockOffset)
          ? (BLOCK_SIZE - currentBlockOffset)
          : (len - copied);
      arrayCopy(inp, copied + inOff, currentBlock, currentBlockOffset, toCopy);
      copied += toCopy;
      currentBlockOffset += toCopy;
    }
  }

  void processBlock() {
    // TODO Calculation varied between web and native.
    if (currentBlockOffset < BLOCK_SIZE) {
      currentBlock[currentBlockOffset] = 1;
      for (var i = currentBlockOffset + 1; i < BLOCK_SIZE; i++) {
        currentBlock[i] = 0;
      }
    }

    final t0 = unpack32(currentBlock, 0, Endian.little);
    final t1 = unpack32(currentBlock, 4, Endian.little);
    final t2 = unpack32(currentBlock, 8, Endian.little);
    final t3 = unpack32(currentBlock, 12, Endian.little);

    h0 += t0 & 0x3ffffff;
    h1 += uRS((t1 << 32) | t0, 26) & 0x3ffffff;
    h2 += uRS((t2 << 32) | t1, 20) & 0x3ffffff;
    h3 += uRS((t3 << 32) | t2, 14) & 0x3ffffff;
    h4 += uRS(t3, 8);

    if (currentBlockOffset == BLOCK_SIZE) {
      h4 += shiftl32(1, 24);
    }

    var tp0 = h0 * r0 + h1 * s4 + h2 * s3 + h3 * s2 + h4 * s1;
    var tp1 = h0 * r1 + h1 * r0 + h2 * s4 + h3 * s3 + h4 * s2;
    var tp2 = h0 * r2 + h1 * r1 + h2 * r0 + h3 * s4 + h4 * s3;
    var tp3 = h0 * r3 + h1 * r2 + h2 * r1 + h3 * r0 + h4 * s4;
    var tp4 = h0 * r4 + h1 * r3 + h2 * r2 + h3 * r1 + h4 * r0;

    h0 = (tp0 & 0xffffffff) & 0x3ffffff;
    tp1 += uRS(tp0, 26);
    h1 = (tp1 & 0xffffffff) & 0x3ffffff;
    tp2 += uRS(tp1, 26);
    h2 = (tp2 & 0xffffffff) & 0x3ffffff;
    tp3 += uRS(tp2, 26);
    h3 = (tp3 & 0xffffffff) & 0x3ffffff;
    tp4 += uRS(tp3, 26);
    h4 = (tp4 & 0xffffffff) & 0x3ffffff;

    h0 += (uRS(tp4, 26) & 0x


oe = lambda num: "Even" if num % 2 == 0 else "Odd"

print(oe(5))


ublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 * SPDX-License-Identifier: MIT
 */

/***********************************************************************************************
 * ***
 *
 * !!!! WARNING: THIS FILE IS AUTO GENERATED. ANY CHANGES MAY BE OVERWRITTEN !!!!
 *
 * Generated on: 2020-10-05T16:49:32.048386
 * Version: Armv8.7-A-2020-09
 * Source: https://developer.arm.com/-/media/developer/products/architecture/armv8-a-architecture/2020-09/SysReg_xml_v87A-2020-09.tar.gz
 *
 * !!!! WARNING: THIS FILE IS AUTO GENERATED. ANY CHANGES MAY BE OVERWRITTEN !!!!
 *
 **********************************************************************************************
 * * */

/*
 * ================================================================================================
 * Register Information
 * ================================================================================================
 *
 * Register:    Interrupt Controller Hyp Control Register (ich_hcr_el2)
 * Group:       Virtualization registers
 * Type:        64-bit Register
 * Description: Controls the environment for VMs.
 * File:        AArch64-ich_hcr_el2.xml
 */

/*
 * ================================================================================================
 * Register Read/Write Functions
 * ================================================================================================
 */

/// reading the Interrupt Controller Hyp Control Register (ich_hcr_el2) register
pub fn reg_rawrd() -> u64 {
    let mut regval: u64;
    unsafe {
        // MRS <Xt>, ICH_HCR_EL2
        llvm_asm!("mrs $0, ich_hcr_el2" : "=r"(regval));
    }
    return regval;
}

/// writing the Interrupt Controller Hyp Control Register (ich_hcr_el2) register
pub fn reg_rawwr(val: u64) {
    unsafe {
        // MSR ICH_HCR_EL2, <Xt>
        llvm_asm!("msr ich_hcr_el2, $0" : : "r"(val));
    }
}

/*
 * ================================================================================================
 * Register Fields Read/Write Functions
 * ================================================================================================
 */

/// reads field val from register
pub fn eoicount_read() -> u64 {
    // bits 27..31
    let val = reg_rawrd();
    (val >> 27) & 0x1f
}

/// inserts field val into register
pub fn eoicount_write(newval: u64) {
    // bits 27..31
    let val = reg_rawrd();
    reg_rawwr(val & !(0x1f << 27) | ((newval & 0x1f) << 27));
}

/// reads field val from register
pub fn dvim_1_read() -> u64 {
    // bits 15..15
    let val = reg_rawrd();
    (val >> 15) & 0x1
}

/// inserts field val into register
pub fn dvim_1_write(newval: u64) {
    // bits


ototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {

  // if the abs isn't a dir, then nothing can match!
  if (!entries)
    return cb()

  // It will only match dot entries if it starts with a dot, or if
  // dot is set.  Stuff like @(.foo|.bar) isn't allowed.
  var pn = remain[0]
  var negate = !!this.minimatch.negate
  var rawGlob = pn._glob
  var dotOk = this.dot || rawGlob.charAt(0) === '.'

  var matchedEntries = []
  for (var i = 0; i < entries.length; i++) {
    var e = entries[i]
    if (e.charAt(0) !== '.' || dotOk) {
      var m
      if (negate && !prefix) {
        m = !e.match(pn)
      } else {
        m = e.match(pn)
      }
      if (m)
        matchedEntries.push(e)
    }
  }

  //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries)

  var len = matchedEntries.length
  // If there are no matched entries, then nothing matches.
  if (len === 0)
    return cb()

  // if this is the last remaining pattern bit, then no need for
  // an additional stat *unless* the user has specified mark or
  // stat explicitly.  We know they exist, since readdir returned
  // them.

  if (remain.length === 1 && !this.mark && !this.stat) {
    if (!this.matches[index])
      this.matches[index] = Object.create(null)

    for (var i = 0; i < len; i ++) {
      var e = matchedEntries[i]
      if (prefix) {
        if (prefix !== '/')
          e = prefix + '/' + e
        else
          e = prefix + e
      }

      if (e.charAt(0) === '/' && !this.nomount) {
        e = path.join(this.root, e)
      }
      this._emitMatch(index, e)
    }
    // This was the last one, and no stats were needed
    return cb()
  }

  // now test all matched entries as stand-ins for that part
  // of the pattern.
  remain.shift()
  for (var i = 0; i < len; i ++) {
    var e = matchedEntries[i]
    var newPattern
    if (prefix) {
      if (prefix !== '/')
        e = prefix + '/' + e
      else
        e = prefix + e
    }
    this._process([e].concat(remain), index, inGlobStar, cb)
  }
  cb()
}

Glob.prototype._emitMatch = function (index, e) {
  if (this.aborted)
    return

  if (isIgnored(this, e))
    return

  if (this.paused) {
    this._emitQueue.push([index, e])
    return
  }

  var abs = isAbsolute(e) ? e : this._makeAbs(e)

  if (this.mark)
    e = this._mark(e)

  if (this.absolute)
    e = abs

  if (this.matches[index][e])
    return

  if (this.nodir) {
    var c = this.cache[abs]
    if (c === 'DIR' || Array.isArray(c))
      return
  }

  this.matches[index][e] = true

  var st = this.statCache[abs]
  if (st)
    this.emit('stat', e, st)

  this.emit('match', e)
}

Glob.prototype._readdirInGlobStar = function (abs, cb) {
  if (this.aborted)
    return

  // follow all symlinked directories forever
  // just proceed as if this is a non-globstar situation
  if (this.follow)
    return this._readdir(abs, false, cb)


ute::<*const u8, VMTrampoline>(host_trampoline);
        Ok((instance, host_trampoline))
    }
}

pub unsafe fn create_raw_function(
    func: *mut [VMFunctionBody],
    sig: VMSharedSignatureIndex,
    host_state: Box<dyn Any + Send + Sync>,
) -> Result<InstanceHandle> {
    let mut module = Module::new();
    let mut functions = PrimaryMap::new();
    functions.push(Default::default());

    let sig_id = SignatureIndex::from_u32(u32::max_value() - 1);
    module.types.push(ModuleType::Function(sig_id));
    let func_id = module.functions.push(sig_id);
    module
        .exports
        .insert(String::new(), EntityIndex::Function(func_id));

    Ok(
        OnDemandInstanceAllocator::default().allocate(InstanceAllocationRequest {
            module: Arc::new(module),
            functions: &functions,
            image_base: (*func).as_ptr() as usize,
            imports: Imports::default(),
            shared_signatures: sig.into(),
            host_state,
            store: None,
            wasm_data: &[],
        })?,
    )
}
use crate::coord::ranged1d::types::RangedCoordusize;
use crate::coord::ranged1d::{
    AsRangedCoord, DiscreteRanged, KeyPointHint, NoDefaultFormatting, Ranged, ValueFormatter,
};
use std::cmp::{Ordering, PartialOrd};
use std::marker::PhantomData;
use std::ops::{Add, Range, Sub};

/// The type marker used to denote the rounding method.
/// Since we are mapping any range to a discrete range thus not all values are
/// perfect mapped to the grid points. In this case, this type marker gives hints
/// for the linspace coord for how to treat the non-grid-point values.
pub trait LinspaceRoundingMethod<V> {
    /// Search for the value within the given values array and rounding method
    ///
    /// - `values`: The values we want to search
    /// - `target`: The target value
    /// - `returns`: The index if we found the matching item, otherwise none
    fn search(values: &[V], target: &V) -> Option<usize>;
}

/// This type marker means linspace do the exact match for searching
/// which means if there's no value strictly equals to the target, the coord spec
/// reports not found result.
#[derive(Clone)]
pub struct Exact<V>(PhantomData<V>);

impl<V: PartialOrd> LinspaceRoundingMethod<V> for Exact<V> {
    fn search(values: &[V], target: &V) -> Option<usize> {
        values.iter().position(|x| target == x)
    }
}

/// This type marker means we round up the value. Which means we try to find a
/// minimal value in the values array that is greater or equal to the target.
#[derive(Clone)]
pub struct Ceil<V>(PhantomData<V>);

impl<V: PartialOrd> LinspaceRoundingMethod<V> for Ceil<V> {
    fn search(values: &[V], target: &V) -> Option<usize> {
        let ascending = if values.len() < 2 {
            true
        } else {
            values[0].partial_cmp(&values[1]) == Some(Ordering::Less)
        };

        match values.binary_search_by(|probe| {
            if ascending {
                probe.partial_cmp(target).unwrap()
            } else {
                target.partial_cmp(probe).unwrap()
            }
        }) {
            Ok(idx) => Some(idx),
            Err(idx) => {
                let offset = if ascending { 0 } else { 1 };

                if idx < offset || idx >= values.len() + offset {
                    return None;
                }
                Some(idx - offset)
            }
        }
    }
}

/// This means we use the round down. Which means we try to find a
/// maximum value in the values array that is less or equal to the target.
#[derive


', 'italic', 'strike'].forEach(function (token) {
  		['url', 'bold', 'italic', 'strike'].forEach(function (inside) {
  			if (token !== inside) {
  				Prism.languages.markdown[token].inside.content.inside[inside] = Prism.languages.markdown[inside];
  			}
  		});
  	});

  	Prism.hooks.add('after-tokenize', function (env) {
  		if (env.language !== 'markdown' && env.language !== 'md') {
  			return;
  		}

  		function walkTokens(tokens) {
  			if (!tokens || typeof tokens === 'string') {
  				return;
  			}

  			for (var i = 0, l = tokens.length; i < l; i++) {
  				var token = tokens[i];

  				if (token.type !== 'code') {
  					walkTokens(token.content);
  					continue;
  				}

  				/*
  				 * Add the correct `language-xxxx` class to this code block. Keep in mind that the `code-language` token
  				 * is optional. But the grammar is defined so that there is only one case we have to handle:
  				 *
  				 * token.content = [
  				 *     <span class="punctuation">```</span>,
  				 *     <span class="code-language">xxxx</span>,
  				 *     '\n', // exactly one new lines (\r or \n or \r\n)
  				 *     <span class="code-block">...</span>,
  				 *     '\n', // exactly one new lines again
  				 *     <span class="punctuation">```</span>
  				 * ];
  				 */

  				var codeLang = token.content[1];
  				var codeBlock = token.content[3];

  				if (codeLang && codeBlock &&
  					codeLang.type === 'code-language' && codeBlock.type === 'code-block' &&
  					typeof codeLang.content === 'string') {

  					// this might be a language that Prism does not support

  					// do some replacements to support C++, C#, and F#
  					var lang = codeLang.content.replace(/\b#/g, 'sharp').replace(/\b\+\+/g, 'pp');
  					// only use the first word
  					lang = (/[a-z][\w-]*/i.exec(lang) || [''])[0].toLowerCase();
  					var alias = 'language-' + lang;

  					// add alias
  					if (!codeBlock.alias) {
  						codeBlock.alias = [alias];
  					} else if (typeof codeBlock.alias === 'string') {
  						codeBlock.alias = [codeBlock.alias, alias];
  					} else {
  						codeBlock.alias.push(alias);
  					}
  				}
  			}
  		}

  		walkTokens(env.tokens);
  	});

  	Prism.hooks.add('wrap', function (env) {
  		if (env.type !== 'code-block') {
  			return;
  		}

  		var codeLang = '';
  		for (var i = 0, l = env.classes.length; i < l; i++) {
  			var cls = env.classes[i];
  			var match = /language-(.+)/.exec(cls);
  			if (match) {
  				codeLang = match[1];
  				break;
  			}
  		}

  		var grammar = Prism.languages


(rs->netfpga), ROUTER_OP_LUT_NAT_INT_CHKSUM_REG, ntohs(nat->nat_int.checksum));
	/* write ext ip */
	//writeReg(&(rs->netfpga), ROUTER_OP_LUT_NAT_EXT_IP_REG, ntohl(nat->nat_ext.ip.s_addr));
	/* write ext port */
	//writeReg(&(rs->netfpga), ROUTER_OP_LUT_NAT_EXT_PORT_REG, ntohs(nat->nat_ext.port));
	/* write ext checksum */
	//writeReg(&(rs->netfpga), ROUTER_OP_LUT_NAT_EXT_CHKSUM_REG, ntohs(nat->nat_ext.checksum));
	/* write the numbe of hits */
	//writeReg(&(rs->netfpga), ROUTER_OP_LUT_NAT_HIT_REG, ntohl(nat->hits));
	/* write the row number */
	//writeReg(&(rs->netfpga), ROUTER_OP_LUT_NAT_WR_ADDR_REG, row);

}

void write_nat_table_zero_to_hw(router_state *rs, uint8_t row) {
	/*
	writeReg(&(rs->netfpga), ROUTER_OP_LUT_NAT_INT_IP_REG, 0);
	writeReg(&(rs->netfpga), ROUTER_OP_LUT_NAT_INT_PORT_REG, 0);
	writeReg(&(rs->netfpga), ROUTER_OP_LUT_NAT_INT_CHKSUM_REG, 0);
	writeReg(&(rs->netfpga), ROUTER_OP_LUT_NAT_EXT_IP_REG, 0);
	writeReg(&(rs->netfpga), ROUTER_OP_LUT_NAT_EXT_PORT_REG, 0);
	writeReg(&(rs->netfpga), ROUTER_OP_LUT_NAT_EXT_CHKSUM_REG, 0);
	writeReg(&(rs->netfpga), ROUTER_OP_LUT_NAT_HIT_REG, 0);
	writeReg(&(rs->netfpga), ROUTER_OP_LUT_NAT_WR_ADDR_REG, row);
	*/
}

void lock_nat_table(router_state *rs) {
	assert(rs);
	if(pthread_mutex_lock(rs->nat_table_mutex) != 0) {
		perror("Failure getting nat table lock");
	}
}

void unlock_nat_table(router_state *rs) {
	assert(rs);
	if(pthread_mutex_unlock(rs->nat_table_mutex) != 0) {
		perror("Failure unlocking nat table lock");
	}
}


Body string   `json:"webhook_request_body,omitempty" validate:"optional"`
	WebhookHeaders     string   `json:"webhook_headers,omitempty" validate:"optional"`
}
package model

import "time"

type ServiceForm struct {
	Name                string          `json:"name,omitempty" minLength:"1"`
	Target              string          `json:"target,omitempty"`
	Type                uint8           `json:"type,omitempty"`
	Cover               uint8           `json:"cover,omitempty"`
	Notify              bool            `json:"notify,omitempty" validate:"optional"`
	Duration            uint64          `json:"duration,omitempty"`
	MinLatency          float32         `json:"min_latency,omitempty" default:"0.0"`
	MaxLatency          float32         `json:"max_latency,omitempty" default:"0.0"`
	LatencyNotify       bool            `json:"latency_notify,omitempty" validate:"optional"`
	EnableTriggerTask   bool            `json:"enable_trigger_task,omitempty" validate:"optional"`
	EnableShowInService bool            `json:"enable_show_in_service,omitempty" validate:"optional"`
	FailTriggerTasks    []uint64        `json:"fail_trigger_tasks,omitempty"`
	RecoverTriggerTasks []uint64        `json:"recover_trigger_tasks,omitempty"`
	SkipServers         map[uint64]bool `json:"skip_servers,omitempty"`
	NotificationGroupID uint64          `json:"notification_group_id,omitempty"`
}

type ServiceResponseItem struct {
	ServiceName string       `json:"service_name,omitempty"`
	CurrentUp   uint64       `json:"current_up"`
	CurrentDown uint64       `json:"current_down"`
	TotalUp     uint64       `json:"total_up"`
	TotalDown   uint64       `json:"total_down"`
	Delay       *[30]float32 `json:"delay,omitempty"`
	Up          *[30]uint64  `json:"up,omitempty"`
	Down        *[30]uint64  `json:"down,omitempty"`
}

func (r ServiceResponseItem) TotalUptime() float32 {
	if r.TotalUp+r.TotalDown == 0 {
		return 0
	}
	return float32(r.TotalUp) / (float32(r.TotalUp + r.TotalDown)) * 100
}

type CycleTransferStats struct {
	Name       string               `json:"name"`
	From       time.Time            `json:"from"`
	To         time.Time            `json:"to"`
	Max        uint64               `json:"max"`
	Min        uint64               `json:"min"`
	ServerName map[uint64]string    `json:"server_name,omitempty"`
	Transfer   map[uint64]uint64    `json:"transfer,omitempty"`
	NextUpdate map[uint64]time.Time `json:"next_update,omitempty"`
}

type ServiceResponse struct {
	Services           map[uint64]ServiceResponseItem `json:"services,omitempty"`
	CycleTransferStats map[uint64]CycleTransferStats  `json:"cycle_transfer_stats,omitempty"`
}

type BatchMoveServerForm struct {
	Ids    []uint64 `json:"ids,omitempty" validate:"required"`
	ToUser uint64   `json:"to_user,omitempty" validate:"required"`
}
package model

import (
	"fmt"
	"log"

	"github.com/goccy/go-json"
	"github.com/robfig/cron/v3"
	"gorm.io/gorm"

	pb "github.com/nezhahq/nezha/proto"
)

const (
	_ = iota
	TaskTypeH


�书、牌照、操作证件。存在重大事故隐患的农业机械，其所有人或者使用人排除隐患前不得继续使用。

第四十二条 农业机械安全监督管理执法人员进行安全监督检查时，应当佩戴统一标志，出示行政执法证件。农业机械安全监督检查、事故勘察车辆应当在车身喷涂统一标识。

第四十三条 农业机械化主管部门不得为农业机械指定维修经营者。

第四十四条 农业机械化主管部门应当定期向同级公安机关交通管理部门通报拖拉机登记、检验以及有关证书、牌照、操作证件发放情况。公安机关交通管理部门应当定期向同级农业机械化主管部门通报农业机械在道路上发生的交通事故及处理情况。

## 第六章 法律责任

第四十五条 县级以上地方人民政府农业机械化主管部门、工业主管部门、市场监督管理部门及其工作人员有下列行为之一的，对直接负责的主管人员和其他直接责任人员，依法给予处分，构成犯罪的，依法追究刑事责任：

(一)不依法对拖拉机、联合收割机实施安全检验、登记，或者不依法核发拖拉机、联合收割机证书、牌照的；

(二)对未经考试合格者核发拖拉机、联合收割机操作证件，或者对经考试合格者拒不核发拖拉机、联合收割机操作证件的；

(三)不依法处理农业机械事故，或者不依法出具农业机械事故认定书和其他证明材料的；

(四)在农业机械生产、销售等过程中不依法履行监督管理职责的；

(五)其他未依照本条例的规定履行职责的行为。

第四十六条 生产、销售利用残次零配件或者报废农业机械的发动机、方向机、变速器、车架等部件拼装的农业机械的，由县级以上人民政府市场监督管理部门责令停止生产、销售，没收违法所得和违法生产、销售的