intenance on the bssid device if we're a beacon or other ssid-carrying
            // packet...

            if (dot11info->subtype == packet_sub_beacon) {
                d11phy->handle_ssid(dot11info->bssid_dev, dot11info->bssid_dot11, in_pack,
                        pack_l1info, dot11info, pack_gpsinfo);
                dot11info->bssid_dot11->set_last_beacon_timestamp(in_pack->ts.tv_sec);
                dot11info->bssid_dot11->bitset_type_set(DOT11_DEVICE_TYPE_BEACON_AP);
            } else if (dot11info->subtype == packet_sub_probe_resp) {
                d11phy->handle_ssid(dot11info->bssid_dev, dot11info->bssid_dot11, in_pack,
                        pack_l1info, dot11info, pack_gpsinfo);
                dot11info->bssid_dot11->bitset_type_set(DOT11_DEVICE_TYPE_PROBE_AP);
            }

            d11phy->devicetracker->update_view_device(dot11info->bssid_dev);
        }

        if (dot11info->source_dev != nullptr) {
            dot11info->source_dot11 =
                dot11info->source_dev->get_sub_as<dot11_tracked_device>(d11phy->dot11_device_entry_id);
            std::stringstream newdevstr;

            if (dot11info->source_dot11 == nullptr) {
                _MSG_INFO("Detected new 802.11 Wi-Fi device {}",
                        dot11info->source_dev->get_macaddr().mac_to_string());

                dot11info->source_dot11 =
                    std::make_shared<dot11_tracked_device>(d11phy->dot11_builder.get());

                dot11_tracked_device::attach_base_parent(dot11info->source_dot11,
                        dot11info->source_dev);

                dot11info->new_device = true;
            }

            if (dot11info->bssid_dev != nullptr) {
                dot11info->source_dot11->set_last_bssid(dot11info->bssid_dev->get_macaddr());
            } else {
                dot11info->source_dot11->set_last_bssid(mac_addr());
            }

            if (!dot11info->channel.empty() && dot11info->channel != "0") {
                dot11info->source_dev->set_channel(dot11info->channel);
            } else if (pack_l1info != nullptr &&
                    (pack_l1info->freq_khz != dot11info->source_dev->get_frequency() ||
                    dot11info->source_dev->get_channel().length() == 0)) {
                try {
                    dot11info->source_dev->set_channel(khz_to_channel(pack_l1info->freq_khz));
                } catch (const std::runtime_error& e) {
                    ;
                }
            }

            // If it's sending ibss-flagged packets it's got to be adoc
            if (dot11info->ibss) {
                dot11info->source_dev->bitset_basic_type_set(KIS_DEVICE_BASICTYPE_PEER);
                dot11info->source_dev->set_tracker_type_string(d11phy->devtype_adhoc);
                dot11info->source_dot11->bitset_type_set(DOT11_DEVICE_TYPE_ADHOC);
            } else {
                // If it's the source of a mgmt packet, it's got to be a wifi device of
                // some sort and not just bridged
                dot11info->source_dev->set_type_string_ifnotany([d11phy]() {
                    return d11phy->devtype_client;
                }, (KIS_DEVICE_BASICTYPE_CLIENT | KIS_DEVICE_BASICTYPE_AP));
                dot11info->source_dev->bitset_basic_type_set(KIS_DEVICE_BASICTYPE_CLIENT);
            }


)];case
5:var
ag=e[3];a:{var
cw=a[1];if(typeof
ag!=="number"&&1===ag[0]){var
L=ag[2],ah=cE(e,b,cw),ai=ah[2][3];if(0===k$(F5,L,ai)[0]){var
ca=[0,ah[2][2],ai],av=c7([5,dC(ah,F3([0,dh(1,L),L],ca))],d,2);break a}var
av=W([0,d,[0,[0,L,ai]]]);break a}var
av=W([0,d,bxR])}return[0,b,av];case
6:return[0,b,c7([6,j(a[1],function(a){return Gf(e,b,a)})],d,0)];case
7:return[0,b,c7([7,j(a[1],function(a){return Gf(e,b,a)})],d,2)];case
8:return[0,b,c7([8,j(a[1],function(a){return Gf(e,b,a)})],d,2)];case
9:var
cx=a[3],cy=a[2],cb=d3(e,b,a[1],bzd),a6=lc(e,b,cy)[2],a7=a8(a8(cx,function(a){return lc(e,b,a)}),function(a){return a[2]}),cd=a6[2][2],a9=bN(a8(a7,function(a){return a[2][2]}),0);a:{b:{c:{var
cc=[9,cb,a6,a7];switch(cd){case
2:switch(a9){case
2:var
aj=2;break a;case
1:break;default:break c}break;case
0:break;default:break b}if(1===a9)break b}var
aj=0;break a}var
aj=1}return[0,b,c7(cc,d,aj)];case
10:var
cz=a[2],bc=d3(e,b,a[1],bze),bd=lc([0,e[1],e[2],e[3],e[4]+1|0],b,cz)[2];a:{switch(bd[2][2]){case
0:var
ak=bc[1];b:{if(typeof
ak!=="number"&&5===ak[0]){var
a$=ak[1],F=0,bI=C(a$);for(;;){var
aA=F<bI?1:0;if(aA){var
aB=U(a$,F),ba=48<aB?1:0,bb=ba?aB<=57?1:0:ba;if(!bb){F=F+1|0;continue}var
aC=bb}else
var
aC=aA;var
bg=aC;break b}}var
bg=0}if(bg){var
al=2;break a}break;case
2:var
al=2;break a}var
al=0}return[0,b,c7([10,bc,bd],d,al)];case
11:var
aw=a[1],cA=a[4],cB=a[3],ce=d3(e,b,a[2],bzf),cf=d3(e,b,cB,bzg);im(aw);var
bi=_A(e,b,aw,0,cA);return[0,b,c7([11,aw,ce,cf,bi],d,_z(bi[2][2]))];case
12:var
ax=a[1],cC=a[3],am=cE(e,b,a[2]);im(ax);var
y=am[2][3];a:{var
cg=am[2][1];if(typeo


r)
			}
		}
		if len(add) < 1 && len(remove) < 1 {
			update = true
		}

		d.SetPartial("servers")
	}

	if update {
		req := slb.CreateSetVServerGroupAttributeRequest()
		req.VServerGroupId = d.Id()
		req.VServerGroupName = name
		req.BackendServers = expandBackendServersWithPortToString(d.Get("servers").(*schema.Set).List())
		_, err := client.WithSlbClient(func(slbClient *slb.Client) (interface{}, error) {
			return slbClient.SetVServerGroupAttribute(req)
		})
		if err != nil {
			return fmt.Errorf("SetVServerGroupAttribute got an error: %#v", err)
		}
	}

	d.Partial(false)

	return resourceAliyunSlbServerGroupRead(d, meta)
}

func resourceAliyunSlbServerGroupDelete(d *schema.ResourceData, meta interface{}) error {
	client := meta.(*connectivity.AliyunClient)
	slbService := SlbService{client}
	req := slb.CreateDeleteVServerGroupRequest()
	req.VServerGroupId = d.Id()
	return resource.Retry(5*time.Minute, func() *resource.RetryError {
		_, err := client.WithSlbClient(func(slbClient *slb.Client) (interface{}, error) {
			return slbClient.DeleteVServerGroup(req)
		})
		if err != nil {
			if IsExceptedErrors(err, []string{VServerGroupNotFoundMessage, InvalidParameter}) {
				return nil
			}
			if IsExceptedErrors(err, []string{RspoolVipExist}) {
				return resource.RetryableError(fmt.Errorf("DeleteVServerGroup got an error: %#v", err))
			}
			return resource.NonRetryableError(err)
		}

		if _, err := slbService.DescribeSlbVServerGroupAttribute(d.Id()); err != nil {
			if NotFoundError(err) {
				return nil
			}
			return resource.NonRetryableError(fmt.Errorf("While deleting VServer Group, DescribeVServerGroupAttribute got an error: %#v", err))
		}
		return resource.RetryableError(fmt.Errorf("DeleteVServerGroup %s timeout.", d.Id()))
	})
}
/*
Copyright 2016 The TensorFlow Authors. All Rights Reserved.

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

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

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

package tensorflow

// #include "tensorflow/c/c_api.h"
import "C"

import "runtime"

type code C.TF_Code

// status holds error information returned by TensorFlow. We convert all
// TF statuses to Go errors.
type status struct {
	c *C.TF_Status
}

func newStatus() *status {
	s := &status{C.TF_NewStatus()}
	runtime.SetFinalizer(s, (*status).finalizer)
	return s
}

func (s *status) finalizer() {
	C.TF_DeleteStatus(s.c)
}

func (s *status) Code() code {
	return code(C.TF_GetCode(s.c))
}

func (s *status) String() string {
	return C.GoString(C.TF_


 108, 6, "Lindfield North", 203, "Current", "Lindfield Public School", "218 Pacific Hwy", "", "", "LINDFIELD", "NSW", 2070, "Public School", "218 Pacific Hwy", "LINDFIELD", "", "", "Grosvenor Rd - Gate, path", -33.78106, 151.16972, 1371206, "Assisted", 2792, 180, 6, 2},
		PollingPlace{2, "NSW", "Bradfield", 108, 6, "Lindfield West", 204, "Current", "Beaumont Road Public School", "Beaumont Rd", "", "", "KILLARA", "NSW", 2071, "Beaumont Road Public School", "Beaumont Rd", "KILLARA", "Double classroom behind hall", "", "Beaumont Rd - 3 gates", -33.77468, 151.14553, 1371111, "Assisted", 2738, 161, 6, 2},
		PollingPlace{2, "NSW", "Bradfield", 108, 6, "Normanhurst (Bradfield)", 133, "Current", "Normanhurst Public School", "Normanhurst Rd", "", "", "NORMANHURST", "NSW", 2076, "Public School", "Normanhurst Rd", "NORMANHURST", "", "", "Normanhurst Rd - Gate, Path Fraser Rd - Gate, Path", -33.7237, 151.098, 1251410, "Assisted", 1096, 73, 3, 1},
		PollingPlace{2, "NSW", "Bradfield", 108, 6, "Pymble", 206, "Current", "Sacred Heart Parish Hall", "cnr Pacific Hwy & Bobbin Head Rd", "", "", "PYMBLE", "NSW", 2073, "Sacred Heart Parish Hall", "cnr Pacific Hwy & Bobbin Head Rd", "PYMBLE", "", "", "Bobbin Head Rd - Gate Richard Porter Way - Driveway", -33.7395, 151.137, 1370807, "None", 1185, 65, 3, 1},
		PollingPlace{2, "NSW", "Bradfield", 108, 6, "Pymble North", 137, "Current", "Pymble Public School", "Crown Rd", "", "", "PYMBLE", "NSW", 2073, "Public School", "Crown Rd", "PYMBLE", "", "", "Crown Rd - Gate Rushall Rd - Gate", -33.731839, 151.1411654, 1370806, "Assisted", 2599, 90, 6, 1},
		PollingPlace{2, "NSW", "Bradfield", 108, 6, "Pymble West", 207, "Current", "West Pymble Public School", "Apollo Ave", "", "", "WEST PYMBLE", "NSW", 2073, "Public School", "Apollo Ave", "WEST PYMBLE", "", "", "Apollo Ave - Gate/path Tristania Ave - Gate/path", -33.76394, 151.12354, 1370707, "Assisted", 2099, 78, 5, 1},
		PollingPlace{2, "NSW", "Bradfield", 108, 6, "Roseville", 208, "Current", "Roseville Uniting Church", "7A Lord St", "", "", "ROSEVILLE", "NSW", 2069, "Uniting Church", "7A Lord St", "ROSEVILLE", "", "", "Lord St - Main entrance, driveway", -33.7842, 151.179311, 1371405, "Assisted", 1591, 117, 4, 2},
		PollingPlace{2, "NSW", "Bradfield", 108, 6, "Roseville East", 210, "Current", "Roseville Public School", "19a Archbold Rd", "", "", "ROSEVILLE", "NSW", 2069, "Public School", "19a Archbold Rd", "ROSEVILLE", "", "Duntroon Ave", "Addison Ave - Pedestrian path Duntroon Ave - Driveway and path", -33.782, 151.188, 1371406, "Assisted", 1740, 270, 4, 3},
		PollingPlace{2, "NSW", "Bradfield", 108, 6, "Roseville South", 2032, "Appointment", "St Barnabas' Anglican


l Tokens: ${totalTokens}\n` +
            `  Average Tokens: ${(totalTokens / files.length).toFixed(0)}\n` +
            `  Total Cost: $${totalCostUSD.toFixed(4)} (${totalCostTL.toFixed(2)} TL)`
        );

        // Save results with timestamp
        const resultFile = path.join(RESULTS_DIR, getTimestampFilename());
        fs.writeFileSync(resultFile, results.join('\n\n'), 'utf8');

        console.log('\nProcess completed! Results saved:');
        console.log(`File: ${resultFile}`);
        console.log(`Total Cost: $${totalCostUSD.toFixed(4)} (${totalCostTL.toFixed(2)} TL)`);
        console.log(`Total Time: ${totalTime.toFixed(2)} seconds`);
        console.log(`Total Tokens: ${totalTokens}`);
        console.log(`Average Tokens: ${(totalTokens / files.length).toFixed(0)}`);

    } catch (error) {
        console.error('General error:', error.message);
        process.exit(1);
    }
}

// Start the application
main().catch(error => {
    console.error('Application error:', error.message);
    process.exit(1);
}); const path = require("path");
const fs = require("fs");
const webpack = require("webpack");
const version = JSON.parse(fs.readFileSync(path.join(__dirname, "package.json"))).version;
const WebpackShellPlugin = require("webpack-shell-plugin");
const isProd = process.env.NODE_ENV === "production";

let config = {
    mode: 'development',
    entry: {
        app: ["./src/main.ts"]
    },
    watch: !isProd,
    devtool: "inline-source-map",
    output: {
        path: path.resolve(__dirname, "dist"),
        filename: "ifvisible.js",
        libraryTarget: "umd"
    },
    resolve: {
        extensions: [".webpack.js", ".web.js", ".ts", ".tsx", ".js"]
    },
    module: {
        rules: [{
            test: /\.tsx?$/,
            use: {
                loader: "ts-loader"
            }
        }]
    },
    optimization: {
        minimize: isProd
    },
    plugins: [
        new webpack.DefinePlugin({
            __VERSION__: JSON.stringify(version)
        })
    ]
};

if (isProd) {
    console.log("Production Mode");
    config.plugins.push(new webpack.optimize.AggressiveMergingPlugin());
}

config.plugins.push(new WebpackShellPlugin({
    dev: false,
    onBuildEnd: ['cp ./dist/ifvisible.js ./docs/']
}));

module.exports = config;
module.exports = {
  // extends: 'airbnb-base',
  parser: '@typescript-eslint/parser',
  plugins: ['@typescript-eslint'],
  extends: ['airbnb-typescript/base'],
  rules: {
    'import/no-cycle': 0,
    'no-inner-declarations': 0,
    'no-restricted-globals': 0,
    'no-undef': 0,
    'max-len': 0,
    camelcase: 0,
    'import/prefer-default-export': 0,
    // don't require .vue extension when importing
    'import/extensions': [ 'error', 'always', {
        ts: 'never',
        js: 'never',
        jsx: 'never',
    }],
    'object-curly-newline': 0,
    'arrow-body-style': 0,
    // allow function without return statement
    'consistent-return': 0,
    // enforce multiline trailing commas everywhere except function params
    'comma-dangle': ['error', {
      arrays: 'always-multiline',
      objects: 'always-multiline',
      imports: 'always-multiline',
      exports: 'always-multiline',
      functions: 'never',
    }],
    // allow require statements anywhere
    'global-require': 0,
    // allow dangling underscore
    'no-underscore-dangle': 0,
    // force space before function parentheses everywhere
    'space


])new HashEntry[cap]);
    Segment<K,V>[] ss = (Segment<K,V>[])new Segment[ssize];
    UNSAFE.putOrderedObject(ss, SBASE, s0); // ordered write of segments[0]
    this.segments = ss;
}
```

总结一下在 Java 7 中 ConcurrentHashMap 的初始化逻辑。

1. 必要参数校验。
2. 校验并发级别 `concurrencyLevel` 大小，如果大于最大值，重置为最大值。无参构造**默认值是 16.**
3. 寻找并发级别 `concurrencyLevel` 之上最近的 **2 的幂次方**值，作为初始化容量大小，**默认是 16**。
4. 记录 `segmentShift` 偏移量，这个值为【容量 = 2 的 N 次方】中的 N，在后面 Put 时计算位置时会用到。**默认是 32 - sshift = 28**.
5. 记录 `segmentMask`，默认是 ssize - 1 = 16 -1 = 15.
6. **初始化 `segments[0]`**，**默认大小为 2**，**负载因子 0.75**，**扩容阀值是 2\*0.75=1.5**，插入第二个值时才会进行扩容。

### 3. put

接着上面的初始化参数继续查看 put 方法源码。

```java
/**
 * Maps the specified key to the specified value in this table.
 * Neither the key nor the value can be null.
 *
 * <p> The value can be retrieved by calling the <tt>get</tt> method
 * with a key that is equal to the original key.
 *
 * @param key key with which the specified value is to be associated
 * @param value value to be associated with the specified key
 * @return the previous value associated with <tt>key</tt>, or
 *         <tt>null</tt> if there was no mapping for <tt>key</tt>
 * @throws NullPointerException if the specified key or value is null
 */
public V put(K key, V value) {
    Segment<K,V> s;
    if (value == null)
        throw new NullPointerException();
    int hash = hash(key);
    // hash 值无符号右移 28位（初始化时获得），然后与 segmentMask=15 做与运算
    // 其实也就是把高4位与segmentMask（1111）做与运算
    int j = (hash >>> segmentShift) & segmentMask;
    if ((s = (Segment<K,V>)UNSAFE.getObject          // nonvolatile; recheck
         (segments, (j << SSHIFT) + SBASE)) == null) //  in ensureSegment
        // 如果查找到的 Segment 为空，初始化
        s = ensureSegment(j);
    return s.put(key, hash, value, false);
}

/**
 * Returns the segment for the given index, creating it and
 * recording in segment table (via CAS) if not already present.
 *
 * @param k the index
 * @return the segment
 */
@SuppressWarnings("unchecked")
private Segment<K,V> ensureSegment(int k) {
    final Segment<K,V>[] ss = this.segments;
    long u = (k << SSHIFT) + SBASE; // raw offset
    Segment<K,V> seg;
    // 判断 u 位置的


mall mt-1 text-medium-emphasis"},[e._v("\n                                                "+e._s(e.__("This will allow users to delete servers"))+"\n                                            ")])])]),e._v(" "),s("div",{staticClass:"space-y-2"},[s("h3",{staticClass:"text-base leading-6 font-medium border-b border-dotted border-medium-emphasis pb-1"},[e._v("\n                                            "+e._s(e.__("Site permissions")))]),e._v(" "),s("div",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.form.site_permissions.create,expression:"form.site_permissions['create']"}],staticClass:"form-checkbox",attrs:{id:"site_create",type:"checkbox"},domProps:{checked:Array.isArray(e.form.site_permissions.create)?e._i(e.form.site_permissions.create,null)>-1:e.form.site_permissions.create},on:{change:function(t){var s=e.form.site_permissions.create,r=t.target,a=!!r.checked;if(Array.isArray(s)){var i=e._i(s,null);r.checked?i<0&&e.$set(e.form.site_permissions,"create",s.concat([null])):i>-1&&e.$set(e.form.site_permissions,"create",s.slice(0,i).concat(s.slice(i+1)))}else e.$set(e.form.site_permissions,"create",a)}}}),e._v(" "),s("label",{staticClass:"ml-2 text-sm",attrs:{for:"site_create"}},[e._v(e._s(e.__("Allow site creation")))]),e._v(" "),s("p",{staticClass:"text-small mt-1 text-medium-emphasis"},[e._v("\n                                                "+e._s(e.__("This will allow users to create sites"))+"\n                                            ")])]),e._v(" "),s("div",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.form.site_permissions.update,expression:"form.site_permissions['update']"}],staticClass:"form-checkbox",attrs:{id:"site_update",type:"checkbox"},domProps:{checked:Array.isArray(e.form.site_permissions.update)?e._i(e.form.site_permissions.update,null)>-1:e.form.site_permissions.update},on:{change:function(t){var s=e.form.site_permissions.update,r=t.target,a=!!r.checked;if(Array.isArray(s)){var i=e._i(s,null);r.checked?i<0&&e.$set(e.form.site_permissions,"update",s.concat([null])):i>-1&&e.$set(e.form.site_permissions,"update",s.slice(0,i).concat(s.slice(i+1)))}else e.$set(e.form.site_permissions,"update",a)}}}),e._v(" "),s("label",{staticClass:"ml-2 text-sm",attrs:{for:"site_update"}},[e._v(e._s(e.__("Allow site updating")))]),e._v(" "),s("p",{staticClass:"text-small mt-1 text-medium-emphasis"},[e._v("\n                                                "+e._s(e.__("This will allow users to update sites"))+"\n                                            ")])]),e._v(" "),s("div",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.form.site_permissions.delete,expression:"form.site_permissions['delete']"}],staticClass:"form-checkbox",attrs:{id:"site_delete",type:"checkbox"},domProps:{checked:Array.isArray(e.form.site_permissions.delete)?e._i(e


pl.append(
                    quote!(
                        impl ::std::convert::From<#variant_type> for #name {
                            fn from(error: #variant_type) -> Self {
                                #name::#variant_name(error)
                            }
                        }
                    )
                )
            } else {
                panic!("VariantData of {} arguments length must be 1, but actual {:?}", name, len);
            };
        } else {
            panic!("VariantData of {} must be tuple, but actual {:?}", name, variant);
        };
    }

    from_impl
}
<gh_stars>1-10
use crate::algebra::prelude::*;

#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
pub struct Normal {
    pub x: f64,
    pub y: f64,
    pub z: f64,
}

impl Normal {
    pub const ORIGIN: Self = Normal {
        x: 0.0,
        y: 0.0,
        z: 0.0,
    };

    pub fn has_nans(&self) -> bool {
        self.x.is_nan() || self.y.is_nan() || self.z.is_nan()
    }

    pub const fn new(x: f64, y: f64, z: f64) -> Self {
        Normal { x, y, z }
    }

    pub fn length2(&self) -> f64 {
        self.x * self.x + self.y * self.y + self.z * self.z
    }

    /// The magnitude/length of a Vector
    pub fn length(&self) -> f64 {
        self.length2().sqrt()
    }

    pub fn normalized(&self) -> Self {
        let mag = self.length();

        /* Make a copy and divide it by the magnitude*/
        *self / mag
    }

    pub fn dot(&self, rhs: &Self) -> f64 {
        self.x * rhs.x + self.y * rhs.y + self.z * rhs.z
    }
}

impl From<Vec3> for Normal {
    fn from(v: Vec3) -> Self {
        Self::new(v.x, v.y, v.z)
    }
}

impl From<Point3> for Normal {
    fn from(p: Point3) -> Self {
        Self::new(p.x, p.y, p.z)
    }
}

impl std::ops::Sub<Normal> for Normal {
    type Output = Normal;
    fn sub(self, rhs: Normal) -> Normal {
        Normal::new(self.x - rhs.x, self.y - rhs.y, self.z - rhs.z)
    }
}

impl std::ops::Add<Normal> for Normal {
    type Output = Normal;
    fn add(self, rhs: Normal) -> Normal {
        Normal::new(self.x + rhs.x, self.y + rhs.y, self.z + rhs.z)
    }
}

impl std::ops::Mul<f64> for Normal {
    type Output = Normal;
    fn mul(self, rhs: f64) -> Normal {
        Normal::new(self.x * rhs, self.y * rhs, self.z * rhs)
    }
}

impl std::ops::Mul<Normal> for Normal {
    type Output = Normal;
    fn mul(self, rhs: Normal) -> Normal {
        Normal::new(self.x * rhs.x, self.y * rhs.y, self.z * rhs.z)
    }
}

impl std::ops::Mul<Normal> for f64 {
    type Output = Normal;
    fn mul(self, rhs: Normal) -> Normal {
        Normal::new(rhs.x * self, rhs.y * self, rhs.z * self)
    }
}

impl std::ops::Div<f64> for Normal {
    type Output = Normal;
    fn div(self, rhs: f64) -> Normal {
        Normal::new(self.x / rhs, self.y / rhs, self.z / rhs)
    }
}

impl std::ops::Neg for Normal {
    type Output = Normal;
    fn neg(self) -> Normal {
        Normal::new(-self.x, -self.y, -self.z)
    }
}


      for branch in branches.iter() {
                if *branch == cur_branch {
                    println!("* {}", branch);
                } else {
                    println!("  {}", branch);
                }
            }
        }
    }
}

fn status() {
    let oid = reference::get_head_oid();
    match RefValue::get_branch_name().unwrap() {
        Some(branch) => println!("On branch {}", branch),
        None => println!("HEAD detached at {}", &oid[10..]),
    }

    let ignore_files = read_ignore_file();
    let diffs = diff::diff_trees(
        Tree::get_head_tree().unwrap(),
        Tree::get_working_tree(&ignore_files).unwrap(),
        false,
    )
    .unwrap();

    if diffs.0.is_empty() && diffs.1.is_empty() && diffs.2.is_empty() {
        println!("\nCurrent status is clean.");
        exit(0);
    }
    println!("\nChanged to be commited:");
    for m in diffs.0.iter() {
        println!(
            "{:ident$}{}:   {:#}",
            "",
            "modified".green(),
            &m.green(),
            ident = 7
        );
    }
    for c in diffs.1.iter() {
        println!(
            "{:ident$}{} :   {:#}",
            "",
            "created".green(),
            &c.green(),
            ident = 7
        );
    }
    for r in diffs.2.iter() {
        println!(
            "{:ident$}{} :   {:#}",
            "",
            "removed".red(),
            &r.red(),
            ident = 7
        );
    }
}

fn reset(commit: &str) {
    reference::reset(commit);
}

fn help() {
    println!(
        "\
dsgit: A toy version management system written in Rust.

USAGE:
    dsgit [COMMANDS]

COMMANDS:
    --help | -h                   : Show this help.
    init                          : Initialize dsgit, creating `.dsgit` directory.
    hash-object [FILE NAME]       : Given file, calculate hash object.
    cat-object [OID]              : Given object id, display object's contents.
    read-tree [OID]               : Read a tree objects from specified tree oid.
    write-tree                    : Write a tree objects structure into .dsgit.
    commit [MESSAGE]              : Record changes to the repository.
    switch [COMMIT]               : Switch branch or restore working tree's files.
    tag [TAG NAME] [COMMIT]       : Set a mark to commit hash.
    branch [BRANCH NAME] [COMMIT] : Diverge from the main line of development and \
continue to do work without messing with that main line.
    status                        : Display a current status of version management.
    reset [COMMIT]                : Reset to HEAD from specified commit hash.
    show [COMMIT]                 : Display a commit object's contents.
    diff [COMMIT]                 : Display a difference between working tree and specified commit tree.
"
    );
    exit(0);
}

fn main() {
    match arg_parse().unwrap() {
        Commands::Help => help(),
        Commands::Init => init(),
        Commands::Log(oid) => log(oid),
        Commands::Cat(file) => cat_object(&file),
        Commands::HashObject(file) => hash_object(&file),
        Commands::ReadTree(oid) => {
            let ignore_files = read_ignore_file();
            read_tree(&oid, ignore_files);
        }


c-26.51 0-48-21.49-48-48V176c0-26.51 21.49-48 48-48h16v352z"],sun:[512,512,[],"f185","M274.835 12.646l25.516 62.393c4.213 10.301 16.671 14.349 26.134 8.492l57.316-35.479c15.49-9.588 34.808 4.447 30.475 22.142l-16.03 65.475c-2.647 10.81 5.053 21.408 16.152 22.231l67.224 4.987c18.167 1.348 25.546 24.057 11.641 35.826L441.81 242.26c-8.495 7.19-8.495 20.289 0 27.479l51.454 43.548c13.906 11.769 6.527 34.478-11.641 35.826l-67.224 4.987c-11.099.823-18.799 11.421-16.152 22.231l16.03 65.475c4.332 17.695-14.986 31.73-30.475 22.142l-57.316-35.479c-9.463-5.858-21.922-1.81-26.134 8.492l-25.516 62.393c-6.896 16.862-30.774 16.862-37.67 0l-25.516-62.393c-4.213-10.301-16.671-14.349-26.134-8.492l-57.317 35.479c-15.49 9.588-34.808-4.447-30.475-22.142l16.03-65.475c2.647-10.81-5.053-21.408-16.152-22.231l-67.224-4.987c-18.167-1.348-25.546-24.057-11.641-35.826L70.19 269.74c8.495-7.19 8.495-20.289 0-27.479l-51.454-43.548c-13.906-11.769-6.527-34.478 11.641-35.826l67.224-4.987c11.099-.823 18.799-11.421 16.152-22.231l-16.03-65.475c-4.332-17.695 14.986-31.73 30.475-22.142l57.317 35.479c9.463 5.858 21.921 1.81 26.134-8.492l25.516-62.393c6.896-16.861 30.774-16.861 37.67 0zM392 256c0-74.991-61.01-136-136-136-74.991 0-136 61.009-136 136s61.009 136 136 136c74.99 0 136-61.009 136-136zm-32 0c0 57.346-46.654 104-104 104s-104-46.654-104-104 46.654-104 104-104 104 46.654 104 104z"],superscript:[512,512,[],"f12b","M395.198 256c3.461-10.526 18.796-21.28 36.265-32.425 16.625-10.605 35.467-22.626 50.341-38.862 17.458-19.054 25.944-40.175 25.944-64.567 0-60.562-50.702-88.146-97.81-88.146-42.491 0-76.378 22.016-94.432 50.447-4.654 7.329-2.592 17.036 4.623 21.865l30.328 20.296c7.032 4.706 16.46 3.084 21.63-3.614 8.022-10.394 18.818-18.225 31.667-18.225 19.387 0 26.266 12.901 26.266 23.948 0 36.159-119.437 57.023-119.437 160.024 0 6.654.561 13.014 1.415 19


lot	move.l	a1,a0
	and.l	#$ffff,d0
	and.l	#$ffff,d1
	move	d1,d3
	asl	#2,d1
	add	d3,d1
	asl.l	#5,d1
	move	d0,d3
	lsr	#1,d3
	and	#$fff8,d3
	add	d3,a0
	add.l	d1,a0
	and	#$f,d0
	asl	#2,d0
	move.l	pixmask(pc,d0),d0
	cmp	#2,d2
	blt.s	colour1
	beq.s	colour2
colour3	or.l	d0,(a0)
	rts
colour1	or	d0,(a0)
	rts
colour2	or	d0,2(a0)
	rts
off_screen
	rts

pixmask	dc.l	$80008000,$40004000,$20002000,$10001000
	dc.l	$08000800,$04000400,$02000200,$01000100
	dc.l	$00800080,$00400040,$00200020,$00100010
	dc.l	$00080008,$00040004,$00020002,$00010001

setup_parallax
	movem.l	d1-7/a0-6,-(a7)
	move	60(a7),d7
	cmp	#200,d7
	ble.s	.ok
	move	#200,d7
.ok	movem	62(a7),d0-3
	lea	stars(pc),a4
	lea	limits(pc),a5
	movem	d0-3,(a5)	; xmin,ymin,xmax,ymax
	exg	d0,d2
	exg	d1,d3
	sub	d2,d0
	addq	#1,d0
	move	d0,8(a5)	; width
	sub	d3,d1
	addq	#1,d1
	move	d1,10(a5)	; height
	subq	#1,d0
	subq	#1,d1
	move.l	#65536,d3
	move.l	d3,d4
	divu	d0,d3
	divu	d1,d4

	lea	nstars(pc),a0
	move	d7,(a0)+
	subq	#1,d7
.lp	move	d3,d5
	bsr.s	random
	and.l	#$ffff,d0
	add	(a5),d0
	move.l	d0,(a4)+
	move	d4,d5
	bsr.s	random
	and.l	#$ffff,d0
	add	2(a5),d0
	move.l	d0,(a4)+
	dbf	d7,.lp
	movem.l	(a7)+,d1-7/a0-6
	rts

random	move	#17,-(a7)
	trap	#14
	addq	#2,a7
	and.l	#$ffff,d0
	divu	d5,d0
	rts

nstars	ds.w	1

limits	dc.w	16
	dc.w	16
	dc.w	159
	dc.w	99
	dc.w	160-16
	dc.w	100-16

stars	ds.b	200*8


cijfer = int(input('Voer een cijfer in (tussen 1 en 10):\n'))

if cijfer == 10:
    omschrijving = "uitmuntend"
elif cijfer == 9:
    omschrijving = "zeer goed"
elif cijfer == 8:
    omschrijving = "goed"
elif cijfer == 7:
    omschrijving = "ruim voldoende"
elif cijfer == 6:
    omschrijving = "voldoende"
elif cijfer == 5:
    omschrijving = "bijna voldoende"
elif cijfer == 4:
    omschrijving = "onvoldoende"
elif cijfer == 3:
    omschrijving = "gering"
elif cijfer == 2:
    omschrijving = "slecht"
elif cijfer == 1:
    omschrijving = "zeer slecht"
else:
    print('Dit kan ik niet omzetten!')
    exit()

if cijfer >= 6:
    print(f"Gefeliciteerd, {omschrijving} je resultaat is een {cijfer}")
else:
    print(f"Jammer, {omschrijving} je resultaat is een {cijfer}")


��"],
  'sparkling_heart': ["💖"],
  'speak_no_evil': ["🙊"],
  'speaker': ["🔈","🔉","🔊","📣"],
  'speaking_head': ["🗣"],
  'spear': ["🔱"],
  'speech': ["👁🗨","💭","🗯"],
  'speech_balloon': ["💬"],
  'speed': ["🏃➡","🏃♀➡","🏃♂","🏃♂➡","🚅","⏩"],
  'speedboat': ["🚤"],
  'spell': ["🧙"],
  'spent': ["😵"],
  'spice': ["🫚"],
  'spicy': ["🌶","🍛"],
  'spider': ["🕷"],
  'spider_web': ["🕸"],
  'spill': ["🫗","🫟"],
  'spin': ["🌀"],
  'spiny': ["🦔"],
  'spiral': ["😵💫","🌀"],
  'spiral_calendar': ["🗓"],
  'spiral_notepad': ["🗒"],
  'splatter': ["🫟"],
  'spock': ["🖖"],
  'sponge': ["🧽"],
  'spooky': ["👻","🏮"],
  'spool': ["🧵"],
  'spoon': ["🥄"],
  'spore': ["🍄🟫"],
  'sport': ["🏌♂","🤼","🤸","🤾","🚣♂","🏊♂","🤽","🏄♂","⛹♂","🏋♂","🚴♂","🚵♂","🤹","🛼"],
  'sports': ["👟","🩰","⚽","🏀","🏈","⚾","🥎","🎾","🏐","🏉","🥏","⛳","🏌♀","🏌","🏓","🏸","🥅","🏒","🏑","🥍","🏏","🎿","⛷","🏂","🤺","🤼♀","🤼♂","🤾♀","🤾♂","⛸","🥌","🏹","🥊","🚣♀","🚣","🧗♀","🧗♂","🏊♀","🏊","🤽♀","🤽♂","🏄♀","🏄","⛹♀","⛹","🏋♀","🏋","🚴♀","🚴","🚵♀","🚵","🤿","🪀","🪁","🦺","🎗","🎟","🎳","🏎","🏍","🚲","🏟"],
  'spots': ["🦒"],
  'spring': ["👒","🐰","🐦","🐝","🐇","🌱","🍃","🌹","🌷","🌸","💐","☀","⛅","☂","☔","💧","🌈","🎐","💮"],
  'sprout': ["🍄🟫"],
  'spy': ["🕵♀","🕵♂","🕵"],
  'squid': ["🦑"],
  'squiggle': ["〰","➰"],
  'squ


ext.setColor("white");
		this.disabled = true;
	}

	public enable(): void {
		this.setTint(0xffffff);
		this.buttonText.setColor("black");
		this.disabled = false;
	}

	public setText(str: string):void {
		this.buttonText.setText(str)
	}

	public setDisabled(disabled: boolean) {
		if (disabled)
			this.disable();
		else
			this.enable();
	}
}
class TimerManager
{
	private static _shape:egret.Shape;
	private static _currTimer:number = 0;
	private static _dictHandlers:Array<TimerHandler>;
	private static _timeout:number = 1000;
	private static _currFrame:number = 0;
	private static _count:number = 0;
	private static _pool:Array<TimerHandler>;
	public constructor()
	{

	}

	public static init():void
	{
		TimerManager._shape = new egret.Shape();
		TimerManager._shape.addEventListener(egret.Event.ENTER_FRAME, TimerManager.onShapeEnterFrameHandler, null);
		TimerManager._dictHandlers = new Array<TimerHandler>();
		TimerManager._pool = new Array<TimerHandler>();
	}

	private static onShapeEnterFrameHandler(e:egret.Event):void
	{
		if(TimerManager._currTimer == 0)
		{
			TimerManager._currTimer = egret.getTimer();
			return;
		}

		let overT:number = egret.getTimer() - TimerManager._currTimer;
		if(overT > TimerManager._timeout)
		{
			TimerManager._currTimer = egret.getTimer();
			return;
		}

		for(let key in TimerManager._dictHandlers)
		{
			let handler:TimerHandler = TimerManager._dictHandlers[key];
			let t:number = handler.userFrame ? TimerManager._currFrame:TimerManager._currTimer;
			if(t >= handler.exeTime)
			{
				handler.repeat ? handler.exeTime += handler.delay : TimerManager.clearTimer(handler.method);
				handler.method.apply(handler.objThis, handler.args);
			}
		}

	}

	private static create(useFrame:Boolean, repeat:Boolean, delay:number, method:Function, objThis:any, args:Array<any> = null):void
	{
		//先删除相同函数的计时
		TimerManager.clearTimer(method);
		//如果执行时间小于1，直接执行
		if (delay < 1)
		{
			method.apply(objThis, args)
			return;
		}
		let handler:TimerHandler = TimerManager._pool.length > 0 ? TimerManager._pool.pop() : new TimerHandler();
		handler.userFrame = useFrame;
		handler.repeat = repeat;
		handler.delay = delay;
		handler.method = method;
		handler.args = args;
		handler.exeTime = delay + (useFrame ? TimerManager._currFrame : TimerManager._currTimer);
		handler.objThis = objThis;
		handler.randGUID();
		TimerManager._dictHandlers[handler.handlerId] = handler;
		TimerManager._count++;
	}

	public static clearTimer(method:Function):void
	{
		var handler:TimerHandler = TimerManager.getHandlerByMethond(method);
		if (handler != null)
		{
			delete TimerManager._dictHandlers[handler.handlerId];
			handler.clear();

			TimerManager._pool.push(handler);
			TimerManager._count--;
		}
	}

	private static getHandlerByMethond(method:Function):TimerHandler
	{
		TimerManager._dictHandlers.forEach(handler =>
		{
			if(handler.method == method)
			{
				return handler;
			}
		});

		return null;
	}

	/**定时重复执行*/
	public static doLoop(delay:number, method:Function, objThis


CV_SUB_ULEB128 w1 0x0
# CHECK-NEXT:     0x2 R_RISCV_CALL_PLT foo 0x0
# RELAX-NEXT:     0x2 R_RISCV_RELAX - 0x0
# RELAX-NEXT:     0xA R_RISCV_SET_ULEB128 w2 0x0
# RELAX-NEXT:     0xA R_RISCV_SUB_ULEB128 w1 0x0
# RELAX-NEXT:     0xB R_RISCV_SET_ULEB128 w2 0x78
# RELAX-NEXT:     0xB R_RISCV_SUB_ULEB128 w1 0x0
# RELAX-NEXT:     0xD R_RISCV_SET_ULEB128 w1 0x0
# RELAX-NEXT:     0xD R_RISCV_SUB_ULEB128 w2 0x0
# CHECK-NEXT:   }
# CHECK-NEXT: ]

## R_RISCV_SET_ULEB128 relocated locations contain values not accounting for linker relaxation.
# CHECK:      Hex dump of section '.alloc_w':
# CHECK-NEXT: 0x00000000 02089700 0000e780 00000880 01f8ffff ................
# CHECK-NEXT: 0x00000010 ffffffff ffff01                     .......

.section .alloc_w,"ax",@progbits; w:
.uleb128 w1-w       # w1 is later defined in the same section
.uleb128 w2-w1      # w1 and w2 are separated by a linker relaxable instruction
w1:
  call foo
w2:
.uleb128 w2-w1      # 0x08
.uleb128 w2-w1+120  # 0x0180
.uleb128 -(w2-w1)   # 0x01fffffffffffffffff8

.ifdef ERR
# ERR: :[[#@LINE+1]]:16: error: .uleb128 expression is not absolute
.uleb128 extern-w   # extern is undefined
# ERR: :[[#@LINE+1]]:11: error: .uleb128 expression is not absolute
.uleb128 w-extern
# ERR: :[[#@LINE+1]]:11: error: .uleb128 expression is not absolute
.uleb128 x-w        # x is later defined in another section

.section .alloc_x,"aw",@progbits; x:
# ERR: :[[#@LINE+1]]:11: error: .uleb128 expression is not absolute
.uleb128 y-x
.section .alloc_y,"aw",@progbits; y:
# ERR: :[[#@LINE+1]]:11: error: .uleb128 expression is not absolute
.uleb128 x-y

# ERR: :[[#@LINE+1]]:10: error: .uleb128 expression is not absolute
.uleb128 extern
# ERR: :[[#@LINE+1]]:10: error: .uleb128 expression is not absolute
.uleb128 y
.endif


2DEngine.interpolateFloat(prevProgress, progress, Render3DEngine.getTickDelta()), c1, c2);
                prevProgress = progress;
            }
            case WiseTree -> {
                Color color = this.color.getValue().getColorObject();
                context.getMatrices().push();
                context.getMatrices().translate(xAnim, yAnim, 0);
                context.getMatrices().multiply(RotationAxis.POSITIVE_Z.rotation((System.currentTimeMillis() % 70000) / 70000f * 360f));
                context.getMatrices().translate(-xAnim, -yAnim, 0);
                Render2DEngine.drawRect(context.getMatrices(), xAnim - 0.75f, yAnim - 5, 1.5f, 10, color);
                Render2DEngine.drawRect(context.getMatrices(), xAnim - 5, yAnim - 0.75f, 10, 1.5f, color);
                Render2DEngine.drawRect(context.getMatrices(), xAnim, yAnim - 5, 5, 1.5f, color);
                Render2DEngine.drawRect(context.getMatrices(), xAnim - 5, yAnim + 4, 5.25f, 1.5f, color);
                Render2DEngine.drawRect(context.getMatrices(), xAnim - 5f, yAnim - 5, 1.5f, 4.25f, color);
                Render2DEngine.drawRect(context.getMatrices(), xAnim + 3.5f, yAnim, 1.5f, 5.5f, color);
                context.getMatrices().pop();
            }
            case Dot -> {
                context.getMatrices().push();
                context.getMatrices().translate(xAnim + 4, yAnim + 4, 0);
                RenderSystem.enableBlend();
                RenderSystem.blendFunc(GlStateManager.SrcFactor.SRC_ALPHA, GlStateManager.DstFactor.ONE);
                RenderSystem.setShader(GameRenderer::getPositionTexColorProgram);
                BufferBuilder bufferBuilder = Tessellator.getInstance().begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_TEXTURE_COLOR);

                RenderSystem.setShaderTexture(0, TextureStorage.firefly);
                Color color1 = colorMode.getValue() == ColorMode.Sync ? HudEditor.getColor(1) : color.getValue().getColorObject();
                Matrix4f posMatrix = context.getMatrices().peek().getPositionMatrix();
                bufferBuilder.vertex(posMatrix, 0, -8f, 0).texture(0f, 1f).color(color1.getRGB());
                bufferBuilder.vertex(posMatrix, -8f, -8f, 0).texture(1f, 1f).color(color1.getRGB());
                bufferBuilder.vertex(posMatrix, -8f, 0, 0).texture(1f, 0).color(color1.getRGB());
                bufferBuilder.vertex(posMatrix, 0, 0, 0).texture(0, 0).color(color1.getRGB());
                BufferRenderer.drawWithGlobalProgram(bufferBuilder.end());
                RenderSystem.defaultBlendFunc();
                RenderSystem.disableBlend();
                context.getMatrices().pop();
            }
            case Default -> {
                Color color = this.color.getValue().getColorObject();

                float offset = animated.getValue() ? -3f + (Render2DEngine.interpolateFloat(prevProgress, progress, Render3DEngine.getTickDelta()) / 100f) : 0;
                prevProgress = progress;

                if (!t.getValue()) {
                    Render2DEngine.drawRect(context.getMatrices(), xAnim - 1, yAnim - 6 + offset, 2, 4, Color.BLACK);
                    Render2DEngine.drawRect(context.getMatrices(), xAnim - 0.5f, yAnim - 5.5f + of


ignedIngressContent,
    ) -> Result<(), MessageAcceptanceError> {
        self.exec_env
            .should_accept_ingress_message(state, provisional_whitelist, ingress)
    }
}

impl IngressMessageFilterImpl {
    pub(crate) fn new(exec_env: Arc<ExecutionEnvironmentImpl>) -> Self {
        Self { exec_env }
    }
}
use optcolorwhen::OptColorWhen;
use structopt::StructOpt;

//----------------------------------------------------------------------

//{{{ CmdOptConf
#[derive(StructOpt, Debug)]
//# [structopt(name = "cmp_structopt", author = "", about = "An example of StructOpt usage.")]
#[structopt()]
pub struct CmdOptConf {
    /// A flag, true if used in the command line.
    #[structopt(
        name = "debug",
        short = "d",
        long = "debug",
        help = "Activate debug mode"
    )]
    flag_debug: bool,

    #[structopt(
        name = "verbose",
        short = "v",
        long = "verbose",
        help = "Verbose mode. -vv is more verbose",
        default_value = "0"
    )]
    cnt_verbose: u64,

    /// An argument of type float, with a default value.
    #[structopt(
        name = "speed",
        short = "s",
        long = "speed",
        help = "Set speed",
        default_value = "42"
    )]
    opt_speed: f32,

    #[structopt(
        name = "color",
        long = "color",
        help = "Use markers to highlight\n<when> is \'always\', \'never\',\nor \'auto\'",
        default_value = "auto"
    )]
    opt_color: OptColorWhen,

    #[structopt(
        name = "config",
        short = "c",
        long = "config",
        help = "Give a path string argument"
    )]
    opt_config: Option<String>,

    /// Needed parameter, the first on the command line.
    #[structopt(name = "input", help = "Input file")]
    arg_input: String,

    /// An optional parameter, will be `None` if not present on the
    /// command line.
    #[structopt(name = "output", help = "Output file, stdout if not present")]
    arg_output: Option<String>,
}
//}}} CmdOptConf

#[inline(never)]
pub fn parse_cmdopts(_program: &str, env_args: Vec<&str>) -> anyhow::Result<CmdOptConf> {
    let args = CmdOptConf::from_iter(env_args);
    Ok(args)
}

pub fn create_conf() -> anyhow::Result<CmdOptConf> {
    let env_args: Vec<String> = std::env::args().collect();
    //let _program = env_args.remove(0);
    let program = env!("CARGO_PKG_NAME");
    let env_args: Vec<&str> = env_args.iter().map(std::string::String::as_str).collect();
    parse_cmdopts(&program, env_args)
}
<reponame>Tiamat-Tech/dit<gh_stars>10-100
use crate::IPLDLink;

use std::collections::HashMap;
use std::time::{SystemTime, UNIX_EPOCH};

use serde::{Deserialize, Serialize};
use serde_with::{serde_as, DisplayFromStr};

use cid::Cid;

/// Metadata of all your comments.
/// Direct Pin.
#[serde_as]
#[derive(Serialize, Deserialize, Debug, Default, PartialEq, Eq, Clone)]
pub struct Commentary {
    /// Content cids mapped to lists of links to comments ordered from oldest to newest.
    #[serde_as(as = "HashMap<DisplayFromStr, Vec<_>>")]


/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>

  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
  arising from the use of this software.

  Permission is granted to anyone to use this software for any purpose,
  including commercial applications, and to alter it and redistribute it
  freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not
     claim that you wrote the original software. If you use this software
     in a product, an acknowledgment in the product documentation would be
     appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be
     misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"

#ifndef SDL_riscoswindow_h_
#define SDL_riscoswindow_h_

#include "SDL_riscosdefs.h"

struct SDL_WindowData
{
    SDL_Window *window;
    sprite_area *fb_area;
    sprite_header *fb_sprite;
};

extern int RISCOS_CreateWindow(_THIS, SDL_Window *window);
extern void RISCOS_DestroyWindow(_THIS, SDL_Window *window);
extern int RISCOS_GetWindowWMInfo(_THIS, SDL_Window *window, struct SDL_SysWMinfo *info);

#endif /* SDL_riscoswindow_h_ */


ng>()
        // 缓存当前参数
        val arg = StringBuilder()

        // 表示前一个字符是不是转义符(即反斜杠)
        var lastIsEscape = false

        // 遍历
        for (char in chars) {
            // 当前字符是不是转义符
            val isEscape = char == escape
            // 当前字符是不是分隔符
            val isSeparator = char == separator
            // 如果当前字符是分隔符且上一个字符不是转义符
            if (isSeparator && !lastIsEscape) {
                // 参数怼回去
                args.add(arg.toString())
                arg.setLength(0)
            } else {
                // 如果前一字符为转义符, 理应判断当前字符是否需要转义
                // 需要转义则吞掉转义符, 不需转义则将转义符视作普通反斜杠处理
                if (!isEscape && !isSeparator && lastIsEscape) {
                    arg.append(escape)
                }
                // 如果当前字符不为转义符, 直接填入字符
                if (!isEscape || lastIsEscape) {
                    arg.append(char)
                }
            }
            // 进行转义符记录
            lastIsEscape = isEscape && !lastIsEscape
        }
        // 处理最后一个参数
        // 如果最后一个字符是转义符, 应将其视作普通反斜杠处理
        if (lastIsEscape) {
            args.add("$arg$escape")
        } else {
            args.add(arg.toString())
        }
        return args
    }

    /**
     * 将文本分为两段
     *
     * @param separator 分隔符
     * @return 分割后文本
     */
    @JvmStatic
    fun String.splitOnce(separator: String): Array<String> {
        return when (val index = this.indexOf(separator)) {
            -1 -> arrayOf(this)
            else -> {
                val pre = this.substring(0, index)
                val post = this.substring(index + separator.length)
                arrayOf(pre, post)
            }
        }
    }

    @JvmStatic
    fun String.parseByte(): Byte? {
        return NumberParser.parseByte(this)
    }

    @JvmStatic
    fun String.parseByte(def: Byte): Byte {
        return NumberParser.parseByte(this, def)
    }

    @JvmStatic
    fun String.parseShort(): Short? {
        return NumberParser.parseShort(this)
    }

    @JvmStatic
    fun String.parseShort(def: Short): Short {
        return NumberParser.parseShort(this, def)
    }

    @JvmStatic
    fun String.parseInteger(): Int? {
        return NumberParser.parseInteger(this)
    }

    @JvmStatic
    fun String.parseInteger(def: Int): Int {
        return NumberParser.parseInteger(this, def)
    }

    @JvmStatic
    fun String.toIntOrNull(): Int? {
        return NumberParser.parseInteger(this)
    }

    @JvmStatic
    fun String.toInt(def: Int): Int {
        return NumberParser.parseInteger(this, def)
    }

    @JvmStatic
    fun String.parseLong(): Long? {
        return NumberParser.parseLong(this)
    }

    @JvmStatic
    fun String.parseLong(def: Long): Long {
        return NumberParser.parseLong(this, def)
    }

    @JvmStatic
    fun String.parseBigInteger(): BigInteger? {


1, %g3
	bge 1b
	save

	mov	2, %g1
	mov	%g1, %wim
	set 0x10e0, %g1		! enable traps
	mov %g1, %psr
	nop; nop; nop;

	mov %psr, %g1
	srl %g1, 12, %g1
	andcc %g1, 1, %g0
	be 1f
	nop

	set _fsrxx, %g3
	ld [%g3], %fsr
	ldd [%g3], %f0
	ldd [%g3], %f2
	ldd [%g3], %f4
	ldd [%g3], %f6
	ldd [%g3], %f8
	ldd [%g3], %f10
	ldd [%g3], %f12
	ldd [%g3], %f14
	ldd [%g3], %f16
	ldd [%g3], %f18
	ldd [%g3], %f20
	ldd [%g3], %f22
	ldd [%g3], %f24
	ldd [%g3], %f26
	ldd [%g3], %f28
	ba  1f
	ldd [%g3], %f30

.align	8
_fsrxx:
	.word 0
	.word 0

1:
	mov %asr17, %g3
	srl %g3, 28, %g3
	andcc %g3, 0x0f, %g3
	bne 1f

	set GPTIMER, %g1
	set FREQMHZ-1, %g2
	st %g2, [%g1 + 0x04]
	st %g2, [%g1 + 0x00]
	st %g0, [%g1 + 0x08]
	set -1, %g2
	st %g2, [%g1 + 0x14]
	set 7, %g2
	st %g2, [%g1 + 0x08]

	! %g3 = cpu index
1:	set STACKSIZE, %g2
        mov %g0, %g1
2:	subcc %g3, 0, %g0
	be 3f
	nop
	add %g1, %g2, %g1
	ba 2b
	sub %g3, 1, %g3

3:	set RAMSTART+ RAMSIZE-32, %fp
	sub %fp, %g1, %fp
	sub %fp, 96, %sp

	set RAMSTART, %g1

	jmp %g1
	nop

.align	32


#0x0
	add r6, r2, #0x0
	cmp r5, #0x0
	bne _020119B4
	bl GF_AssertFail
_020119B4:
	cmp r4, #0x0
	bne _020119BC
	bl GF_AssertFail
_020119BC:
	cmp r6, #0x0
	bne _020119C4
	bl GF_AssertFail
_020119C4:
	ldr r0, [r5, #0xc]
	str r0, [r4, #0x0]
	ldr r0, [r5, #0x10]
	str r0, [r6, #0x0]
	pop {r4-r6, pc}
	.balign 4

	thumb_func_start sub_020119D0
sub_020119D0: ; 0x020119D0
	push {r3-r7, lr}
	add r5, r0, #0x0
	add r7, r1, #0x0
	cmp r5, #0x0
	bne _020119DE
	bl GF_AssertFail
_020119DE:
	ldr r0, [r5, #0x4]
	mov r6, #0x0
	cmp r0, #0x0
	ble _020119FC
	add r4, r6, #0x0
_020119E8:
	ldr r0, [r5, #0x0]
	add r1, r7, #0x0
	ldr r0, [r0, r4]
	bl sub_020200A0
	ldr r0, [r5, #0x4]
	add r6, r6, #0x1
	add r4, #0xc
	cmp r6, r0
	blt _020119E8
_020119FC:
	pop {r3-r7, pc}
	.balign 4

	thumb_func_start sub_02011A00
sub_02011A00: ; 0x02011A00
	push {r3-r7, lr}
	add r5, r0, #0x0
	add r7, r1, #0x0
	cmp r5, #0x0
	bne _02011A0E
	bl GF_AssertFail
_02011A0E:
	ldr r0, [r5, #0x4]
	mov r6, #0x0
	cmp r0, #0x0
	ble _02011A2C
	add r4, r6, #0x0
_02011A18:
	ldr r0, [r5, #0x0]
	add r1, r7, #0x0
	ldr r0, [r0, r4]
	bl sub_02020238
	ldr r0, [r5, #0x4]
	add r6, r6, #0x1
	add r4, #0xc
	cmp r6, r0
	blt _02011A18
_02011A2C:
	pop {r3-r7, pc}
	.balign 4

	thumb_func_start sub_02011A30
sub_02011A30: ; 0x02011A30
	push {r3-r7, lr}
	add r5, r0, #0x0
	add r7, r1, #0x0
	cmp r5, #0x0
	bne _02011A3E
	bl GF_AssertFail
_02011A3E:
	ldr r0, [r5, #0x4]
	mov r6, #0x0
	cmp r0, #0x0
	ble _02011A5C
	add r4, r6, #0x0
_02011A48:
	ldr r0, [r5, #0x0]
	add r1, r7, #0x0
	ldr r0, [r0, r


/*
 * Copyright (C) 2015, Intel Corporation. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * 3. Neither the name of the copyright holder nor the names of its
 *    contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#ifndef CPU_X86_DRIVERS_GALILEO_PINMUX_H_
#define CPU_X86_DRIVERS_GALILEO_PINMUX_H_

#include <stdint.h>

typedef enum galileo_pin_group {
  GALILEO_PIN_GRP_ANALOG,
  GALILEO_PIN_GRP_DIGITAL
} galileo_pin_group_t;

#define GALILEO_NUM_ANALOG_PINS 6
#define GALILEO_NUM_DIGITAL_PINS 14
#define GALILEO_NUM_PINS (GALILEO_NUM_ANALOG_PINS + GALILEO_NUM_DIGITAL_PINS)

int galileo_pinmux_initialize(void);

/**
 * \brief     Set the indicated pin to be a digital input.
 * \param grp Indicates whether the pin is in the analog or digital group.
 * \param pin Index of pin within group.
 */
void galileo_pinmux_select_din(galileo_pin_group_t grp, unsigned pin);
/**
 * \brief Set the indicated pin to be a digital output.
 */
void galileo_pinmux_select_dout(galileo_pin_group_t grp, unsigned pin);
/**
 * \brief Set the indicated pin to be a PWM pin. Only a subset of the pins
 *        support PWM output. This implicitly operates on the digital pin
 *        group.
 */
void galileo_pinmux_select_pwm(unsigned pin);
/**
 * \brief Connect the indicated pin to a serial port. This implicitly operates
 *        on the digital pin group. Galileo Gen. 2 supports UART0 on pins 0 and
 *        1 and UART1 on pins 2 and 3.
 */
void galileo_pinmux_select_serial(unsigned pin);
/**
 * \brief Connect analog pins 4 (SDA) and 5 (SCL) to I2C.
 */
void galileo_pinmux_select_i2c(void);
/**
 * \brief Connect digital pins 11 (MOSI), 12 (MISO), and 13 (CLK) to SPI.
 */
void galileo_pinmux_select_spi(void);
/**
 * \brief Set the indicated pin to be an ADC input. This implicitly operates
 *        on the analog pin group.
 */
void galileo_pinmux_select_analog(unsigned pin);

#endif /* CPU_X86_DRIVERS_GALILEO_PINMUX_H_ */


RTED,
        payload: eventTime,
      });
      history.push(`/countdownTimer/${eventId}`);
    }
  }
};
import {
  CovidItem_Country,
  CovidItem_General,
  FilterIds,
} from "../../types/custom.interface";
import { ACTIONS_General } from "../redux/actions/generalActions";
import store from "../redux/store";
import { ACTIONS_Country } from "../redux/actions/countryActions";
/*
Normal şartlarda Redux'ta bu kullanım tipi yoktur. mapDispatchToProps nesnesiyle işlemler halledilir.
Detaylı bilgi: https://react-redux.js.org/using-react-redux/connect-mapdispatch

Bizim kullanmamızın amacı Redux Store'umuzun bazı cihazlarda Material UI Theme Provider'ımız ile çakışmasından dolayı.
Herhangi bir riske girmemek için "dispatch işlemlerini" manual yolla hallediyoruz.
*/

export const setGeneralData = (data: CovidItem_General[]) => {
  const act: ACTIONS_General = {
    type: "SET_GENERAL_DATA",
    payload: data,
  };

  store.dispatch(act);
};

export const setFilterType = (filterId: FilterIds) => {
  const act: ACTIONS_General = {
    type: "SET_FILTER_TYPE",
    payload: filterId,
  };

  store.dispatch(act);
};

export const setToday = (val: boolean) => {
  const act: ACTIONS_General = {
    type: "SET_TODAY",
    payload: val,
  };

  store.dispatch(act);
};

export const setCountry = (ct: CovidItem_Country | null) => {
  const act: ACTIONS_Country = {
    type: "SET_COUNTRY",
    payload: ct,
  };

  store.dispatch(act);
};
import * as ASCIITable from 'ascii-table';
import * as fs from "fs";
import * as JSONBig from 'json-bigint';

import Globals, {BaseAccount, SentTx, TXReceipt, V3JSONKeyStore} from "../utils/Globals";

import Session from "./Session";

export interface Args {
    [key: string]: any;
    options: {
        [key: string]: any;
    };
}

export type Message = SentTx[] | BaseAccount[] | TXReceipt | V3JSONKeyStore | ASCIITable | object | string;

export interface StagedOutput<Message> {
    type: string;
    subtype?: string;
    args: Args,
    message?: Message;
}

export type StagingFunction = (args: Args, session: Session) => Promise<StagedOutput<Message>>;

export default class Staging {
    public static ERROR = 'error';
    public static SUCCESS = 'success';
    public static ERRORS = {
        BLANK_FIELD: 'Field(s) should not be blank',
        DECRYPTION: 'Failed decryption',
        DIRECTORY_NOT_EXIST: 'Directory should exist',
        FETCH_FAILED: 'Could not fetch data',
        FILE_NOT_FOUND: 'Cannot find file',
        INVALID_CONNECTION: 'Invalid connection',
        IS_DIRECTORY: 'Should not be a directory',
        IS_FILE: 'Should be a directory',
        OTHER: 'Something went wrong',
        PATH_NOT_EXIST: 'Path(s) should exist',
    };

    public static exists(path: string): boolean {
        return fs.existsSync(path);
    }

    public static isDirectory(path: string): boolean {
        return fs.lstatSync(path).isDirectory();
    }

    public static success(args: Args, message: Message) {
        return {
            args,
            message,
            type: Staging.SUCCESS,
        }


- Conversion constructors --

    constructor(v: Number) : this(v.ul)
    constructor(x: Number, y: Number) : this(x.ul, y.ul)

    // Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)

    constructor(x: Number, v: Vec1t<out Number>) : this(x, v._x)

    @JvmOverloads
    constructor(v: Vec1t<out Number>, y: Number = v._x) : this(v._x, y)

    constructor(x: Vec1t<out Number>, y: Vec1t<out Number>) : this(x._x, y._x)

    constructor(v: Vec2t<out Number>) : this(v._x, v._y)
    constructor(v: Vec3t<out Number>) : this(v._x, v._y)
    constructor(v: Vec4t<out Number>) : this(v._x, v._y)

    @JvmOverloads
    constructor(x: Boolean, y: Boolean = x) : this(x.ul, y.ul)

    constructor(x: Boolean, v: Vec1bool) : this(x.ul, v.x.ul)

    @JvmOverloads
    constructor(v: Vec1bool, y: Boolean = v.x) : this(v.x.ul, y.ul)

    constructor(x: Vec1bool, y: Vec1bool) : this(x.x.ul, y.x.ul)

    constructor(v: Vec2bool) : this(v.x.ul, v.y.ul)
    constructor(v: Vec3bool) : this(v.x.ul, v.y.ul)
    constructor(v: Vec4bool) : this(v.x.ul, v.y.ul)

    constructor(bytes: ByteArray, index: Int = 0, oneByteOneUlong: Boolean = false, bigEndian: Boolean = true) : this(
        if (oneByteOneUlong) bytes[index].ul else bytes.getUlong(index, bigEndian),
        if (oneByteOneUlong) bytes[index + 1].ul else bytes.getUlong(index + Ulong.BYTES, bigEndian))

    constructor(chars: CharArray, index: Int = 0) : this(chars[index].ul, chars[index + 1].ul)
    constructor(shorts: ShortArray, index: Int = 0) : this(shorts[index], shorts[index + 1])
    constructor(ints: IntArray, index: Int = 0) : this(ints[index], ints[index + 1])
    constructor(longs: LongArray, index: Int = 0) : this(longs[index], longs[index + 1])
    constructor(floats: FloatArray, index: Int = 0) : this(floats[index], floats[index + 1])
    constructor(doubles: DoubleArray, index: Int = 0) : this(doubles[index], doubles[index + 1])
    constructor(booleans: BooleanArray, index: Int = 0) : this(booleans[index].ul, booleans[index + 1].ul)

    constructor(numbers: Array<out Number>, index: Int = 0) : this(numbers[index], numbers[index + 1])
    constructor(chars: Array<Char>, index: Int = 0) : this(chars[index].ul, chars[index + 1].ul)
    constructor(booleans: Array<Boolean>, index: Int = 0) : this(booleans[index].ul, booleans[index + 1].ul)

    constructor(list: Iterable<*>, index: Int = 0) : this(list.elementAt(index)!!.toLong, list.elementAt(index + 1)!!.toLong)

    constructor(bytes: ByteBuffer, index: Int = bytes.pos, oneByteOneUlong: Boolean = false) : this(
        if (oneByteOneUlong) bytes[index].ul else bytes.getLong(index).ul,
        if (oneByteOneUlong) bytes[index + 1].ul else bytes.getLong(index + Ulong.BYTES).


Plotly plot: "+t+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var n,i,a,s,l=t._transitionData._frames,c=t._transitionData._frameHash;if(!Array.isArray(e))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+e);var f=l.length+2*e.length,p=[],d={};for(n=e.length-1;n>=0;n--)if(o.isPlainObject(e[n])){var v=e[n].name,g=(c[v]||d[v]||{}).name,y=e[n].name,m=c[g]||d[g];g&&y&&"number"==typeof y&&m&&S<5&&(S++,o.warn('addFrames: overwriting frame "'+(c[g]||d[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===S&&o.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),d[v]={name:v},p.push({frame:h.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}p.sort((function(t,e){return t.index>e.index?-1:t.index<e.index?1:0}));var x=[],b=[],_=l.length;for(n=p.length-1;n>=0;n--){if("number"==typeof(i=p[n].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;c[i.name="frame "+t._transitionData._counter++];);if(c[i.name]){for(a=0;a<l.length&&(l[a]||{}).name!==i.name;a++);x.push({type:"replace",index:a,value:i}),b.unshift({type:"replace",index:a,value:l[a]})}else s=Math.max(0,Math.min(p[n].index,_)),x.push({type:"insert",index:s,value:i}),b.unshift({type:"delete",index:s}),_++}var w=h.modifyFrames,T=h.modifyFrames,k=[t,b],A=[t,x];return u&&u.add(t,w,k,T,A),h.modifyFrames(t,x)},e.deleteFrames=function(t,e){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t);var r,n,i=t._transitionData._frames,a=[],s=[];if(!e)for(e=[],r=0;r<i.length;r++)e.push(r);for((e=e.slice()).sort(),r=e.length-1;r>=0;r--)n=e[r],a.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:i[n]});var l=h.modifyFrames,c=h.modifyFrames,f=[t,s],p=[t,a];return u&&u.add(t,l,f,c,p),h.modifyFrames(t,a)},e.addTraces=function t(r,n,i){r=o.getGraphDiv(r);var a,s,l=[],c=e.deleteTraces,f=t,h=[r,l],p=[r,n];for(function(t,e,r){var n,


from aiogram import Bot
from aiogram.types import BotCommand
from logging import Logger

from lexicon.lexicon import LexiconCommands

async def load_main_command(bot: Bot, logger: Logger) -> None:
    main_commands: list = [
        BotCommand(command=command, description=description)
        for command, description in LexiconCommands.items()
    ]
    await bot.set_my_commands(main_commands)
    logger.debug("Uploaded the main commands")


`json:"maxQPS" example:"150"`               // 最大QPS

	// 错误统计
	Error4xx     int64   `json:"error4xx" example:"234"`      // 4xx错误数量
	Error4xxRate float64 `json:"error4xxRate" example:"0.23"` // 4xx错误率(百分比)
	Error5xx     int64   `json:"error5xx" example:"45"`       // 5xx错误数量
	Error5xxRate float64 `json:"error5xxRate" example:"0.05"` // 5xx错误率(百分比)

	// 安全统计
	BlockCount    int64 `json:"blockCount" example:"123"`   // 拦截数量
	AttackIPCount int64 `json:"attackIPCount" example:"45"` // 攻击IP数量
}

// RealtimeQPSData 实时QPS数据
// @Description 实时QPS数据点，包含时间戳和值
type RealtimeQPSData struct {
	Timestamp time.Time `json:"timestamp" example:"2024-01-01T12:30:45Z"` // 时间戳
	Value     int64     `json:"value" example:"120"`                      // QPS值
}

// RealtimeQPSResponse 实时QPS响应
// @Description 实时QPS数据响应
type RealtimeQPSResponse struct {
	Data []RealtimeQPSData `json:"data"` // QPS数据点列表
}

// TimeSeriesDataPoint 时间序列数据点
// @Description 时间序列图表数据点
type TimeSeriesDataPoint struct {
	Timestamp time.Time `json:"timestamp" example:"2024-01-01T12:00:00Z"` // 时间戳，表示数据点的时间
	Value     int64     `json:"value" example:"128"`                      // 数值，表示该时间点的指标值
}

// TrafficDataPoint 流量数据点
// @Description 流量时间序列图表数据点
type TrafficDataPoint struct {
	Timestamp       time.Time `json:"timestamp" example:"2024-01-01T12:00:00Z"` // 时间戳，表示数据点的时间
	InboundTraffic  int64     `json:"inboundTraffic" example:"1024000"`         // 入站流量(字节)
	OutboundTraffic int64     `json:"outboundTraffic" example:"2048000"`        // 出站流量(字节)
}

// TimeSeriesResponse 时间序列响应
// @Description 时间序列图表数据响应
type TimeSeriesResponse struct {
	Metric    string                `json:"metric" example:"requests"` // 指标名称
	TimeRange string                `json:"timeRange" example:"24h"`   // 时间范围
	Data      []TimeSeriesDataPoint `json:"data"`                      // 数据点列表
}

// TrafficTimeSeriesResponse 流量时间序列响应
// @Description 流量时间序列图表数据响应
type TrafficTimeSeriesResponse struct {
	TimeRange string             `json:"timeRange" example:"24h"` // 时间范围
	Data      []TrafficDataPoint `json:"data"`                    // 流量数据点列表
}

// CombinedTimeSeriesResponse 组合时间序列响应
// @Description 同时包含请求数和拦截数的时间序列数据
type CombinedTimeSeriesResponse struct {
	TimeRange string             `json:"timeRange" example:"24h"` // 时间范围
	Requests  TimeSeriesResponse `json:"requests"`                // 请求数时间序列
	Blocks    TimeSeriesResponse `json:"blocks"`                  // 拦截数时间序列
}


nt("Dos", "Tres")
    queue.addComponent("Cuatro", "Cinco", "Seis")
    println(queue.printQueue())

    queue.removeComponent()
    println(queue.printQueue())

    println(queue.peekComponent())

    println("-> STACKS")
    val pilaList = ArrayList<Int>()
    val stack = MyStack(pilaList)

    stack.addComponent(1, 2, 3)
    stack.addComponent(4, 5)
    println(stack.printStack())

    stack.removeComponent()
    println(stack.printStack())

    println(stack.peekComponent())
}
fun main() {
    // browser()
    printer()
}

class Stack<T>(initialStack: List<T> = emptyList()) {

    private var stack: MutableList<T> = initialStack.toMutableList()

    fun push(e: T) {
        stack.addLast(e)
    }

    fun get(): T? {
        return this.stack.lastOrNull()
    }

    fun pop(): T? {
        return if (stack.isNotEmpty()) {
            stack.removeLast()
        } else {
            null
        }
    }

    fun clear() {
        stack.clear()
    }

    fun size(): Int {
        return stack.size
    }
}

class Queue<T>(initialQueue: List<T> = emptyList()) {

    private var queue: MutableList<T> = initialQueue.toMutableList()

    fun enqueue(e: T) {
        queue.addLast(e)
    }

    fun get(): T? {
        return this.queue.lastOrNull()
    }

    fun dequeue(): T? {
        return if (queue.isNotEmpty()) {
            queue.removeLast()
        } else {
            null
        }
    }

    fun clear() {
        queue.clear()
    }
}

fun browser() {
    var backward: Stack<String> = Stack()
    var forward: Stack<String> = Stack()

    fun goBackward() {
        val actualWeb = backward.pop() ?: ""
        if (actualWeb != "") {
            forward.push(actualWeb)
        }
    }

    fun goForward() {
        val actualWeb = forward.pop() ?: ""
        if (actualWeb != "") {
            backward.push(actualWeb)
        }
    }

    fun goWebSite(web: String) {
        backward.push(web)
        forward.clear()
    }
    var quite = false

    while (!quite) {
        println()
        var web = backward.get() ?: ""
        println("Web: $web")
        println("1. Go to a website")
        println("2. Go back")
        println("3. Go forward")
        println("4. Quite")

        val input = readLine() ?: ""
        if (input == "1") {
            println("Web:")
                web = readLine() ?: ""
                if (web != "") {
                    goWebSite(web)
                } else {
                    println("Wrong input")
                }
        } else if (input == "2") {
            goBackward()
        } else if (input == "3") {
            goForward()
        } else if (input == "4") {
            quite = true
        } else {
            println("Wrong input")
        }
    }
}

fun printer() {
    var printer: Queue<String> = Queue()
    var quite = false

    while (!quite) {
        val word = readLine() ?: ""

        if (word != "") {

            if (word == "imprimir") {
                val file = printer.dequeue() ?: ""
                println("> $file")
            } else if (word == "quite") {
                quite = true
            } else {
                printer.enqueue(word)
            }
        }
    }
}/*
 * EJERCICIO:
 * Muestra ejemplos de todas las operaciones que puedes real


pecific
// setter (e.g., SetBool, SetInt) will panic.
func (v Value) CanSet() bool {
	return v.flag&(flagAddr|flagRO) == flagAddr
}

// Elem returns the value that the interface v contains
// or that the pointer v points to.
// It panics if v's Kind is not Interface or Pointer.
// It returns the zero Value if v is nil.
func (v Value) Elem() Value {
	k := v.kind()
	switch k {
	case Interface:
		var eface any
		if v.typ.NumMethod() == 0 {
			eface = *(*any)(v.ptr)
		} else {
			eface = (any)(*(*interface {
				M()
			})(v.ptr))
		}
		x := unpackEface(eface)
		if x.flag != 0 {
			x.flag |= v.flag.ro()
		}
		return x
	case Pointer:
		ptr := v.ptr
		if v.flag&flagIndir != 0 {
			ptr = *(*unsafe.Pointer)(ptr)
		}
		// The returned value's address is v's value.
		if ptr == nil {
			return Value{}
		}
		tt := (*ptrType)(unsafe.Pointer(v.typ))
		typ := tt.elem
		fl := v.flag&flagRO | flagIndir | flagAddr
		fl |= flag(typ.Kind())
		return Value{typ, ptr, fl}
	}
	panic(&ValueError{"reflectlite.Value.Elem", v.kind()})
}

func valueInterface(v Value) any {
	if v.flag == 0 {
		panic(&ValueError{"reflectlite.Value.Interface", 0})
	}

	if v.kind() == Interface {
		// Special case: return the element inside the interface.
		// Empty interface has one layout, all interfaces with
		// methods have a second layout.
		if v.numMethod() == 0 {
			return *(*any)(v.ptr)
		}
		return *(*interface {
			M()
		})(v.ptr)
	}

	// TODO: pass safe to packEface so we don't need to copy if safe==true?
	return packEface(v)
}

// IsNil reports whether its argument v is nil. The argument must be
// a chan, func, interface, map, pointer, or slice value; if it is
// not, IsNil panics. Note that IsNil is not always equivalent to a
// regular comparison with nil in Go. For example, if v was created
// by calling ValueOf with an uninitialized interface variable i,
// i==nil will be true but v.IsNil will panic as v will be the zero
// Value.
func (v Value) IsNil() bool {
	k := v.kind()
	switch k {
	case Chan, Func, Map, Pointer, UnsafePointer:
		// if v.flag&flagMethod != 0 {
		// 	return false
		// }
		ptr := v.ptr
		if v.flag&flagIndir != 0 {
			ptr = *(*unsafe.Pointer)(ptr)
		}
		return ptr == nil
	case Interface, Slice:
		// Both interface and slice are nil if first word is 0.
		// Both are always bigger than a word; assume flagIndir.
		return *(*unsafe.Pointer)(v.ptr) == nil
	}
	panic(&ValueError{"reflectlite.Value.IsNil", v.kind()})
}

// IsValid reports whether v represents a value.
// It returns false if v is the zero Value.
// If IsValid returns false, all other methods except String panic.
// Most functions and methods never return an invalid Value.
// If one does, its documentation states the conditions explicitly.
func (v Value) IsValid() bool {
	return v.flag != 0
}

// Kind returns v's Kind.
// If v is the zero Value (IsValid returns false), Kind returns Invalid.
func (v Value) Kind() Kind {
	return v.kind()
}

// implemented in runtime:
func chanlen(unsafe.Pointer) int
func maplen(unsafe.Pointer) int

// Len returns v's length.


tartIPLong = NetUtils.ip2Long(startIP);
    	long endIPLong = startIPLong;
    	if (endIP != null) {
            endIPLong = NetUtils.ip2Long(endIP);
        }

    	Transaction txn = Transaction.currentTxn();
    	List<String> problemIPs = null;

    	if (type.equals("public")) {
            problemIPs = savePublicIPRange(txn, startIPLong, endIPLong, zoneId, vlanDbId, sourceNetworkId, physicalNetworkId);
        } else if (type.equals("private")) {
            problemIPs = savePrivateIPRange(txn, startIPLong, endIPLong, podId, zoneId);
        }

    	String[] linkLocalIps = NetUtils.getLinkLocalIPRange(10);
    	long startLinkLocalIp = NetUtils.ip2Long(linkLocalIps[0]);
    	long endLinkLocalIp = NetUtils.ip2Long(linkLocalIps[1]);

    	saveLinkLocalPrivateIPRange(txn, startLinkLocalIp,  endLinkLocalIp, podId, zoneId);

    	return problemIPs;
    }

	public Vector<String> savePublicIPRange(Transaction txn, long startIP, long endIP, long zoneId, long vlanDbId, Long sourceNetworkId, long physicalNetworkId) {
		String insertSql = "INSERT INTO `cloud`.`user_ip_address` (public_ip_address, data_center_id, vlan_db_id, mac_address, source_network_id, physical_network_id) VALUES (?, ?, ?, (select mac_address from `cloud`.`data_center` where id=?), ?, ?)";
		String updateSql = "UPDATE `cloud`.`data_center` set mac_address = mac_address+1 where id=?";
		Vector<String> problemIPs = new Vector<String>();
		PreparedStatement stmt = null;

		Connection conn = null;
		try {
			conn = txn.getConnection();
		} catch (SQLException e) {
			return null;
		}

        while (startIP <= endIP) {
            try {
    		stmt = conn.prepareStatement(insertSql);
    		stmt.setString(1, NetUtils.long2Ip(startIP));
    		stmt.setLong(2, zoneId);
    		stmt.setLong(3, vlanDbId);
    		stmt.setLong(4, zoneId);
    		stmt.setLong(5, sourceNetworkId);
    		stmt.setLong(6, physicalNetworkId);
    		stmt.executeUpdate();
    		stmt.close();
    		stmt = conn.prepareStatement(updateSql);
    		stmt.setLong(1, zoneId);
            stmt.executeUpdate();
            stmt.close();
            } catch (Exception ex) {
                problemIPs.add(NetUtils.long2Ip(startIP));
            }
            startIP++;
        }

        return problemIPs;
	}

	public List<String> savePrivateIPRange(Transaction txn, long startIP, long endIP, long podId, long zoneId) {
		String insertSql = "INSERT INTO `cloud`.`op_dc_ip_address_alloc` (ip_address, data_center_id, pod_id, mac_address) VALUES (?, ?, ?, (select mac_address from `cloud`.`data_center` where id=?))";
        String updateSql = "UPDATE `cloud`.`data_center` set mac_address = mac_address+1 where id=?";
		Vector<String> problemIPs = new Vector<String>();

        try {
            Connection conn = null;
            conn = txn.getConnection();
            while (startIP <= endIP) {
                try {
                    PreparedStatement stmt = conn.prepareStatement(insertSql);
            		stmt.setString(1, NetUtils.long2Ip(startIP));
            		stmt.setLong(2, zoneId);
            		stmt.setLong(3, podId);


Forward,
							n, 2, work[m:], work[n-1+m:], z[l-1:], ldz)
					} else {
						d[l-1], d[l] = impl.Dlae2(d[l-1], e[l-1], d[l])
					}
					e[l-1] = 0
					l -= 2
					if l < lend {
						break
					}
					continue
				}
				if jtot == nmaxit {
					break
				}
				jtot++

				// Form shift.
				g := (d[l-1] - p) / (2 * e[l-1])
				r := impl.Dlapy2(g, 1)
				g = d[m] - p + (e[l-1])/(g+math.Copysign(r, g))
				s := 1.0
				c := 1.0
				p = 0.0

				// Inner loop.
				for i := m; i < l; i++ {
					f := s * e[i]
					b := c * e[i]
					c, s, r = impl.Dlartg(g, f)
					if i != m {
						e[i-1] = r
					}
					g = d[i] - p
					r = (d[i+1]-g)*s + 2*c*b
					p = s * r
					d[i] = g + p
					g = c*r - b

					// If eigenvectors are desired, then save rotations.
					if icompz > 0 {
						work[i] = c
						work[n-1+i] = s
					}
				}

				// If eigenvectors are desired, then apply saved rotations.
				if icompz > 0 {
					mm := l - m + 1
					impl.Dlasr(blas.Right, lapack.Variable, lapack.Forward,
						n, mm, work[m:], work[n-1+m:], z[m:], ldz)
				}
				d[l] -= p
				e[l-1] = g
			}
		}

		// Undo scaling if necessary.
		switch iscale {
		case down:
			// Pretend that d and e are matrices with 1 column.
			impl.Dlascl(lapack.General, 0, 0, ssfmax, anorm, lendsv-lsv+1, 1, d[lsv:], 1)
			impl.Dlascl(lapack.General, 0, 0, ssfmax, anorm, lendsv-lsv, 1, e[lsv:], 1)
		case up:
			impl.Dlascl(lapack.General, 0, 0, ssfmin, anorm, lendsv-lsv+1, 1, d[lsv:], 1)
			impl.Dlascl(lapack.General, 0, 0, ssfmin, anorm, lendsv-lsv, 1, e[lsv:], 1)
		}

		// Check for no convergence to an eigenvalue after a total of n*maxit iterations.
		if jtot >= nmaxit {
			break
		}
	}
	for i := 0; i < n-1; i++ {
		if e[i] != 0 {
			return false
		}
	}
	return true
}
// Copyright ©2019 The Gonum Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package prng

import (
	"math/rand/v2"
	"testing"
	"time"
)

var _ rand.Source = (*MT19937)(nil)

// Random values in tests are produced by 40 iterations of the C code
// with or without an initial seed array.

func TestMT19937(t *testing.T) {
	t.Parallel()
	want := []uint32{
		3499211612, 581869302, 3890346734, 3586334585, 545404204,
		4161255391, 3922919429, 949333985, 2715962298, 1323567403,
		418932835, 2350294565, 119


,"l":30}')).toEqual(new Map([['h',10],['s',20],['v',30]]));

    expect(cv.Transform.encode({transform:'MQTT:color_rgb'}, new Map([['r',10],['g',20],['b',30]]))).toEqual('10,20,30');
    expect(cv.Transform.decode({transform:'MQTT:color_rgb'}, '10,20,30')).toEqual(new Map([['r',10],['g',20],['b',30]]));

    expect(cv.Transform.encode({transform:'MQTT:color_r_g_b'}, new Map([['r',10],['g',20],['b',30]]))).toEqual({'r':10,'g':20,'b':30});
    expect(cv.Transform.decode({transform:'MQTT:color_r_g_b'}, '{"r":10,"g":20,"b":30}')).toEqual(new Map([['r',10],['g',20],['b',30]]));

    expect(cv.Transform.encode({transform:'MQTT:color_rgbw'}, new Map([['r',10],['g',20],['b',30],['w',40]]))).toEqual('10,20,30,40');
    expect(cv.Transform.decode({transform:'MQTT:color_rgbw'}, '10,20,30,40')).toEqual(new Map([['r',10],['g',20],['b',30],['w',40]]));
    expect(cv.Transform.encode({transform:'MQTT:color_rgbw', selector:'a'}, new Map([['r',10],['g',20],['b',30],['w',40]]))).toEqual('{"a":"10,20,30,40"}');
    expect(cv.Transform.decode({transform:'MQTT:color_rgbw', selector:'a'}, '{"a":"10,20,30,40"}')).toEqual(new Map([['r',10],['g',20],['b',30],['w',40]]));

    expect(cv.Transform.encode({transform:'MQTT:color_r_g_b_w'}, new Map([['r',10],['g',20],['b',30],['w',40]]))).toEqual({'r':10,'g':20,'b':30,'w':40});
    expect(cv.Transform.decode({transform:'MQTT:color_r_g_b_w'}, '{"r":10,"g":20,"b":30,"w":40}')).toEqual(new Map([['r',10],['g',20],['b',30],['w',40]]));
    expect(cv.Transform.encode({transform:'MQTT:color_r_g_b_w', selector:'a'}, new Map([['r',10],['g',20],['b',30],['w',40]]))).toEqual('{"a":{"r":10,"g":20,"b":30,"w":40}}');
    expect(cv.Transform.decode({transform:'MQTT:color_r_g_b_w', selector:'a'}, '{"a":{"r":10,"g":20,"b":30,"w":40}}')).toEqual(new Map([['r',10],['g',20],['b',30],['w',40]]));

    expect(cv.Transform.encode({transform:'MQTT:color_rgb_hex'}, new Map([['r',20],['g',40],['b',60]]))).toEqual('#336699');
    expect(cv.Transform.decode({transform:'MQTT:color_rgb_hex'}, '#336699')).toEqual(new Map([['r',20],['g',40],['b',60]]));
    expect(cv.Transform.encode({transform:'MQTT:color_rgb_hex', selector:'a'}, new Map([['r',20],['g',40],['b',60]]))).toEqual('{"a":"#336699"}');
    expect(cv.Transform.decode({transform:'MQTT:color_rgb_hex', selector:'a'}, '{"a":"#336699"}')).toEqual(new Map([['r',20],['g',40],['b',60]]));


DPT_TRIANGLEFAN = 6,
}}
ENUM!{enum D3DTRANSFORMSTATETYPE {
    D3DTS_VIEW = 2,
    D3DTS_PROJECTION = 3,
    D3DTS_TEXTURE0 = 16,
    D3DTS_TEXTURE1 = 17,
    D3DTS_TEXTURE2 = 18,
    D3DTS_TEXTURE3 = 19,
    D3DTS_TEXTURE4 = 20,
    D3DTS_TEXTURE5 = 21,
    D3DTS_TEXTURE6 = 22,
    D3DTS_TEXTURE7 = 23,
}}
ENUM!{enum D3DRENDERSTATETYPE {
    D3DRS_ZENABLE = 7,
    D3DRS_FILLMODE = 8,
    D3DRS_SHADEMODE = 9,
    D3DRS_ZWRITEENABLE = 14,
    D3DRS_ALPHATESTENABLE = 15,
    D3DRS_LASTPIXEL = 16,
    D3DRS_SRCBLEND = 19,
    D3DRS_DESTBLEND = 20,
    D3DRS_CULLMODE = 22,
    D3DRS_ZFUNC = 23,
    D3DRS_ALPHAREF = 24,
    D3DRS_ALPHAFUNC = 25,
    D3DRS_DITHERENABLE = 26,
    D3DRS_ALPHABLENDENABLE = 27,
    D3DRS_FOGENABLE = 28,
    D3DRS_SPECULARENABLE = 29,
    D3DRS_FOGCOLOR = 34,
    D3DRS_FOGTABLEMODE = 35,
    D3DRS_FOGSTART = 36,
    D3DRS_FOGEND = 37,
    D3DRS_FOGDENSITY = 38,
    D3DRS_RANGEFOGENABLE = 48,
    D3DRS_STENCILENABLE = 52,
    D3DRS_STENCILFAIL = 53,
    D3DRS_STENCILZFAIL = 54,
    D3DRS_STENCILPASS = 55,
    D3DRS_STENCILFUNC = 56,
    D3DRS_STENCILREF = 57,
    D3DRS_STENCILMASK = 58,
    D3DRS_STENCILWRITEMASK = 59,
    D3DRS_TEXTUREFACTOR = 60,
    D3DRS_WRAP0 = 128,
    D3DRS_WRAP1 = 129,
    D3DRS_WRAP2 = 130,
    D3DRS_WRAP3 = 131,
    D3DRS_WRAP4 = 132,
    D3DRS_WRAP5 = 133,
    D3DRS_WRAP6 = 134,
    D3DRS_WRAP7 = 135,
    D3DRS_CLIPPING = 136,
    D3DRS_LIGHTING = 137,
    D3DRS_AMBIENT = 139,
    D3DRS_FOGVERTEXMODE = 140,
    D3DRS_COLORVERTEX = 141,
    D3DRS_LOCALVIEWER = 142,
    D3DRS_NORMALIZENORMALS = 143,
    D3DRS_DIFFUSEMATERIALSOURCE = 145,
    D3DRS_SPECULARMATERIALSOURCE = 146,
    D3DRS_AMBIENTMATERIALSOURCE = 147,
    D3DRS_EMISSIVEMATERIALSOURCE = 148,
    D3DRS_VERTEXBLEND = 151,
    D3DRS_CLIPPLANEENABLE = 152,
    D3DRS_POINTSIZE = 154,
    D3DRS_POINTSIZE_MIN = 155,
    D3DRS_POINTSPRITEENABLE = 156,
    D3DRS_POINTSCALEENABLE = 157,
    D3DRS_POINTSCALE_A = 158,
    D3DRS_POINTSCALE_B = 159,
    D3DRS_POINTSCALE_C = 160,
    D3DRS_MULTISAMPLEA


| (((ushort)(a[11 * i + 5] & 0xff) & 0x0f) << 7));
                    break;
                }
                case 2:
                {
                    coeffs[8 * i + 0] =
                        (ushort)(((a[11 * i + 0] & 0xff) >> 0) | (((ushort)(a[11 * i + 1] & 0xff) & 0x07) << 8));
                    coeffs[8 * i + 1] =
                        (ushort)(((a[11 * i + 1] & 0xff) >> 3) | (((ushort)(a[11 * i + 2] & 0xff) & 0x3f) << 5));
                    break;
                }
            }

            coeffs[n - 1] = 0;
        }

        public override void Lift(Polynomial a)
        {
            int n = coeffs.Length;
            Array.Copy(a.coeffs, 0, coeffs, 0, n);
            Z3ToZq();
        }

        public override void R2Inv(Polynomial a)
        {
            HpsPolynomial f = new HpsPolynomial((NtruHpsParameterSet)ParameterSet);
            HpsPolynomial g = new HpsPolynomial((NtruHpsParameterSet)ParameterSet);
            HpsPolynomial v = new HpsPolynomial((NtruHpsParameterSet)Parame


blSubTitle->GetId()] = mapping;
            }
        }
    }

    bigPanel->SetSizer(topSizer);

    if (useEvents and not title.IsEmpty())
    {
        topSizer->AddSpacer(6);
    }

    // Adding the big panel to the sizer
    auto* s = new wxBoxSizer(wxHORIZONTAL);
    s->AddSpacer(15);
    s->Add(bigPanel, 1, wxALL | wxEXPAND);
    s->AddSpacer(15);
    GetSizer()->Add(s, 0, wxALL | wxEXPAND);
}

void StartupWizard::resetAllBackgroundColors(wxWindow* selected)
{
    if (pLastSelected != selected)
    {
        if (pLastSelected)
        {
            pLastSelected->SetBackgroundColour(pDefaultBgColor);
            pLastSelected->Refresh();
        }
        pLastSelected = (pAllowDisplaySelection) ? selected : nullptr;
        if (pLastSelected)
        {
            pLastSelected->SetBackgroundColour(pSelectedBgColor);
            pLastSelected->Refresh();
        }
    }
}

void StartupWizard::onClick(wxCommandEvent& evt)
{
    // Close any remaining window
    Component::Spotlight::FrameClose();

    // The object that triggered the event
    auto* obj = dynamic_cast<wxWindow*>(evt.GetEventObject());

    // Getting the top-level object
    while (obj and not dynamic_cast<wxDialog*>(obj->GetParent()))
    {
        obj = obj->GetParent();
    }

    pAllowDisplaySelection = false;
    // Resetting its color
    if (obj)
    {
        const wxString& mapping = pMapping[obj->GetId()];

        if (wxT("new") == mapping)
        {
            // New study
            Dispatcher::StudyNew();
        }
        else
        {
            if (wxT("open") == mapping)
            {
                const wxString path = Forms::ApplWnd::Instance()->openStudyFolder(false);
                if (path.empty())
                {
                    // The focus may have been lost. Restoring it.
                    SetFocus();
                    // Re-Initializing the color states
                    resetAllBackgroundColors(nullptr);
                    // Re-Allow the selection from the user (hover)
                    pAllowDisplaySelection = true;
                    return;
                }
                String studyfolder;
                wxStringToString(path, studyfolder);

                String title;
                if (Data::Study::TitleFromStudyFolder(studyfolder, title))
                {
                    Dispatcher::StudyOpen(studyfolder);
                }
                else
                {
                    // The focus may have been lost. Restoring it.
                    SetFocus();
                    // Re-Initializing the color states
                    resetAllBackgroundColors(nullptr);
                    // Re-Allow the selection from the user (hover)
                    pAllowDisplaySelection = true;

                    logs.error() << "This folder does not seem to be a valid study: "
                                 << studyfolder;
                    return;
                }
            }
            else
            {
                // Recent files
                if (not mapping.IsEmpty())
                {
                    String t;
                    wxStringToString(mapping, t);
                    Dispatcher::StudyOpen(t);
                }
            }
        }
    }

    // Close the window
    Dispatcher::GUI::Destroy(this);
}

void StartupWizard::onWindowMotion(wxMouseEvent& evt)
{
    resetAllBackgroundColors(nullptr);
    evt.Skip();
}

void StartupWizard::onMotion(wxMouseEvent& evt)
{
    // The object that triggered the event
    auto* obj = dynamic_cast<wxWindow*>(evt.GetEventObject());

    // Getting the top-level object
    while (obj and !dynamic_cast<wxDialog*>(obj->GetP


--tw-shadow:var(--tw-shadow-colored)}.shadow-rose-500\/20{--tw-shadow-color:rgba(244,63,94,.2);--tw-shadow:var(--tw-shadow-colored)}.shadow-rose-500\/50{--tw-shadow-color:rgba(244,63,94,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-sky-500\/20{--tw-shadow-color:rgba(14,165,233,.2);--tw-shadow:var(--tw-shadow-colored)}.shadow-sky-500\/50{--tw-shadow-color:rgba(14,165,233,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-teal-500\/50{--tw-shadow-color:rgba(20,184,166,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-yellow-500\/20{--tw-shadow-color:rgba(234,179,8,.2);--tw-shadow:var(--tw-shadow-colored)}.shadow-yellow-500\/50{--tw-shadow-color:rgba(234,179,8,.5);--tw-shadow:var(--tw-shadow-colored)}.\!outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-1{outline-width:1px}.outline-offset-2{outline-offset:2px}.outline-offset-4{outline-offset:4px}.outline-slate-300{outline-color:#cbd5e1}.outline-transparent{outline-color:transparent}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color),var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color),0 0 #0000;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color),var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color),0 0 #0000;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-muted-400{--tw-ring-opacity:1;--tw-ring-color:rgb(var(--color-muted-400)/var(--tw-ring-opacity))}.ring-muted-500{--tw-ring-opacity:1;--tw-ring-color:rgb(var(--color-muted-500)/var(--tw-ring-opacity))}.ring-muted-900\/5{--tw-ring-color:rgb(var(--color-muted-900)/.05)}.ring-primary-2


.oversizeHandling;
    return {
      'MatchPattern': matchPattern,
      'MatchScope': matchScope.value,
      'OversizeHandling': oversizeHandling.value,
    };
  }
}

enum IPAddressVersion {
  ipv4('IPV4'),
  ipv6('IPV6'),
  ;

  final String value;

  const IPAddressVersion(this.value);

  static IPAddressVersion fromString(String value) =>
      values.firstWhere((e) => e.value == value,
          orElse: () =>
              throw Exception('$value is not known in enum IPAddressVersion'));
}

/// Contains zero or more IP addresses or blocks of IP addresses specified in
/// Classless Inter-Domain Routing (CIDR) notation. WAF supports all IPv4 and
/// IPv6 CIDR ranges except for /0. For information about CIDR notation, see the
/// Wikipedia entry Classless
/// Inter-Domain Routing.
///
/// WAF assigns an ARN to each IPSet that you create. To use an IP
/// set in a rule, you provide the ARN to the Rule statement
/// IPSetReferenceStatement.
class IPSet {
  /// The Amazon Resource Name (ARN) of the entity.
  final String arn;

  /// Contains an array of strings that specifies zero or more IP addresses or
  /// blocks of IP addresses that you want WAF to inspect for in incoming
  /// requests. All addresses must be specified using Classless Inter-Domain
  /// Routing (CIDR) notation. WAF supports all IPv4 and IPv6 CIDR ranges except
  /// for /0.
  ///
  /// Example address strings:
  ///
  ///

  ///

  /// For requests that originated from the IP address 192.0.2.44, specify
  /// 192.0.2.44/32.
  ///

  ///

  /// For requests that originated from IP addresses from 192.0.2.0 to
  /// 192.0.2.255, specify 192.0.2.0/24.
  ///

  ///

  /// For requests that originated from the IP address
  /// 1111:0000:0000:0000:0000:0000:0000:0111, specify
  /// 1111:0000:0000:0000:0000:0000:0000:0111/128.
  ///

  ///

  /// For requests that originated from IP addresses
  /// 1111:0000:0000:0000:0000:0000:0000:0000 to
  /// 1111:0000:0000:0000:ffff:ffff:ffff:ffff, specify
  /// 1111:0000:0000:0000:0000:0000:0000:0000/64.
  ///

  ///

  /// For more information about CIDR notation, see the Wikipedia entry Classless
  /// Inter-Domain Routing.
  ///
  /// Example JSON Addresses specifications:
  ///
  ///

  ///

  /// Empty array: "Addresses": []
  ///

  ///

  /// Array with one address: "Addresses": ["192.0.2.44/32"]
  ///

  ///

  /// Array with three addresses: "Addresses": ["192.0.2.44/32",
  /// "192.0.2.0/24", "192.0.0.0/16"]
  ///

  ///

  /// INVALID specification: "Addresses": [""] INVALID
  ///

  ///

  final List<String> addresses;

  /// The version of the IP addresses, either IPV4 or
  /// IPV6.
  final IPAddressVersion iPAddressVersion;

  /// A unique identifier for the set. This ID is returned in the responses to
  /// create and list commands. You provide it to operations like update and
  /// delete.


            );
        }
    }
}

unsafe extern "C" fn perform_task<T: Task>(task: *mut c_void) -> *mut c_void {
    let task: Box<T> = Box::from_raw(task.cast());
    let result = task.perform();
    Box::into_raw(task);
    Box::into_raw(Box::new(result)).cast()
}

unsafe extern "C" fn complete_task<T: Task>(
    task: *mut c_void,
    result: *mut c_void,
    out: &mut raw::Local,
) {
    let result: Result<T::Output, T::Error> = *Box::from_raw(result.cast());
    let task: Box<T> = Box::from_raw(task.cast());
    TaskContext::with(|cx| {
        if let Ok(result) = task.complete(cx, result) {
            *out = result.to_raw();
        }
    })
}
//! This library contains common macros.
//!
//! As this crate exports many different macros it is recommended
//! not to use `#[macro_use] extern crate common_macros;` but instead
//! to use the newer way of "just" importing the macros you need
//! (e.g. `use common_macros::{hash_map, hash_set};`).
//!

/// Counts the number of `;` separated expressions passed in to the
/// macro at compiler time.
///
/// This does count expressions containing other expressions just as
/// one expression.
///
/// The macro can be used to e.g. get the right value for a `.with_capacity()`
/// constructor at compiler time, i.e. it's normally used only by other macros.
///
///
/// # Examples
///
/// ```
/// use common_macros::const_expr_count;
///
/// macro_rules! my_vec {
///     ($($item:expr),*) => ({
///         let mut vec = Vec::with_capacity(const_expr_count! {$($item);*});
///         $(
///             //let's forget to insert the values
///             if false {
///                 vec.push($item);
///             }
///         )*
///         vec
///     });
/// }
///
/// fn main() {
///     let vec = my_vec![1u8,2,3,4];
///     assert!(vec.capacity() >= 4);
/// }
/// ```
#[macro_export]
macro_rules! const_expr_count {
    () => (0);
    ($e:expr) => (1);
    ($e:expr; $($other_e:expr);*) => ({
        1 $(+ $crate::const_expr_count!($other_e) )*
    });

    ($e:expr; $($other_e:expr);* ; ) => (
        $crate::const_expr_count! { $e; $($other_e);* }
    );
}

/// Macro to crate a `HashMap` with a number of key-value pairs in it.
///
/// There is an alternate syntax, which allows insertion into an existing
/// map (and still uses `const_expr_count!` to call `map.reserve()` with).
///
/// # Examples
///
/// ```
/// use common_macros::hash_map;
///
/// let is_fun_map = hash_map!{
///     "joke" => true,
///     "cat" => true,
/// };
/// ```
///
/// ```
/// use std::collections::HashMap;
/// use common_macros::hash_map;
///
/// fn setup_map() -> HashMap<u8,u8> {
///     HashMap::new()
/// }
///
/// let mut map = hash_map!(with setup_map(); insert {
///     12 => 13,
///     13 => 56
/// });
///
/// hash_map!(with &mut map; insert {
///     44 => 45,
///     48 =>


umns - Both Sidebar
-----------------------------------------------------------------*/

.bothsidebar .post-grid.grid-2 .entry { width: 270px; }

.bothsidebar .post-grid.grid-2 .entry-image,
.bothsidebar .post-grid.grid-2 .entry-image img { height: 152px; }

.bothsidebar .post-grid.grid-2 .entry-title h2 { font-size: 16px; }

/* Blog - Masonry
-----------------------------------------------------------------*/

.post-masonry .entry-image,
.post-masonry .entry-image img { height: auto !important; }

/* Blog - Masonry Full
-----------------------------------------------------------------*/

.post-masonry-full { margin: -80px 0 -80px -1px !important; }

.post-masonry-full .entry {
	width: 24.9% !important;
	margin: 0 !important;
	padding: 40px 30px;
	border-bottom: 1px dashed;
	border-left: 1px dashed;
	border-color: #E5E5E5;
}

.post-masonry-full.grid-3 .entry { width: 33.30% !important; }

/* Blog - Timeline
-----------------------------------------------------------------*/

.timeline-border {
	position: absolute;
	top: 0;
	left: 50%;
	margin-left: -71px;
	width: 0;
	border-left: 1px dashed #CCC;
	height: 100%;
}

.post-timeline { margin-right: -140px !important; }

.post-timeline .entry {
	width: 500px !important;
	margin-right: 140px !important;
}

.entry.entry-date-section {
	width: 100% !important;
	margin: 50px -70px 80px;
	padding: 0;
	border: 0;
	text-align: center;
}

.entry.entry-date-section span {
	display: inline-block;
	padding: 10px 15px;
	background-color: #FFF;
	border: 2px solid #EEE;
	font-size: 18px;
	font-weight: bold;
	letter-spacing: 1px;
	text-transform: uppercase;
	font-family: 'Raleway', sans-serif;
}

.post-timeline .entry-timeline {
	display: none;
	position: absolute;
	border: 2px solid #CCC;
	background-color: #FFF;
	padding-top: 0;
	text-indent: -9999px;
	top: 40px;
	left: auto;
	right: -76px;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	font-size: 26px;
	font-weight: bold;
	color: #AAA;
	text-align: center;
	line-height: 1;
	-webkit-transition: all .3s ease-in-out;
	-o-transition: all .3s ease-in-out;
	transition: all .3s ease-in-out;
}

.entry.entry-date-section + .entry .entry-timeline { top: 70px; }

.post-timeline .entry-timeline div.timeline-divider {
	position: absolute;
	top: 4px;
	left: -58px;
	width: 50px;
	height: 0;
	border-top: 1px dashed #CCC;
	-webkit-transition: all .3s ease-in-out;
	-o-transition: all .3s ease-in-out;
	transition: all .3s ease-in-out;
}

.post-timeline .alt .entry-timeline {
	right: auto;
	left: -77px;
}

.post-timeline .alt .entry-timeline div.timeline-divider {
	left: auto;
	right: -58px;


-= 1
            player_2_reward += 1
            self.ball.spawn()

        if(self.player_1_score >= self.top_score or
           self.player_2_score >= self.top_score):
            if self.render_mode == "human":
                self.game_over()
            else:
                done = True
                truncated = True

        return observation, player_1_reward, player_2_reward, done, truncated, info

    def _step(self, player_1_action=0, player_2_action=0):

        self.player_1_paddle.move(player_1_action)
        self.player_2_paddle.move(player_2_action)

        self.fill_background()

        self.player_1_paddle.draw(screen=self.screen)
        self.player_2_paddle.draw(screen=self.screen)
        self.ball.move()
        self.ball.draw(screen=self.screen)

        if(self.render_mode == "human"):
            self.clock.tick(self.fps)
            pygame.display.flip()


_checked_dirt");
	public static final FrozenLibPlacedFeature TALL_WINE_PALM_CHECKED_DIRT = WWPlacementUtils.register("tall_wine_palm_checked_dirt");
	public static final FrozenLibPlacedFeature SMALL_WINE_PALM_CHECKED_DIRT = WWPlacementUtils.register("small_wine_palm_checked_dirt");

	private WWTreePlaced() {
		throw new UnsupportedOperationException("WWTreePlaced contains only static declarations.");
	}

	public static void registerTreePlaced() {
		WWConstants.logWithModId("Registering WWTreePlaced for", true);

		// BIRCH

		BIRCH_CHECKED.makeAndSetHolder(WWTreeConfigured.BIRCH_TREE.getHolder(),
			PlacementUtils.filteredByBlockSurvival(Blocks.BIRCH_SAPLING)
		);

		BIRCH_BEES_0004.makeAndSetHolder(WWTreeConfigured.BIRCH_BEES_0004.getHolder(),
			PlacementUtils.filteredByBlockSurvival(Blocks.BIRCH_SAPLING)
		);

		BIRCH_BEES_025.makeAndSetHolder(WWTreeConfigured.BIRCH_BEES_025.getHolder(),
			PlacementUtils.filteredByBlockSurvival(Blocks.BIRCH_SAPLING)
		);

		DYING_BIRCH.makeAndSetHolder(WWTreeConfigured.DYING_BIRCH.getHolder(),
			PlacementUtils.filteredByBlockSurvival(Blocks.BIRCH_SAPLING)
		);

		SHORT_BIRCH.makeAndSetHolder(WWTreeConfigured.SHORT_BIRCH.getHolder(),
			PlacementUtils.filteredByBlockSurvival(Blocks.BIRCH_SAPLING)
		);

		DYING_SHORT_BIRCH.makeAndSetHolder(WWTreeConfigured.SHORT_DYING_BIRCH.getHolder(),
			PlacementUtils.filteredByBlockSurvival(Blocks.BIRCH_SAPLING)
		);

		SHORT_BIRCH_BEES_0004.makeAndSetHolder(WWTreeConfigured.SHORT_BIRCH_BEES_0004.getHolder(),
			PlacementUtils.filteredByBlockSurvival(Blocks.BIRCH_SAPLING)
		);

		MEDIUM_BIRCH.makeAndSetHolder(WWTreeConfigured.MEDIUM_BIRCH.getHolder(),
			PlacementUtils.filteredByBlockSurvival(Blocks.BIRCH_SAPLING)
		);

		DYING_MEDIUM_BIRCH.makeAndSetHolder(WWTreeConfigured.MEDIUM_DYING_BIRCH.getHolder(),
			PlacementUtils.filteredByBlockSurvival(Blocks.BIRCH_SAPLING)
		);

		MEDIUM_BIRCH_BEES_0004.makeAndSetHolder(WWTreeConfigured.MEDIUM_BIRCH_BEES_0004.getHolder(),
			PlacementUtils.filteredByBlockSurvival(Blocks.BIRCH_SAPLING)
		);

		DYING_SUPER_BIRCH.makeAndSetHolder(WWTreeConfigured.DYING_SUPER_BIRCH.getHolder(),
			PlacementUtils.filteredByBlockSurvival(Blocks.BIRCH_SAPLING)
		);

		SUPER_BIRCH_BEES_0004.makeAndSetHolder(WWTreeConfigured.SUPER_BIRCH_BEES_0004.getHolder(),
			PlacementUtils.filteredByBlockSurvival(Blocks.BIRCH_SAPLING)
		);

		SUPER_BIRCH_BEES.makeAndSetHolder(WWTreeConfigured.SUPER_BIRCH_BEES.getHolder(),
			PlacementUtils.filteredByBlockSurvival(Blocks.BIRCH_SAPLING)
		);

		SUPER_BIRCH.makeAndSetHolder(WWTreeConfigured.SUPER_BIRCH.getHolder(),
			PlacementUtils.filteredByBlockSurvival(Blocks.BIRCH_SAPLING)
		);

		FALLEN_BIRCH_CHECKED.makeAndSetHolder(WWTreeConfigured.FALLEN_BIRCH_TREE.getHolder(),
			BlockPredicateFilter.forPredicate(BlockPredicate.matchesTag(Direction.DOWN.getNormal(), WWBlockTags.FALLEN_TREE_