 └── common/
├── docs/                  # Documentation
├── examples/              # Example configurations
├── certs/                 # Development certificates
├── logs/                  # Log files
├── Cargo.toml            # Rust dependencies
├── Cargo.lock            # Dependency lock file
├── docker-compose.yml    # Docker composition
├── Dockerfile            # Container definition
└── README.md             # Project overview
```

### Core Modules

#### `main.rs` - Application Entry Point
```rust
// Initializes logging and CLI parsing
// Delegates to CLI module for command execution
#[tokio::main]
async fn main() -> anyhow::Result<()> {
    init_default_logging()?;
    let cli = Cli::parse_args();
    cli.execute().await
}
```

#### `cli.rs` - Command Line Interface
```rust
// Defines CLI structure using clap
// Handles subcommands: start, validate, init, gen-certs
// Provides configuration overrides
pub enum Commands {
    Start { config: PathBuf, host: Option<String>, port: Option<u16> },
    Validate { config: PathBuf },
    Init { output: PathBuf, force: bool },
    GenCerts { hostname: String, output_dir: PathBuf },
}
```

#### `config.rs` - Configuration Management
```rust
// Configuration structures and parsing
// Validation and default values
// TOML serialization/deserialization
pub struct GatewayConfig {
    pub server: ServerConfig,
    pub routes: Vec<RouteConfig>,
    pub logging: LoggingConfig,
}
```

#### `server.rs` - HTTP Server
```rust
// Axum server setup and routing
// HTTP/HTTPS listener configuration
// Middleware setup and request routing
pub async fn create_server(config: GatewayConfig) -> Result<Router> {
    // Server creation logic
}
```

#### `proxy.rs` - Proxy Logic
```rust
// Core request proxying functionality
// Route matching and upstream forwarding
// Request/response transformation
pub async fn proxy_handler(
    State(state): State<ProxyState>,
    method: Method,
    uri: Uri,
    headers: HeaderMap,
    body: Body,
) -> impl IntoResponse {
    // Proxy implementation
}
```

## 🛠 Development Setup

### Prerequisites

1. **Install Rust**
   ```bash
   curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
   source ~/.cargo/env
   rustup component add clippy rustfmt
   ```

2. **Install Development Tools**
   ```bash
   # Code formatting
   rustup component add rustfmt

   # Linting
   rustup component add clippy

   # Documentation generation
   cargo install cargo-doc

   # Test coverage
   cargo install cargo-tarpaulin

   # Security audit
   cargo install cargo-audit
   ```

3. **Clone Repository**
   ```bash
   git clone https://github.com/murugan-kannan/ferragate.git
   cd ferragate
   ```

### Development Environment

#### VS Code Setup

Install recommended extensions:
- `rust-analyzer` - Rust language support
- `crates` - Cargo.toml management
- `Better TOML` - TOML syntax highlighting

Create `.vscode/settings.json`:
```json
{
    "rust-analyzer.checkOnSave.command": "clippy",
    "rust-analyzer.cargo.features": "all",
    "editor.formatOnSave": true,
    "[rust]": {
        "editor.defaultFormatter": "rust-lang.rust-analyzer"
    }
}
```

#### Development Scripts

Create `scripts/dev.sh`:
```bash
#!/bin/bash
# Development convenience script

case "$1" in
    "build")
        cargo build
        ;;
    "test")
        cargo test
        ;;
    "lint")
        cargo clippy -- -D warnings
        ;;
    "format")
        cargo fmt
        ;;
    "check")


      public override void Export(string path) {
            string folder = Path.GetDirectoryName(path),
                fileNameBase = Path.GetFileNameWithoutExtension(path);
            CreateRootFile(path, "txt");
            for (int i = 0; i < Channels.Length; i++) {
                SaveFilters(((IIRChannelData)Channels[i]).filters, 0, Bands, Path.Combine(folder, $"{fileNameBase} {GetLabel(i)}.txt"));
            }
        }
    }

    /// <summary>
    /// IIR filter set for MiniDSP 2x4 HD.
    /// </summary>
    public class MiniDSP2x4HDFilterSetLite : MiniDSP2x4FilterSetLite {
        /// <summary>
        /// Maximum number of peaking EQ filters per channel.
        /// </summary>
        public override int Bands => 10;

        /// <summary>
        /// IIR filter set for MiniDSP 2x4 HD with a given number of channels.
        /// </summary>
        public MiniDSP2x4HDFilterSetLite(int channels) : base(channels) { }

        /// <summary>
        /// IIR filter set for MiniDSP 2x4 HD with a given number of channels.
        /// </summary>
        public MiniDSP2x4HDFilterSetLite(ReferenceChannel[] channels) : base(channels) { }

        /// <summary>
        /// IIR filter set for MiniDSP 2x4 HD with a given number of channels, only using half the bands, and at a modified sample rate.
        /// </summary>
        internal MiniDSP2x4HDFilterSetLite(int channels, int sampleRate) : base(channels, sampleRate) { }

        /// <summary>
        /// IIR filter set for MiniDSP 2x4 HD with a given set of channels, only using half the bands, and at a modified sample rate.
        /// </summary>
        internal MiniDSP2x4HDFilterSetLite(ReferenceChannel[] channels, int sampleRate) : base(channels, sampleRate) { }
    }
}


const yDiff = mousePos.y - currentPos.yRel
  const tanRatio = yDiff / xDiff
  const tanAngle = Math.atan(tanRatio)
  const c = pythagorC(xDiff, yDiff)
  // TODO: some random constants?
  const possibleAcceleration = Math.pow(c / 40, 2)
  const finAcceleration = Math.min(
    possibleAcceleration,
    maxSpeedPerSecond / (1000 / timeSinceLastTick)
  )
  const newX = Math.cos(tanAngle) * finAcceleration || 0
  const newY = Math.sin(tanAngle) * finAcceleration || 0
  return {
    distanceX: Math.abs(newX),
    distanceY: Math.abs(newY),
  }
}

const stayInRange = (num: number, { min, max }: { min: number; max: number }) =>
  Math.min(Math.max(min, num), max)

const addShaking = (cameraShakeIntensity: number, axisPosition: number) =>
  cameraShakeIntensity > 0
    ? axisPosition + Math.random() * cameraShakeIntensity - cameraShakeIntensity / 2
    : axisPosition

export const calculateNewObjPos = (
  mousePos: MousePos,
  meElement: CenterElement,
  timeSinceLastTick: number,
  playground: { width: number; height: number },
  { cameraShakeIntensity }: { cameraShakeIntensity: number }
) => {
  const { distanceX, distanceY } = getDistance(
    mousePos,
    meElement,
    meElement.maxSpeedPerSecond,
    timeSinceLastTick
  )
  const x = calculateProgress(mousePos.x, meElement.x, meElement.xRel, distanceX)
  const y = calculateProgress(mousePos.y, meElement.y, meElement.yRel, distanceY)
  // calculate new pos and stay in playground
  const xWithBorder = stayInRange(x, { min: 0, max: playground.width })
  const yWithBorder = stayInRange(y, { min: 0, max: playground.height })
  return {
    x: addShaking(cameraShakeIntensity, xWithBorder),
    y: addShaking(cameraShakeIntensity, yWithBorder),
  }
}

const isInAxios = (axisPosition: number, larger: number, lower: number, halfWidth: number) =>
  axisPosition + halfWidth >= larger && axisPosition <= lower + halfWidth

/**
 * range define borders like:
 *  -1 ... 1
 *  -5 ... 5
 *
 * this function check if `num` is inside of that range
 * if not -> move it to max/min value
 */
export const getInRange = (num: number, range = 1) => stayInRange(num, { min: -range, max: range })

/**
 * check if `gameElement` is in view (screen that user can see)
 *
 * collisions of screen and elements are compared by absolute coordinations
 */
export const isInView = (view: View, gameElement: GameElement): boolean => {
  let height = null
  let width = null
  // make square position for easier calculating of `isInView` fn
  if (gameElement.type === GameElementType.Circle) {
    width = gameElement.radius
    height = gameElement.radius
  } else {
    width = gameElement.width
    height = gameElement.height
  }

  const rightX = view.leftX + view.width
  const bottomY = view.topY + view.height

  const isInX = isInAxios(gameElement.x, view.leftX, rightX, width)
  const isInY = isInAxios(gameElement.y, view.topY, bottomY, height)

  return isInX && isInY
}

/**
 * calculate player position from absolute playground coordinations
 * to screen view relative coordinations
 */
export const getRelativePosByAbsPos = (view: View, { x, y }: Coord): Coord => {
  const relativeXCoord = x - view.leftX
  const relativeYCoord = y - view.topY
  return {
    x: relativeXCoord,
    y: relativeYCoord,
  }
}
export function isCut(position: string): boolean {
    return position.toLowerC


"14"
	},
	{
		"id": "1223",
		"name": "Gagret",
		"state_id": "14"
	},
	{
		"id": "1224",
		"name": "Ghamarwin",
		"state_id": "14"
	},
	{
		"id": "1225",
		"name": "Hamirpur",
		"state_id": "14"
	},
	{
		"id": "1226",
		"name": "Jawala Mukhi",
		"state_id": "14"
	},
	{
		"id": "1227",
		"name": "Jogindarnagar",
		"state_id": "14"
	},
	{
		"id": "1228",
		"name": "Jubbal",
		"state_id": "14"
	},
	{
		"id": "1229",
		"name": "Jutogh",
		"state_id": "14"
	},
	{
		"id": "1230",
		"name": "Kala Amb",
		"state_id": "14"
	},
	{
		"id": "1231",
		"name": "Kalpa",
		"state_id": "14"
	},
	{
		"id": "1232",
		"name": "Kangra",
		"state_id": "14"
	},
	{
		"id": "1233",
		"name": "Kasauli",
		"state_id": "14"
	},
	{
		"id": "1234",
		"name": "Kot Khai",
		"state_id": "14"
	},
	{
		"id": "1235",
		"name": "Kullu",
		"state_id": "14"
	},
	{
		"id": "1236",
		"name": "Kulu",
		"state_id": "14"
	},
	{
		"id": "1237",
		"name": "Manali",
		"state_id": "14"
	},
	{
		"id": "1238",
		"name": "Mandi",
		"state_id": "14"
	},
	{
		"id": "1239",
		"name": "Mant Khas",
		"state_id": "14"
	},
	{
		"id": "1240",
		"name": "Mehatpur Basdehra",
		"state_id": "14"
	},
	{
		"id": "1241",
		"name": "Nadaun",
		"state_id": "14"
	},
	{
		"id": "1242",
		"name": "Nagrota",
		"state_id": "14"
	},
	{
		"id": "1243",
		"name": "Nahan",
		"state_id": "14"
	},
	{
		"id": "1244",
		"name": "Naina Devi",
		"state_id": "14"
	},
	{
		"id": "1245",
		"name": "Nalagarh",
		"state_id": "14"
	},
	{
		"id": "1246",
		"name": "Narkanda",
		"state_id": "14"
	},
	{
		"id": "1247",
		"name": "Nurpur",
		"state_id": "14"
	},
	{
		"id": "1248",
		"name": "Palampur",
		"state_id": "14"
	},
	{
		"id": "1249",
		"name": "Pandoh",
		"state_id": "14"
	},
	{
		"id": "1250",
		"name": "Paonta Sahib",
		"state_id": "14"
	},
	{


rride
  void onInputText(TextEditingValue text) {
    ysTree?.transact((transaction) {
      deleteComposing();
      deleteSelectRange();
      ysTree?.onInputText(text);
    });
    record();
    showPopupTool(true);
    replaceWithTitleCheck();
    replaceWithLiCheck();
    replaceWithQuoteCheck();
  }

  @override
  void delete(bool backspace) {
    if (selectState.hasSelectRange) {
      deleteSelectRange();
    } else {
      deleteCursor(backspace);
    }
    showPopupTool();
  }

  @override
  void deleteCursor(bool backspace) {
    ysTree?.deleteCursor(backspace);
    record();
  }

  @override
  void deleteSelectRange() {
    ysTree?.deleteSelectRange();
    record();
  }

  @override
  void insertContent(List<WenBlock>? insertBlocks, String? insertText) {
    if (insertBlocks == null || insertBlocks.isEmpty) {
      if (insertText == null || insertText == "") {
        return;
      }
      insertBlocks = parseTextToBlock(insertText);
    }
    insertBlocks = dealPasteBlocks(insertBlocks);
    ysTree?.insertContent(insertBlocks);
    record();
  }

  @override
  void changeTextLevel(int level) {
    ysTree?.changeTextLevel(level);
    record();
  }

  @override
  void changeTextToQuote() {
    ysTree?.changeTextToQuote();
    record();
  }

  @override
  void addCodeBlock({String code = "", String language = ""}) {
    ysTree?.addCodeBlock(code: code, language: language);
    record();
  }

  @override
  void addBlock(WenBlock block) {
    ysTree?.addBlock(block);
    record();
  }

  @override
  void addTextBlock() {
    ysTree?.addTextBlockAfter();
    ysTree?.applySelectionToEditor();
    ysTree?.applyCursorToEditor();
    record();
  }

  @override
  void addTextBlockBefore() {
    ysTree?.addTextBlockBefore();
    ysTree?.applySelectionToEditor();
    ysTree?.applyCursorToEditor();
    record();
  }

  @override
  void addLink() {
    var linkController = fluent.TextEditingController(text: "");
    var textController = fluent.TextEditingController(text: "");
    var ok = false;
    showMobileDialog(
        context: viewContext,
        builder: (context) {
          return fluent.ContentDialog(
            title: const fluent.Text("添加链接"),
            constraints: isMobile
                ? const BoxConstraints(maxWidth: 300)
                : fluent.kDefaultContentDialogConstraints,
            content: fluent.Column(
              mainAxisSize: MainAxisSize.min,
              children: [
                fluent.Container(
                  margin: const EdgeInsets.only(
                    bottom: 10,
                  ),
                  child: fluent.TextBox(
                    placeholder: "请输入链接文字",
                    autofocus: true,
                    onSubmitted: (s) {
                      ok = true;
                      Navigator.pop(context, '取消');
                    },
                    controller: textController,
                  ),
                ),
                Container(
                  child: fluent.TextBox(
                    placeholder: "http://",
                    controller: linkController,
                    onSubmitted: (s) {
                      ok = true;
                      Navigator.pop(context, '取消');
                    },
                  ),
                ),
              ],
            ),
            actions: [
              fluent.Button(


led {
        background-position: -80px 0;
    }

.iradio_minimal {
    background-position: -100px 0;
}
    .iradio_minimal.hover {
        background-position: -120px 0;
    }
    .iradio_minimal.checked {
        background-position: -140px 0;
    }
    .iradio_minimal.disabled {
        background-position: -160px 0;
        cursor: default;
    }
    .iradio_minimal.checked.disabled {
        background-position: -180px 0;
    }

/* HiDPI support */
@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
    .icheckbox_minimal,
    .iradio_minimal {
        background-image: url(minimal@2x.png);
        -webkit-background-size: 200px 20px;
        background-size: 200px 20px;
    }
}/* iCheck plugin Line skin, yellow
----------------------------------- */
.icheckbox_line-yellow,
.iradio_line-yellow {
    position: relative;
    display: block;
    margin: 0;
    padding: 5px 15px 5px 38px;
    font-size: 13px;
    line-height: 17px;
    color: #fff;
    background: #FFC414;
    border: none;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
    cursor: pointer;
}
    .icheckbox_line-yellow .icheck_line-icon,
    .iradio_line-yellow .icheck_line-icon {
        position: absolute;
        top: 50%;
        left: 13px;
        width: 13px;
        height: 11px;
        margin: -5px 0 0 0;
        padding: 0;
        overflow: hidden;
        background: url(line.png) no-repeat;
        border: none;
    }
    .icheckbox_line-yellow.hover,
    .icheckbox_line-yellow.checked.hover,
    .iradio_line-yellow.hover {
        background: #FFD34F;
    }
    .icheckbox_line-yellow.checked,
    .iradio_line-yellow.checked {
        background: #FFC414;
    }
        .icheckbox_line-yellow.checked .icheck_line-icon,
        .iradio_line-yellow.checked .icheck_line-icon {
            background-position: -15px 0;
        }
    .icheckbox_line-yellow.disabled,
    .iradio_line-yellow.disabled {
        background: #FFE495;
        cursor: default;
    }
        .icheckbox_line-yellow.disabled .icheck_line-icon,
        .iradio_line-yellow.disabled .icheck_line-icon {
            background-position: -30px 0;
        }
    .icheckbox_line-yellow.checked.disabled,
    .iradio_line-yellow.checked.disabled {
        background: #FFE495;
    }
        .icheckbox_line-yellow.checked.disabled .icheck_line-icon,
        .iradio_line-yellow.checked.disabled .icheck_line-icon {
            background-position: -45px 0;
        }

/* HiDPI support */
@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
    .icheckbox_line-yellow .icheck_line-icon,
    .irad


0};
  const auto& hdr0Stack = hdr0.stack();
  const auto& hdr1Stack = hdr1.stack();

  EXPECT_EQ(hdr1.size(), hdr0.size());
  EXPECT_EQ(hdr1.size(), 3 * MPLSHdr::Label::kSizeBytes);
  EXPECT_EQ(hdr0Stack, hdr1Stack);
}

TEST(MPLSHdrTest, cursor_data_constructor_1_label) {
  auto rxPkt = MockRxPacket::fromHex(
      "00067" // 103 label
      "d" // 110,1 -> exp 6 bottomOfStack 1
      "3f" // timeToLive 63
  );
  folly::io::Cursor cursor(rxPkt->buf());
  MPLSHdr hdr(&cursor);

  const auto& stack = hdr.stack();

  EXPECT_EQ(MPLSHdr::Label::kSizeBytes, hdr.size());
  EXPECT_EQ(stack[0].label, 103);
  EXPECT_EQ(stack[0].trafficClass, 6);
  EXPECT_EQ(stack[0].bottomOfStack, 1);
  EXPECT_EQ(stack[0].timeToLive, 63);
}

TEST(MPLSHdrTest, cursor_data_constructor_3_labels) {
  auto rxPkt = MockRxPacket::fromHex(
      "054c4" // 21700 label
      "8" // 010,0 -> exp 4 bottomOfStack 0
      "7d" // timeToLive 125

      "00068" // 104 label
      "c" // 110,0 -> exp 6 bottomOfStack 0
      "7e" // timeToLive 126

      "00067" // 103 label
      "d" // 110,1 -> exp 6 bottomOfStack 1
      "3f" // timeToLive 63

      // ip header
      "6" // VERSION: 6
      "ff" // Traffic Class
      "fffff" // Flow Label
      "00 00" // Payload Length
      "3B" // Next Header: No Next Header
      "01" // Hop Limit: 1
      // IPv6 Source Address
      "26 20 00 00 1c fe fa ce"
      "b0 0c 00 00 00 00 00 03"
      // IPv6 Destination Address
      "26 20 00 00 1c fe fa ce"
      "b0 0c 00 00 00 00 00 04"

      // junk
      "deadbeef"
      "deadbeef"
      "deadbeef"
      "deadbeef"
      "deadbeef"
      "deadbeef"
      "deadbeef"
      "deadbeef"
      "deadbeef"
      "deadbeef"
      "deadbeef");

  std::vector<MPLSHdr::Label> stack{
      MPLSHdr::Label{21700, 4, false, 125},
      MPLSHdr::Label{104, 6, false, 126},
      MPLSHdr::Label{103, 6, true, 63},
  };
  folly::io::Cursor cursor(rxPkt->buf());
  MPLSHdr hdr(&cursor);
  EXPECT_EQ(hdr.size(), 3 * MPLSHdr::Label::kSizeBytes);
  const auto& hdrStack = hdr.stack();
  EXPECT_EQ(hdrStack.size(), stack.size());
  for (auto i = 0; i < hdrStack.size(); i++) {
    EXPECT_EQ(stack[i], hdrStack[i]);
  }
}

TEST(MPLSHdrTest, decapsulateV6MplsPacket) {
  auto ioBuf = PktUtil::parseHexData(
      // dst mac, src mac vlan-type
      "44 4c a8 e4 19 e3 02 90 fb 43 a2 ec 81 00"
      // vlan tag and mpls
      "0f a1 88 47"
      // label on top
      "00 12 c2 7e"
      // label in middle
      "00 0c 82 7e"
      //


# Code generated by lark_sdk_gen. DO NOT EDIT.

from pylark.lark_request import RawRequestReq, _new_method_option
import attr
import typing
import io

@attr.s
class CheckUserIsInApplicationPaidScopeReq(object):
    open_id: str = attr.ib(
        default="", metadata={"req_type": "query", "key": "open_id"}
    )  # 用户 open_id，open_id 和 user_id 两个参数必须包含其一，若同时传入取 open_id
    user_id: str = attr.ib(
        default="", metadata={"req_type": "query", "key": "user_id"}
    )  # 用户 user_id，user_id 和 open_id 两个参数必须包含其一，若同时传入取 open_id

@attr.s
class CheckUserIsInApplicationPaidScopeResp(object):
    status: str = attr.ib(
        default="", metadata={"req_type": "json", "key": "status"}
    )  # 用户是否在开通范围中，"valid" -该用户在开通范围中，"not_in_scope"-该用户不在开通范围中，"no_active_license"-企业未购买任何价格方案或价格方案已过期，"exceeds_maximum_limit"-企业当前配置的付费功能开通范围人数超出限制，需提醒管理员调整
    price_plan_id: str = attr.ib(
        default="", metadata={"req_type": "json", "key": "price_plan_id"}
    )  # 租户当前使用的「价格方案ID」，对应开发者后台中「价格方案配置」中的「价格方案」
    is_trial: bool = attr.ib(
        factory=lambda: bool(), metadata={"req_type": "json", "key": "is_trial"}
    )  # 是否为试用版本，true-是试用版本；false-非试用版本
    service_stop_time: str = attr.ib(
        default="", metadata={"req_type": "json", "key": "service_stop_time"}
    )  # 租户当前有生效价格方案时表示价格方案的到期时间，为时间unix时间戳

def _gen_check_user_is_in_application_paid_scope_req(request, options) -> RawRequestReq:
    return RawRequestReq(
        dataclass=CheckUserIsInApplicationPaidScopeResp,
        scope="Application",
        api="CheckUserIsInApplicationPaidScope",
        method="GET",
        url="https://open.feishu.cn/open-apis/pay/v1/paid_scope/check_user",
        body=request,
        method_option=_new_method_option(options),
        need_tenant_access_token=True,
    )


宋体;color:black;mso-font-kerning:0pt;">年<o:p></o:p>

2<o:p></o:p>

3<o:p></o:p>

3<o:p></o:p>

2.4<o:p></o:p>

表二十三提供了威胁评论和威胁动机的评价基准

表23 威胁频率与威胁动机赋值关系

威胁频率<o:p></o:p>
	<td data-colwidth="173" width="173" style


).not(".main-color").each(function() {
      var shade = $(this).find(".shade").text().trim(),
          hex   = $(this).find(".hex").text().trim();

      colors[color][shade] = hex;
    });
    main[color] = color + "-" + $(this).find(".main-color .shade").text().trim();

  });
  var LESS = "";
  $.each(colors, function(name, shades) {
    LESS += "\n\n";
    $.each(shades, function(shade, hex) {
      LESS += "@" + name + "-" + shade + ": " + hex + ";\n";
    });
    if (main[name]) {
      LESS += "@" + name + ": " + main[name] + ";\n";
    }
  });
  console.log(LESS);
})();

*/
@red-50: #ffebee;
@red-100: #ffcdd2;
@red-200: #ef9a9a;
@red-300: #e57373;
@red-400: #ef5350;
@red-500: #f44336;
@red-600: #e53935;
@red-700: #d32f2f;
@red-800: #c62828;
@red-900: #b71c1c;
@red-A100: #ff8a80;
@red-A200: #ff5252;
@red-A400: #ff1744;
@red-A700: #d50000;
@red: @red-500;

@pink-50: #fce4ec;
@pink-100: #f8bbd0;
@pink-200: #f48fb1;
@pink-300: #f06292;
@pink-400: #ec407a;
@pink-500: #e91e63;
@pink-600: #d81b60;
@pink-700: #c2185b;
@pink-800: #ad1457;
@pink-900: #880e4f;
@pink-A100: #ff80ab;
@pink-A200: #ff4081;
@pink-A400: #f50057;
@pink-A700: #c51162;
@pink: @pink-500;

@purple-50: #f3e5f5;
@purple-100: #e1bee7;
@purple-200: #ce93d8;
@purple-300: #ba68c8;
@purple-400: #ab47bc;
@purple-500: #9c27b0;
@purple-600: #8e24aa;
@purple-700: #7b1fa2;
@purple-800: #6a1b9a;
@purple-900: #4a148c;
@purple-A100: #ea80fc;
@purple-A200: #e040fb;
@purple-A400: #d500f9;
@purple-A700: #aa00ff;
@purple: @purple-500;

@deep-purple-50: #ede7f6;
@deep-purple-100: #d1c4e9;
@deep-purple-200: #b39ddb;
@deep-purple-300: #9575cd;
@deep-purple-400: #7e57c2;
@deep-purple-500: #673ab7;
@deep-purple-600: #5e35b1;
@deep-purple-700: #512da8;
@deep-purple-800: #4527a0;
@deep-purple-900: #311b92;
@deep-purple-A100: #b388ff;
@deep-purple-A200: #7c4dff;
@deep-purple-A400: #651fff;
@deep-purple-A700: #6200ea;
@deep-purple: @deep-purple-500;

@indigo-50: #e8eaf6;
@indigo-100: #c5cae9;
@indigo-200: #9fa8da;
@indigo-300: #7986cb;
@indigo-400: #5c6bc0;
@indigo-500: #3f51b5;
@indigo-600: #3949ab;
@indigo-700: #303f9f;
@indigo-800: #283593;
@indigo-900: #1a237e;
@indigo-A100: #8c9eff;
@indigo-A200: #536dfe;
@indigo-A400: #3d5afe;
@indigo-A700: #304ffe;
@indigo: @indigo-500


 label: "2 ${TranslationKey.minute.tr}"),
    RadioData(value: 5, label: "5 ${TranslationKey.minute.tr}"),
    RadioData(value: 10, label: "10 ${TranslationKey.minute.tr}"),
    RadioData(value: 30, label: "30 ${TranslationKey.minute.tr}"),
  ];

  static List<RadioData> get languageSelections {
    return [
        RadioData(value: 'zh_CN', label: "简体中文"),
        RadioData(value: 'en_US', label: "English"),
      ]
      ..sort((a, b) => a.label.compareTo(b.label))
      ..insert(0, RadioData(value: 'auto', label: TranslationKey.auto.tr));
  }

  static const defaultLocale = Locale("zh", "CN");
  static final supportedLocales = languageSelections.sublist(1).map((item) {
    final codes = item.value.split("_");
    return Locale(codes[0], codes.length == 1 ? null : codes[1]);
  });
  static const localizationsDelegates = [
    GlobalMaterialLocalizations.delegate,
    GlobalWidgetsLocalizations.delegate,
  ];

  //设备类型图片
  static final Map<String, Icon> devTypeIcons = {
    'Windows': const Icon(
      Icons.laptop_windows_outlined,
      color: Colors.grey,
      size: 48,
    ),
    'Android': const Icon(
      Icons.android_outlined,
      color: Colors.grey,
      size: 48,
    ),
    'Mac': const Icon(
      Icons.laptop_mac_outlined,
      color: Colors.grey,
      size: 48,
    ),
    'Linux': Icon(
      MdiIcons.linux,
      color: Colors.grey,
      size: 48,
    ),
    'IOS': const Icon(
      Icons.apple_outlined,
      color: Colors.grey,
      size: 48,
    ),
  };

  //按键名称映射
  static final keyNameMap = [
    {
      "key": "Divide",
      "name": "/",
    },
    {
      "key": "Multiply",
      "name": "*",
    },
    {
      "key": "Subtract",
      "name": "-",
    },
    {
      "key": "Add",
      "name": "+",
    },
    {
      "key": "Equal",
      "name": "=",
    },
    {
      "key": "Minus",
      "name": "-",
    },
  ];

  //截屏路径关键字（Android）
  static final List<String> screenshotKeywords = [
    "screenshot",
    "screen_shot",
    "screen-shot",
    "screen shot",
    "screencapture",
    "screen_capture",
    "screen-capture",
    "screen capture",
    "screencap",
    "screen_cap",
    "screen-cap",
    "screen cap",
    "screenshots",
  ];

  //包名
  static const String pkgName = "clipshare.coclyun.top";

  //Windows上使用，与项目中的 windows/packaging.exe/make_config.yaml 保持一致
  static const String appGuid = "B72665DE-3DB5-B0E9-0EF9-55CCB65D3D62";
}
import 'package:flutter/material.dart';

class RoundedChip extends RawChip {
  const RoundedChip({
    super.key,
    super.avatar,
    required super.label,
    super.labelStyle,
    super.labelPadding,
    super.onDeleted,
    super.deleteIconColor,
    super.deleteButtonTooltipMessage,
    super.side = BorderSide.none,
    super.shape = const RoundedRectangleBorder(
      borderRadius: BorderRadius.all(Radius.circular(50)),
    ),
    super.clipBehavior = Clip.none,
    super.focusNode,
    super.autofocus = false,
    super.color,
    super.backgroundColor,
    super.padding,
    super.visualDensity = const VisualDensity(
      horizontal: VisualDensity.minimumDensity,
      vertical: VisualDensity.minimumDensity,
    ),
    super.materialTapTargetSize,
    super


31]
// ymm2 <- [d02 d12 d22 d32]
// ymm3 <- [d03 d13 d23 d33]
// ymm4 <- [d40 d50 d60 d70]
// ymm5 <- [d41 d51 d61 d71]
// ymm6 <- [d42 d52 d62 d72]
// ymm7 <- [d43 d53 d63 d73]
// ymm8  <- [d80 d91 da2 db3]
// ymm9  <- [d81 d90 da3 db2]
// ymm10 <- [d83 d92 da1 db0]
// ymm11 <- [d82 d93 d60 db1]
// ymm12 <- dirty
// ymm13 <- dirty
// ymm14 <- dirty
// ymm15 <- dirty
//
// output arguments:
// r10  <- E
// r11  <- inv_diag_E
// ymm0 <- [d00 d10 d20 d30]
// ymm1 <- [d01 d11 d21 d31]
// ymm2 <- [d02 d12 d22 d32]
// ymm3 <- [d03 d13 d23 d33]
// ymm4 <- [d40 d50 d60 d70]
// ymm5 <- [d41 d51 d61 d71]
// ymm6 <- [d42 d52 d62 d72]
// ymm7 <- [d43 d53 d63 d73]
// ymm8  <- [d80 d91 da2 db3]
// ymm9  <- [d81 d90 da3 db2]
// ymm10 <- [d83 d92 da1 db0]
// ymm11 <- [d82 d93 d60 db1]
// ymm12 <- dirty
// ymm13 <- dirty
// ymm14 <- dirty
// ymm15 <- dirty

#if MACRO_LEVEL>=1
	.macro INNER_EDGE_DTRSM_RUN_INV_12X4_LIB4
#else
	.p2align 4,,15
	FUN_START(inner_edge_dtrsm_run_inv_12x4_lib4)
#endif

	// first column
	vbroadcastsd	0(%r11), %ymm12
	vmulpd			%ymm0, %ymm12, %ymm0
	vmulpd			%ymm4, %ymm12, %ymm4
	vmulpd			%ymm8, %ymm12, %ymm8
	vbroadcastsd	32(%r10), %ymm12
	vfnmadd231pd	%ymm0, %ymm12, %ymm1
	vfnmadd231pd	%ymm4, %ymm12, %ymm5
	vfnmadd231pd	%ymm8, %ymm12, %ymm9
	vbroadcastsd	64(%r10), %ymm12
	vfnmadd231pd	%ymm0, %ymm12, %ymm2
	vfnmadd231pd	%ymm4, %ymm12, %ymm6
	vfnmadd231pd	%ymm8, %ymm12, %ymm10
	vbroadcastsd	96(%r10), %ymm12
	vfnmadd231pd	%ymm0, %ymm12, %ymm3
	vfnmadd231pd	%ymm4, %ymm12, %ymm7
	vfnmadd231pd	%ymm8, %ymm12, %ymm11

	// second column
	vbroadcastsd	8(%r11), %ymm12
	vmulpd			%ymm1, %ymm12, %ymm1
	vmulpd			%ymm5, %ymm12, %ymm5
	vmulpd			%ymm9, %ymm12, %ymm9
	vbroadcastsd	72(%r10), %ymm12
	vfnmadd231pd	%ymm1, %ymm12, %ymm2
	vfnmadd231pd	%ymm5, %ymm12, %ymm6
	vfnmadd231pd	%ymm9, %ymm12, %ymm10
	vbroadcastsd	104(%r10), %ym


ILBOX_LOAD_AFTER_LOGIN, true)

    private val currentUserPreferences
        get() = currentUserId?.let(::preferencesFor)

    private inline fun <T> withCurrentUserPreferences(block: (SharedPreferences) -> T): T? {
        currentUserPreferences ?: Timber.d("No current user set")
        return currentUserPreferences?.let(block)
    }

    val incorrectPinAttempts: Int
        get() {
            val secureSharedPreferences = app.secureSharedPreferences
            return secureSharedPreferences.getInt(PREF_PIN_INCORRECT_ATTEMPTS, 0)
        }

    @Deprecated("Use 'currentUser' variant", ReplaceWith("isCurrentUserBackgroundSyncEnabled()"))
    val isBackgroundSyncEnabled: Boolean
        get() = currentLegacyUser?.isBackgroundSync ?: false

    fun isCurrentUserSnoozeScheduledEnabled(): Boolean {
        val userId = requireNotNull(currentUserId)
        return requireNotNull(snoozeSettings).getScheduledSnooze(preferencesFor(userId))
    }

    @Deprecated("Use 'currentUser' variant", ReplaceWith("isCurrentUserSnoozeScheduledEnabled()"))
    fun isSnoozeScheduledEnabled(): Boolean =
        isCurrentUserSnoozeScheduledEnabled()

    // Very important: don't setSnoozeQuick to false if it already is false otherwise it will
    // keep saving, saving can be super slow on users with a lot of accounts!
    suspend fun isSnoozeQuickEnabled(): Boolean {
        if (snoozeSettings!!.snoozeQuick && snoozeSettings!!.snoozeQuickEndTime - System.currentTimeMillis() <= 0) {
            setSnoozeQuick(false, 0)
        }
        return snoozeSettings!!.snoozeQuick
    }

    // Very important: don't setSnoozeQuick to false if it already is false otherwise it will
    // keep saving, saving can be super slow on users with a lot of accounts!
    @Deprecated("Use suspend function", ReplaceWith("isSnoozeQuickEnabled"))
    fun isSnoozeQuickEnabledBlocking(): Boolean =
        runBlocking { isSnoozeQuickEnabled() }

    fun firstMailboxLoadDone() {
        prefs.edit().putBoolean(PREF_IS_FIRST_MAILBOX_LOAD_AFTER_LOGIN, false).apply()
    }

    fun increaseIncorrectPinAttempt() {
        val secureSharedPreferences = app.secureSharedPreferences
        var attempts = secureSharedPreferences.getInt(PREF_PIN_INCORRECT_ATTEMPTS, 0)
        secureSharedPreferences.edit().putInt(PREF_PIN_INCORRECT_ATTEMPTS, ++attempts).apply()
    }

    fun resetPinAttempts() {
        val secureSharedPreferences = app.secureSharedPreferences
        secureSharedPreferences.edit().putInt(PREF_PIN_INCORRECT_ATTEMPTS, 0).apply()
    }

    fun savePin(mailboxPin: String?) {
        val secureSharedPreferences = app.secureSharedPreferences
        secureSharedPreferences.edit().putString(PREF_PIN, mailboxPin).apply()
    }

    fun getMailboxPin(): String? =
        app.secureSharedPreferences.getString(PREF_PIN, "")

    fun canShowStorageLimitWarning(): Boolean =
        withCurrentUserPreferences { it[PREF_SHOW_STORAGE_LIMIT_WARNING] } ?: true

    fun setShowStorageLimitWarning(value: Boolean) {
        withCurrentUserPreferences {
            it[PREF_SHOW_STORAGE_LIMIT_WARNING] = value
        }
    }

    fun canShowStorageLimitReached(): Boolean =
        withCurrentUserPreferences { it[PREF_SHOW_STORAGE_LIMIT_REACHED] } ?: true

    fun setShowStorageLimitReached(value: Boolean) {
        withCurrentUserPreferences {
            it[PREF_SHOW_STORAGE_LIMIT_REACHED] = value
        }
    }

    fun clearBackupPrefs() {
        backupPrefs.clearAll()
    }

    /**
     * @throws IllegalStateException if [currentUserId] or [sno


uis, auctor dolor. Curabitur sed facilisis nibh, a tincidunt lectus. Duis interdum nibh quis porttitor facilisis. In sit amet nulla sed nibh tristique iaculis eu nec metus.

Heading level 2

Aliquam hendrerit egestas orci, at sollicitudin lectus mattis eu. Nunc elementum congue sagittis. Praesent in tempus nisl. Vestibulum consequat dapibus arcu, in ornare felis gravida et. Vestibulum ut diam lacinia, sagittis leo eu, convallis felis. Maecenas sit amet ipsum lobortis, sollicitudin sem a, blandit purus. Nulla vehicula dignissim augue id sagittis. Sed pulvinar erat non fermentum elementum. Quisque volutpat, nunc id congue finibus, dui dolor efficitur nunc, ac interdum lacus lacus in enim. Nullam mattis nulla a magna efficitur, et rhoncus nulla ullamcorper. Mauris fermentum dictum massa vitae porta. Maecenas rutrum augue eu lorem fringilla fringilla. Mauris posuere luctus libero et sodales. Donec posuere pharetra efficitur.

Aliquam erat volutpat

Donec sodales malesuada purus, a gravida ipsum molestie ac

Donec ac luctus leo, eget lobortis sapien

Quisque ultricies egestas ipsum, tempor porta nulla facilisis eu

Sed fermentum viverra tortor ut lacinia

Phasellus dictum interdum efficitur. Maecenas eleifend sapien felis, quis interdum ex tempor a. Aenean sodales, eros ac fermentum elementum, enim nisi finibus nisi, sed tempus turpis mauris ac quam. Aenean ac leo vel ante sollicitudin consequat in ut augue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis sodales odio diam. Phasellus ultricies faucibus massa sit amet pharetra.

Ut vitae tristique magna. In hac habitasse platea dictumst. Aliquam tempor dolor in ante porta, quis convallis metus laoreet. Ut a magna mauris. Vestibulum blandit ante vitae felis gravida hendrerit. Nulla eleifend vel diam non viverra. Nullam at maximus mi. Integer luctus quis felis vitae ornare. Ut eu consequat libero.

13 March 2018

Blog layout © All rights reserved

Latest Posts

Aliquam erat volutpat

Donec sodales malesuada purus, a gravida ipsum molestie ac

Donec ac luctus leo, eget lobortis sapien

<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>Units Viewport: Height</title>
    <link rel="stylesheet" href="./responsive.css"


_tNVRAM_ReadCnf.buf[0x4+index];
		}

	}else //MT5921
	{
		SP_tNVRAM_ReadReq.LID = pLID;
		SP_tNVRAM_ReadReq.RID = m_usRID;
		SP_tNVRAM_ReadCnf.len = m_iBTBufSize;
	    SP_tNVRAM_ReadCnf.buf = (unsigned char*) malloc (m_iBTBufSize*sizeof(unsigned char));
		m_MetaResult =  (META_RESULT)SP_REQ_ReadFromNVRAM ();
		if ( m_MetaResult!=META_SUCCESS )
		{
			return m_MetaResult;
		}

		for (index=0; index < 6; index=index+2)
		{
			mac_addr[index] = SP_tNVRAM_ReadCnf.buf[0x26+index+1];
			mac_addr[index+1] = SP_tNVRAM_ReadCnf.buf[0x26+index];
		}
	}

    return META_SUCCESS;
}

void CMySpMeta::Checksum_Generation(unsigned char StorageBuf[])
{
	int u2Len = (EEPROM_NIC_CHKSUM_ADD_DW - EEPROM_NIC_CHKSUM_START_ADD_DW + 1) * 2;

	/* 5921 Start NIC EEPROM Checksum from 0x0D ~ 0x9F */
	int StartIndex = EEPROM_NIC_CHKSUM_START_ADD_DW * 2;	//from word to byte
	int EndIndex = EEPROM_NIC_CHKSUM_ADD_DW * 2;
	int LoopIndex = 0;
	unsigned char Chksum = 0;
	unsigned char New_Chksum = 0;
	unsigned char Old_Chksum = 0;

	//for (LoopIndex = StartIndex; LoopIndex <= EndIndex; LoopIndex++)
	for (LoopIndex = 0; LoopIndex < u2Len - 1; LoopIndex++)//not count 0x13F
	{
		Chksum = (Chksum + StorageBuf[LoopIndex + StartIndex]) & 0x00FF;
	}
	Old_Chksum = StorageBuf[0x13F];
	New_Chksum = (0x01FF - Chksum) & 0x00FF;

	StorageBuf[0x13F] = (0x01FF - Chksum) & 0x00FF;
}
// FullWrite.cpp : Defines the class behaviors for the application.
//

#include "stdafx.h"
#include "FullWrite.h"
#include "Splash.h"
#include "MainFrm.h"
#include "FullWriteDoc.h"
#include "FullWriteView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CFullWriteApp

BEGIN_MESSAGE_MAP(CFullWriteApp, CWinApp)
	//{{AFX_MSG_MAP(CFullWriteApp)
	ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG_MAP
	// Standard file based document commands
	ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
	ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CFullWriteApp construction

CFullWriteApp::CFullWriteApp()
{
	// TODO: add construction code here,
	// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CFullWriteApp object

CFullWriteApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CFullWriteApp initialization

BOOL CFullWriteApp::InitInstance()
{
	AfxOleInit();
	AfxInitRichEdit();
	AfxEnableControlContainer();

	// Standard initialization
	// If you are not using these features and wish to reduce the si


ai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
  ordinal: n => `${n}.`,
  weekStart: 1,
  formats: {
    LT: 'HH:mm',
    LTS: 'HH:mm:ss',
    L: 'DD.MM.YYYY',
    LL: 'D. MMMM YYYY',
    LLL: 'D. MMMM YYYY HH:mm',
    LLLL: 'dddd, D. MMMM YYYY HH:mm'
  },
  relativeTime: {
    future: 'in %s',
    past: 'vor %s',
    s: relativeTimeFormatter,
    m: relativeTimeFormatter,
    mm: relativeTimeFormatter,
    h: relativeTimeFormatter,
    hh: relativeTimeFormatter,
    d: relativeTimeFormatter,
    dd: relativeTimeFormatter,
    M: relativeTimeFormatter,
    MM: relativeTimeFormatter,
    y: relativeTimeFormatter,
    yy: relativeTimeFormatter
  }
}

dayjs.locale(locale, null, true)

export default locale
// Vietnamese [vi]
import dayjs from 'dayjs'

const locale = {
  name: 'vi',
  weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'),
  months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'),
  weekStart: 1,
  weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
  monthsShort: 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'),
  weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
  ordinal: n => n,
  formats: {
    LT: 'HH:mm',
    LTS: 'HH:mm:ss',
    L: 'DD/MM/YYYY',
    LL: 'D MMMM [năm] YYYY',
    LLL: 'D MMMM [năm] YYYY HH:mm',
    LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',
    l: 'DD/M/YYYY',
    ll: 'D MMM YYYY',
    lll: 'D MMM YYYY HH:mm',
    llll: 'ddd, D MMM YYYY HH:mm'
  },
  relativeTime: {
    future: '%s tới',
    past: '%s trước',
    s: 'vài giây',
    m: 'một phút',
    mm: '%d phút',
    h: 'một giờ',
    hh: '%d giờ',
    d: 'một ngày',
    dd: '%d ngày',
    M: 'một tháng',
    MM: '%d tháng',
    y: 'một năm',
    yy: '%d năm'
  }
}

dayjs.locale(locale, null, true)

export default locale

// Macedonian [mk]
import dayjs from 'dayjs'

const locale = {
  name: 'mk',
  weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split('_'),
  months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split('_'),
  weekStart: 1,
  weekdaysShort: '


6] = "Kindal Tejeluna",
		[15975] = "Hilandera carroñera",
		[8020] = "[UNUSED] Shyn",
		[4599] = "Sarah Killian",
		[16167] = "Ensamblaje huesudo",
		[8116] = "Ziggle Chispaz",
		[6015] = "Thorta",
		[16359] = "Mensajero Argenta",
		[2017] = "Pícara Sangrepluma",
		[8296] = "Mojo el Retorcido",
		[8360] = "Elki",
		[7015] = "Flagglemurk el Cruel",
		[1986] = "Araña Tejemadera",
		[4309] = "Gorm Tótem Siniestro",
		[9257] = "Brujo del Escudo del Estigma",
		[12254] = "Marca de detonación (NESH)",
		[13842] = "Embajadora Rokhstrom Lobo Gélido",
		[1048] = "Teniente Horrocrusto",
		[15574] = "Ancestro Picopiedra",
		[1121] = "Zancanieve Peloescarcha",
		[17689] = "<TXT>Elemento de misión de captura de la guardia de la Corona",
		[382] = "Alguacil Marris",
		[14909] = "Poká",
		[10930] = "Dargh Tirojusto",
		[4799] = "Clamainferno Malarraíz",
		[1532] = "Espíritu deambulante",
		[15602] = "Ancestro Correpradera",
		[9448] = "Pretoriano Escarlata",
		[302] = "Mary la Ciega",
		[11734] = "Señor Colmen'Regal",
		[1088] = "Reptador monstruoso",
		[15562] = "Ancestro Rugidomazo",
		[1167] = "Cavador Rompecantos",
		[13086] = "Aggi Piesdeplomo",
		[15607] = "Ancestro Levesusurro",
		[6251] = "Strahad Farsan",
		[12034] = "Koiter",
		[10088] = "Xao'tsu",
		[1197] = "Chamán Rompecantos",
		[10216] = "Gubber Blump",
		[10357] = "Ressan el Agujas",
		[4027] = "Bruja de la Tormenta Furia Sangrienta",
		[10408] = "Gárgola Ventorroca",
		[10472] = "Ocultista de Scholomance",
		[12156] = "Lanzahachas Hacha Invernal",
		[10600] = "Thontek Pezuña Estrepitosa",
		[10664] = "Arúspice",
		[8151] = "Guardia de Punta de Nijel",
		[1402] = "Topper McNabb",
		[10856] = "Intendente Argenta Hasana",
		[10920] = "Kelek Guardacielo",
		[1151] = "Crocolisco marino",
		[11048] = "Victor Ward",
		[10406] = "Cuervoso necrófago",
		[11176] = "Krathok Puñofundido",
		[222] = "Nillen Andemar",
		[5646] = "Lanzahachas Furiarena",
		[11368] = "Murciélago buscasangre",
		[1554] = "Murciumbrío vampírico",
		[11496] = "Immol'thar",
		[6647] = "Magistrix Yelmalcón",
		[11624] = "Taiga Crin Sabia",
		[11688] = "Centauro maldito",
		[


    if (ret != ESP_OK) {
        log_error("i2c_param_config failed");
        return true;
    }
    ret = i2c_driver_install((i2c_port_t)bus_number, conf.mode, 0, 0, 0);
    if (ret != ESP_OK) {
        log_error("i2c_driver_install failed");
        return true;
    }
    //Clock Stretching Timeout: 20b:esp32, 5b:esp32-c3, 24b:esp32-s2
    i2c_set_timeout((i2c_port_t)bus_number, 0xfffff);
    return false;
}

// cppcheck-suppress unusedFunction
int i2c_write(int bus_number, uint8_t address, const uint8_t* data, size_t count) {
#if 0
        esp_err_t        ret = ESP_FAIL;
        i2c_cmd_handle_t cmd = NULL;

        //short implementation does not support zero size writes (example when scanning) PR in IDF?
        //ret =  i2c_master_write_to_device((i2c_port_t)bus_number, address, buff, size, timeOutMillis / portTICK_RATE_MS);

        uint8_t cmd_buff[I2C_LINK_RECOMMENDED_SIZE(1)] = { 0 };

        cmd = i2c_cmd_link_create_static(cmd_buff, I2C_LINK_RECOMMENDED_SIZE(1));
        ret = i2c_master_start(cmd);
        if (ret != ESP_OK) {
            goto end;
        }
        ret = i2c_master_write_byte(cmd, (address << 1) | I2C_MASTER_WRITE, true);
        if (ret != ESP_OK) {
            goto end;
        }
        if (count) {
            ret = i2c_master_write(cmd, data, count, true);
            if (ret != ESP_OK) {
                goto end;
            }
        }
        ret = i2c_master_stop(cmd);
        if (ret != ESP_OK) {
            goto end;
        }
        ret = i2c_master_cmd_begin((i2c_port_t)bus_number, cmd, 10 / portTICK_RATE_MS);

    end:
        if (cmd != NULL) {
            i2c_cmd_link_delete_static(cmd);
        }
        return ret ? -1 : count;
#else
    return i2c_master_write_to_device((i2c_port_t)bus_number, address, data, count, 10 / portTICK_RATE_MS) ? -1 : count;
#endif
}

// cppcheck-suppress unusedFunction
int i2c_read(int bus_number, uint8_t address, uint8_t* data, size_t count) {
    return i2c_master_read_from_device((i2c_port_t)bus_number, address, data, count, 10 / portTICK_RATE_MS) ? -1 : count;
}
/**
 * @file WebSockets.cpp
 * @date 20.05.2015
 * @author Markus Sattler
 *
 * Copyright (c) 2015 Markus Sattler. All rights reserved.
 * This file is part of the WebSockets for Arduino.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Frankl


    }
}
use crate::{
    errors::Error,
    model::{
        id::{ChannelId, VideoId},
        Channel, ChannelFilter, ChannelVideoFilter, ChannelVideoType, CommentSearch, Language,
        PaginatedResult, Video, VideoFilter, VideoFull, VideoSearch,
    },
    util::validate_response,
};

#[cfg(feature = "streams")]
use futures_core::Stream;

#[derive(Debug, Clone)]
/// The client used for interacting with the Holodex API.
pub struct Client {
    http: ureq::Agent,
    token: String,
}

impl Client {
    const ENDPOINT: &'static str = "https://holodex.net/api/v2";
    const USER_AGENT: &'static str =
        concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION"),);

    #[must_use = "Unused Holodex client."]
    /// Create a new client with the provided API token.
    ///
    /// # Examples
    /// Create a client that gets the API token from an environment variable:
    /// ```rust
    /// # if std::env::var_os("HOLODEX_API_TOKEN").is_none() {
    /// #   std::env::set_var("HOLODEX_API_TOKEN", "my-api-token");
    /// # }
    /// let token = std::env::var("HOLODEX_API_TOKEN").unwrap();
    /// let client = holodex::Client::new(&token)?;
    /// # Ok::<(), holodex::errors::Error>(())
    /// ```
    ///
    /// # Errors
    /// Will return [`Error::InvalidApiToken`] if `api_token` contains invalid characters.
    ///
    /// Will return [`Error::HttpClientCreationError`] if a TLS backend cannot be initialized, or the resolver cannot load the system configuration.
    pub fn new(api_token: &str) -> Result<Self, Error> {
        let http = ureq::builder().user_agent(Self::USER_AGENT).build();

        Ok(Self {
            http,
            token: api_token.to_owned(),
        })
    }

    /// Query videos.
    ///
    /// Pretty much everything you need.
    /// This is the most 'vanilla' variant with almost no preset values,
    /// and [`videos_from_channel`][`Self::videos_from_channel`] and [`live`][`Self::live`] both use the same query structure
    /// but provision default values differently for some of the query params.
    ///
    /// Not as powerful at searching arbitrary text as the Search API (currently not documented/available).
    ///
    /// # Examples
    ///
    /// Retrieve the five closest Japanese streams from independent streamers
    /// scheduled to go live within the next 24 hours, along with their descriptions.
    /// ```rust
    /// use holodex::model::{
    ///     builders::VideoFilterBuilder, ExtraVideoInfo, Language, Organisation,
    ///     VideoSortingCriteria, VideoType
    /// };
    ///
    /// # if std::env::var_os("HOLODEX_API_TOKEN").is_none() {
    /// #   std::env::set_var("HOLODEX_API_TOKEN", "<PASSWORD>-token");
    /// # }
    /// let token = std::env::var("HOLODEX_API_TOKEN").unwrap();
    /// let client = holodex::Client::new(&token)?;
    ///
    /// let filter = VideoFilterBuilder::new()
    ///     .organisation(Organisation::Independents)
    ///     .language(&[Language::Japanese])
    ///     .video_type(VideoType::Stream)
    ///     .max_upcoming_hours(24)
    ///     .include(&[ExtraVideoInfo::Description])
    ///     .sort_by(VideoSortingCriteria::StartScheduled)
    ///     .limit(5)
    ///     .build();
    ///
    ///


d KB at %p-%p\n", cache_size, compiled_code, compiled_code + cache_size * 1024);
#if defined(CPU_arm) && !defined(ARMV6T2) && !defined(CPU_AARCH64)
        max_compile_start = compiled_code + cache_size * 1024 - BYTES_PER_INST - DATA_BUFFER_SIZE;
#else
        max_compile_start = compiled_code + cache_size * 1024 - BYTES_PER_INST;
#endif
        current_compile_p = compiled_code;
        current_cache_size = 0;
#if defined(CPU_arm) && !defined(ARMV6T2) && !defined(CPU_AARCH64)
        reset_data_buffer();
#endif
    }
}

static void calc_checksum(blockinfo* bi, uae_u32* c1, uae_u32* c2)
{
    uae_u32 k1 = 0;
    uae_u32 k2 = 0;

    checksum_info* csi = bi->csi;
    while (csi) {
        uae_s32 len = csi->length;
        uintptr tmp = (uintptr)csi->start_p;
        uae_u32* pos;

        len += (tmp & 3);
        tmp &= ~((uintptr)3);
        pos = (uae_u32*)tmp;

       	if (len >= 0 && len <= MAX_CHECKSUM_LEN) {
       		if(get_mem_bank(pos).baseaddr_direct_r!=0 &&
               get_mem_bank(pos+len).baseaddr_direct_r!=0)
            {
                while (len > 0) {
                    k1 += *pos;
                    k2 ^= *pos;
                    pos++;
                    len -= 4;
    	        }
            }
            else
            {
            	if((int)(((uaecptr)pos)>>16) == (int)(((uaecptr)pos+len)>>16))
            	{
                	addrbank ab=get_mem_bank(pos);
					while (len > 0) {
						uint32_t data=call_mem_get_func(ab.lget, (uae_u32)pos);
						k1 += data;
						k2 ^= data;
						pos++;
						len -= 4;
					}
            	}
            	else
            	{
//					printf("Checksum Xbanking ab = 0x%04X ab2 = 0x%04X\n",(int)(((uaecptr)pos)>>16),(int)(((uaecptr)pos+len)>>16));
					while (len > 0) {
		            	addrbank ab=get_mem_bank(pos);
						uint32_t data=call_mem_get_func(ab.lget, (uae_u32)pos);
						k1 += data;
						k2 ^= data;
						pos++;
						len -= 4;
					}
            	}
            }
        }
        csi = csi->next;
    }

    *c1 = k1;
    *c2 = k2;
}

int check_for_cache_miss(void)
{
    blockinfo* bi = get_blockinfo_addr(regs.pc_p);

    if (bi) {
        int cl = cacheline(regs.pc_p);
        if (bi != cache_tags[cl + 1].bi) {
            raise_in_cl_list(bi);
            return 1;
        }
    }
    return 0;
}

static void recompile_block(void)
{
    /* An existing block's countdown code has expired. We need to make
       sure that execute_normal doesn't refuse to recompile due to a
       perceived cache miss... */
    blockinfo* bi = get_blockinfo_addr(regs.pc_p);

    raise_in_cl_list(bi);
    execute_normal();
}

static void cache_miss(void)
{
    blockinfo* bi = get_blockinfo_addr(regs.pc_p);

    if (!bi) {
        execute_normal(); /* Compile this block now */
        return;
    }
    raise_in_cl_list(bi);
}

static


#ifndef _CHK_DATAGRAM_SOCKET_H
#define _CHK_DATAGRAM_SOCKET_H

/*
* 数据报套接字
*/

#include "event/chk_event.h"
#include "util/chk_bytechunk.h"
#include "util/chk_timer.h"
#include "chk_ud.h"

typedef struct chk_datagram_socket chk_datagram_socket;

typedef struct chk_datagram_event {
	chk_sockaddr    src;
	chk_bytebuffer *buff;
}chk_datagram_event;

typedef void (*chk_datagram_socket_cb)(chk_datagram_socket*,chk_datagram_event*,int32_t error);

chk_datagram_socket *chk_datagram_socket_new(int32_t fd,int32_t addr_type);

void chk_datagram_socket_close(chk_datagram_socket *s);

int32_t chk_datagram_socket_sendto(chk_datagram_socket *s,chk_bytebuffer *buff,chk_sockaddr *dst);

chk_ud chk_datagram_socket_getUd(chk_datagram_socket *s);

void chk_datagram_socket_setUd(chk_datagram_socket *s,chk_ud ud);

int32_t chk_datagram_socket_set_broadcast(chk_datagram_socket *s);

int32_t chk_datagram_socket_broadcast(chk_datagram_socket *s,chk_bytebuffer *buff,chk_sockaddr *addr);

#endif


,
      titles: ['Lista 1', 'Lista 2'],
      filterPlaceholder: 'Digite uma palavra-chave',
      noCheckedFormat: '{total} itens',
      hasCheckedFormat: '{checked}/{total} selecionados'
    },
    image: {
      error: 'Erro ao carregar imagem'
    },
    pageHeader: {
      title: 'Voltar'
    },
    popconfirm: {
      confirmButtonText: 'Sim',
      cancelButtonText: 'Não'
    }
  }
};'use strict';

exports.__esModule = true;
exports.default = {
  el: {
    colorpicker: {
      confirm: 'Confirmar',
      clear: 'Despejar'
    },
    datepicker: {
      now: 'Ahora',
      today: 'Hoy',
      cancel: 'Cancelar',
      clear: 'Despejar',
      confirm: 'Confirmar',
      selectDate: 'Seleccionar fecha',
      selectTime: 'Seleccionar hora',
      startDate: 'Fecha Incial',
      startTime: 'Hora Inicial',
      endDate: 'Fecha Final',
      endTime: 'Hora Final',
      prevYear: 'Año Anterior',
      nextYear: 'Próximo Año',
      prevMonth: 'Mes Anterior',
      nextMonth: 'Próximo Mes',
      year: '',
      month1: 'enero',
      month2: 'febrero',
      month3: 'marzo',
      month4: 'abril',
      month5: 'mayo',
      month6: 'junio',
      month7: 'julio',
      month8: 'agosto',
      month9: 'septiembre',
      month10: 'octubre',
      month11: 'noviembre',
      month12: 'diciembre',
      // week: 'semana',
      weeks: {
        sun: 'dom',
        mon: 'lun',
        tue: 'mar',
        wed: 'mié',
        thu: 'jue',
        fri: 'vie',
        sat: 'sáb'
      },
      months: {
        jan: 'ene',
        feb: 'feb',
        mar: 'mar',
        apr: 'abr',
        may: 'may',
        jun: 'jun',
        jul: 'jul',
        aug: 'ago',
        sep: 'sep',
        oct: 'oct',
        nov: 'nov',
        dec: 'dic'
      }
    },
    select: {
      loading: 'Cargando',
      noMatch: 'No hay datos que coincidan',
      noData: 'Sin datos',
      placeholder: 'Seleccionar'
    },
    cascader: {
      noMatch: 'No hay datos que coincidan',
      loading: 'Cargando',
      placeholder: 'Seleccionar',
      noData: 'Sin datos'
    },
    pagination: {
      goto: 'Ir a',
      pagesize: '/página',
      total: 'Total {total}',
      pageClassifier: ''
    },
    messagebox: {
      confirm: 'Aceptar',
      cancel: 'Cancelar',
      error: 'Entrada inválida'
    },
    upload: {
      deleteTip: 'Pulse Eliminar para retirar',
      delete: 'Eliminar',
      preview: 'Vista Previa',
      continue: 'Continuar'
    },
    table: {
      emptyText: 'Sin Datos',
      confirmFilter: 'Confirmar',
      resetFilter: 'Reiniciar',
      clearFilter: 'Despejar',
      sumText: 'Suma'
    },
    tree: {
      emptyText: 'Sin Datos'
    },
    transfer: {
      noMatch: 'No hay datos que coincidan',
      noData: 'Sin datos',
      titles: ['Lista 1', 'Lista 2'],
      filterPlaceholder: '


n");
    var posJson = jsonDecode(positionJsonStr);
    var posMap = posJson["list"] as Map;
    var keysJson = jsonDecode(keysJsonStr) as List;
    var result = <String, HeroInfo>{};
    for (var keyJson in keysJson) {
      var hero = HeroInfo();
      var heroId = keyJson["heroId"] as String;
      var pos = posMap[heroId];
      if (pos != null) {
        hero.roadType = (pos as Map).keys.map((e) {
          if (e == "top") {
            return "上路";
          }
          if (e == "mid") {
            return "中路";
          }
          if (e == "jungle") {
            return "打野";
          }
          if (e == "support") {
            return "辅助";
          }
          if (e == "bottom") {
            return "下路";
          }
          return "";
        }).join(",");
      }
      hero.searchKey = keyJson["keywords"];
      hero.id = keyJson["alias"];
      result[keyJson["alias"]] = hero;
    }
    return result;
  }

  @override
  Future<List<HeroInfo>> getHeroList() async {
    if (heroList == null) {
      var heroPositionMap = await getHeroPositionInfo();
      var jsonStr =
          await rootBundle.loadString("assets/lol/data/champion.json");
      var heroJson = jsonDecode(jsonStr);
      var heroMap = heroJson["data"] as Map;
      var heroList = <HeroInfo>[];
      for (var heroItem in heroMap.values) {
        var id = heroItem["id"] as String;
        var name = heroItem["name"] as String;
        var nickname = heroItem["title"] as String;
        var attr = HeroBaseAttr.fromJson(heroItem["stats"]);
        heroList.add(
          HeroInfo(
            heroId: heroItem["key"],
            name: name,
            nickname: nickname,
            iconUrl: "assets/lol/img/champion/$id.png",
            baseAttr: attr,
            searchKey: heroPositionMap[id]?.searchKey ?? "$name,$nickname",
            roadType: heroPositionMap[id]?.roadType,
          ),
        );
      }
      this.heroList = heroList;
    }
    return heroList!;
  }

  @override
  Future<bool> favoriteHero(HeroInfo hero) async {
    return false;
  }

  @override
  Future<List<HeroSpell>> getHeroSpell(String id) {
    // TODO: implement getHeroSpell
    throw UnimplementedError();
  }

  @override
  Future<String?> getHeroIcon(String? heroId) async {
    if (heroId == null) {
      return null;
    }
    var list = await getHeroList();
    var first = list.where((element) => element.heroId == heroId).firstOrNull;
    return first?.iconUrl;
  }

  @override
  Future<HeroInfo?> getHeroInfo(String? heroId) async {
    if (heroId == null) {
      return null;
    }
    var list = await getHeroList();
    return list.where((element) => element.heroId == heroId).firstOrNull;
  }
}
import 'package:fluent_ui/fluent_ui.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/rendering.dart';

class PopupStack extends Stack {
  PopupStack({
    super.key,
    super.alignment,
    super.textDirection,
    super.fit,
    super.clipBehavior,
    super.children,
  });

  @override
  RenderStack createRenderObject(BuildContext context) {
    return PopupRenderStack(


le) {
      addMatches(prefix, mod.getFeatures(), result)
    }
    return CompletionResult(result)
  }

  private fun addMatches(
    prefix: String,
    entries: List<String>,
    result: MutableList<CompletionItem>
  ) {
    for (entry in entries) {
      val match =
        if (entry.contains('.')) {
          match(entry.substringAfterLast('.'), entry, prefix)
        } else {
          matchLevel(entry, prefix)
        }

      if (match == NO_MATCH) {
        continue
      }

      val item = createEnumOrFlagCompletionItem(ResourceTableRegistry.PCK_ANDROID, entry, match)
      item.insertText = entry
      item.insertTextFormat = PLAIN_TEXT
      result.add(item)
    }
  }

  private fun getModule(): ModuleProject {
    return Lookup.getDefault().lookup(ModuleProject.COMPLETION_MODULE_KEY)
      ?: throw IllegalStateException("No module project provided")
  }

  override fun findResourceTables(nsUri: String?): Set<IResourceTable> {
    val tables = manifestResourceTable().toMutableSet()
    if (nsUri.isNullOrBlank()) {
      return tables
    }
    tables.addAll(super.findResourceTables(nsUri))
    log.info("Found ${tables.size} resource tables for namespace: $nsUri")
    return tables
  }
}
/*
 *  This file is part of AndroidIDE.
 *
 *  AndroidIDE is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  AndroidIDE is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *   along with AndroidIDE.  If not, see <https://www.gnu.org/licenses/>.
 */

package com.itsaky.androidide.javac.services.visitors

import com.itsaky.androidide.javac.services.visitors.FindAnonymousVisitor.Mode.CHECK
import com.itsaky.androidide.javac.services.visitors.FindAnonymousVisitor.Mode.COLLECT
import openjdk.source.tree.ClassTree
import openjdk.source.tree.MethodTree
import openjdk.source.tree.Tree
import openjdk.source.tree.VariableTree

/**
 * Partial reparse helper visitor. Finds anonymous and local classes in given method tree.
 *
 * @author Akash Yadav
 */
class FindAnonymousVisitor : ErrorAwareTreeScanner<Unit, Unit>() {

  private enum class Mode {
    COLLECT,
    CHECK
  }

  var noInner = 0
  var hasLocalClass = false
  val docOwners: MutableSet<Tree> = HashSet<Tree>()
  private var mode = COLLECT

  fun reset() {
    noInner = 0
    hasLocalClass = false
    mode = CHECK
  }

  override fun visitClass(node: ClassTree, p: Unit?): Unit? {
    if (node.simpleName.isNotEmpty()) {
      hasLocalClass = true
    }

    noInner++
    handleDoc(node)
    return super.visitClass(node, p)
  }

  override fun visitMethod(node: MethodTree, p: Unit?): Unit? {
    handleDoc(node)
    return super.visitMethod(node, p)
  }

  override fun visitVariable(node: VariableTree, p: Unit?): Unit? {
    handleDoc(node)
    return super.visitVariable(node, p)
  }

  private fun handleDoc(tree: Tree) {
    if (mode == COLLECT) {
      docOwners.add(tree)
    }
  }
}
/*
 *  This file is part of AndroidIDE.
 *
 *  AndroidIDE is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software


 as F
from torchvision.utils import save_image

from watermark_anything.data.metrics import msg_predict_inference
from notebooks.inference_utils import (
    load_model_from_checkpoint, default_transform, unnormalize_img,
    create_random_mask, plot_outputs, msg2str
)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

# Load the model from the specified checkpoint
exp_dir = "checkpoints"
json_path = os.path.join(exp_dir, "params.json")
ckpt_path = os.path.join(exp_dir, 'checkpoint.pth')
wam = load_model_from_checkpoint(json_path, ckpt_path).to(device).eval()

# Define the directory containing the images to watermark
img_dir = "assets/images"  # Directory containing the original images
output_dir = "outputs"  # Directory to save the watermarked images
os.makedirs(output_dir, exist_ok=True)
```
</details>

> [!TIP]
> You can specify the `wam.scaling_w` factor, which controls the imperceptibility/robustness trade-off. Increasing it will lead to worse images but more robust watermarks, and vice versa.
> By default, it is set to 2.0, feel free to increase or decrease it to test how it influences the metrics.

### Single Watermark

Example of script for watermark embedding, detection and decoding for one message:

```py
# Define a 32-bit message to be embedded into the images
wm_msg = torch.randint(0, 2, (32,)).float().to(device)

# Proportion of the image to be watermarked (0.5 means 50% of the image).
# This is used here to show the watermark localization property. In practice, you may want to use a predifined mask or the entire image.
proportion_masked = 0.5

# Iterate over each image in the directory
for img_ in os.listdir(img_dir):
    # Load and preprocess the image
    img_path = os.path.join(img_dir, img_)
    img = Image.open(img_path).convert("RGB")
    img_pt = default_transform(img).unsqueeze(0).to(device)  # [1, 3, H, W]

    # Embed the watermark message into the image
    outputs = wam.embed(img_pt, wm_msg)

    # Create a random mask to watermark only a part of the image
    mask = create_random_mask(img_pt, num_masks=1,mask_percentage=proportion_masked)  # [1, 1, H, W]
    img_w = outputs['imgs_w'] * mask + img_pt * (1 - mask)  # [1, 3, H, W]

    # Detect the watermark in the watermarked image
    preds = wam.detect(img_w)["preds"]  # [1, 33, 256, 256]
    mask_preds = F.sigmoid(preds[:, 0, :, :])  # [1, 256, 256], predicted mask
    bit_preds = preds[:, 1:, :, :]  # [1, 32, 256, 256], predicted bits

    # Predict the embedded message and calculate bit accuracy
    pred_message = msg_predict_inference(bit_preds, mask_preds).cpu().float()  # [1, 32]
    bit_acc = (pred_message == wm_msg).float().mean().item()

    # Save the watermarked image and the detection mask
    mask_preds_res = F.interpolate(mask_preds.unsqueeze(1), size=(img_pt.shape[-2], img_pt.shape[-1]), mode="bilinear", align_corners=False)  # [1, 1, H, W]
    save_image(unnormalize_img(img_w), f"{output_dir}/{im


  "stake-in",
		Short: "stake-in <username> --amount <lino>",
		Args:  cobra.ExactArgs(1),
		RunE: func(cmd *cobra.Command, args []string) error {
			ctx := client.NewCoreContextFromViper().WithTxEncoder(linotypes.TxEncoder(cdc))
			user := linotypes.AccountKey(args[0])
			amount := viper.GetString(FlagAmount)
			msg := types.StakeInMsg{
				Username: user,
				Deposit:  amount,
			}
			return ctx.DoTxPrintResponse(msg)
		},
	}
	cmd.Flags().String(FlagAmount, "", "amount of stake in")
	_ = cmd.MarkFlagRequired(FlagAmount)
	return cmd
}

// GetCmdStakeout -
func GetCmdStakeout(cdc *codec.Codec) *cobra.Command {
	cmd := &cobra.Command{
		Use:   "stake-out",
		Short: "stake-out <username> --amount <lino>",
		Args:  cobra.ExactArgs(1),
		RunE: func(cmd *cobra.Command, args []string) error {
			ctx := client.NewCoreContextFromViper().WithTxEncoder(linotypes.TxEncoder(cdc))
			user := linotypes.AccountKey(args[0])
			amount := viper.GetString(FlagAmount)
			msg := types.StakeOutMsg{
				Username: user,
				Amount:   amount,
			}
			return ctx.DoTxPrintResponse(msg)
		},
	}
	cmd.Flags().String(FlagAmount, "", "amount of stake in")
	_ = cmd.MarkFlagRequired(FlagAmount)
	return cmd
}

// GetCmdClaimInterest -
func GetCmdClaimInterest(cdc *codec.Codec) *cobra.Command {
	cmd := &cobra.Command{
		Use:   "claim-interest",
		Short: "claim-interest username",
		Args:  cobra.ExactArgs(1),
		RunE: func(cmd *cobra.Command, args []string) error {
			ctx := client.NewCoreContextFromViper().WithTxEncoder(linotypes.TxEncoder(cdc))
			username := linotypes.AccountKey(args[0])
			msg := types.ClaimInterestMsg{
				Username: username,
			}
			return ctx.DoTxPrintResponse(msg)
		},
	}
	return cmd
}

// GetCmdStakeinFor - stakeinFor
func GetCmdStakeinFor(cdc *codec.Codec) *cobra.Command {
	cmd := &cobra.Command{
		Use:   "stake-in-for",
		Short: "stake-in-for <from> --to <bar> --amount <lino>",
		Args:  cobra.ExactArgs(1),
		RunE: func(cmd *cobra.Command, args []string) error {
			ctx := client.NewCoreContextFromViper().WithTxEncoder(linotypes.TxEncoder(cdc))
			from := linotypes.AccountKey(args[0])
			to := linotypes.AccountKey(viper.GetString(FlagTo))
			amount := viper.GetString(FlagAmount)
			msg := types.StakeInForMsg{
				Sender:   from,
				Deposit:  amount,
				Receiver: to,
			}
			return ctx.DoTxPrintResponse(msg)
		},
	}
	cmd.Flags().String(FlagAmount, "", "amount of stake in")
	cmd.Flags().String(FlagTo, "", "receiver username")
	_ = cmd.MarkFlagRequired(FlagTo)
	_ = cmd.MarkFlagRequired(FlagAmount)
	return cmd
}
package cli

import (
	// "fmt"

	"github.com/cosmos/cosmos-sdk/client"
	"github.com/


nent::INVALID:  return "INVALID";  break;
    case Component::USE:      return "USE";      break;
    case Component::USE_DEF:  return "USE_DEF";  break;
    case Component::USE_KILL: return "USE_KILL"; break;
    case Component::KILL:     return "KILL";     break;
    case Component::TEMP:     return "TEMP";     break;
    case Component::DEF:      return "DEF";      break;
    case Component::CALL:     return "CALL";     break;
    default: assert(false, "unknown effect");
  }
  return "Undefined Use/Def info";
}

Effect::Effect(const char *name) : _name(name), _use_def(effect_lookup(name)) {
  _ftype = Form::EFF;
}

Effect::~Effect() {
}

// Dynamic type check
Effect *Effect::is_effect() const {
  return (Effect*)this;
}

// True if this component is equal to the parameter.
bool Effect::is(int use_def_kill_enum) const {
  return (_use_def == use_def_kill_enum ? true : false);
}
// True if this component is used/def'd/kill'd as the parameter suggests.
bool Effect::isa(int use_def_kill_enum) const {
  return (_use_def & use_def_kill_enum) == use_def_kill_enum;
}

void Effect::dump() {
  output(stderr);
}

void Effect::output(FILE *fp) {          // Write info to output files
  fprintf(fp,"Effect: %s\n", (_name?_name:""));
}

//------------------------------ExpandRule-------------------------------------
ExpandRule::ExpandRule() : _expand_instrs(),
                           _newopconst(cmpstr, hashstr, Form::arena) {
  _ftype = Form::EXP;
}

ExpandRule::~ExpandRule() {                  // Destructor
}

void ExpandRule::add_instruction(NameAndList *instruction_name_and_operand_list) {
  _expand_instrs.addName((char*)instruction_name_and_operand_list);
}

void ExpandRule::reset_instructions() {
  _expand_instrs.reset();
}

NameAndList* ExpandRule::iter_instructions() {
  return (NameAndList*)_expand_instrs.iter();
}

void ExpandRule::dump() {
  output(stderr);
}

void ExpandRule::output(FILE *fp) {         // Write info to output files
  NameAndList *expand_instr = NULL;
  const char *opid = NULL;

  fprintf(fp,"\nExpand Rule:\n");

  // Iterate over the instructions 'node' expands into
  for(reset_instructions(); (expand_instr = iter_instructions()) != NULL; ) {
    fprintf(fp,"%s(", expand_instr->name());

    // iterate over the operand list
    for( expand_instr->reset(); (opid = expand_instr->iter()) != NULL; ) {
      fprintf(fp,"%s ", opid);
    }
    fprintf(fp,");\n");
  }
}

//------------------------------RewriteRule------------------------------------
RewriteRule::RewriteRule(char* params, char* block)
  : _tempParams(params), _tempBlock(block) { };  // Constructor
RewriteRule::~RewriteRule() {                 // Destructor
}

void RewriteRule::dump() {
  output(stderr);
}

void RewriteRule::output(FILE *fp) {         // Write info to output files
  fprintf(fp,"\nRewrite Rule:\n%s\n%s\n",
          (_tempParams?_tempParams:""),
          (_tempBlock?_tempBlock:""));
}

//==============================MachNodes======================================
//------------------------------MachNodeForm-----------------------------------
MachNodeForm::MachNodeForm(char *id)
  : _ident(id) {
}

MachNodeForm::~MachNodeForm() {
}

MachNodeForm *MachNode


from django import template
from django.templatetags.static import static
from django.core.cache import cache

from webp_converter.utils import make_image_key
from webp_converter.models import WebPImage

register = template.Library()

@register.simple_tag(takes_context=True)
def static_webp(context, static_path, quality=80):
    try:
        webp_compatible = context["webp_compatible"]
    except KeyError:
        raise Exception(
            "'webp_converter.context_processors.webp_support' "
            "needs to be added to your context processors."
        )
    if not webp_compatible:
        return static(static_path)
    key = make_image_key(static_path, quality)
    webp_image_url = cache.get(key)
    if not webp_image_url:
        webp_image, _ = WebPImage.objects.get_or_create(
            static_path=static_path, quality=quality
        )
        if not webp_image.webp_image_exists:
            webp_image.save_webp_image()
        webp_image_url = webp_image.webp_url
        cache.set(key, webp_image_url)
    return webp_image_url


onTryGetCoreVar(eq.e1) && eq.e2.depth() == 0)
            types.push({ x: ExpressionTryGetCoreVar(eq.e1), T: (<any>eq.e2).v.getType() });
    for (var eq of eqs.concat(neq))
    {
        if (eq.e1.depth() > 1)
            types.push({ x: ExpressionTryGetCoreVar(eq.e1), T: null });
        if (eq.e2.depth() > 1)
            types.push({ x: ExpressionTryGetCoreVar(eq.e2), T: null });
    }
    // sort
    types.sort((a, b) => a.x < b.x ? -1 : 1);
    // reduce
    var typesRed: { x: string, T: Type }[] = [];
    for (var type of types)
    {
        var newEntry = typesRed.length == 0 || typesRed[typesRed.length - 1].x != type.x;
        if (newEntry)
            typesRed.push(type);
        var entry = typesRed[typesRed.length - 1];
        var intersection = Type.intersect(entry.T, type.T);
        if (intersection.impossible)
            knownToBeFalse = true;
        else
            entry.T = intersection.t;
    }
    types = typesRed;

    return {
        access: accs,
        equalities: eqs,
        inEqualities: neq,
        types: types,
        knownToBeFalse: knownToBeFalse
    };
}

// pot. false negatives!
export function vfdImpliesApprox(
    data1: VerificationFormulaData,
    data2: VerificationFormulaData): boolean
{
    if (data1.knownToBeFalse)
        return true;

    // --equalities
    for (var eq2 of data2.equalities)
    {   // prove eq2!
        if (data1.equalities.some(eq1 => ExpressionPairEq(eq1, eq2)))
            continue; // found exact match
        return false;
    }
    // here: equalities GUARANTEED to be implied

    // --inEqualities
    for (var neq2 of data2.inEqualities)
    {   // prove neq2!
        if (data1.inEqualities.some(neq1 => ExpressionPairEq(neq1, neq2)))
            continue; // found exact match
        // try simple arithmetic
        if (neq2.e2.depth() == 0)
        {
            var val2 = neq2.e2;
            var data1s = data1.equalities.filter(eq1 => Expression.eq(neq2.e1, eq1.e1) && eq1.e2.depth() == 0);
            if (data1s.length != 0)
            {
                var val1 = data1s[0].e2;
                if (!Expression.eq(val1, val2))
                    continue; // found witness for arithmetic inequality
            }
        }
        return false;
    }
    // here: inEqualities GUARANTEED to be implied

    // --access
    var acc1s = data1.access;
    for (var acc2 of data2.access)
    {   // prove acc2!
        if (acc1s.some(acc1 => Expression.eq(acc1.e, acc2.e) && acc1.f == acc2.f))
        {
            acc1s = acc1s.filter(acc1 => !(Expression.eq(acc1.e, acc2.e) && acc1.f == acc2.f));
            continue; // found exact match
        }
        return false;
    }
    // here: access GUARANTEED to be implied

    // --type
    for (var ty2 of data2.types)
    {   // prove acc2!
        var ty1s = data


;
    /**
     * File size
     *
     * @property size
     */
    this.size = file.size;

    /**
     * URL string containing image data.
     *
     * @property data
     */
    this.data = undefined;
  };

}));
var pModel = {
  "scoring": {
    "size": [20, 22],
    "bias": -1.3970965781063711,
    "coef": [-0.019443206312618266, -0.0084626551369373984, -0.0056439963412376806, -0.0030632716896851417, 0.0050581938798613096, 0.0038671999692946632, 0.0073781421893252819, 0.008408844556368901, 0.0021079916674897471, 0.0088021517989660455, 0.0084634202851292546, 0.0091341881048755593, 0.0021677708519095705, 0.0057905826022958259, 0.010027042924308791, 0.010018015835686447, 0.011074574130386098, -0.00061695783617744283, -0.0060840083569450205, -0.0094487678808903661, -0.012441209862965338, -0.0038650406223106025, -0.00031049888008515014, 0.003187872856386012, 0.0078183021180926356, 0.010960251877128001, 0.012100913210202307, 0.012289318801648701, 0.012872315936395949, 0.0134197639066574, 0.012863004278393353, 0.012570470005854794, 0.0144288424245574, 0.013339430524005279, 0.013248442014867023, 0.012998181709015256, 0.0080561986303109411, 0.0014670228332206666, -0.011928206846124195, -0.0097909276659884133, -0.019951337591485003, -0.014601516863452837, -0.013174779761633797, -0.0060514903696567476, -0.0010407140556988824, 0.0054650997555345483, 0.010448591237341475, 0.014061216421035866, 0.015918382919452134, 0.016360925963435087, 0.02175676516818845, 0.017301016139781272, 0.014195207612699818, 0.012452400847919372, 0.010454129710215853, 0.0040883019269826832, -0.0014194361456059026, -0.0038498599142176948, -0.010769873280441659, -0.011758097810167857, -0.0046927302624985654, -0.0022134112349382041, -0.0039804434067522172, -0.012186682535867691, -0.011886732829841436, -0.008198434083715244, 0.0028353930104073055, 0.0070820189528775831, 0.012238372017639833, 0.016348014515026394, 0.020980251210150468, 0.01731275318263429, 0.01186526524722499, 0.007237133559106634, 0.0028787582373227981, -0.007467321804467685, -0.012293394385884527, -0.014833951237083715, -0.0083886394867411403, -0.001277206299448029, -0.0043237762267366413, -0.00079995554890789644, -0.0090446939377834615, -0.015715154398522533, -0.016374353020164909, -0.018048467332774626, -0.012034275948581882, -0.0072430439975880896, 0.00051252407841081971, 0.013091943912572559, 0.018570409085074381, 0.013098815816852492, 0.0008591564011330168, -0.0064555113363009954, -0.014574145037132261, -0.018221531408352937, -0.01805986873321162, -0.016665959992610131, -0.016742981997331947, -0.


能·三亚湾美丽五区(海虹路东) 鲁能三亚湾美丽五区", "三亚市三亚市吉阳区海韵路19号 金陵海景花园", "海南省三亚市河东区迎宾路165号(迎宾路与凤凰路交汇处附近) 中铁子悦薹", "三亚湾路114号 绿海田园", "三亚市凤凰路157号华庭天下（河东路与凤凰路交汇处） 华庭天下", "三亚市迎宾路345号 同心家园-一期", "榆亚路115号 大东海花园", "吉阳区凤凰路美丽之冠北侧300米 汇丰国际公寓", "三亚市凤凰路38号(免税店以北200米) 京海成·鹿港溪山", "二二三国道海棠花幼儿园斜对面 龙海风情小镇", "海南省三亚市吉阳区金鸡岭路438号 三亚海岳半岛成邦", "海南省三亚市吉阳区春光路21号 丽冠雅居", "荔枝沟路8号 怡和豪庭", "迎宾路中段右转高园河路东侧 湖光山舍", "三亚市凤凰路北侧妙林田洋(凯丰大酒店对面) 华庭·时光里", "三亚市二二三国道 福瑞国际公馆", "内蒙古自治区呼和浩特市赛罕区如意开发区东二环五纬路附近 讨号板村", "玉泉鄂尔多斯大街与云中路交汇南500米路西 西岸国际", "鄂尔多斯大街与丰州路交汇处 竹园小区", "新城赛马场北路,距北郊公园400米 城市维也纳", "赛罕区大学东街与丰州南路交叉口东 巨华·巨海城1区", "呼和浩特市赛罕区展览馆西路1号 长乐湾住宅小区", "东二环路曙光中学对面（乌兰恰特大剧院北500米） 首府观邸", "内蒙古自治区呼和浩特市新城区长海巷3号 长城住宅小区", "内蒙古自治区呼和浩特市赛罕区银河南街 荷塘月色", "新华东街78号（艺校对面农发银行东50米） 华门世家", "巴彦淖尔


), %zmm24, %zmm18

// CHECK: vpaddsw %zmm28, %zmm17, %zmm20
// CHECK:  encoding: [0x62,0x81,0x75,0x40,0xed,0xe4]
          vpaddsw %zmm28, %zmm17, %zmm20

// CHECK: vpaddsw %zmm28, %zmm17, %zmm20 {%k2}
// CHECK:  encoding: [0x62,0x81,0x75,0x42,0xed,0xe4]
          vpaddsw %zmm28, %zmm17, %zmm20 {%k2}

// CHECK: vpaddsw %zmm28, %zmm17, %zmm20 {%k2} {z}
// CHECK:  encoding: [0x62,0x81,0x75,0xc2,0xed,0xe4]
          vpaddsw %zmm28, %zmm17, %zmm20 {%k2} {z}

// CHECK: vpaddsw (%rcx), %zmm17, %zmm20
// CHECK:  encoding: [0x62,0xe1,0x75,0x40,0xed,0x21]
          vpaddsw (%rcx), %zmm17, %zmm20

// CHECK: vpaddsw 4660(%rax,%r14,8), %zmm17, %zmm20
// CHECK:  encoding: [0x62,0xa1,0x75,0x40,0xed,0xa4,0xf0,0x34,0x12,0x00,0x00]
          vpaddsw 4660(%rax,%r14,8), %zmm17, %zmm20

// CHECK: vpaddsw 8128(%rdx), %zmm17, %zmm20
// CHECK:  encoding: [0x62,0xe1,0x75,0x40,0xed,0x62,0x7f]
          vpaddsw 8128(%rdx), %zmm17, %zmm20

// CHECK: vpaddsw 8192(%rdx), %zmm17, %zmm20
// CHECK:  encoding: [0x62,0xe1,0x75,0x40,0xed,0xa2,0x00,0x20,0x00,0x00]
          vpaddsw 8192(%rdx), %zmm17, %zmm20

// CHECK: vpaddsw -8192(%rdx), %zmm17, %zmm20
// CHECK:  encoding: [0x62,0xe1,0x75,0x40,0xed,0x62,0x80]
          vpaddsw -8192(%rdx), %zmm17, %zmm20

// CHECK: vpaddsw -8256(%rdx), %zmm17, %zmm20
// CHECK:  encoding: [0x62,0xe1,0x75,0x40,0xed,0xa2,0xc0,0xdf,0xff,0xff]
          vpaddsw -8256(%rdx), %zmm17, %zmm20

// CHECK: vpaddusb %zmm22, %zmm27, %zmm19
// CHECK:  encoding: [0x62,0xa1,0x25,0x40,0xdc,0xde]
          vpaddusb %zmm22, %zmm27, %zmm19

// CHECK: vpaddusb %zmm22, %zmm27, %zmm19 {%k7}
// CHECK:  encoding: [0x62,0xa1,0x25,0x47,0xdc,0xde]
          vpaddusb %zmm22, %zmm27, %zmm19 {%k7}

// CHECK: vpaddusb %zmm22, %zmm27, %zmm19 {%k7} {z}
// CHECK:  encoding: [0x62,0xa1,0


器
            tabLayout.setupWithViewPager(viewPager); //将tabLayout与viewPager建立匹配
        });

}

    @Override
    protected View getBarView() {
        return title_count;
    }

    @Override
    protected void initTitle() {
        super.initTitle();
        iv_left_icon.setOnClickListener(v -> popToBack());
    }

}
/*
 * Copyright (C) 2021 dreamn(dream@dreamn.cn)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package cn.dreamn.qianji_auto.core.broadcast;

import static cn.dreamn.qianji_auto.ui.utils.HandlerUtil.HANDLE_OK;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;

import androidx.annotation.NonNull;

import cn.dreamn.qianji_auto.bills.BillInfo;
import cn.dreamn.qianji_auto.bills.SendDataToApp;
import cn.dreamn.qianji_auto.data.data.RegularCenter;
import cn.dreamn.qianji_auto.data.database.Db;
import cn.dreamn.qianji_auto.setting.AppInfo;
import cn.dreamn.qianji_auto.ui.utils.HandlerUtil;
import cn.dreamn.qianji_auto.utils.runUtils.Log;
import cn.dreamn.qianji_auto.utils.runUtils.TaskThread;

public class XposedBroadcast extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        if (action == null) return;

        if (action.equals("cn.dreamn.qianji_auto.XPOSED_LOG")) {
            Bundle extData = intent.getExtras();
            if (extData == null) return;
            String tag = extData.getString("tag");
            String msg = extData.getString("msg");
            Log.i("Xposed日志-" + tag, msg);
        } else if (action.equals("cn.dreamn.qianji_auto.XPOSED")) {
            Bundle extData = intent.getExtras();
            if (extData == null) return;
            String data = extData.getString("data").replace("\t", "").replace("\n", "n");
            String identify = extData.getString("app_identify");
            String app = extData.getString("app_package");
            String appName = extData.getString("app_name");
            Log.i("Xposed - 自动记账", "自动记账收到数据：AppName:" + appName + ",源自:" + app + ",数据：" + data);
            TaskThread.onThread(() -> {
                Db.db.AppDataDao().add(data, identify, app);
            });
            Handler mHandler = new Handler(Looper.getMainLooper()) {
                @Override
                public void handleMessage(@NonNull Message msg) {
                    BillInfo billInfo = (BillInfo) msg.obj;
                    billInfo.setFromApp(AppInfo.getName(context, app));

                    //  billInfo.setFromApp(app);


l.Token(influxql.AND), LHS: yyDollar[1].expr, RHS: yyDollar[3].expr}
		}
	case 11:
		yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:221
		{
			yyVAL.expr = &influxql.BinaryExpr{Op: influxql.Token(influxql.OR), LHS: yyDollar[1].expr, RHS: yyDollar[3].expr}
		}
	case 12:
		yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:227
		{
			yyVAL.expr = yyDollar[1].expr
		}
	case 13:
		yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:231
		{
			yyVAL.expr = yyDollar[1].expr
		}
	case 14:
		yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:237
		{
			yyVAL.expr = yyDollar[1].expr
		}
	case 15:
		yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:243
		{
			yyVAL.expr = &influxql.BinaryExpr{Op: influxql.Token(influxql.AND), LHS: yyDollar[1].expr, RHS: yyDollar[2].expr}
		}
	case 16:
		yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:247
		{
			yyVAL.expr = &influxql.BinaryExpr{Op: influxql.Token(influxql.AND), LHS: yyDollar[1].expr, RHS: yyDollar[2].expr}
		}
	case 17:
		yyDollar = yyS[yypt-8 : yypt+1]
//line sql.y:253
		{
			unnest := &influxql.Unnest{}

			columnsemi, ok := yyDollar[3].expr.(*influxql.BinaryExpr)
			if !ok {
				yylex.Error("expexted BinaryExpr")
			}
			unnest.Expr = &influxql.Call{
				Name: "match_all",
				Args: []influxql.Expr{
					&influxql.VarRef{Val: columnsemi.RHS.(*influxql.StringLiteral).Val},
					columnsemi.LHS},
			}
			unnest.Aliases = []string{}
			for _, alias := range yyDollar[7].strSlice {
				unnest.Aliases = append(unnest.Aliases, alias)
				unnest.DstType = append(unnest.DstType, influxql.String)
			}

			yyVAL.unnest = unnest
		}
	case 18:
		yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:277
		{
			if _, ok := yyDollar[1].expr.(*influxql.VarRef); ok {
				yyVAL.strSlice = []string{yyDollar[1].expr.(*influxql.VarRef).Val}
			} else {
				yyVAL.strSlice = []string{yyDollar[1].expr.(*influxql.StringLiteral).Val}
			}
		}
	case 19:
		yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:285
		{
			if _, ok := yyDollar[1].expr.(*influxql.VarRef); ok {
				yyVAL.strSlice = append([]string{yyDollar[1].expr.(*influxql.VarRef).Val}, yyDollar[3].strSlice...)
			} else {
				yyVAL.strSlice = append([]string{yyDollar[1].expr.(*influxql.StringLiteral).


um.
  Plane get plane1 => _plane1;

  /// The third plane that defines the bounds of this frustum.
  Plane get plane2 => _plane2;

  /// The fourth plane that defines the bounds of this frustum.
  Plane get plane3 => _plane3;

  /// The fifth plane that defines the bounds of this frustum.
  Plane get plane4 => _plane4;

  /// The sixed plane that defines the bounds of this frustum.
  Plane get plane5 => _plane5;

  /// Create a new frustum without initializing its bounds.
  Frustum()
    : _plane0 = Plane(),
      _plane1 = Plane(),
      _plane2 = Plane(),
      _plane3 = Plane(),
      _plane4 = Plane(),
      _plane5 = Plane();

  /// Create a new frustum as a copy of [other].
  factory Frustum.copy(Frustum other) => Frustum()..copyFrom(other);

  /// Create a new furstum from a [matrix].
  factory Frustum.matrix(Matrix4 matrix) => Frustum()..setFromMatrix(matrix);

  /// Copy the [other] frustum into this.
  void copyFrom(Frustum other) {
    _plane0.copyFrom(other._plane0);
    _plane1.copyFrom(other._plane1);
    _plane2.copyFrom(other._plane2);
    _plane3.copyFrom(other._plane3);
    _plane4.copyFrom(other._plane4);
    _plane5.copyFrom(other._plane5);
  }

  /// Set this from [matrix].
  void setFromMatrix(Matrix4 matrix) {
    final me = matrix.storage;
    final me0 = me[0], me1 = me[1], me2 = me[2], me3 = me[3];
    final me4 = me[4], me5 = me[5], me6 = me[6], me7 = me[7];
    final me8 = me[8], me9 = me[9], me10 = me[10], me11 = me[11];
    final me12 = me[12], me13 = me[13], me14 = me[14], me15 = me[15];

    _plane0
      ..setFromComponents(me3 - me0, me7 - me4, me11 - me8, me15 - me12)
      ..normalize();
    _plane1
      ..setFromComponents(me3 + me0, me7 + me4, me11 + me8, me15 + me12)
      ..normalize();
    _plane2
      ..setFromComponents(me3 + me1, me7 + me5, me11 + me9, me15 + me13)
      ..normalize();
    _plane3
      ..setFromComponents(me3 - me1, me7 - me5, me11 - me9, me15 - me13)
      ..normalize();
    _plane4
      ..setFromComponents(me3 - me2, me7 - me6, me11 - me10, me15 - me14)
      ..normalize();
    _plane5
      ..setFromComponents(me3 + me2, me7 + me6, me11 + me10, me15 + me14)
      ..normalize();
  }

  /// Check if this contains a [point].
  bool containsVector3(Vector3 point) {
    if (_plane0.distanceToVector3(point) < 0.0) {
      return false;
    }

    if (_plane1.distanceToVector3(point) < 0.0) {
      return false;
    }

    if (_plane2.distanceToVector3(point) < 0.0) {
      return false;
    }

    if (_plane3.distanceToVector3(point) < 0.0) {
      return false;
    }

    if (_plane4.distanceToVector3(point) < 0.0) {
      return false;
    }

    if (_plane5.distanceToVector3(point) < 0.0) {
      return false;
    }

    return true;


E, A_NULL);
    class_addmethod(canvas_class, (t_method)canvas_reset_copyfromexternalbuffer,
        gensym("reset_copyfromexternalbuffer"), A_NULL);
/* -------------- connect method used in reading files ------------------ */
    class_addmethod(canvas_class, (t_method)canvas_connect,
        gensym("connect"), A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);

    class_addmethod(canvas_class, (t_method)canvas_disconnect,
        gensym("disconnect"), A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
/* -------------- copy buffer ------------------ */
    copy_binbuf = binbuf_new();

    abstracthandler_setup();
}

void canvas_editor_for_class(t_class *c)
{
    class_addmethod(c, (t_method)canvas_mousedown, gensym("mouse"),
        A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
    class_addmethod(c, (t_method)canvas_mouseup, gensym("mouseup"),
        A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
    class_addmethod(c, (t_method)canvas_key, gensym("key"),
        A_GIMME, A_NULL);
    class_addmethod(c, (t_method)canvas_motion, gensym("motion"),
        A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);

/* ------------------------ menu actions ---------------------------- */
    class_addmethod(c, (t_method)canvas_menuclose,
        gensym("menuclose"), A_DEFFLOAT, 0);
    class_addmethod(c, (t_method)canvas_find_parent,
        gensym("findparent"), A_NULL);
}

void g_editor_newpdinstance(void)
{
    // Have not ported multi-instance editor from pure-data
}

void g_editor_freepdinstance(void)
{
    // Have not ported multi-instance editor from pure-data
}


;written by Doug Fraker
;version 1.3, 10/31/2022

.export _set_vram_buffer, __multi_vram_buffer, __one_vram_buffer
.export _get_frame_count ;_get_pad_new
.export _check_collision, __pal_fade_to, _set_scroll_x, _set_scroll_y, __add_scroll_y, __sub_scroll_y, __sub_scroll_y_ext
.export  __get_ppu_addr, _get_at_addr
; .export _set_data_pointer, _set_mt_pointer, _buffer_1_mt, _buffer_4_mt
.export _color_emphasis, __xy_split, _gray_line, _seed_rng
.export _clear_vram_buffer

.segment "NESDOUG"

;void set_vram_buffer()
_set_vram_buffer:
	ldx #$ff
	stx VRAM_BUF
	stx <NAME_UPD_ENABLE
	inx ;x=0
	stx VRAM_INDEX
	rts
	; ldx #>VRAM_BUF
	; lda #<VRAM_BUF
	; jmp _set_vram_update

;void multi_vram_buffer_horz(void * data, uint8_t len, uint16_t ppu_address);
;void multi_vram_buffer_vert(void * data, uint8_t len, uint16_t ppu_address);
__multi_vram_buffer:
	; AX = ppu_address (X OR'd with corresponding value beforehand)
	; xargs[0] = len
	; sreg = data

	ldy VRAM_INDEX
	sta VRAM_BUF+1, y
	txa
	sta VRAM_BUF+0, y

_multi_vram_buffer_common:
	lda xargs+0
	sta VRAM_BUF+2, y
	;need y for source, x is for dest and for vram_index
	ldx VRAM_INDEX
	inx
	inx
	inx

	ldy #0
@loop:
	lda (sreg), y
	sta VRAM_BUF, x
	inx
	iny
	cpy xargs+0
	bne @loop
	lda #$ff ;=NT_UPD_EOF
	sta VRAM_BUF, x
	stx VRAM_INDEX
	rts

;void one_vram_buffer(uint8_t data, uint16_t ppu_address);
__one_vram_buffer:
	; ax = ppu_address
	; sreg[0] = data
	ldy VRAM_INDEX
	sta VRAM_BUF+1, y
	txa
	sta VRAM_BUF+0, y
	iny
	iny
	lda sreg
	sta VRAM_BUF, y
	iny
	lda #$ff ;=NT_UPD_EOF
	sta VRAM_BUF, y
	sty VRAM_INDEX
	rts

;void clear_vram_buffer();
_clear_vram_buffer:
	lda #0
	sta VRAM_INDEX
	lda #$ff
	sta VRAM_BUF
	rts

; ;uint8_t __fastcall__ get_pad_new(uint8_t pad);
; _get_pad_new:
; 	tay
; 	lda <PAD_STATET,y
; 	ldx #0
; 	rts

;uint8_t __fastcall__ get_frame_count();
_get_frame_count:
	lda <FRAME_CNT
	ldx #0
	rts

PTR2 = TEMP+2 ;and TEMP+3

.import _Generic, _Generic2
;uint8_t __fastcall__ check_collision(void * object1, void * object2);
; __check_collision:
_check_collision:
	; s


.832c-17.632-5.12-61.92-16.24-140.064-25.392 6.464-44.192 10-90.896 10-139.44 0-38.256-2.208-75.343-6.288-111.008 99.008-11.824 142.384-26.72 145.296-27.745l-11.92-33.584c22.24 53.088 34.56 111.296 34.56 172.336 0 58.193-11.28 113.761-31.583 164.833zM285.488 512.001c0-35.808 2.37-70.77 6.705-104.401 51.888 4.08 113.936 7.088 186.863 7.792v222.064c-70.992.688-131.664 3.568-182.688 7.473-7.04-42.193-10.88-86.88-10.88-132.928zM542.945 68.223c78.464 22.736 145.648 131.695 175.744 276.111-48.368 3.856-106.624 6.673-175.744 7.33V68.223zm-63.886.783V351.63c-68.368-.688-126.88-3.473-176.063-7.232C333.7 201.79 401.428 93.646 479.059 69.006zm0 632.223.001 253.743c-72.4-22.976-136.192-118.575-169.36-247.023 47.76-3.504 104.096-6.063 169.359-6.72zm63.888 254.543-.001-254.56c65.952.623 122.064 3.28 169.217 6.928-32.608 130.128-96 226.416-169.216 247.632zm-.001-318.32.001-222.032c73.311-.688 134.991-3.776 186.191-8a844.922 844.922 0 016.496 104.592c0 46.128-3.712 90.864-10.528 133.12-50.416-4.08-110.8-7.008-182.16-7.68zm371.858-323.52c-9.664 3.008-50.063 14.48-131.023 24.032-18.048-95.952-50.672-177.968-93.12-237.168C788.197 143.18 867.797 219.1 914.805 313.932zM358.82 90.589c-52.208 59.952-94.832 146.161-118.096 248.113-72.48-7.856-115.921-17.089-133.312-21.281 50.72-104.64 141.04-186.752 251.408-226.832zM83.637 377.182c12.32 3.344 58.913 14.941 145.553 24.525a795.86 795.86 0 00-7.68 110.305c0 48.273 4.368 94.721 12.24 138.688-74.4 8.033-120.16 17.649-140.688 22.609-19.44-50.096-30.208-104.447-30.208-161.312 0-46.96 7.312-92.256 20.783-134.815zm37.457 355.166c23.264-4.944 64.912-12.464 126.592-18.928 24.288 89.712 63.792 165.616 111.136 219.968-101.12-36.72-185.296-108.752-237.728-201.04zM690.662 923.18c38.224-53.264 68.48-125.024 87.296-208.801 63.408 7.28 103.216 15.792 123.296 20.864-48.016 83.072-121.855 149.393-210.592 187.937z"/></svg>';
  static const String globe_alt =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org


f SPEC_CTRL is unset or V_SPEC_CTRL is set */
	ALTERNATIVE_2 "", \
		"jmp 900f", X86_FEATURE_MSR_SPEC_CTRL, \
		"", X86_FEATURE_V_SPEC_CTRL
901:
.endm
.macro RESTORE_HOST_SPEC_CTRL_BODY spec_ctrl_intercepted:req
900:
	/* Same for after vmexit.  */
	mov $MSR_IA32_SPEC_CTRL, %ecx

	/*
	 * Load the value that the guest had written into MSR_IA32_SPEC_CTRL,
	 * if it was not intercepted during guest execution.
	 */
	cmpb $0, \spec_ctrl_intercepted
	jnz 998f
	rdmsr
	movl %eax, SVM_spec_ctrl(%_ASM_DI)
998:

	/* Now restore the host value of the MSR if different from the guest's.  */
	movl PER_CPU_VAR(x86_spec_ctrl_current), %eax
	cmp SVM_spec_ctrl(%_ASM_DI), %eax
	je 901b
	xor %edx, %edx
	wrmsr
	jmp 901b
.endm

/**
 * __svm_vcpu_run - Run a vCPU via a transition to SVM guest mode
 * @svm:	struct vcpu_svm *
 * @spec_ctrl_intercepted: bool
 */
SYM_FUNC_START(__svm_vcpu_run)
	push %_ASM_BP
	mov  %_ASM_SP, %_ASM_BP
#ifdef CONFIG_X86_64
	push %r15
	push %r14
	push %r13
	push %r12
#else
	push %edi
	push %esi
#endif
	push %_ASM_BX

	/*
	 * Save variables needed after vmexit on the stack, in inverse
	 * order compared to when they are needed.
	 */

	/* Accessed directly from the stack in RESTORE_HOST_SPEC_CTRL.  */
	push %_ASM_ARG2

	/* Needed to restore access to percpu variables.  */
	__ASM_SIZE(push) PER_CPU_VAR(svm_data + SD_save_area_pa)

	/* Finally save @svm. */
	push %_ASM_ARG1

.ifnc _ASM_ARG1, _ASM_DI
	/*
	 * Stash @svm in RDI early. On 32-bit, arguments are in RAX, RCX
	 * and RDX which are clobbered by RESTORE_GUEST_SPEC_CTRL.
	 */
	mov %_ASM_ARG1, %_ASM_DI
.endif

	/* Clobbers RAX, RCX, RDX.  */
	RESTORE_GUEST_SPEC_CTRL

	/*
	 * Use a single vmcb (vmcb01 because it's always valid) for
	 * context switching guest state via VMLOAD/VMSAVE, that way
	 * the state doesn't need to be copied between vmcb01 and
	 * vmcb02 when switching vmcbs for nested virtualization.
	 */
	mov SVM_vmcb01_pa(%_ASM_DI), %_ASM_AX
1:	vmload %_ASM_AX
2:

	/* Get svm->current_vmcb->pa into RAX. */
	mov SVM_current_vmcb(%_ASM_DI), %_ASM_AX
	mov KVM_VMCB_pa(%_ASM_AX), %_ASM_AX

	/* Load guest registers. */
	mov VCPU_RCX(%_ASM_DI), %_ASM_CX
	mov VCPU_RDX(%_ASM_DI), %_ASM_DX
	mov VCPU_RBX(%_ASM_DI), %_ASM_BX
	mov VCPU_RBP(%_ASM_DI), %_ASM_BP
	mov VCPU_RSI(%_ASM_DI), %_ASM_SI
#ifdef CONFIG_X86_64
	mov VCPU_R


# coding=utf-8
#  Copyright (c) 2001-2022, Hove and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
#     the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
#     powered by Hove (www.hove.com).
# Help us simplify mobility and open public transport:
#     a non ending quest to the responsive locomotion way of traveling!
#
# LICENCE: This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Stay tuned using
# twitter @navitia
# channel `#navitia` on riot https://riot.im/app/#/room/#navitia:matrix.org
# https://groups.google.com/d/forum/navitia
# www.navitia.io

from jormungandr.street_network.kraken import Kraken

def status_test():
    kraken = Kraken(instance=None, service_url=None, id=u"tata-é$~#@\"*!'`§èû", modes=["walking", "bike", "car"])

    status = kraken.status()
    assert len(status) == 3
    assert status['id'] == u'tata-é$~#@"*!\'`§èû'
    assert status['class'] == "Kraken"
    assert status['modes'] == ["walking", "bike", "car"]


Graphic EQ

	88
	77
	55
	33
	40
	45
	70

Combine horizontal and vertical sliders, each with their own options, to create the UI for a music player.

<!DOCTYPE html>

	<meta charset="utf-8">
	<title>jQuery UI Tabs - Content via Ajax</title>
	<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">

	<link rel="stylesheet" href="../demos.css">

Preloaded

Tab 1

Tab 2

Tab 3 (slow)

Tab 4 (broken)

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

Fetch external content via Ajax for the tabs by setting an href value in the tab links.  While the Ajax request is waiting for a response, the tab label changes to say "Loading...", then returns to the normal label once loaded.

Tabs 3 and 4 demonstrate slow-loading and broken AJAX tabs, and how to handle serverside errors in those cases. Note: These two require a webserver to interpret PHP. They won't work from the filesystem.

<!DOCTYPE html>

	<meta charset="utf-8">
	<title>jQuery UI Effects - Toggle Demo</title>
	<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">