n,search:r="",hash:a=""}="string"===typeof e?v(e):e,l=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:l,search:B(r),hash:$(a)}}(a,l),c=i&&"/"!==i&&i.endsWith("/"),d=(o||"."===i)&&n.endsWith("/");return u.pathname.endsWith("/")||!c&&!d||(u.pathname+="/"),u}const U=e=>e.join("/").replace(/\/\/+/g,"/"),A=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",$=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function W(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const V=["post","put","patch","delete"],H=(new Set(V),["get",...V]);new Set(H),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function Q(){return Q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Q.apply(this,arguments)}const q=a.createContext(null);const K=a.createContext(null);const Y=a.createContext(null);const X=a.createContext(null);const G=a.createContext({outlet:null,matches:[],isDataRoute:!1});const J=a.createContext(null);function Z(){return null!=a.useContext(X)}function ee(){return Z()||f(!1),a.useContext(X).location}function te(e){a.useContext(Y).static||a.useLayoutEffect(e)}function ne(){let{isDataRoute:e}=a.useContext(G);return e?function(){let{router:e}=de(ce.UseNavigateStable),t=he(fe.UseNavigateStable),n=a.useRef(!1);return te((()=>{n.current=!0})),a.useCallback((function(r,a){void 0===a&&(a={}),n.current&&("number"===typeof r?e.navigate(r):e.navigate(r,Q({fromRouteId:t},a)))}),[e,t])}():function(){Z()||f(!1);let e=a.useContext(q),{basename:t,future:n,navigator:r}=a.useContext(Y),{matches:l}=a.useContext(G),{pathname:o}=ee(),i=JSON.stringify(D(l,n.v7_relativeSplatPath)),u=a.useRef(!1);return te((()=>{u.current=!0})),a.useCallback((function(n,a){if(void 0===a&&(a={}),!u.current)return;if("number"===typeof n)return void r.go(n);let l=I(n,JSON.parse(i),o,"path"===a.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:U([t,l.pathname])),(a.replace?r.replace:r.push)(l,a.state,a)}),[t,r,i,o,e])}()}function re(e,t){let{relative:n}=void 0===t?{}:t,{future:r}=a.useContext(Y),{matches:l}=a.useContext(G),{pathname:o}=ee(),i=JSON.stringi


_link.dart";
import "package:http/http.dart" as http;
import "package:http_parser/http_parser.dart";
import "package:mockito/mockito.dart";
import "package:test/test.dart";

import "./helpers.dart";
import "./mocks/mocks.dart";

void main() {
  MockHttpClient? mockHttpClient;
  late HttpLink httpLink;

  const String uploadMutation = r"""
    mutation($files: [Upload!]!) {
      multipleUpload(files: $files) {
        id
        filename
        mimetype
        path
      }
    }
    """;

  // in the real world this could be a "file-based" search
  const String uploadQuery = r"""
    query($files: [Upload!]!) {
      multipleUpload(files: $files) {
        id
        filename
        mimetype
        path
      }
    }
    """;

  const expectedResponse = r"""
{
  "data": {
    "multipleUpload": [
      {
        "id": "r1odc4PAz",
        "filename": "sample_upload.jpg",
        "mimetype": "image/jpeg",
        "path": "./uploads/r1odc4PAz-sample_upload.jpg"
      },
      {
        "id": "5Ea18qlMur",
        "filename": "sample_upload.txt",
        "mimetype": "text/plain",
        "path": "./uploads/5Ea18qlMur-sample_upload.txt"
      }
    ]
  }
}
        """;

  List<http.MultipartFile> testFiles() => [
        http.MultipartFile.fromBytes(
          "",
          [0, 1, 254, 255],
          filename: "sample_upload.jpg",
          contentType: MediaType("image", "jpeg"),
        ),
        http.MultipartFile.fromString(
          "",
          "just plain text",
          filename: "sample_upload.txt",
          contentType: MediaType("text", "plain"),
        ),
      ];

  group("upload", () {
    late Request gqlRequest;
    setUp(() {
      mockHttpClient = MockHttpClient();

      httpLink = HttpLink(
        "http://localhost:3001/graphql",
        httpClient: mockHttpClient,
      );

      gqlRequest = Request(
        operation: Operation(
          document: parseString(uploadMutation),
        ),
        variables: <String, dynamic>{
          "files": testFiles(),
        },
      );
    });

    test("request encoding", () async {
      Uint8List? bodyBytes;
      when(
        mockHttpClient!.send(any),
      ).thenAnswer((i) async {
        bodyBytes = await (i.positionalArguments[0] as http.BaseRequest)
            .finalize()
            .toBytes();
        return simpleResponse(expectedResponse);
      });

      await httpLink.request(gqlRequest).first;

      final http.MultipartRequest request = verify(
        mockHttpClient!.send(captureAny),
      ).captured.first as http.MultipartRequest;

      final List<String> contentTypeStringSplit =
          request.headers["content-type"]!.split("; boundary=");

      expect(request.method, "POST");
      expect(request.url.toString(), "http://localhost:3001/graphql");
      expect(request.headers["accept"], "*/*");

      expect(contentTypeStringSplit[0], "multipart/form-data");

      final boundary = contentTypeStringSplit[1];
      expect(
        bodyBytes,
        equals(
          [
            ...utf8.encode(
              "--$boundary"
              '\r\ncontent-disposition: form-data; name="operations"\r\n\r\n'
              r"{"
              r'"operationName":null,'
              r'"variables":{"files":[null,null]},'
              r'"query":"mutation($files: [Upload!]!) {\n'
              r"  multipleUpload(files: $files) {\n    id\n    filen


x
    var dy = minorState.y - majorState.y
    var dz = minorState.z - majorState.z
    val R2 = dx*dx + dy*dy + dz*dz

    // R = Total distance between the bodies.
    val R = sqrt(R2)

    // Find the velocity vector <vx, vy, vz>.
    val vx = minorState.vx - majorState.vx
    val vy = minorState.vy - majorState.vy
    val vz = minorState.vz - majorState.vz

    if (point == 4 || point == 5) {
        // For L4 and L5, we need to find points 60 degrees away from the
        // line connecting the two bodies and in the instantaneous orbital plane.
        // Define the instantaneous orbital plane as the unique plane that contains
        // both the relative position vector and the relative velocity vector.

        // Take the cross product of position and velocity to find a normal vector <nx, ny, nz>.
        val nx = dy*vz - dz*vy
        val ny = dz*vx - dx*vz
        val nz = dx*vy - dy*vx

        // Take the cross product normal*position to get a tangential vector <ux, uy, uz>.
        var ux = ny*dz - nz*dy
        var uy = nz*dx - nx*dz
        var uz = nx*dy - ny*dx

        // Convert the tangential direction vector to a unit vector.
        val U = sqrt(ux*ux + uy*uy + uz*uz)
        ux /= U
        uy /= U
        uz /= U

        // Convert the relative position vector into a unit vector.
        dx /= R
        dy /= R
        dz /= R

        // Now we have two perpendicular unit vectors in the orbital plane: 'd' and 'u'.

        // Create new unit vectors rotated (+/-)60 degrees from the radius/tangent directions.
        val vert = if (point == 4) +sin_60 else -sin_60

        // Rotated radial vector
        val Dx = cos_60*dx + vert*ux
        val Dy = cos_60*dy + vert*uy
        val Dz = cos_60*dz + vert*uz

        // Rotated tangent vector
        val Ux = cos_60*ux - vert*dx
        val Uy = cos_60*uy - vert*dy
        val Uz = cos_60*uz - vert*dz

        // Use dot products to find radial and tangential components of the relative velocity.
        val vrad = vx*dx + vy*dy + vz*dz
        val vtan = vx*ux + vy*uy + vz*uz

        return StateVector(
            R * Dx,
            R * Dy,
            R * Dz,
            vrad*Dx + vtan*Ux,
            vrad*Dy + vtan*Uy,
            vrad*Dz + vtan*Uz,
            majorState.t
        )
    }

    // point = 1..3; all these lie on a straight line between the centers of the two bodies.
    // Calculate the distances of each body from their mutual barycenter.
    // r1 = negative distance of major mass from barycenter (e.g. Sun to the left of barycenter)
    // r2 = positive distance of minor mass from barycenter (e.g. Earth to the right of barycenter)
    val r1 = -R * (minorMass / (majorMass + minorMass))
    val r2 = +R * (majorMass / (majorMass + minorMass))

    // Calculate the square of the angular orbital speed in [rad^2 / day^2].
    val omega2 = (majorMass + minorMass) / (R2*R)

    // Use Newton's Method to numerically solve for the location where
    // outward centrifugal acceleration in the rotating frame of reference
    // is equal to net inward gravitational acceleration.
    // First derive a good initial guess based on approximate analysis.
    var scale: Double
    val numer1: Double


60 hertz
	REPT	31
	nop
	ENDR
	move.b	#2,$ffff820a.w	;back to 50 hertz
	move.l	#lower_border,$120.w
	rte

lower_border:
	move.w	fontpal,$ffff8240.w
	movem.l	fontpal,d0-d7
	movem.l	d0-d7,$ffff8240.w
	clr.b	$fffffa1b.w	;DI all other interrupts
	bclr	#0,$fffa0f
	rte

********
* Data *
********
	SECTION DATA
fontpal:
	dc.w	$000,$555,$100,$555,$210,$555,$320,$555
	dc.w	$430,$555,$541,$555,$652,$555,$763,$555

screen_base:	dc.l	0
old484:	dc.w	0
stack_save:	dc.l	0
vsync_flag:	dc.w	0
old70:	dc.l	0
old120:	dc.l	0
old118:	dc.l	0
olda07:	dc.b	0
olda09:	dc.b	0
olda17:	dc.b	0
olda1b:	dc.b	0
olda21:	dc.b	0
	even
old_base:	dc.l	0
counter:	dc.w	0
hertz_switch	dc.w	0

scroll_pointer:	dc.l	scroll_text+7
scroll_text:
 dc.b "                    PERSISTENCE OF VISION PACKED DEMO DISC 69.    "
 dc.b "ALL CODE BY MAC SYS DATA WITH GRAFIX BY OZ (SORRY I MADE THE "
 dc.b "PIC LOOK SO CLUTTERED).  "
 dc.b "THE BRILLIANT MUSIC IS BY MAD MAX AND WAS RIPPED FROM "
 dc.b "THE MEDWAYS BOYS (WRATH OF THE DEMON INTRO).   "
 DC.B "THIS DISC WAS CODED ON 6-4-91, TODAY IS A SPECIAL DAY 'CAUSE "
 DC.B "IT'S MY BIRTHDAY AND I'M 24 (OLD GIT).   THE TIME IS 19:06 "
 DC.B "AND YOU GET BET YOUR PANTS THAT I'LL BE DRINKING PLENTY "
 DC.B "OF THAITES BITTER TONIGHT.    ER, SPEAKING OF BETS, TODAY "
 DC.B "WAS THE GRAND NATIONAL BUT I FORGOT AND MISSED PUTTING A "
 DC.B "BET ON A TOTALLY DUFF HORSE THAT PROBABLY FELL AT THE FIRST FENCE!   "
 DC.B "   ANYWAY ONTO OTHER MATTERS...    IS THIS NOT AN EXCELLENT MENU?  "
 DC.B "  THE CODE TO MOVE ALL THE BITS AROUND IS PRETTY STRAIGHT "
 DC.B "FORWARD, THE MENU IS STUNNING BECAUSE WE HAVE THE "
 DC.B "BEST GRAFIX ARTIST IN LANCASHIRE - OZYMANDIAS.      "
 DC.B "P.O.V. COME FROM THE BLACKPOOL AREA AND ARE THE BEST DEMO "
 DC.B "PACKERS IN THE U.K.   YES, THERE ARE OTHER DEMO PACKERS WHO "
 DC.B "HAVE DONE MORE DISCS THAN WE HAVE BUT HAVE YOU SEEN THEIR MENUS? "
 DC.B "   WE PUT A CUSTOM MENU ONTO ALL OUR DISCS AND DO ALL OUR "
 DC.B "OWN CODING.    I HAVE SOME DEMO COMPILATIONS BY OTHER GROUPS "
 DC.B "AND THEY LOOK LIKE TRASH.   HOW CAN THEY GET AWAY WITH A 1 "
 DC.B "COLOUR SCROLLINE AND USE THE SAME TUNE ON 90 PERCENT OF THEIR DISCS? "
 DC.B "    I KNOW I'VE USE A 1 COLOUR SCROLLINE ABOUT TWICE BUT "
 DC.B "THAT WAS BECAUSE I WAS RUNNING TOP AND BOTTOM BORDER CODE "
 DC.B "WHICH INCORPORATED A SPECTRUM ANALYZER.   "
 DC.B "  TAKE A LO


                    val sofar = cursor.getLongOrNull(pix) ?: 0
                    val total = cursor.getLongOrNull(tix) ?: 1
                    cursor.close()

                    if (sofar == total) {
                        return Downloaded(item)
                    }

                    progress = (sofar * 1.0) / total

                    delay(1000L)
                }
            }

            fun onClick() {
                when (val s = status) {
                    is Downloaded -> {
                        viewModel.load(item.destination.path)
                    }

                    is Downloading -> {
                        coroutineScope.launch {
                            status = waitForDownload(s, item)
                        }
                    }

                    else -> {
                        item.destination.delete()

                        val request = DownloadManager.Request(item.source).apply {
                            setTitle("Downloading model")
                            setDescription("Downloading model: ${item.name}")
                            setAllowedNetworkTypes(DownloadManager.Request.NETWORK_WIFI)
                            setDestinationUri(item.destination.toUri())
                        }

                        viewModel.log("Saving ${item.name} to ${item.destination.path}")
                        Log.i(tag, "Saving ${item.name} to ${item.destination.path}")

                        val id = dm.enqueue(request)
                        status = Downloading(id)
                        onClick()
                    }
                }
            }

            Button(onClick = { onClick() }, enabled = status !is Downloading) {
                when (status) {
                    is Downloading -> Text(text = "Downloading ${(progress * 100).toInt()}%")
                    is Downloaded -> Text("Load ${item.name}")
                    is Ready -> Text("Download ${item.name}")
                    is Error -> Text("Download ${item.name}")
                }
            }
        }

    }
}
package com.gh0u1l5.wechatmagician.util

import android.content.ActivityNotFoundException
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import java.net.URISyntaxException

// Reference: http://blog.csdn.net/likesyour/article/details/61198577
object AlipayUtil {

    private const val ALIPAY_PACKAGE_NAME = "com.eg.android.AlipayGphone"
    private const val INTENT_URL_FORMAT = "intent://platformapi/startapp?saId=10000007&" +
            "clientVersion=3.7.0.0718&qrcode=https%3A%2F%2Fqr.alipay.com%2F{urlCode}%3F_s" +
            "%3Dweb-other&_t=1472443966571#Intent;" +
            "scheme=alipayqr;package=com.eg.android.AlipayGphone;end"

    fun hasInstalledAlipayClient(context: Context): Boolean {
        return try {
            val pm = context.packageManager
            pm.getPackageInfo(ALIPAY_PACKAGE_NAME, 0) != null
        } catch (e: PackageManager.NameNotFoundException) {
            e.printStackTrace(); false
        }
    }

    fun startAlipayClient(context: Context, urlCode: String): Boolean =
            startIntentUrl(context, INTENT_URL_FORMAT.replace("{urlCode}", urlCode))

    private fun startIntentUrl(context: Context, intentFullUrl: String): Boolean {
        return try {
            val intent = Intent.parseUri(intentFullUrl, Intent.URI_INTENT_SCHEME)
            context.startActivity(intent); true
        } catch (e: URISyntaxException) {
            e.printStackTrace(); false
        } catch (e: ActivityNotFoundException) {
            e.printStackTrace(); false
        }
    }
}package com.gh0u1l5.wechatmagician.util

import android.content.Context
import android


line_idx + math.max(1, n or 1)]
end

function Scanner:cur_line()
  return self.lines[self.line_idx]
end

function Scanner:cur_line_idx()
  return self.line_idx
end

---Advance the scanner to the next line.
---@return string?
function Scanner:next_line()
  self.line_idx = self.line_idx + 1
  return self.lines[self.line_idx]
end

---Advance the scanner by n lines.
---@param n? integer # (default: 1)
---@return string?
function Scanner:skip_line(n)
  self.line_idx = self.line_idx + math.max(1, n or 1)
  return self.lines[self.line_idx]
end

return Scanner


: %.2f [C]", msg->temperature);
}

void leftTempCallback(const sensor_msgs::Temperature::ConstPtr& msg)
{
  ROS_INFO("Left CMOS temperature: %.2f [C]", msg->temperature);
}

void rightTempCallback(const sensor_msgs::Temperature::ConstPtr& msg)
{
  ROS_INFO("Right CMOS temperature: %.2f [C]", msg->temperature);
}

void magCallback(const sensor_msgs::MagneticField::ConstPtr& msg)
{
  ROS_INFO("Mag. Field: %.3f,%.3f,%.3f [uT]", msg->magnetic_field.x * 1e-6, msg->magnetic_field.y * 1e-6,
           msg->magnetic_field.z * 1e-6);
}

void pressureCallback(const sensor_msgs::FluidPressure::ConstPtr& msg)
{
  ROS_INFO("Atmospheric Pressure: %.2f [hPa]", msg->fluid_pressure * 100.f);
}

/**
 * Node main function
 */
int main(int argc, char** argv)
{
  /**
   * The ros::init() function needs to see argc and argv so that it can perform
   * any ROS arguments and name remapping that were provided at the command line.
   * For programmatic remappings you can use a different version of init() which takes
   * remappings directly, but for most command-line programs, passing argc and argv is
   * the easiest way to do it.  The third argument to init() is the name of the node.
   *
   * You must call one of the versions of ros::init() before using any other
   * part of the ROS system.
   */
  ros::init(argc, argv, "zed_sensors_subscriber");

  /**
   * NodeHandle is the main access point to communications with the ROS system.
   * The first NodeHandle constructed will fully initialize this node, and the last
   * NodeHandle destructed will close down the node.
   */
  ros::NodeHandle n;

  /**
   * The subscribe() call is how you tell ROS that you want to receive messages
   * on a given topic.  This invokes a call to the ROS
   * master node, which keeps a registry of who is publishing and who
   * is subscribing.  Messages are passed to a callback function, here
   * called imageCallback.  subscribe() returns a Subscriber object that you
   * must hold on to until you want to unsubscribe.  When all copies of the Subscriber
   * object go out of scope, this callback will automatically be unsubscribed from
   * this topic.
   *
   * The second parameter to the subscribe() function is the size of the message
   * queue.  If messages are arriving faster than they are being processed, this
   * is the number of messages that will be buffered up before beginning to throw
   * away the oldest ones.
   */
  ros::Subscriber subImu = n.subscribe("/zed/zed_node/imu/data", 10, imuCallback);
  ros::Subscriber subImuTemp = n.subscribe("/zed/zed_node/imu/temperature", 10, imuTempCallback);
  ros::Subscriber subLeftTemp = n.subscribe("/zed/zed_node/temperature/left", 10, leftTempCallback);
  ros::Subscriber subRightTemp = n.subscribe("/zed/zed_node/temperature/right", 10, rightTempCallback);
  ros::Subscriber subPress = n.subscribe("/zed/zed_node/atm_press", 10, pressureCallback);
  ros::Subscriber subMag = n.subscribe("/zed/zed_node/imu/mag", 10, magCallback);

  /**
   * ros::spin() will enter a loop, pumping callbacks.  With this version, all
   * callbacks will be called from wi


"<leader>ug", "<cmd>Gitsigns toggle_current_line_blame<cr>", { desc = "Toggle Git blame" })

-- lazygit
map("n", "<leader>gg", function() Snacks.lazygit( { cwd = LazyVim.root.git() }) end, { desc = "Lazygit (Root Dir)" })
-- map("n", "<leader>gG", function() Snacks.lazygit() end, { desc = "Lazygit (cwd)" })
map("n", "<leader>gb", function() Snacks.git.blame_line() end, { desc = "Git Blame Line" })
map({ "n", "x" }, "<leader>gB", function() Snacks.gitbrowse() end, { desc = "Git Browse (open)" })
map({"n", "x" }, "<leader>gY", function()
  Snacks.gitbrowse({ open = function(url) vim.fn.setreg("+", url) end, notify = false })
end, { desc = "Git Browse (copy)" })
map("n", "<leader>gf", function() Snacks.lazygit.log_file() end, { desc = "Lazygit Current File History" })
map("n", "<leader>gl", function() Snacks.lazygit.log({ cwd = LazyVim.root.git() }) end, { desc = "Lazygit Log" })
map("n", "<leader>gL", function() Snacks.lazygit.log() end, { desc = "Lazygit Log (cwd)" })
-- local full_size = { width = 1, height = 1 }
-- map("n", "<leader>gg", function() LazyVim.lazygit( { cwd = LazyVim.root.git(), size = fu


   opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 面板内部分组样式 - 水墨卡片效果 */
.form-section {
    margin-bottom: 12px;
    padding: 16px;
    background: var(--section-bg);
    border-radius: 12px;
    border: 1px solid var(--section-border);
    box-shadow: var(--section-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 最后一个分组取消底部间距 */
.form-section:last-child {
    margin-bottom: 0;
}

/* 鼠标悬停时的轻微水墨扩散效果 */
.form-section:hover {
    background: var(--section-hover-bg);
    box-shadow: var(--section-hover-shadow);
}

/* 社交链接导航改为标签样式 */
.social-links-section {
    margin-bottom: 10px;
}

/* 社交链接容器改为标签式设计 */
.social-links {
    display: flex;
    justify-content: space-between;
    background: var(--section-bg);
    border-radius: 10px;
    border: 1px solid var(--section-border);
    padding: 3px;
    margin-bottom: 4px;
    box-shadow: var(--section-shadow);
}

/* 社交链接水墨效果增强 - 改为标签式按钮 */
.social-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    border-radius: 8px;
    color: var(--social-link-color);
    background: transparent;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    position: relative;
    margin: 0 2px;
}

.social-link:hover {
    color: var(--social-link-hover-color);
    background: var(--social-link-hover-bg);
    box-shadow: var(--social-link-hover-shadow);
}

/* 添加active状态以显示当前选中的标签 */
.social-link.active {
    background: var(--social-link-active-bg, var(--social-link-hover-bg));
    color: var(--social-link-active-color, var(--social-link-hover-color));
    box-shadow: var(--social-link-active-shadow, var(--social-link-hover-shadow));
}

/* 修改表单标签样式 - 更有水墨感 */
.form-label {
    font-size: 14px;
    color: var(--label-color);
    margin-bottom: 8px;
    display: block;
    text-shadow: var(--label-shadow);
    letter-spacing: 0.03em;
    position: relative;
    padding-left: 16px;
}

/* 标签前水墨点缀 */
.form-label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--label-dot-bg);
    box-shadow: var(--label-dot-shadow);
}

/* 必填项标签样式


result['Retdata'])&&result['Retdata'][paramJson['codeKey']]==paramJson['codeValue']){//操作成功
      if(utilsService!=null){
        utilsService.message();
      }

      if(successCallback!=null){
        successCallback();
      }
    }else{
      if(utilsService!=null){
        utilsService.message({success:false});
      }

      if(failCallback!=null){
        failCallback();
      }
    }
  }

  /**
   * 获取下拉框 valueValue的值
   * @param selectData 下拉框数据
   * @param selectKey 下拉框key --隐藏值
   * @param paramJson.valueValue 下拉框--显示值
   * @param paramJson.valueKey 下拉框--隐藏值
   * @returns {string}
   */
  getSelectValue(selectData,selectKey,paramJson : Object = {}){
    paramJson = paramJson||{};
    paramJson = Object.assign({valueValue:'valueValue', valueKey:'valueKey'},paramJson);
    let valueValue : string = '';
    for(let i = 0;i<selectData.length;i++){
      if(selectData[i][paramJson['valueKey']]==selectKey){
        valueValue = selectData[i][paramJson['valueValue']];
        break;
      }
    }
    return valueValue;
  }

  /**
   * 返回的结果为同步树数据时转换为树节点需要的数据格式--返回树数据跟选中的节点数据
   * @param result 同步树数据
   * @param option 配置
   * @param selectNode 初始已选中的节点
   */
  convTreeNodeSelect(result,option:Object = {},selectNode:Object[] = []){
    option = Object.assign({
      name:'text',
      id:'recNo',
      pid:'parentId',
      checked:'checked',
      children:'children',
      leaf:'leaf',
      treeData:'treeData'
    },option);

    let tempData:Object[] = [];
    for(let i=0;i<result.length;i++){
      let treeNode: Object = {};
      treeNode['name'] = result[i][option['name']];
      treeNode['id'] = result[i][option['id']];
      treeNode['pid'] = result[i][option['pid']];
      treeNode['checked'] = result[i][option['checked']]==true||result[i][option['checked']]=='true'?true:false;
      if(treeNode['checked']){
        selectNode = [...selectNode,treeNode];
      }
      tempData = [...tempData,treeNode];
      if(!result[i][option['leaf']]){
        let temp = result[i][option['children']];
        if(temp){
          tempData[i]['children'] = this.convTreeNodeSelect(temp,option,selectNode)[option['treeData']]||[];
        }
      }
    }
    return {treeData:tempData,selectNodeData:selectNode};
  }

  /**
   * 返回的结果为同步树数据时转换为级联需要的数据格式
   * @param result 同步树数据
   * @param option 配置
   * @param extOption 其它扩展的字段配置
   */
  convCascaderNode(result,option:Object = {},extOption:string[] = []){
    option = Object.assign({
      value:'value',
      label:'label',
      isLeaf:'isLeaf',
      children:'children'
    },option);

    let tempData:Object[] = [];
    for(let i=0;i<result.length;i++){
      let treeNode: Object = {};
      treeNode['value'] = result[i][option['value']];
      treeNode['label'] = result


0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Barlow';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/barlow/v5/7cHsv4kjgoGqM7E_CfPI42ogvTobdw.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Barlow';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/barlow/v5/7cHsv4kjgoGqM7E_CfPI42ouvTo.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Barlow';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/barlow/v5/7cHsv4kjgoGqM7E_CfOA5WohvTobdw.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Barlow';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/barlow/v5/7cHsv4kjgoGqM7E_CfOA5WogvTobdw.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Barlow';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/barlow/v5/7cHsv4kjgoGqM7E_CfOA5WouvTo.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Barlow';


0E3o porque os limites de utiliza\\u00E7\\u00E3o foram atingidos. Tente mais tarde novamente ou contate o help desk para obter assist\\u00EAncia.\nDetailView_EmptyCustomAttributeLabel=(etiqueta indefinida)\nmulti.header=Filtrado por\\: {0}\nfilter.status.new=Pronto\nmulti.selectall=Marcar tudo\nFilterItem_MediumPriority=M\\u00E9dia\nnotes.tooltip=Coment\\u00E1rios\nsort.taskDefinitionID=ID da defini\\u00E7\\u00E3o de tarefa\nXBUT_CALENDAR=Adicionar lembrete\ndialog.success.multi_complete_plural={0} tarefas processadas\nsort.createdOnReverse=Criado em (mais antigo no topo)\nsubstn.create.from=De\nsort.createdBy=Criado por (nome do usu\\u00E1rio)\nsubstitutesUser.read.error=Erro ao chamar usu\\u00E1rios substitu\\u00EDdos.\nWORKFLOW_TASK_IN_PROGRESS=iniciou a tarefa\nsort.taskTitle=T\\u00EDtulo (A no topo)\nGroupTitle_NoPriority=Nenhuma prioridade\nsort.contextServiceURL=URL de servi\\u00E7o de contexto\nview.ProcessLogs.noProcessLog=Log de tarefa n\\u00E3o dispon\\u00EDvel\nXBUT_SHOWDETAILS=Exibir detalhes\nForward.tooltip=Encaminhar\nGroupAndSort_TaskDefinitionName=Tipo de tarefa\nDialogMultiMessage_ClaimInfoSome=Algumas tarefas n\\u00E3o foram reservadas com sucesso. Verifique as mensagens abaixo.\nXFLD_ComboBox_Decision_Reason_MA=Motivo da decis\\u00E3o (aplica-se a todas as tarefas processadas)\\:\nWORKFLOW_TASK_CREATED=criou a tarefa\nfilter.completed.completedin2Weeks=\\u00DAltimas 2 semanas\ndialog.info.mq.contantBeingCreated=Criando contato\nworklistNoDataWithSearchText=Nenhuma tarefa adequada encontrada\nSuspend.tooltip=Suspender\nsubstn.table.substitution_errors=Erros de substitui\\u00E7\\u00E3o\nsort.expiryDate=Data de vencimento\ntasksReleased={0} tarefas liberadas\ndialog.success.reserve=Tarefa reservada com \\u00EAxito\nDetailView_EnterFullScreenMode=Entrar no modo de tela inteira\ncaFilteringOnlyForOneTaskType=Para filtrar ou ordenar por atributos personalizados, selecione apenas um tipo de tarefa.\nsubstn.delete.multi.error=Imposs\\u00EDvel excluir substitutos em alguns sistemas. Tente novamente mais tarde.\nCREATED_BACKGROUND=Tarefa background criada\nNO_COMMON_ACTIONS=Sem a\\u00E7\\u00F5es comuns. Desmarque a \\u00FAltima tarefa.\nDurationFormatterMinutes=minutos\noperationErrorDialog.title=Erros de processamento\nDurationFormatterMonths=meses\nXBUT_OK=OK\ndialog.success.multi_resubmit_multiple_tasks={0} tarefas suspendidas\nXFLD_TextArea_Decision=Nota de decis\\u00E3o\\:\nview.Workflow.priorityLow=Baixa\nXBUT_MULTI_SELECT=Sele\\u00E7\\u00E3o m\\u00FAltipla\nCustAttrTrue=Verdadeiro\ntableStatusColumnTitle=Status\nConfirmationDialogFrag_NextStepButton=Etapa segu


ne KVM_SET_DEBUGREGS         _IOW(KVMIO,  0xa2, struct kvm_debugregs)
/*
 * vcpu version available with KVM_ENABLE_CAP
 * vm version available with KVM_CAP_ENABLE_CAP_VM
 */
#define KVM_ENABLE_CAP            _IOW(KVMIO,  0xa3, struct kvm_enable_cap)
/* Available with KVM_CAP_XSAVE */
#define KVM_GET_XSAVE		  _IOR(KVMIO,  0xa4, struct kvm_xsave)
#define KVM_SET_XSAVE		  _IOW(KVMIO,  0xa5, struct kvm_xsave)
/* Available with KVM_CAP_XCRS */
#define KVM_GET_XCRS		  _IOR(KVMIO,  0xa6, struct kvm_xcrs)
#define KVM_SET_XCRS		  _IOW(KVMIO,  0xa7, struct kvm_xcrs)
/* Available with KVM_CAP_SW_TLB */
#define KVM_DIRTY_TLB		  _IOW(KVMIO,  0xaa, struct kvm_dirty_tlb)
/* Available with KVM_CAP_ONE_REG */
#define KVM_GET_ONE_REG		  _IOW(KVMIO,  0xab, struct kvm_one_reg)
#define KVM_SET_ONE_REG		  _IOW(KVMIO,  0xac, struct kvm_one_reg)
/* VM is being stopped by host */
#define KVM_KVMCLOCK_CTRL	  _IO(KVMIO,   0xad)
#define KVM_ARM_VCPU_INIT	  _IOW(KVMIO,  0xae, struct kvm_vcpu_init)
#define KVM_ARM_PREFERRED_TARGET  _IOR(KVMIO,  0xaf, struct kvm_vcpu_init)
#define KVM_GET_REG_LIST	  _IOWR(KVMIO, 0xb0, struct kvm_reg_list)

#define KVM_DEV_ASSIGN_ENABLE_IOMMU	(1 << 0)
#define KVM_DEV_ASSIGN_PCI_2_3		(1 << 1)
#define KVM_DEV_ASSIGN_MASK_INTX	(1 << 2)

struct kvm_assigned_pci_dev {
	__u32 assigned_dev_id;
	__u32 busnr;
	__u32 devfn;
	__u32 flags;
	__u32 segnr;
	union {
		__u32 reserved[11];
	};
};

#define KVM_DEV_IRQ_HOST_INTX    (1 << 0)
#define KVM_DEV_IRQ_HOST_MSI     (1 << 1)
#define KVM_DEV_IRQ_HOST_MSIX    (1 << 2)

#define KVM_DEV_IRQ_GUEST_INTX   (1 << 8)
#define KVM_DEV_IRQ_GUEST_MSI    (1 << 9)
#define KVM_DEV_IRQ_GUEST_MSIX   (1 << 10)

#define KVM_DEV_IRQ_HOST_MASK	 0x00ff
#define KVM_DEV_IRQ_GUEST_MASK   0xff00

struct kvm_assigned_irq {
	__u32 assigned_dev_id;
	__u32 host_irq; /* ignored (legacy field) */
	__u32 guest_irq;
	__u32 flags;
	union {
		__u32 reserved[12];
	};
};

struct kvm_assigned_msix_nr {
	__u32 assigned_dev_id;
	__u16 entry_nr;
	__u16 padding;
};

#define KVM_MAX_MSIX_PER_DEV		256
struct kvm_assigned_msix_entry {
	__u32 assigned_dev_id;
	__u32 gsi;
	__u16 entry; /* The index of entry in the MSI-X table */
	__u16 padding[3];
};

#endif /* __LINUX_KVM_H */


)) {
    const newId = makeRef()
    const newPara: StringElementType = {
      t: 'P',
      p: elem.p + 1,
      i: '',
    }
    changes.elements[newId] = {
      elem: newPara,
      path: [newId],
    }
    changes.updated.push(newId)
    return { elem: newPara, path: [newId] }
  } else {
    return { elem, path: [last] }
  }
}

export function simplify(
  editor: EditorProvider,
  composition: CompositionType,
  changes: ChangesType
): ChangesType {
  const { updated, elements } = changes
  const parents: GroupElementRefTypeById = {}
  updated.forEach(ref => {
    const { path } = elements[ref]
    const parentPath = path.slice(0, -1)
    const parentId = parentPath[parentPath.length - 1]
    if (parentId) {
      let refParent: GroupElementRefType = parents[parentId]
      if (!refParent) {
        const parentRef = elements[parentId]
        const parent = parentRef
          ? parentRef.elem
          : getAtPath(composition, parentPath)
        let parentElem: GroupElementType
        if (isStringElement(parent)) {
          parentElem = { ...parent, g: {} }
          delete parentElem.i
        } else if (isGroupElement(parent)) {
          parentElem = { ...parent, g: Object.assign({}, parent.g) }
        } else {
          throw new Error(`FIXME: custom tag`)
        }
        parents[parentId] = refParent = { elem: parentElem, path: parentPath }
      }
      // We change the parent so that it hold the new/modified children.
      refParent.elem.g[ref] = elements[ref].elem
    }
  })

  Object.keys(parents)
    .sort((a, b) => parents[a].elem.p - parents[b].elem.p)
    .forEach(parentId => {
      simplifyParent(composition, changes, parents[parentId])
    })

  checkLast(editor, composition, changes)

  return changes
}
function add(
    num1: number,
    num2:number,
    num3?: number //optional param '?'

): number{

    let total = num1 + num2;
    if(num3 != undefined){

        total += num3;

    }

    return total;

}

let awnser = add(14,23,30);
console.log("Retorna: "+ awnser);

awnser = add(20,30);
console.log('opcional : '+awnser);
import type { BundleArgs } from "@rnx-kit/metro-service";
import { pickValues } from "@rnx-kit/tools-language/properties";
import type { KitBundleConfig } from "./types";

export type KitBundleConfigOverrides = {
  entryPath?: string;
  distPath?: string;
  assetsPath?: string;
  bundlePrefix?: string;
  bundleEncoding?: BundleArgs["bundleEncoding"];
  sourcemapOutput?: string;
  sourcemapSourcesRoot?: string;
  experimentalTreeShake?: boolean;
};

/**
 * Apply overrides, if any, to each kit bundle config. Overrides are applied in-place.
 *
 * @param overrides Optional overrides to apply
 * @param configs Array of kit bundle configurations to override. This is modified if any overrides are applied.
 */
export function applyKitBundleConfigOverrides(
  overrides: KitBundleConfigOverrides,
  configs: KitBundleConfig[]
): void {
  const overridesToApply = pickValues(
    overrides,
    [
      "entryPath",
      "distPath",
      "assetsPath",
      "bundlePrefix",
      "bundleEncoding",
      "sourcemapOutput",
      "sourcemapSourcesRoot",
      "experimentalTreeShake",
    ],
    [
      "entryPath",
      "distPath",
      "assetsPath",
      "bundlePrefix",
      "bundleEncoding",
      "sourcemapOutput",
      "


 = data;
                    });
                    debugPrint('change:$data');
                  },
                  onChangeStart: (data) {
                    debugPrint('start:$data');
                  },
                  onChangeEnd: (data) {
                    debugPrint('end:$data');
                  },
                  min: 0,
                  max: 10,
                  label: '${padding.toStringAsFixed(0)}',
                  activeColor: Colors.green,
                  inactiveColor: Colors.grey,
                  semanticFormatterCallback: (double newValue) {
                    return '${newValue.round()}}';
                  }),
            ),
          ],
        ),
        Row(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: <Widget>[
            Padding(
              padding: EdgeInsets.only(left: 20),
              child: Text('边数'),
            ),
            Expanded(
              child: Slider(
                  value: sideCount!.toDouble(),
                  divisions: 6,
                  onChanged: (data) {
                    if (data.toInt() != sideCount) {
                      setState(() {
                        sideCount = data.toInt();
                        controller.reset();
                        controller.forward();
                      });
                    }
                  },
                  onChangeStart: (data) {
                    debugPrint('start:$data');
                  },
                  onChangeEnd: (data) {
                    debugPrint('end:$data');
                  },
                  min: defaultStyle ? sideCount!.toDouble() : 3,
                  max: defaultStyle ? sideCount!.toDouble() : 8,
                  label: '${sideCount!.toStringAsFixed(0)}',
                  activeColor: Colors.green,
                  inactiveColor: Colors.grey,
                  semanticFormatterCallback: (double newValue) {
                    return '${newValue.round()}}';
                  }),
            ),
          ],
        ),
        Row(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: <Widget>[
            Padding(
              padding: EdgeInsets.only(left: 20),
              child: Text('旋转角度'),
            ),
            Expanded(
              child: Slider(
                  value: angle!.toDouble(),
                  divisions: 360,
                  onChanged: (data) {
                    if (data.toDouble() != angle) {
                      setState(() {
                        angle = data.toDouble();
                        controller.reset();
                        controller.forward();
                      });
                    }
                  },
                  onChangeStart: (data) {
                    debugPrint('start:$data');
                  },
                  onChangeEnd: (data) {
                    debugPrint('end:$data');
                  },
                  min: 0,
                  max: 360,
                  label: '${angle!.toStringAsFixed(0)}',
                  activeColor: Colors.green,
                  inactiveColor: Colors.grey,
                  semanticFormatterCallback: (double newValue) {
                    return '${newValue.round()}}';
                  }),
            ),
          ],
        ),
        MaterialButton(
          onPressed: () {
            setState(() {
              sideCount = 5;
              defaultStyle = !defaultStyle;
            });
          },
          color: Colors.orange,
          child: Text(defaultStyle ? '使用自定义风格' : '使用默认风格'),
        )
      ],
    );
  }
}

class RadarProvider extends BrnRadarChartDataProvider {
  final Map<String, List<double>> dataList1;

  final Map<String, List<double>> dataList2;

  final int? sideCount;

  Rad


e isser you want to validate",

                    ValidateIssuerSigningKey = true,
                    IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes("the secret that needs to be at least 16 characeters long for HmacSha256")),

                    ValidateLifetime = true, //validate the expiration and not before values in the token

                    ClockSkew = TimeSpan.FromMinutes(5) //5 minute tolerance for the expiration date
                };
            });
        }

        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseAuthentication();

            app.UseMvcWithDefaultRoute();

            app.Run(async (context) =>
            {
                context.Response.StatusCode = 404;
                await context.Response.WriteAsync("Page not found");
            });
        }
    }
}


osx.com/2019/06/moving-to-zsh/)（英文）

![](https://cdn.beekka.com/blogimg/asset/202207/bg2022072303.webp)

zsh 已经替代 Bash，成为 Mac 电脑的默认 Shell。这是针对 MacOS 的 zsh 系列教程，一共8个部分。

## 图片

1、[凹镜大楼](https://www.dailymail.co.uk/news/article-2786723/London-skyscraper-Walkie-Talkie-melted-cars-reflecting-sunlight-fitted-shading.html)

2012年，伦敦市中心完工了一座大楼。

![](https://cdn.beekka.com/blogimg/asset/202301/bg2023010304.webp)

这座玻璃幕墙大楼，顶部比底部宽，并且表面有一些向内收缩。

![](https://cdn.beekka.com/blogimg/asset/202301/bg2023010305.webp)

当它完工以后，人们才发现，晴天出太阳时，这栋楼会变成一个凹面镜。

![](https://cdn.beekka.com/blogimg/asset/202301/bg2023010306.webp)

它会聚焦阳光，反射在楼下的大街上。

![](https://cdn.beekka.com/blogimg/asset/202301/bg2023010307.webp)

停在焦点区域的汽车，塑料部件会因为高温而融化。

![](https://cdn.beekka.com/blogimg/asset/202301/bg2023010308.webp)

经过测量，焦点的温度可以达到72度。有人甚至拿出鸡蛋，演示焦点处可以煎鸡蛋。

![](https://cdn.beekka.com/blogimg/asset/202301/bg2023010309.webp)

最后，大楼的开发商赔偿了所有损失，在焦点处安装了永久遮阳伞。

## 文摘

1、**心理否认**

以下内容摘自《崩溃：社会如何选择成败兴旺》（上海译文出版社，2008年），作者是美国生物学家贾雷德·戴蒙德，他也是名著《枪炮、病菌与钢铁》的作者。

![](https://cdn.beekka.com/blogimg/asset/202301/bg2023010513.webp)

一个狭窄的河谷建造了一座巨型水坝，有人对下游居民进行问卷调查，询问他们是否担心水坝倒塌。

![](https://cdn.beekka.com/blogimg/asset/202301/bg2023010514.jpg)

让人意外的是，住在水坝下游几英里的居民竟然是最担心水坝倒塌的人群，而住在水坝正下方的居民却一点都不担心。

原因是正下方的居民产生了“心理否认”。

这些居民每天一抬头就看到水坝，如果担心它会倒塌，从早到晚提心吊胆，那简直没办法过日子。保持镇定的惟一方法，就是从心底里否认水坝可能会倒塌这一事实。

**非理性地拒绝解决已经察觉的问


  expect(integration.application, isNull);
  expect(integration.scopes, isNull);
}

void main() {
  testReadOnlyManager<Integration, IntegrationManager>(
    'IntegrationManager',
    (config, client) =>
        IntegrationManager(config, client, guildId: Snowflake.zero),
    '/guilds/0/integrations',
    sampleObject: sampleIntegration,
    sampleMatches: checkIntegration,
    // Fetch internally uses list(), so we return a list
    fetchObjectOverride: [sampleIntegration],
    additionalParsingTests: [],
    additionalEndpointTests: [
      EndpointTest<IntegrationManager, List<Integration>, List<Object?>>(
        name: 'list',
        source: [sampleIntegration],
        urlMatcher: '/guilds/0/integrations',
        execute: (manager) => manager.list(),
        check: (list) {
          expect(list, hasLength(1));

          checkIntegration(list.first);
        },
      ),
      EndpointTest<IntegrationManager, void, void>(
        name: 'delete',
        method: 'DELETE',
        source: null,
        urlMatcher: '/guilds/0/integrations/0',
        execute: (manager) => manager.delete(Snowflake.zero),
        check: (_) {},
      ),
    ],
  );
}
import 'package:firebridge/firebridge.dart';
import 'package:test/test.dart';

import '../../../mocks/client.dart';
import '../../../test_manager.dart';
import 'invite_manager_test.dart';
import 'member_manager_test.dart';

final sampleGuildText = {
  "id": "41771983423143937",
  "guild_id": "41771983423143937",
  "name": "general",
  "type": 0,
  "position": 6,
  "permission_overwrites": [],
  "rate_limit_per_user": 2,
  "nsfw": true,
  "topic": "24/7 chat about how to gank Mike #2",
  "last_message_id": "155117677105512449",
  "parent_id": "399942396007890945",
  "default_auto_archive_duration": 60
};

void checkGuildText(Channel channel) {
  expect(channel, isA<GuildTextChannel>());

  channel as GuildTextChannel;

  expect(channel.id, equals(Snowflake(BigInt.from(41771983423143937))));
  expect(channel.topic, equals('24/7 chat about how to gank Mike #2'));
  expect(channel.defaultAutoArchiveDuration, equals(Duration(minutes: 60)));
  expect(channel.defaultThreadRateLimitPerUser, isNull);
  expect(channel.guildId, equals(Snowflake(BigInt.from(41771983423143937))));
  expect(channel.isNsfw, isTrue);
  expect(channel.lastMessageId,
      equals(Snowflake(BigInt.from(155117677105512449))));
  expect(channel.lastPinTimestamp, isNull);
  expect(channel.name, equals('general'));
  expect(channel.parentId, equals(Snowflake(BigInt.from(399942396007890945))));
  expect(channel.permissionOverwrites, equals([]));
  expect(channel.position, equals(6));
  expect(channel.rateLimitPerUser, equals(Duration(seconds: 2)));
}

final sampleGuildAnnouncement = {
  "id": "41771983423143937",
  "guild_id": "41771983423143937",
  "name": "important-news",
  "type": 5,
  "position": 6,
  "permission_overwrites": [],
  "nsfw": true,


 = !f.start || f.start <= s.start ? s.start : f.start;
				const preTime = start !== s.start ? getMonths( s.start, f.start ) : 0;
				let time = s.time - preTime;
				let month = Math.min( s.hole / s.time, dist / distTime );

				const total = month * time;

				const newBlock = new analyzerBlock( f.type, f.sType, f.category, f.person, start, undefined, time, month, undefined);
				newBlock.labelId = f.labelId;
				newSteps.push( newBlock );

				distTime -= time;
                dist -= total;
                if(dist <= 100) break;
			}
			newBase = [...newBase, ...newSteps];

			// Generate new step for next loop
			steps = getAnalyzerSteps( newBase, need, mode, alternate, income );
		}
	}
	// Bathtub
	else if(liquidMode === 3)
	{
		// Go through possible liquids
		for(let a = 0; a < sorted.length; a++){
            let
            f = sorted[a],
			dist = f.value;

			// Collect new steps
			let newSteps = [];

			// Sort steps according to holes (big to small)
			let sortSteps = [...steps];
			sortSteps.sort(function(a,b){ return (b.hole/b.time)-(a.hole/a.time); });

			// Collect relevant data
			let months = [], times = [], starts = [];
			for(let k = 0; k < sortSteps.length; k++){
				const s = sortSteps[k];
				if( (f.type !== 99 && s.end <= f.start) || s.hole <= 100 ){ continue; }

				const start = !f.start || f.start <= s.start || f.type === 99 ? s.start : f.start;
				starts.push( start );

				const preTime = start !== s.start ? getMonths( s.start, f.start ) : 0;
				const time = s.time - preTime;
				times.push( time );

				const month= s.hole / s.time;
				months.push( month );
			}

			// Merge same next to eachother
			const newStarts = [...starts];
			newStarts.sort(function(a,b){ return +b - +a; });
			for(let k = 0; k < newStarts.length; k++){
				const i1: number = starts.indexOf(newStarts[k]);
				const i2: number | undefined = newStarts[k+1] ? starts.indexOf(newStarts[k+1]) : undefined;
				if(i2){
					if( months[i2] && ( Math.floor(months[i1]) === Math.floor(months[i2]) ) ){
						months.splice(i1,1);
						times[i2] += times[i1];
						times.splice(i1,1);
						starts[i2] = starts[i2] && starts[i2] < starts[i1] ? starts[i2] : starts[i1];
						starts.splice(i1,1);
					}
				}
			}

			// Get differences
			let diffs=[];
			for(let k = 0; k < months.length; k++){
				diffs.push( months[k+1] ? months[k]-months[k+1] : months[k] );
			}

			// Create position data with magic
            let diffDist = dist, diffTime = 0, diffHeight = 0;
            const diffPos = [];
			for(let k = 0; k < months.length; k++){
                if(!starts[k]) continue;

                let dPos:
                { month: number, time: number, start: Date | undefined }
                = { month: 0, time: 0, start: undefined };
                dPos.start = starts[k];
                dPos.time = times[k];
				if(


IGpldw== d2Nz IDE0MA== IHByZXZpZXc= aXBwaQ== IHVuZm9ydHVuYXRlbHk= b2tlbW9u IGhvcm4= IHJlYXNz IHBlZXI= b2NrZXI= IHVudG8= IEdyYXk= IGNsZWFuaW5n IGF0dHJhY3RlZA== MjAwNw== UG9pbnQ= a2lsbA== IEFncmVlbWVudA== dXJjaGVz IGhvcnI= IE1pc3Npc3M= IHdvcnRoeQ== IGZsb3dlcnM= dG93bg== ZGxs IHJlYWN0aW9ucw== IGRlY2U= IGluZGljYXRpbmc= TUQ= IHByZWZlcmVuY2U= IE1WUA== ZXNzaW9uYWw= IFRhcmdldA== Z2VuY2U= IEluZGlhbnM= IG1pc2M= IGZyZWVseQ== IG11c2NsZXM= IGxpbmV1cA== IGltcGFjdHM= b3VzaW5n b21p YWN1bGFy IGNvbnRyb2xsaW5n YWdpbmU= Y2VyeQ== aGVsbA== IHJhbmtpbmc= IE5pY2g= IEF2ZQ== MTI4 IGhpZ2h3YXk= IGluY29ucw== IGJpbmRpbmc= IHN0cnVnZ2xlcw== IFBpdHRzYnVyZ2g= IGdyYXk= cmlu IGNvbWljcw== IFNwb3J0 IHJlbGF0aXZlcw== IGZyaWdodA== IHByb2Jl IFBvcnR1Zw== IHZvYw== IHR1 IENvcnBz IHBvc3NpYmlsaXRpZXM= IHF1YWxpZnk= d2Nzc3RvcmU= IGxpYnJhcmllcw== IG1pZ3JhbnRz IGVudHJpZXM= IGNvbnNlY3V0aXZl dmFscw== IENoYWlybWFu IGhpbGw= SU1F IEdhcmQ= IGluZXF1YWxpdHk= Zm94 IFNhdmU= IGNvcnQ= Y2xhaW1lZA== IHRyYWl0cw== IHBvdXI= IG1pc3NpbGVz IGVzc2VuY2U= IHNlbmRz IGFsbGlhbmNl IHdpc2hlcw== IENocmlzdG9waGVy Qmln Tlk= IEphY29i c2Fu dXJyZWQ= IFNP bGx5 IGFkdm9jYXRl IEJvbmQ= ICIv VXNpbmc= IGRpc3RyaWN0cw== IEdhdGU= IEJpcg== cmlkZ2U= IE5heg== IFJz Ym9hcmRz IEdh IFJlYWdhbg== IGluZmx1ZW5jZWQ= MTAwMA== YXB5 IGNoYWxsZW5nZWQ= IGJhcmc= IGZhY3VsdHk= IEZpZg== IGFjcXVpcmU= QWM= IGluc2VjdA== IGluc3RydW1lbnRz IGxlYWY= dGhvZG94 TWVzc2FnZQ== IHRhbGU= IHRoZXJlYnk= IHRyYXA= IHN0cm9uZ2VzdA== IE1pbGl0YXJ5 aXNpYmxl IDE5ODQ= ZXRoZWxlc3M= IGZsZXhpYmxl IGtpbGxz IGZpbmlzaGluZw== IFNpemU= IHJlZHVjZXM=


 2", "ext-id-1", Visibility.PRIVATE);
        WorkSummary s7 = getWorkSummary("Public 3", "ext-id-2", Visibility.PUBLIC);
        WorkSummary s8 = getWorkSummary("Limited 3", "ext-id-2", Visibility.LIMITED);
        WorkSummary s9 = getWorkSummary("Private 3", "ext-id-2", Visibility.PRIVATE);

        List<WorkSummary> workList = Arrays.asList(s1, s2, s3, s4, s5, s6, s7, s8, s9);

        /**
         * They should be grouped as
         *
         * Group 1: Public 1 + Public 2 Group 2: Public 3
         */
        Works works = workManager.groupWorks(workList, true);
        assertNotNull(works);
        assertEquals(2, works.getWorkGroup().size());
        assertEquals(1, works.getWorkGroup().get(0).getIdentifiers().getExternalIdentifier().size());
        assertEquals("ext-id-1", works.getWorkGroup().get(0).getIdentifiers().getExternalIdentifier().get(0).getValue());
        assertEquals(2, works.getWorkGroup().get(0).getWorkSummary().size());
        assertThat(works.getWorkGroup().get(0).getWorkSummary().get(0).getTitle().getTitle().getContent(), anyOf(is("Public 1"), is("Public 2")));
        assertThat(works.getWorkGroup().get(0).getWorkSummary().get(1).getTitle().getTitle().getContent(), anyOf(is("Public 1"), is("Public 2")));
        assertEquals(1, works.getWorkGroup().get(1).getIdentifiers().getExternalIdentifier().size());
        assertEquals("ext-id-2", works.getWorkGroup().get(1).getIdentifiers().getExternalIdentifier().get(0).getValue());
        assertEquals(1, works.getWorkGroup().get(1).getWorkSummary().size());
        assertEquals("Public 3", works.getWorkGroup().get(1).getWorkSummary().get(0).getTitle().getTitle().getContent());
    }

    @Test
    public void testGetAll() {
        List<Work> elements = workManager.findWorks("0000-0000-0000-0003");
        assertNotNull(elements);
        assertEquals(6, elements.size());
        boolean found1 = false, found2 = false, found3 = false, found4 = false, found5 = false, found6 = false;
        for (Work element : elements) {
            if (11 == element.getPutCode()) {
                found1 = true;
            } else if (12 == element.getPutCode()) {
                found2 = true;
            } else if (13 == element.getPutCode()) {
                found3 = true;
            } else if (14 == element.getPutCode()) {
                found4 = true;
            } else if (15 == element.getPutCode()) {
                found5 = true;
            } else if (16 == element.getPutCode()) {
                found6 = true;
            } else {
                fail("Invalid element found: " + element.getPutCode());
            }
        }
        assertTrue(found1);
        assertTrue(found2);
        assertTrue(found3);
        assertTrue(found4);
        assertTrue(found5);
    }

    @Test
    public void testGetAllSummaries() {
        List<WorkSummary> elements = workManager.getWorksSummaryList("0000-0000-0000-0003");
        assertNotNull(elements);
        assertEquals(6, elements.size());
        boolean found1 = false, found2 = false, found3 = false, found4 = false, found5 = false, found6 = false;
        for (WorkSummary element : elements) {
            if (11 == element.getPutCode()) {
                found1 = true;
            } else if (12 == element.getPutCode()) {
                found2 = true;
            } else if (13 == element.getPutCode()) {
                found3 = true;
            } else if (14 == element.getPutCode()) {
                found4 = true;
            } else i


WithSpecialsForAccountAsFlow(
            accountName = accountName,
            filterDriveTypes = setOf(DRIVE_TYPE_PROJECT),
        ).first().map { it.toModel() }

        assertNotNull(spacesInDatabase)
        assertEquals(1, spacesInDatabase.size)
        assertEquals(spacesToInsertModel, spacesInDatabase)
    }

    @Test
    fun insertOrDeleteSpacesWithSpacesAlreadyInDatabaseNotAttachedToAccountAnymore() = runTest {
        val accountName = OC_SPACE_PROJECT_WITHOUT_IMAGE.accountName

        val specialsAlreadyInDatabaseToInsert = listOf(
            OC_SPACE_SPECIAL_IMAGE.toEntity(accountName, OC_SPACE_PROJECT_WITH_IMAGE.id),
            OC_SPACE_SPECIAL_README.toEntity(accountName, OC_SPACE_PROJECT_WITH_IMAGE.id)
        )

        val spacesAlreadyInDatabaseToInsert = listOf(
            OC_SPACE_PROJECT_WITH_IMAGE.toEntity()
        )

        spacesDao.insertOrDeleteSpaces(spacesAlreadyInDatabaseToInsert, specialsAlreadyInDatabaseToInsert)

        val spacesAlreadyInDatabase = spacesDao.getSpacesByDriveTypeWithSpecialsForAccountAsFlow(
            accountName = accountName,
            filterDriveTypes = setOf(DRIVE_TYPE_PROJECT),
        ).first()

        assertEquals(1, spacesAlreadyInDatabase.size)
        assertEquals(2, spacesAlreadyInDatabase[0].specials.size)

        val newSpecialsToInsert = listOf(
            OC_SPACE_SPECIAL_README.toEntity(accountName, OC_SPACE_PROJECT_WITHOUT_IMAGE.id),
        )

        val newSpacesToInsertModel = listOf(
            OC_SPACE_PROJECT_WITHOUT_IMAGE
        )

        val newSpacesToInsert = newSpacesToInsertModel.map { it.toEntity() }

        spacesDao.insertOrDeleteSpaces(newSpacesToInsert, newSpecialsToInsert)

        val spacesInDatabaseEntity = spacesDao.getSpacesByDriveTypeWithSpecialsForAccountAsFlow(
            accountName = accountName,
            filterDriveTypes = setOf(DRIVE_TYPE_PROJECT),
        ).first()

        val spacesInDatabase = spacesInDatabaseEntity.map { it.toModel() }
        val specialsInDatabase = spacesInDatabaseEntity.flatMap { it.specials }

        assertNotNull(spacesInDatabase)
        assertEquals(1, spacesInDatabase.size)
        assertEquals(1, specialsInDatabase.size)
        assertEquals(newSpacesToInsertModel, spacesInDatabase)
    }

    @Test
    fun insertOrDeleteSpacesWithSpacesAlreadyInDatabaseStillAttachedToAccount() = runTest {
        val accountName = OC_SPACE_PROJECT_WITHOUT_IMAGE.accountName

        val specialsAlreadyInDatabaseToInsert = listOf(
            OC_SPACE_SPECIAL_IMAGE.toEntity(accountName, OC_SPACE_PROJECT_WITH_IMAGE.id),
            OC_SPACE_SPECIAL_README.toEntity(accountName, OC_SPACE_PROJECT_WITH_IMAGE.id)
        )

        val spacesAlreadyInDatabaseToInsert = listOf(
            OC_SPACE_PROJECT_WITH_IMAGE.toEntity()
        )

        spacesDao.insertOrDeleteSpaces(spacesAlreadyInDatabaseToInsert, specialsAlreadyInDatabaseToInsert)

        val spacesAlreadyInDatabase = spacesDao.getSpacesByDriveTypeWithSpecialsForAccountAsFlow(
            accountName = accountName,
            filterDriveTypes = setOf(DRIVE_TYPE_PROJECT),
        ).first()

        assertEquals(1, spacesAlreadyInDatabase.size)
        assertEquals(2, spacesAlreadyInDatabase[0].specials.size)

        val anotherSpaceId = "8871f4f3-fc6f-4a6


          b.al    cmpLen

cmp8:       ldr     x4, [x2], #8
            ldr     x5, [x3], #8
            rev     x4, x4
            rev     x5, x5
            cmp     x4, x5
            bne     str.cmp.done
cmpLen:     subs    w6, w6, #8      //Also compares W6 to 8
            bhs     cmp8

            // Fewer than eight characters left (and more
            // than zero). Cheapest to just compare them
            // one at a time:

            adds    w6, w6, #8
			beq		str.cmp.done	//If lens are equal

cmp1:
            ldrb    w4, [x2], #1
            ldrb    w5, [x3], #1
            cmp     w4, w5
            bne     str.cmp.done
            subs    w6, w6, #1
            bne     cmp1

            // At this point, the strings are equal
            // through the length of the shorter
            // string. The comparison is thus based
            // on the result of comparing the lengths
            // of the two strings.

cmpLens:
            ldr     w6, [x0, #string.len]   //Fetch left len
            cmp     w6, w7                  //Right len

str.cmp.done:
            ldp     x2, x3, [fp, #str_cmp.saveX2X3]
            ldp     x4, x5, [fp, #str_cmp.saveX4X5]
            ldp     x6, x7, [fp, #str_cmp.saveX6X7]
            leave
            endp    str.cmp


;

    let git_repo = if sub_scheme == "file" {
        let mut url = url.clone();

        url.set_scheme("file")
            .map_err(|_| "failed to set scheme to `file`")?;

        let path = url
            .to_file_path()
            .map_err(|_| format!("url is not a file path: {}", url))?;

        git::open_git_repo(path)?
    } else {
        git::setup_git_repo(&config.repo_dir, sub_scheme, url)?
    };

    open_git_index(url, git_repo, publishing)
}

pub fn index_from_url(config: IndexConfig, url: &Url, publishing: bool) -> Result<Box<Index>> {
    let mut scheme = url.scheme().split("+");

    let first = scheme
        .next()
        .ok_or_else(|| format!("bad scheme: {}", url))?;

    match first {
        "file" => url
            .to_file_path()
            .map_err(|_| format!("url is not a file path: {}", url).into())
            .and_then(|path| index_from_path(&path)),
        "git" => index_from_git(config, scheme, url, publishing),
        scheme => Err(format!("bad scheme: {}", scheme).into()),
    }.chain_err(|| format!("loading index from URL: {}", url))
}
//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_548.hrx"

#[allow(unused)]
fn runner() -> crate::TestRunner {
    super::runner()
}

#[test]
fn test() {
    assert_eq!(
        runner().ok(
            ".parent-sel-value {\
             \n  font-family: &;\
             \n  .parent-sel-interpolation {\
             \n    font-family: #{&};\
             \n     .parent-sel-value-concat {\
             \n        font-family: \"Current parent: \" + &;\
             \n     }\
             \n  }\
             \n}\n"
        ),
        ".parent-sel-value {\
         \n  font-family: .parent-sel-value;\
         \n}\
         \n.parent-sel-value .parent-sel-interpolation {\
         \n  font-family: .parent-sel-value .parent-sel-interpolation;\
         \n}\
         \n.parent-sel-value .parent-sel-interpolation .parent-sel-value-concat {\
         \n  font-family: \"Current parent: .parent-sel-value .parent-sel-interpolation .parent-sel-value-concat\";\
         \n}\n"
    );
}
<reponame>bstrie/cannyls
use std::cmp;
use std::io::{self, Read, Seek, SeekFrom, Write};
use std::ptr;

use crate::block::{AlignedBytes, BlockSize};
use crate::nvm::NonVolatileMemory;
use crate::{ErrorKind, Result};

/// ジャーナル領域用のバッファ.
///
/// 内部の`NonVolatileMemory`実装のアライメント制約(i.e., ストレージのブロック境界に揃っている)を満たしつつ、
/// ジャーナル領域への追記を効率化するのが目的.
#[derive(Debug)]
pub struct JournalNvmBuffer<N: NonVolatileMemory> {
    // ジャーナル領域のデータを、実際に永続化するために使用される内部のNVMインスタンス
    inner: N,

    // 現在の読み書きカーソルの位置
    position: u64,

    // 書き込みバッファ
    //
    // ジャーナル領域から発行された書き込み要求は、
    // 以下のいずれかの条件を満たすまでは、メモリ上の本バッファに保持されており、
    // 内部NVMには反映されないままとなる:
    // - `sync


p/ping Retry Count
        {
          this->set_retry_count_ = true;
          int rc = ACE_OS::atoi(get_opts.optarg);
          if (rc > 0)
            this->retry_count_ = rc;
        }
        break;
      case 'l': /// hostname of the activator
        this->activator_ = ACE_TEXT_ALWAYS_CHAR(get_opts.optarg);
        this->set_activator_ = true;
        break;
      case 'q' :
        this->quiet_ = true;
        break;
      case 'h':  // display help
        this->print_usage ();
        return -1;
      default:
        ORBSVCS_ERROR((LM_ERROR, "ERROR : Unknown option '%c'\n", (char) c));
        this->print_usage ();
        return -1;
      }
    }
  return 0;
}

// ============================================================================
// = Run methods

int
TAO_IMR_Op_Activate::run ()
{
  ACE_ASSERT(! CORBA::is_nil(imr_));
  try
    {
      this->imr_->activate_server (this->server_name_.c_str ());
      if (!this->quiet_)
        {
          ORBSVCS_DEBUG ((LM_DEBUG,
                          "Successfully Activated server <%C>\n",
                          this->server_name_.c_str ()));
        }
    }
  catch (const ImplementationRepository::CannotActivate& ex)
    {
      if (!this->quiet_)
        {
          ORBSVCS_ERROR ((LM_ERROR,
                          "Cannot activate server <%C> reason <%C>\n",
                          this->server_name_.c_str (),
                          ex.reason.in ()));
        }
      return TAO_IMR_Op::CANNOT_ACTIVATE;
    }
  catch (const ImplementationRepository::NotFound&)
    {
      if (!this->quiet_)
        {
          ORBSVCS_ERROR ((LM_ERROR,
                          "Could not find server <%C>.\n",
                          this->server_name_.c_str ()));
        }
      return TAO_IMR_Op::NOT_FOUND;
    }
  catch (const PortableServer::ForwardRequest&)
    {
      throw;
    }
  catch (const CORBA::Exception& ex)
    {
      if (!this->quiet_)
        {
          ex._tao_print_exception ("Activating Server");
        }
      return TAO_IMR_Op::UNKNOWN;
    }

  return TAO_IMR_Op::NORMAL;
}

int
TAO_IMR_Op_Autostart::run ()
{
  ACE_ASSERT(! CORBA::is_nil (imr_));

  ImplementationRepository::ServerInformationList_var server_list;
  ImplementationRepository::ServerInformationIterator_var server_iter;

  try
    {
      this->imr_->list (0,
        false,
        server_list,
        server_iter);

      ACE_ASSERT(CORBA::is_nil (server_iter.in ()));

      CORBA::ULong len = server_list->length ();
      for (CORBA::ULong i = 0; i < len; ++i)
        {
          try
            {
              this->imr_->activate_server (server_list[i].server.in ());
            }
          catch (const CORBA::Exception& ex)
            {
              ex._tao_print_exception (server_list[i].server.in ());
              // Ignore exception
            }
        }
    }
  catch (const CORBA::Exception& ex)
    {
      ex._tao_print_exception ("autostart");
      return TAO_IMR_Op::UNKNOWN;
    }

  return TAO_IMR_Op::NORMAL;
}

int
TAO_IMR_Op_IOR::run ()
{
  ACE_


#;

#[derive(Debug, RustcDecodable)]
struct Args {
    arg_tasks: Vec<String>,
    flag_diff: bool,
    flag_filter: Option<TaskFilter>,
}

#[derive(Debug, Clone, RustcDecodable)]
enum TaskFilter {
    All,
    LocalOnly,
    RemoteOnly,
    Unimplemented,
}

impl Default for TaskFilter {
    fn default() -> Self {
        TaskFilter::All
    }
}

/// Prints a colored diff of two strings to the terminal.
fn print_diff<T: ?Sized>(t: &mut T, s1: &str, s2: &str) -> io::Result<()>
    where T: Terminal
{
    let (_dist, changeset) = difference::diff(&s1, &s2, "\n");

    for i in 0..changeset.len() {
        match changeset[i] {
            Difference::Same(ref x) => {
                try!(t.reset());
                try!(writeln!(t, " {}", x));
            }
            Difference::Add(ref x) => {
                try!(t.fg(term::color::GREEN));
                for line in x.split("\n") {
                    try!(writeln!(t, "+{}", line));
                }
            }
            Difference::Rem(ref x) => {
                try!(t.fg(term::color::RED));
                for line in x.split("\n") {
                    try!(writeln!(t, "-{}", line));
                }
            }
        }
    }
    try!(t.reset());
    try!(t.flush());
    Ok(())
}

/// Prints a task in a human-readable format.
fn print_task<T: ?Sized>(t: &mut T, task: &Task, diff: bool) -> io::Result<()>
    where T: Terminal
{
    try!(t.attr(term::Attr::Bold));
    try!(writeln!(t, "{}", task.title()));
    try!(t.reset());

    try!(write!(t, "Local:"));
    try!(write_status(t, task.local_code().is_some()));

    try!(write!(t, "Remote:"));
    try!(write_status(t, task.remote_code().is_some()));
    try!(writeln!(t, ""));

    if let (Some(ref local_code), Some(ref remote_code)) = (task.local_code(), task.remote_code()) {
        if diff {
            try!(print_diff(t, remote_code, local_code));
        }
    }

    Ok(())
}

/// Writes a boolean as a pretty, human-readable string.
fn write_status<T: ?Sized>(t: &mut T, boolean: bool) -> io::Result<()>
    where T: Terminal
{
    try!(t.attr(term::Attr::Bold));

    if boolean {
        try!(t.fg(term::color::GREEN));
        try!(write!(t, " ✔ "))
    } else {
        try!(t.fg(term::color::RED));
        try!(write!(t, " ✘ "));
    }

    try!(t.reset());
    Ok(())
}

fn main() {
    let args: Args = Docopt::new(USAGE).and_then(|d| d.decode()).unwrap_or_else(|e| e.exit());

    let mut t = term::stdout().unwrap();

    let tasks = if args.arg_tasks.len() > 0 {
        meta::fetch_tasks(&args.arg_tasks.as_slice())
    } else {
        meta::fetch_all_tasks()
    };

    let task_filter = args.flag_filter.unwrap_or_default().to_owned();

    for task in tasks {
        match task_filter {
            TaskFilter::LocalOnly if !task.is_local_only() => continue,
            TaskFilter::RemoteOnly if !task.is_remote_only() => continue,
            TaskFilter::Unimplemented if !task.is_unimplemented() => continue,
            TaskFilter::All | _ => print_task(&mut *t, &task, args.flag_diff).unwrap(),
        }
    }
}
//! Aufgabe 2.1: Primzahltest

fn main() {

}

#[test]
fn small_primes() {
    assert!(is_prime(2));
    assert!(is_prime(3));
    assert!(is_prime(5));
    assert!(is_prime(7));
}

#[test]
fn small_composites() {


resentation of the path
	update_path_representation(data);

	// Setup our position params
	let snapped_position = data.snap_handler.snap_position(responses, input.viewport_bounds.size(), document, input.mouse.position);
	let position = transform.inverse().transform_point2(snapped_position);

	// Add a curve to the path
	if let Some(layer_path) = &data.path {
		// Push curve onto path
		let point = Point { x: position.x, y: position.y };
		data.bez_path.push(PathEl::CurveTo(point, point, point));

		responses.push_back(apply_bez_path(layer_path.clone(), data.bez_path.clone(), transform));

		// Clear previous overlays
		data.shape_editor.remove_overlays(responses);

		// Create a new `shape` from the updated `bez_path`
		let bez_path = data.bez_path.clone().into_iter().collect();
		data.curve_shape = VectorShape::new(layer_path.to_vec(), transform, &bez_path, false, responses);
		data.shape_editor.set_shapes_to_modify(vec![data.curve_shape.clone()]);

		// Select the second to last `PathEl`'s handle
		data.shape_editor.set_shape_selected(0);
		let handle_element = data.shape_editor.select_nth_anchor(0, -2);
		handle_element.select_point(ControlPointType::Handle2 as usize, true, responses);

		// Select the last `PathEl`'s anchor point
		if let Some(last_anchor) = data.shape_editor.select_last_anchor() {
			last_anchor.select_point(ControlPointType::Anchor as usize, true, responses);
		}
		data.shape_editor.set_selected_mirror_options(true, true);
	}
}

/// Replace a `PathEl` with another inside of `bez_path` by index
fn replace_path_element(data: &mut PenToolData, transform: DAffine2, replace_index: usize, replacement: PathEl, responses: &mut VecDeque<Message>) {
	data.bez_path[replace_index] = replacement;
	if let Some(layer_path) = &data.path {
		responses.push_back(apply_bez_path(layer_path.clone(), data.bez_path.clone(), transform));
	}
}

/// Remove a curve from the end of the `bez_path`
fn remove_from_curve(data: &mut PenToolData) {
	// Refresh data's representation of the path
	update_path_representation(data);
	data.bez_path.pop();
}

/// Create the initial moveto for the `bez_path`
fn start_bez_path(start_position: DVec2) -> Vec<PathEl> {
	vec![PathEl::MoveTo(Point {
		x: start_position.x,
		y: start_position.y,
	})]
}

/// Convert curve `PathEl` into a line `PathEl`
fn convert_curve_to_line(curve: PathEl) -> PathEl {
	match curve {
		PathEl::CurveTo(_, _, p) => PathEl::LineTo(p),
		_ => PathEl::MoveTo(Point::ZERO),
	}
}

/// Update data's version of `bez_path` to match `ShapeEditor`'s version
fn update_path_representation(data: &mut PenToolData) {
	// TODO Update ShapeEditor to provide similar functionality
	// We need to make sure we have the most up-to-date bez_path
	if !data.shape_editor.shapes_to_modify.is_empty() {
		// Hacky way of saving the curve changes
		data.bez_path = data.shape_editor.shapes_to_modify[0].bez_path.elements().to_vec();
	}
}

/// Apply the `bez_path` to the `shape` in the viewport
fn apply_bez_path(layer_path: Vec<LayerId>, bez_path: Vec<PathEl>, transform: DAffine2) -> Message


 {
				result = _attach->textState(point - QPoint(attachLeft, attachTop), request);
			}
		}
	}
	if (_parent->data()->isHistoryEntry()) {
		if (!result.link && outer.contains(point)) {
			result.link = _openl;
		}
	}
	_lastPoint = point - outer.topLeft();

	result.symbol += symbolAdd;
	return result;
}

TextSelection Game::adjustSelection(TextSelection selection, TextSelectType type) const {
	if (!_descriptionLines || selection.to <= _title.length()) {
		return _title.adjustSelection(selection, type);
	}
	auto descriptionSelection = _description.adjustSelection(toDescriptionSelection(selection), type);
	if (selection.from >= _title.length()) {
		return fromDescriptionSelection(descriptionSelection);
	}
	auto titleSelection = _title.adjustSelection(selection, type);
	return { titleSelection.from, fromDescriptionSelection(descriptionSelection).to };
}

void Game::clickHandlerActiveChanged(const ClickHandlerPtr &p, bool active) {
	if (_attach) {
		_attach->clickHandlerActiveChanged(p, active);
	}
}

void Game::clickHandlerPressedChanged(const ClickHandlerPtr &p, bool pressed) {
	if (p == _openl) {
		if (pressed) {
			if (!_ripple) {
				const auto full = QRect(0, 0, width(), height());
				const auto outer = full.marginsRemoved(inBubblePadding());
				_ripple = std::make_unique<Ui::RippleAnimation>(
					st::defaultRippleAnimation,
					Ui::RippleAnimation::RoundRectMask(
						outer.size(),
						_st.radius),
					[=] { repaint(); });
			}
			_ripple->add(_lastPoint);
		} else if (_ripple) {
			_ripple->lastStop();
		}
	}
	if (_attach) {
		_attach->clickHandlerPressedChanged(p, pressed);
	}
}

bool Game::toggleSelectionByHandlerClick(const ClickHandlerPtr &p) const {
	return _attach && _attach->toggleSelectionByHandlerClick(p);
}

bool Game::allowTextSelectionByHandler(const ClickHandlerPtr &p) const {
	return (p == _openl);
}

bool Game::dragItemByHandler(const ClickHandlerPtr &p) const {
	return _attach && _attach->dragItemByHandler(p);
}

TextForMimeData Game::selectedText(TextSelection selection) const {
	auto titleResult = _title.toTextForMimeData(selection);
	auto descriptionResult = _description.toTextForMimeData(
		toDescriptionSelection(selection));
	if (titleResult.empty()) {
		return descriptionResult;
	} else if (descriptionResult.empty()) {
		return titleResult;
	}
	return titleResult.append('\n').append(std::move(descriptionResult));
}

void Game::playAnimation(bool autoplay) {
	if (_attach) {
		if (autoplay) {
			_attach->autoplayAnimation();
		} else {
			_attach->playAnimation();
		}
	}
}

QMargins Game::inBubblePadding() const {
	return {
		st::msgPadding.left(),
		isBubbleTop() ? st::msgPadding.left() : st::mediaInBubbleSkip,
		st::msgPadding.right(),
		(isBubbleBottom()
			? (st::msgPadding.left() + bottomInfoPadding())
			: st::mediaInBubbleSkip),
	};
}

QMargins Game::innerMargin() const {
	return _st.padding;
}

int Game::bottomInfoPadding() const {
	if (!isBubbleBottom()) {
		return 0;
	}

	auto result = st::msgDateFont->height;

	// we use padding greater than st::msgPadding.bottom() in the
	// bottom of the bubble so that the le


[][] = [
  ['v', 'verb / verso / 《話》very / velocity / volt[s] / volume / vide'],
  ['V', 'vanadium の化学記号'],
  ['v.', 'versus(《米》vs.)'],
  ['V.', 'vice / village'],
  ['V.G.', 'very good / Vicar-General 司教総代理'],
  ['v.i.', 'verb intransitive / vide infra(ラテン語)下を見よ'],
  ['V.P.', 'Vice-President'],
  ['v.s.', 'vide supra'],
  ['V sign', 'Vサイン(人さし指と中指を立ててV字形を作り勝利を表す)'],
  ['v.t.', 'verb transitive'],
  ['V,v', '〈C〉英語アルファベットの第22字 / 〈C〉V字形をしたもの / 〈U〉(ローマ数字の)5'],
  ['v.v.', 'vice versa'],
  ['V-neck', 'ネック(V 字形のえりぐり)'],
  ['V-One', '=V-1'],
  ['V-two', '=V-2'],
  ['V-1', 'V1号[ロケット爆弾](第二次世界大戦中,ドイツ軍が英国攻撃用に使った)'],
  ['V-2', 'V2号[ロケット爆弾](第二次世界大戦末期に,ドイツ軍が英国攻撃用に使った)'],
  ['VA', 'Veterans Administration 在郷軍人局 / Vice Admiral'],
  ['Va.,VA', 'Virginia'],
  ['Vac', '大学の休暇[vacation の略]'],
  ['vacancy', '〈C〉『あき部屋』,あいた貸間,あき地 / 〈C〉(地位・役職などの)『空席』,欠員 / 〈U〉〈C〉空間,空虚 / 〈U〉虚脱状態,ぼんやりしていること / 〈U〉何もすることがない状態,無為,暇'],
  ['vacant', '(部屋・家・座席・土地などが)『あいている』,無人の / (地位・役職などが)『空席の』,欠員のある / 放心した,ぼんやりした;間の抜けた,ばかな / (時間などが)『あいている』,暇な'],
  ['vacantly', 'ぼんやりと,ぽかんとして'],
  ['vacate', '〈席・家・場所など〉‘を\'あける,立ちのく / 〈地位・役職など〉‘を\'退く,辞任する'],
  ['vacation', '〈C〉《おもに米》『休暇』,休み(《英》holiday) / 〈C〉〈U〉《文》(部屋・家・土地などを)明け渡すこと,立ちのき;辞職,退任《+of+名》 / (…で)『休暇をとる』《+at(in)+名》'],
  ['vacationer', '休暇をとる人'],
  ['vaccinate', '(…の免疫になるように)〈人・家畜〉


                    // 直接解析JSON并手动构建对象
                    val jsonNode = objectMapper.readTree(responseBody)
                    val code = jsonNode.get("code").asInt()
                    val message = jsonNode.get("message").asText()
                    val timestamp = if (jsonNode.has("timestamp")) jsonNode.get("timestamp").asText() else null

                    if (code == 200 && jsonNode.has("data")) {
                        val dataNode = jsonNode.get("data")

                        // 手动解析用户列表
                        val users = mutableListOf<ApiModels.UserInfo>()
                        val itemsNode = dataNode.get("items")
                        if (itemsNode != null && itemsNode.isArray) {
                            itemsNode.forEach { userNode ->
                                try {
                                    val id = userNode.get("id").asInt()
                                    val userId = if (userNode.has("user_id")) userNode.get("user_id").asText() else null
                                    val username = userNode.get("username").asText()
                                    val email = if (userNode.has("email")) userNode.get("email").asText() else null
                                    val phone = if (userNode.has("phone")) userNode.get("phone").asText() else null
                                    val isActive = if (userNode.has("is_active")) userNode.get("is_active").asBoolean() else true
                                    val createdAt = if (userNode.has("created_at")) userNode.get("created_at").asText() else null
                                    val updatedAt = if (userNode.has("updated_at")) userNode.get("updated_at").asText() else null

                                    // 处理roles字段 - 可能是字符串数组
                                    val rolesList = mutableListOf<ApiModels.UserInfo.Role>()
                                    if (userNode.has("roles") && userNode.get("roles").isArray) {
                                        val rolesNode = userNode.get("roles")
                                        rolesNode.forEach { roleNode ->
                                            if (roleNode.isTextual) {
                                                // 字符串角色
                                                rolesList.add(ApiModels.UserInfo.Role(name = roleNode.asText()))
                                            } else if (roleNode.isObject) {
                                                // 对象角色
                                                val roleId = if (roleNode.has("id")) roleNode.get("id").asInt() else null
                                                val roleName = if (roleNode.has("name")) roleNode.get("name").asText() else null
                                                rolesList.add(ApiModels.UserInfo.Role(id = roleId, name = roleName))
                                            }
                                        }
                                    }

                                    // 创建UserInfo对象并添加到列表
                                    users.add(ApiModels.UserInfo(
                                        id = id,
                                        userId = userId,
                                        username = username,
                                        email = email,
                                        phone = phone,
                                        isActive = isActive,
                                        createdAt = createdAt,
                                        updatedAt = updatedAt,
                                        roles = rolesList
                                    ))
                                } catch (e: Exception) {
                                    println("[ERROR] 解析用户信息失败: ${e.message}")
                                    e.printStackTrace()
                                }
                            }
                        }

                        val total = if (dataNode.has("total")) dataNode.get("total").asInt() else users.size
                        val responsePage = if (dataNode.has("page")) dataNode.get("page").asInt() else


r": {
                                                    "responseText": {"simpleText": "Thanks for your feedback!"},
                                                    "actionButton": {
                                                        "buttonRenderer": {
                                                            "text": {"simpleText": "Learn more"},
                                                            "navigationEndpoint": {
                                                                "clickTrackingParams": "CCAQ1eACIhMIpJ6A6pOQ7AIVVBS3AB3jNwKp",
                                                                "commandMetadata": {
                                                                    "webCommandMetadata": {
                                                                        "url": "https://support.google.com/youtube/answer/3181017?hl=en",
                                                                        "webPageType": "WEB_PAGE_TYPE_UNKNOWN",
                                                                        "rootVe": 83769
                                                                    }
                                                                },
                                                                "urlEndpoint": {"url": "https://support.google.com/youtube/answer/3181017?hl=en"}
                                                            },
                                                            "trackingParams": "CCAQ1eACIhMIpJ6A6pOQ7AIVVBS3AB3jNwKp"
                                                        }
                                                    },
                                                    "trackingParams": "CB8QuWoiEwiknoDqk5DsAhVUFLcAHeM3Aqk="
                                                }
                                            }
                                        }
                                    },
                                    "visitAdvertiserRenderer": {
                                        "buttonRenderer": {
                                            "style": "STYLE_UNKNOWN",
                                            "text": {"runs": [{"text": "plarium.com"}]},
                                            "icon": {"iconType": "OPEN_IN_NEW"},
                                            "navigationEndpoint": {
                                                "clickTrackingParams": "CB0Q5LwDIhMIpJ6A6pOQ7AIVVBS3AB3jNwKp",
                                                "loggingUrls": [{"baseUrl": "https://www.googleadservices.com/pagead/aclk?sa=L\u0026ai=Cg-9DqBh0X_HDG5usz7sPiLGGwAyuytOiX7Okpb63DNnZHhACIABgpaCVgJgBggEXY2EtcHViLTYyMTk4MTE3NDcwNDkzNzGgAf6NoLcCqAMEqgTDA0_QvsqbeyR4DskRkCtMAbeT4BBnJc2ZpD0UzjA6OdDczD1CvS0fUkLDJNawEg4CNC9owZHP3Sf_6vZW_JitDXfz2C-Q6isy8VCvBslUG0rypAP69ESPBJc8Q_2tacGm8W0SXoZVAmCiT1NB_YbtlHsVllTwBRocHxI150e0MpZy_9DeErW0


 %tt
	.word 0xb7a00040  ! 9432: FMOVd	fmovd	%f0, %f58
	.word 0xbe350000  ! 9433: SUBC_R	orn 	%r20, %r0, %r31
	.word 0xbe24c000  ! 9434: SUB_R	sub 	%r19, %r0, %r31
	.word 0xb3abc820  ! 9439: FMOVVC	fmovs	%fcc1, %f0, %f25
	ldda	[%r19 + %g0] 0xf0, %f2
	.word 0xb3aa8820  ! 9442: FMOVG	fmovs	%fcc1, %f0, %f25
	.word 0xb5a48920  ! 9444: FMULs	fmuls	%f18, %f0, %f26
	.word 0xb3aa0820  ! 9445: FMOVA	fmovs	%fcc1, %f0, %f25
	ldda	[%r18 + %g0] 0xf0, %f2
	.word 0xb5aa4820  ! 9457: FMOVNE	fmovs	%fcc1, %f0, %f26
	.word 0xbd342001  ! 9463: SRL_I	srl 	%r16, 0x0001, %r30
	.word 0xba4521c4  ! 9469: ADDC_I	addc 	%r20, 0x01c4, %r29
	.word 0xbf3dd000  ! 9471: SRAX_R	srax	%r23, %r0, %r31
hwintr_1_442:
!$EV trig_pc_d(1,expr(@VA(.MAIN.hwintr_1_442), 16, 16)) -> intp(1, 0, 37)
	.word 0xb9a98820  ! 9482: FMOVNEG	fmovs	%fcc1, %f0, %f28
	.word 0xb3480000  ! 9485: RDHPR_HPSTATE	rdhpr	%hpstate, %r25
	.word 0xb9a409a0  ! 9488: FDIVs	fdivs	%f16, %f0, %f28
	.word 0xb7a8c820  ! 9490: FMOVL	fmovs	%fcc1, %f0, %f27
	.word 0xbba58840  ! 9495: FADDd	faddd	%f22, %f0, %f60
	.word 0xb5a00560  ! 9496: FSQRTq	fsqrt
	.word 0xb7a549a0  ! 9497: FDIVs	fdivs	%f21, %f0, %f27
	.word 0xb6c4a0ba  ! 9502: ADDCcc_I	addccc 	%r18, 0x00ba, %r27
hwintr_1_443:
!$EV trig_pc_d(1,expr(@VA(.MAIN.hwintr_1_443), 16, 16)) -> intp(1, 0, 3f)
	.word 0xbfa54920  ! 9505: FMULs	fmuls	%f21, %f0, %f31
	.word 0xb5a48920  ! 9506: FMULs	fmuls	%f18, %f0, %f26
	.word 0xb9aa8820  ! 9510: FMOVG	fmovs	%fcc1, %f0, %f28
hwintr_1_444:
!$EV trig_pc_d(1,expr(@VA(.MAIN.hwintr_1_444), 16, 16)) -> intp(1, 0, 3d)
hwintr_1_445:
!$EV trig_pc_d(1,expr(@VA(.MAIN.hwintr_1_445), 16, 16)) -> intp(1, 0, 1b)
	.word 0xb9a94820  ! 9517: FMOVCS	fmovs	%fcc1, %f0, %f28
	.word 0x859521c4  ! 9521: WRPR_TSTATE_


	mov	v17.d[0],x14
	mov	v17.d[1],x15
#ifdef __AARCH64EB__
	rev32	v17.16b,v17.16b
#endif
	mov	w7,0x87
	extr	x9,x13,x13,#32
	extr	x15,x13,x12,#63
	and	w8,w7,w9,asr#31
	eor	x14,x8,x12,lsl#1
	mov	v18.d[0],x16
	mov	v18.d[1],x17
#ifdef __AARCH64EB__
	rev32	v18.16b,v18.16b
#endif
	mov	w7,0x87
	extr	x9,x15,x15,#32
	extr	x17,x15,x14,#63
	and	w8,w7,w9,asr#31
	eor	x16,x8,x14,lsl#1
	mov	v19.d[0],x18
	mov	v19.d[1],x19
#ifdef __AARCH64EB__
	rev32	v19.16b,v19.16b
#endif
	mov	w7,0x87
	extr	x9,x17,x17,#32
	extr	x19,x17,x16,#63
	and	w8,w7,w9,asr#31
	eor	x18,x8,x16,lsl#1
	mov	v20.d[0],x20
	mov	v20.d[1],x21
#ifdef __AARCH64EB__
	rev32	v20.16b,v20.16b
#endif
	mov	w7,0x87
	extr	x9,x19,x19,#32
	extr	x21,x19,x18,#63
	and	w8,w7,w9,asr#31
	eor	x20,x8,x18,lsl#1
	mov	v21.d[0],x22
	mov	v21.d[1],x23
#ifdef __AARCH64EB__
	rev32	v21.16b,v21.16b
#endif
	mov	w7,0x87
	extr	x9,x21,x21,#32
	extr	x23,x21,x20,#63
	and	w8,w7,w9,asr#31
	eor	x22,x8,x20,lsl#1
	mov	v22.d[0],x24
	mov	v22.d[1],x25
#ifdef __AARCH64EB__
	rev32	v22.16b,v22.16b
#endif
	mov	w7,0x87
	extr	x9,x23,x23,#32
	extr	x25,x23,x22,#63
	and	w8,w7,w9,asr#31
	eor	x24,x8,x22,lsl#1
	mov	v23.d[0],x26
	mov	v23.d[1],x27
#ifdef __AARCH64EB__
	rev32	v23.16b,v23.16b
#endif
	mov	w7,0x87
	extr	x9,x25,x25,#32
	extr	x27,x25,x24,#63
	and	w8,w7,w9,asr#31
	eor	x26,x8,x24,lsl#1
	b.lt	.Lxts_4_blocks_process_gb
	ld1	{v4.4s,v5.4s,v6.4s,v7.4s},[x0],#64
	rbit	v16.16b,v16.16b
	rbit	v17.16b,v17.16b
	rbit	v18.16b,v18.16b
	rbit	v19.16b,v19.16b
	eor	v4.16b, v4.16b, v16.16b
	eor	v5.16b, v5.16b, v17.16b
	eor


image-gallery-svg {
	@apply !h-16;
}

.gallery-item .image-gallery-fullscreen-button {
	@apply absolute top-0 bottom-0 left-[60px] w-[calc(100%-120px)] p-5 flex-center opacity-0 transition-opacity;
}

.gallery-item .image-gallery-fullscreen-button .image-gallery-svg {
	@apply !h-8 !w-8;
}

.gallery-item:hover .image-gallery-fullscreen-button {
	@apply opacity-100 cursor-zoom-in;
}

.gallery-item .image-gallery-right-nav:hover,
.gallery-item .image-gallery-left-nav:hover {
	@apply opacity-100;
}

.gallery-item .image-gallery-icon:focus {
	@apply opacity-100;
}

.image-gallery-content.fullscreen .image-gallery-fullscreen-button {
	@apply hidden;
}

.image-gallery-content.fullscreen .image-gallery-slide img {
	@apply object-contain;
}

#projects .image-gallery-index {
	@apply hidden;
}
/*! WMPotify for Spicetify by Ingan121 */
@import "variables.scss";
@import "global.scss";

@import "controls/menu.scss";
@import "controls/scrollbar.scss";
@import "controls/button.scss";
@import "controls/search.scss";
@import "controls/checkbox.scss";
@import "controls/dropdown.scss";
@import "controls/slider.scss";
@import "controls/dialog.scss";
@import "controls/tooltip.scss";
@import "controls/textbox.scss";
@import "controls/common.scss";

@import "ui/frame.scss";
@import "ui/topbar.scss";
@import "ui/mainarea.scss";
@import "ui/playerbar.scss";
@import "ui/fullscreen.scss";
@import "ui/tinting.scss";

@import "panels/queue.scss";
@import "panels/npv.scss";
@import "panels/friends.scss";
@import "panels/libx.scss";
@import "panels/config.scss";

@import "pages/nowplaying.scss";
@import "pages/home.scss";
@import "pages/playlist.scss";
@import "pages/artist.scss";
@import "pages/discography.scss";
@import "pages/album.scss";
@import "pages/search.scss";
@import "pages/settings.scss";
@import "pages/profile.scss";
@import "pages/genre.scss";
@import "pages/cinema.scss";
:root {
    /* Windows Classic Color Schemes + WindowMetrics + Fonts */
    --active-border: #B4B4B4;
    --active-title: #99B4D1;
    --app-workspace: #ABABAB;
    --background: #000000;
    --button-alternate-face: #000000;
    --button-dk-shadow: #696969;
    --surface: #f0f0f0; /* ButtonFace */
    --button-hilight: #FFFFFF;
    --button-light: #E3E3E3;
    --button-shadow-color: #A0A0A0;
    --button-text: #000000;
    --gradient-active-title: #B9D1EA;
    --gradient-inactive-title: #D7E4F2;
    --gray-text: #6D6D6D;
    --hilight: #3399FF;
    --hilight-text: #FFFFFF;
    --hot-tracking-color: #0066CC;
    --inactive-border: #F4F7FC;
    --inactive-title: #BFCDDB;
    --inactive-title-text: #434E54;
    --info-t


: string) => {
				if (!phrase) return null;
				return this.client.util.resolveGuild(phrase, this.client.guilds.cache);
			},

			[ArgumentTypes.GUILDS]: (_message: Message, phrase: string) => {
				if (!phrase) return null;
				const guilds = this.client.util.resolveGuilds(phrase, this.client.guilds.cache);
				return guilds.size ? guilds : null;
			},

			[ArgumentTypes.MESSAGE]: (message: Message, phrase: string) => {
				if (!phrase) return null;
				try {
					return message.channel.messages.fetch(phrase as Snowflake);
				} catch (e) {
					return null;
				}
			},

			[ArgumentTypes.GUILD_MESSAGE]: async (message: Message, phrase: string) => {
				if (!phrase) return null;
				if (!message.guild) return null;
				for (const channel of message.guild.channels.cache.values()) {
					if (channel.type !== "GUILD_TEXT") continue;
					try {
						return await (channel as TextChannel | NewsChannel | ThreadChannel).messages.fetch(phrase as Snowflake);
					} catch (err) {
						if (/^Invalid Form Body/.test(err.message)) return null;
					}
				}

				return null;
			},

			[ArgumentTypes.RELEVANT_MESSAGE]: async (message: Message, phrase: string) => {
				if (!phrase) return null;
				const hereMsg = await message.channel.messages.fetch(phrase as Snowflake).catch(() => null);
				if (hereMsg) {
					return hereMsg;
				}

				if (message.guild) {
					for (const channel of message.guild.channels.cache.values()) {
						if (channel.type !== "GUILD_TEXT") continue;
						try {
							return await (channel as TextChannel | NewsChannel | ThreadChannel).messages.fetch(phrase as Snowflake);
						} catch (err) {
							if (/^Invalid Form Body/.test(err.message)) return null;
						}
					}
				}

				return null;
			},

			[ArgumentTypes.INVITE]: (_message: Message, phrase: string) => {
				if (!phrase) return null;
				try {
					return this.client.fetchInvite(phrase);
				} catch (e) {
					return null;
				}
			},

			[ArgumentTypes.USER_MENTION]: (_message: Message, phrase: string) => {
				if (!phrase) return null;
				const id = phrase.match(/<@!?(\d{17,19})>/);
				if (!id) return null;
				return this.client.users.cache.get(id[1] as Snowflake) || null;
			},

			[ArgumentTypes.MEMBER_MENTION]: (message: Message, phrase: string) => {
				if (!phrase) return null;
				if (!message.guild) return null;
				const id = phrase.match(/<@!?(\d{17,19})>/);
				if (!id) return null;
				return message.guild.members.cache.get(id[1] as Snowflake) || null;
			},

			[ArgumentTypes.CHANNEL_MENTION]: (message: Message, phrase: string) => {
				if (!phrase) return null;
				if (!message.guild) return null;
				const id = phrase.match(/<#(\d{17,19})>/);
				if (!id) return null;
				return message.guild.channels.cache.get(id[1] as Snowflake) || null;
			},

			[ArgumentTypes.ROLE_MENTION]: (message: Message, phrase: string) => {
				if (!phrase) return null;
				if (!message.guil


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

The Medical Imaging Interaction Toolkit (MITK)

Copyright (c) German Cancer Research Center (DKFZ)
All rights reserved.

Use of this source code is governed by a 3-clause BSD license that can be
found in the LICENSE file.

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

#ifndef mitkDICOMTagsOfInterestHelper_h
#define mitkDICOMTagsOfInterestHelper_h

#include <unordered_map>

#include <mitkDICOMTagPath.h>

#include "MitkDICOMExports.h"

namespace mitk
{

    /** Type specifies tags of interest. Key is the tag path of interest.
    * The value is an optional user defined name for the property that should be used to store the tag value(s).
    * Empty value is default and will imply to use the found DICOMTagPath as property name.*/
    typedef std::map<DICOMTagPath, std::string> DICOMTagPathMapType;

    /** Returns the list of tags that are by default of interest and should
    * be extracted when loading DICOM data. This can for instance be used
    * to with DICOMFileReader::SetAdditionalTagsOfInterest().*/
    DICOMTagPathMapType MITKDICOM_EXPORT GetCurrentDICOMTagsOfInterest();

    /** Returns the list of tags that are by default of interest and should
     * be extracted when loading DICOM data. This can for instance be used
     * to with DICOMFileReader::SetAdditionalTagsOfInterest().*/
    DICOMTagPathMapType MITKDICOM_EXPORT GetDefaultDICOMTagsOfInterest();
}

#endif


 = new UserEvent(),
                PageSize = 0,
                Filter = "",
                ValidateOnly = false,
                Params = { { "", new Value() }, },
                UserLabels = { { "", "" }, },
            };
            // Make the request
            RecommendResponse response = recommendationServiceClient.Recommend(request);
            // End snippet
        }

        /// <summary>Snippet for RecommendAsync</summary>
        public async Task RecommendRequestObjectAsync()
        {
            // Snippet: RecommendAsync(RecommendRequest, CallSettings)
            // Additional: RecommendAsync(RecommendRequest, CancellationToken)
            // Create client
            RecommendationServiceClient recommendationServiceClient = await RecommendationServiceClient.CreateAsync();
            // Initialize request argument(s)
            RecommendRequest request = new RecommendRequest
            {
                ServingConfigAsServingConfigName = ServingConfigName.FromProjectLocationDataStoreServingConfig("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]"),
                UserEvent = new UserEvent(),
                PageSize = 0,
                Filter = "",
                ValidateOnly = false,
                Params = { { "", new Value() }, },
                UserLabels = { { "", "" }, },
            };
            // Make the request
            RecommendResponse response = await recommendationServiceClient.RecommendAsync(request);
            // End snippet
        }
    }
}


de
        MOVLO       r6, r8                  // c3

        .p2align    3
0:
        # Load initial bias from w into accumulators
        VLDM        r9!, {d16-d19}          // Bias
        VMOV        q10, q8
        VMOV        q11, q9
        VMOV        q12, q8
        VMOV        q13, q9
        VMOV        q14, q8
        VMOV        q15, q9

1:
        # Load next 4 A pointers
        LDR         r3, [r2,  0]
        LDR         r12, [r2,  4]
        LDR         r10, [r2,  8]
        LDR         r0, [r2, 12]
        ADD         r2, r2, 16              // a += MR * sizeof(void*)

        # Add a_offset
        LDR         r5, [sp, 132]           // a_offset
        LDR         r7, [sp, 136]           // zero
        CMP         r3,  r7                 // if a0 == zero
        ADD         r3,  r3, r5             // a0 += a_offset
        MOVEQ       r3,  r7                 //   a0 = zero, else += a0 + a_offset
        CMP         r12,  r7                // if a1 == zero
        ADD         r12, r12, r5            // a1 += a_offset
        MOVEQ       r12,  r7                //   a1 = zero, else += a1 + a_offset
        CMP         r10,  r7                // if a2 == zero
        ADD         r10, r10, r5            // a2 += a_offset
        MOVEQ       r10,  r7                //   a2 = zero, else += a2 + a_offset
        CMP         r0,  r7                 // if a3 == zero
        ADD         r0,  r0, r5             // a3 += a_offset
        LDR         r5, [sp, 68]            // kc
        MOVEQ       r0,  r7                 //   a3 = zero, else += a3 + a_offset

        SUBS        r5, r5, 16              // kc - 16
        BLO         5f                      // less than 4 channels?

        # Prologue
        VLD1.32     {d0}, [r3]!             // A0
        VLDM        r9!, {d8-d11}           // B0
        VLD1.32     {d1}, [r12]!            // A1
        VLD1.32     {d2}, [r10]!            // A2
        VLD1.32     {d3}, [ r0]!            // A3

        SUBS        r5, r5, 16
        BLO         3f                      // less than 4 channels?  skip main loop

        .p2align    3

        # Main loop - 4 floats of A (16 bytes)
2:
        VMLA.F32    q8, q4, d0[0]
        VLDM        r9!, {d12-d15}          // B1
        VMLA.F32    q10, q4, d1[0]
        VMLA.F32    q12, q4, d2[0]
        VLD1.32     {d4}, [r3]!             // A0
        VMLA.F32    q14, q4, d3[0]
        VMLA.F32    q9, q5, d0[0]
        VLD1.32     {d5}, [r12]!            // A1
        VMLA.F32    q11, q5, d1[0]
        VMLA.F32    q13, q5, d2[0]
        VMLA.F32    q15, q5, d3[0]
        VLD1.32     {d6}, [r10]!            // A2
        VMLA.F32    q8, q6, d0[1]
        VMLA.F32    q10, q


/*
 *  Copyright 2018 The WebRTC Project Authors. All rights reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#ifndef EXAMPLES_ANDROIDNATIVEAPI_JNI_ANDROIDCALLCLIENT_H_
#define EXAMPLES_ANDROIDNATIVEAPI_JNI_ANDROIDCALLCLIENT_H_

#include <jni.h>

#include <memory>
#include <string>

#include "api/peerconnectioninterface.h"
#include "rtc_base/criticalsection.h"
#include "rtc_base/scoped_ref_ptr.h"
#include "rtc_base/thread_checker.h"
#include "sdk/android/native_api/jni/scoped_java_ref.h"
#include "sdk/android/native_api/video/videosource.h"

namespace webrtc_examples {

class AndroidCallClient {
 public:
  AndroidCallClient();
  ~AndroidCallClient();

  void Call(JNIEnv* env,
            const webrtc::JavaRef<jobject>& cls,
            const webrtc::JavaRef<jobject>& local_sink,
            const webrtc::JavaRef<jobject>& remote_sink);
  void Hangup(JNIEnv* env, const webrtc::JavaRef<jobject>& cls);
  // A helper method for Java code to delete this object. Calls delete this.
  void Delete(JNIEnv* env, const webrtc::JavaRef<jobject>& cls);

  webrtc::ScopedJavaLocalRef<jobject> GetJavaVideoCapturerObserver(
      JNIEnv* env,
      const webrtc::JavaRef<jobject>& cls);

 private:
  class PCObserver;

  void CreatePeerConnectionFactory() RTC_RUN_ON(thread_checker_);
  void CreatePeerConnection() RTC_RUN_ON(thread_checker_);
  void Connect() RTC_RUN_ON(thread_checker_);

  rtc::ThreadChecker thread_checker_;

  bool call_started_ RTC_GUARDED_BY(thread_checker_);

  const std::unique_ptr<PCObserver> pc_observer_;

  rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> pcf_
      RTC_GUARDED_BY(thread_checker_);
  std::unique_ptr<rtc::Thread> network_thread_ RTC_GUARDED_BY(thread_checker_);
  std::unique_ptr<rtc::Thread> worker_thread_ RTC_GUARDED_BY(thread_checker_);
  std::unique_ptr<rtc::Thread> signaling_thread_
      RTC_GUARDED_BY(thread_checker_);

  std::unique_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>> local_sink_
      RTC_GUARDED_BY(thread_checker_);
  std::unique_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>> remote_sink_
      RTC_GUARDED_BY(thread_checker_);
  rtc::scoped_refptr<webrtc::JavaVideoTrackSourceInterface> video_source_
      RTC_GUARDED_BY(thread_checker_);

  rtc::CriticalSection pc_mutex_;
  rtc::scoped_refptr<webrtc::PeerConnectionInterface> pc_
      RTC_GUARDED_BY(pc_mutex_);
};

}  // namespace webrtc_examples

#endif  // EXAMPLES_ANDROIDNATIVEAPI_JNI_ANDROIDCALLCLIENT_H_