    display: none;
}

.radio-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--primary-light);
    border-radius: 50%;
    margin-right: var(--spacing-sm);
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: var(--white);
    border-radius: 50%;
}

.radio-label {
    font-weight: 500;
    color: var(--primary-darkest);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.radio-description {
    font-size: 12px;
    color: var(--grey-medium);
    margin-left: 26px;
    line-height: 1.4;
}

.radio-option.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--grey-light);
}

.radio-option.disabled:hover {
    border-color: var(--primary-light);
    background: var(--grey-light);
}

.radio-option.disabled .radio-label {
    cursor: not-allowed;
}

.radio-option.disabled input[type="radio"] {
    cursor: not-allowed;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-blue);
    border: 1px solid var(--primary-light);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--primary-lightest);
    border-color: var(--primary-blue);
}

/* Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results Section */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
    gap: var(--spacing-lg);
}

.results-meta {
    display: flex;
    gap: var(--


(-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
    .icheckbox_line-grey .icheck_line-icon,
    .iradio_line-grey .icheck_line-icon {
        background-image: url(line@2x.png);
        -webkit-background-size: 60px 13px;
        background-size: 60px 13px;
    }
}/* iCheck plugin Line skin, green
----------------------------------- */
.icheckbox_line-green,
.iradio_line-green {
    position: relative;
    display: block;
    margin: 0;
    padding: 5px 15px 5px 38px;
    font-size: 13px;
    line-height: 17px;
    color: #fff;
    background: #1b7e5a;
    border: none;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
    cursor: pointer;
}
    .icheckbox_line-green .icheck_line-icon,
    .iradio_line-green .icheck_line-icon {
        position: absolute;
        top: 50%;
        left: 13px;
        width: 13px;
        height: 11px;
        margin: -5px 0 0 0;
        padding: 0;
        overflow: hidden;
        background: url(line.png) no-repeat;
        border: none;
    }
    .icheckbox_line-green.hover,
    .icheckbox_line-green.checked.hover,
    .iradio_line-green.hover {
        background: #24AA7A;
    }
    .icheckbox_line-green.checked,
    .iradio_line-green.checked {
        background: #1b7e5a;
    }
        .icheckbox_line-green.checked .icheck_line-icon,
        .iradio_line-green.checked .icheck_line-icon {
            background-position: -15px 0;
        }
    .icheckbox_line-green.disabled,
    .iradio_line-green.disabled {
        background: #89E6C4;
        cursor: default;
    }
        .icheckbox_line-green.disabled .icheck_line-icon,
        .iradio_line-green.disabled .icheck_line-icon {
            background-position: -30px 0;
        }
    .icheckbox_line-green.checked.disabled,
    .iradio_line-green.checked.disabled {
        background: #89E6C4;
    }
        .icheckbox_line-green.checked.disabled .icheck_line-icon,
        .iradio_line-green.checked.disabled .icheck_line-icon {
            background-position: -45px 0;
        }

/* HiDPI support */
@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
    .icheckbox_line-green .icheck_line-icon,
    .iradio_line-green .icheck_line-icon {
        background-image: url(line@2x.png);
        -webkit-background-size: 60px 13px;
        background-size: 60px 13px;
    }
}/* iCheck plugin Square skin, yellow
----------------------------------- */
.icheckbox_square-yellow,
.iradio_square-yellow {
    display: inline-block;
    *display: inline;
    vertical-align: middle;
    margin: 0;
    padding: 0;
    width: 22px;
    height: 22px;
    background: url(yellow.png) no-repeat;
    border: none;
    cursor: pointer;
}

.icheckbox_square-yellow {
    background-position: 0 0;
}
    .icheckbox_square-


ile(filepath);

		for (File file : fin.listFiles()) {
			if (file.isDirectory()) {
				for (File file2 : file.listFiles())
					file2.delete();
			}
		}

		System.out.println("Generating length Three paths: ");
		for (int i = 0; i < vList.size(); i++) {
			index1 = i;
			v1 = graph.get(vList.get(i));

			for (int j = 0; j < v1.degree; j++) {

				index2 = vList.indexOf(v1.adjacencyList[j]);
				v2 = graph.get(v1.adjacencyList[j]);
				for (int k = 0; k < v2.degree; k++) {
					index3 = vList.indexOf(v2.adjacencyList[k]);
					v3 = graph.get(v2.adjacencyList[k]);
					for (int l = 0; l < v3.degree; l++) {
						stack = new Stack<Integer>();
						index4 = vList.indexOf(v3.adjacencyList[l]);
						if (index1 != -1 && index2 != -1 && index3 != -1
								&& index4 != -1) {
							stack.push(index4);
							if (stack.contains(index3))
								continue;
							stack.push(index3);
							if (stack.contains(index2))
								continue;
							stack.push(index2);
							if (stack.contains(index1))
								continue;
							stack.push(index1);

							printPath(graph, stack, vList, curves, filepath, no);
							no++;
						}
					}
				}
			}

		}
		System.out.println("Total number length three of paths: " + no);
	}

	public void generateLengthFourPaths(ArrayList<Vertex> graph,
			String filepath, Object obj[]) {
		// Object obj[] = this.generatePaths(graph, filepath);

		@SuppressWarnings("unchecked")
		ArrayList<Integer> vList = (ArrayList<Integer>) obj[0];

		@SuppressWarnings("unchecked")
		ArrayList<Vertex> curves[][] = (ArrayList<Vertex>[][]) obj[1];

		Stack<Integer> stack = new Stack<Integer>();
		Vertex v1, v2, v3, v4;
		int index1, index2, index3, index4, index5;
		int no = 0;

		System.out.println("I am deleting files....");
		File fin = new File(filepath);

		for (File file : fin.listFiles()) {
			if (file.isDirectory()) {
				for (File file2 : file.listFiles())
					file2.delete();
			}
		}

		System.out.println("Generating length four paths: ");
		for (int i = 0; i < vList.size(); i++) {
			index1 = i;
			v1 = graph.get(vList.get(i));

			for (int j = 0; j < v1.degree; j++) {

				index2 = vList.indexOf(v1.adjacencyList[j]);
				v2 = graph.get(v1.adjacencyList[j]);

				for (int k = 0; k < v2.degree; k++) {
					index3 = vList.indexOf(v2.adjacencyList[k]);
					v3 = graph.get(v2.adjacencyList[k]);

					for (int l = 0; l < v3.degree; l++) {
						index4 = vList.indexOf(v3.adjacencyList[l]);
						v4 = graph.get(v3.adjacencyList[l]);
						for (int m = 0; m < v4.degree; m++) {
							stack = new Stack<Integer>();
							index5 = vList.indexOf(v4.adjacencyList[m]);
							if (index1 != -1 && index2 != -1 && index3 != -1
									&& index4 != -1 && index5 != -1) {
								stack.push(index5);
								if (stack.contains(index4))
									continue;
								stack.push(index4);


   let data = formats.get(&crate_type).unwrap();

    let crates = &codegen_results.crate_info.used_crates_static;
    for &(cnum, _) in crates {
        for lib in codegen_results.crate_info.native_libraries[&cnum].iter() {
            let name = match lib.name {
                Some(ref l) => l,
                None => continue,
            };
            if !relevant_lib(sess, &lib) {
                continue
            }
            match lib.kind {
                NativeLibraryKind::NativeUnknown => cmd.link_dylib(&name.as_str()),
                NativeLibraryKind::NativeFramework => cmd.link_framework(&name.as_str()),
                NativeLibraryKind::NativeStaticNobundle => {
                    // Link "static-nobundle" native libs only if the crate they originate from
                    // is being linked statically to the current crate.  If it's linked dynamically
                    // or is an rlib already included via some other dylib crate, the symbols from
                    // native libs will have already been included in that dylib.
                    if data[cnum.as_usize() - 1] == Linkage::Static {
                        cmd.link_staticlib(&name.as_str())
                    }
                },
                // ignore statically included native libraries here as we've
                // already included them when we included the rust library
                // previously
                NativeLibraryKind::NativeStatic => {}
            }
        }
    }
}

fn relevant_lib(sess: &Session, lib: &NativeLibrary) -> bool {
    match lib.cfg {
        Some(ref cfg) => attr::cfg_matches(cfg, &sess.parse_sess, None),
        None => true,
    }
}

fn are_upstream_rust_objects_already_included(sess: &Session) -> bool {
    match sess.lto() {
        Lto::Fat => true,
        Lto::Thin => {
            // If we defer LTO to the linker, we haven't run LTO ourselves, so
            // any upstream object files have not been copied yet.
            !sess.opts.cg.linker_plugin_lto.enabled()
        }
        Lto::No |
        Lto::ThinLocal => false,
    }
}
<gh_stars>0
pub fn hello(name: Option<&str>) -> String {
    let n = match name { Some(name) => name, None => "World", };
    format!("Hello, {}!", n)
}

/* This is a line-condensed version of the script I paired with
   Krystal @kammitama5 at the Rust LA meetup with major help and
   credit going to <NAME> @hjr3 and <NAME>.
   Thanks for the great meetup!

   After playing around a little bit, I can say that unlike
   Python, whitespace is less of a deal for propper syntax,
   like in C or JS.
   As I learn more I'll reevaluate that hypothesis.

   Todo: Go through each element of this syntax and comment on
   what it is and what it does.
   Comment on the nature of rust as a whole,
   and how this function traverses its waters.
   Start reading the rust book and doing the exercises therein.
 */

<filename>src/animation.rs
use std::sync::atomic::AtomicU32;
use std::sync::{Arc, Mutex};

use bevy::core::Time;
use bevy::ecs::prelude::*;
use bevy::ecs::system::SystemState;
use bevy::prelude::{Children, DespawnRecursiveExt};

use crate::dom::Control;
use crate::observer::{Observer, UninitObserver};
use crate::runtime::{UiScratchSpace, UpdateFunc};

#[derive(Component)]
pub(crate) struct ActiveTween {
    duration: f32,
    time_left: f32,
    start: f32,
    end: f32,
    arc: Arc<AtomicU32>,
    uf: UpdateFunc,
}

pub struct UninitTweenObserver<UO> {
    observer: UO,
    settings: TweenSettings,
}

struct TweenSettings {
    duration: f32,
    // interpolation_type: ?
}

pub struct TweenObserver {
    current_val: Arc<AtomicU32>,
}


rung",
  },
  [3001] = {
    ["D"] = "Ich habe Euch in der Vergangenheit viele Fertigkeiten beigebracht, aber es ist an der Zeit, dass Euch ein anderer lehrt. Er lebt in Ratschet und sein Name ist Strahad. Er ist ein Mensch, aber lasst Euch deswegen nicht dazu hinreißen, ihn für schwach zu halten oder als Euren Feind anzusehen - zumindest vorerst. Er ist mächtig und sollte respektiert werden. Er kann Euch große Beschwörungen lehren, Beschwörungen, für die Ihr, glaube ich, bereit seid. Geht nun zu ihm.$B$BEr ist in Ratschet... Über der Hafenstadt, gleich bei dem Turm dort.",
    ["O"] = "Findet Strahad Farsan in Ratschet.",
    ["T"] = "Die Suche nach Strahad",
  },
  [3002] = {
    ["D"] = "Obwohl ich meinen Feind genau kenne, bin ich ein Krieger, $N. Ich kann Euch nicht sagen, über welche Fähigkeiten diese Kugel verfügt.$B$BIch kenne einen Magier in Orgrimmar, der uns mehr über die Kugel sagen können wird. Bringt sie zu ihm.",
    ["O"] = "Bringt die Gordunnikugel zu Uthel\'nay in die Dunkeldornenlodge in Orgrimmar.",
    ["T"] = "Die Gordunnikugel",
  },
  [3022] = {
    ["D"] = "$N, ich sehe deutlich, dass Ihr Euch liebend gern meiner noblen Sache zuwenden möchtet. Ja, natürlich könnt Ihr etwas für mich tun!$B$BBringt diese Kiste mit Eiern zu Erelas Himmelsbern. Das ist ein Druide, der sich um diese Eier kümmert. Er bebrütet sie und bildet dann die jungen Hippogryphen aus. Ihr findet ihn in Teldrassil, in einem kleinen Dorf im Süden namens Rut\'theran.",
    ["O"] = "Bringt die sorgfältig verpackte Kiste zu Erelas Himmelsbern in das Dorf Rut\'theran.",
    ["T"] = "Vorsichtig behandeln.",
  },
  [3042] = {
    ["D"] = "Die Trolle der Sandwüter von Zul\'Farrak stellen ein Aushärtungsmittel aus Sandstein her, und ich kann dies verwenden, um die von mir hergestellten Waren auszuhärten, ja, so ist es! Von Kennern wird es hoch gepriesen; wenn Ihr mir also einen guten Vorrat dieses Härters bringt, werde ich Euch reich belohnen.$B$BZul\'Farrak liegt nordwestlich von Gadgetzan. Viel Glück.",
    ["O"] = "Bringt 20 Phiolen Trollaushärter zu Trenton Lichthammer in Gadgetzan.",
    ["T"] = "Trollaushärter",
  },
  [3062] = {
    ["D"] = "Edana Hasskralle ist die Königin der Nordschwingen, die in den Ruinen im Westen zu Hause sind. Sie ist das vollkommen Böse; ich habe gehört, dass sie ein Herz aus Kristall hat. Sie ist bar jeglicher Emotionen außer dem Hass, den sie für alle anderen fühlt. Ihr müsst Euch Edana stellen und mir ihr dunkles Herz zurückbringen.$B$BIch habe von einem Horn gehört, das die Harpyien tragen - wenn es bei den Hasskrallensteinen, im nördlichen Teil der Ruinen, geblasen wird, wird die Königin beschworen.$B$BStellt Euch ihre Über


< nf {
        let ip: usize = (*plan).fct[k].fct;
        let ido: usize = n / (ip * l1);
        let tw = plan.mem.as_slice();
        let wa = &tw[(*plan).fct[k].tw_index..];
        if ip == 4 {
            radb4(ido, l1, p1, p2, wa);
        } else if ip == 2 {
            radb2(ido, l1, p1, p2, wa);
        } else if ip == 3 {
            radb3(ido, l1, p1, p2, wa);
        } else if ip == 5 {
            radb5(ido, l1, p1, p2, wa);
        } else {
            let tws = plan.mem.as_slice();
            let csarr = &tws[(*plan).fct[k].tws_index..];
            radbg(ido, ip, l1, p1, p2, wa, csarr);
        }
        let tmp: &mut [f64] = p1;
        p1 = p2;
        p2 = tmp;
        l1 = l1 * ip;
        k = k + 1;
    }
    unsafe {
        //copy_and_norm(from_raw_parts_mut(c, n), from_raw_parts_mut(p1, n), n, fct);
        copy_and_norm(from_raw_parts_mut(c_ptr, n), p1, n, fct);
    }
    return 0;
}

fn rfftblue_backward_safe(plan: &mut FftbluePlan, c: &mut [f64], fct: f64) -> i32 {
    let n: usize = (*plan).n;
    let mut tmp = vec![0.0f64; 2 * n];
    tmp[0] = c[0];
    tmp[1] = 0.0f64;
    (&mut tmp[2..n+1]).copy_from_slice(&c[1..n]);
    if n & 1 == 0 {
        tmp[n + 1] = 0.0f64;
    }
    let mut m: usize = 2;
    while m < n {
        tmp[2 * n - m] = tmp[m];
        tmp[2 * n - m + 1] = -tmp[m + 1];
        m = m + 2;
    }
    let res = fftblue_fft_safe(plan, tmp.as_mut_slice(), 1, fct);
    if res != 0 {
        return -1;
    }

    for m in 0..n {
        c[m] = tmp[2 * m];
    }
    return 0;
}

pub fn make_cfft_plan_safe(length: usize) -> CfftPlan {
    let tmp_packplan:CfftpPlan = Default::default();
    let tmp_blueplan:FftbluePlan = Default::default();
    let mut plan = CfftPlan{packplan:tmp_packplan, blueplan: tmp_blueplan};
    if (length < 50) || (largest_prime_factor(length) <= ((length as f64).sqrt() as usize)) {
        (plan).packplan = make_cfftp_plan_safe(length);
        return plan;
    }
    let comp1: f64 = cost_guess(length);
    let mut comp2: f64 = 2.0 * cost_guess(good_size(2 * length - 1));
    comp2 *= 1.5;
    if comp2 < comp1 {
        (plan).blueplan = make_fftblue_plan_safe(length);
    } else {
        (plan).packplan = make_cfftp_plan_safe(length);
    }
    return plan;
}

pub fn cfft_forward_safe(plan: &mut CfftPlan, c: &mut [f64], fct: f64) -> i32 {
    if (*plan).packplan.length != 0 {
        return cfftp_forward_safe(&mut (*plan).packplan


"C_ToyBox.GetToyFromIndex", -- [7511]
	"C_ToyBox.GetToyInfo", -- [7512]
	"C_ToyBox.GetToyLink", -- [7513]
	"C_ToyBox.GetUncollectedShown", -- [7514]
	"C_ToyBox.GetUnusableShown", -- [7515]
	"C_ToyBox.HasFavorites", -- [7516]
	"C_ToyBox.IsExpansionTypeFilterChecked", -- [7517]
	"C_ToyBox.IsSourceTypeFilterChecked", -- [7518]
	"C_ToyBox.IsToyUsable", -- [7519]
	"C_ToyBox.PickupToyBoxItem", -- [7520]
	"C_ToyBox.SetAllExpansionTypeFilters", -- [7521]
	"C_ToyBox.SetAllSourceTypeFilters", -- [7522]
	"C_ToyBox.SetCollectedShown", -- [7523]
	"C_ToyBox.SetExpansionTypeFilter", -- [7524]
	"C_ToyBox.SetFilterString", -- [7525]
	"C_ToyBox.SetIsFavorite", -- [7526]
	"C_ToyBox.SetSourceTypeFilter", -- [7527]
	"C_ToyBox.SetUncollectedShown", -- [7528]
	"C_ToyBox.SetUnusableShown", -- [7529]
	"C_ToyBoxInfo", -- [7530]
	"C_ToyBoxInfo.ClearFanfare", -- [7531]
	"C_ToyBoxInfo.NeedsFanfare", -- [7532]
	"C_Traits", -- [7533]
	"C_Traits.CanPurchaseRank", -- [7534]
	"C_Traits.CanRefundRank", -- [7535]
	"C_Traits.CascadeRepurchaseRanks", -- [7536]
	"C_Traits.ClearCascadeRepurchaseHistory", -- [7537]
	"C_Traits.CloseTraitSystemInteraction", -- [7538]
	"C_Traits.CommitConfig", -- [7539]
	"C_Traits.ConfigHasStagedChanges", -- [7540]
	"C_Traits.GenerateImportString", -- [7541]
	"C_Traits.GenerateInspectImportString", -- [7542]
	"C_Traits.GetConditionInfo", -- [7543]
	"C_Traits.GetConfigIDBySystemID", -- [7544]
	"C_Traits.GetConfigIDByTreeID", -- [7545]
	"C_Traits.GetConfigInfo", -- [7546]
	"C_Traits.GetConfigsByType", -- [7547]
	"C_Traits.GetDefinitionInfo", -- [7548]
	"C_Traits.GetEntryInfo", -- [7549]
	"C_Traits.GetLoadoutSerializationVersion", -- [7550]
	"C_Traits.GetNodeCost", -- [7551]
	"C_Traits.GetNodeInfo", -- [7552]
	"C_Traits.GetStagedChangesCost", -- [7553]
	"C_Traits.GetStagedPurchases", -- [7554]
	"C_Traits.GetTraitCurrencyInfo", -- [7555]
	"C_Traits.GetTraitDescription", -- [7556]
	"C_Traits.GetTraitSystemFlags", -- [7557]
	"C_Traits.GetTraitSystemWidgetSetID", -- [7558]
	"C_Traits.GetTreeCurrencyInfo", -- [7559]
	"C_Traits.GetTreeHash", -- [7560]
	"C_Traits.GetTreeInfo", -- [7561]
	"C_Traits.GetTreeNodes", -- [7562]
	"C_Traits.HasValidInspectData", -- [7563]
	"C_Traits.IsReadyForCommit", -- [7564]
	"C_Traits.PurchaseRank", -- [7565]
	"C_Traits.RefundAllRanks", -- [7566]
	"C_Traits.RefundRank", -- [7567]
	"C_Traits.


8587HZI0YsR3a0lL
            NVzHLIRJmvTI+SGegSb/evnKdGvLbqUM9s+KK5DiWKnBH90kGR+N/tO3TVSgwpC0
            X3qZc/K8q1BBn9dqcJRIKr/dZ7Mq1U6sa5zg+sDIZvLoS/weutBuPRHP9AofQWpS
            F1JkgTbf0PrGVr3jgdaXCY/7vfsB6+utgcs1F7KfKZA=");

        internal static string IetfMlKem768EncryptedPrivateKeyExpandedKeyPem => field ??= PemEncoding.WriteString(
            "ENCRYPTED PRIVATE KEY",
            IetfMlKem768EncryptedPrivateKeyExpandedKey);

        internal static byte[] IetfMlKem768PrivateKeyBoth => field ??= Convert.FromBase64String(@"
            MIIJvgIBADALBglghkgBZQMEBAIEggmqMIIJpgRAAAECAwQFBgcICQoLDA0ODxAR
            EhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+PwSC
            CWAn0qd/M3VvYSCO8ROr6CWVhz1KvHMOW11nlSm/akzrY4NCcjGoYS9BVQUVrLpS
            5I6ti5QoM7vmhl0T0Up50sXD4H8KBW2N56rfyroFjEk8gLN8q4xWJ1O7O6a27IKX
            +IXqp1QNUwAVqEQG5VsTZrV34jbOWKJtih61pE1UIyPCFn2b9KR/mFaZygW65DuN
            7GF/AjgKOJCv1LjH7H7eJlU6Al885bxdemITAwQjXLGtSDa1ZrW4Y72b20WihEpw
            R7bI04PkSFJeBAtNyKK0jGw3yW1i1D8/2I4ogcQKIFyeJI9lK1kngad5+GiA8qFH
            tnhj85HMGlqQjACV4HISKR4u+KNuuanAxgcyJbNHA6SvBJOCxHVz2mj96SRa1ETj
            Gx+9tSHx9h83vAzvKSBn5nDSih/9kE9vEZCplpGKEwN6bKvzw3O/gpbNN6szundG
            gJzD+K3hs2Ob1Xv8xpZQqq8d4Zj8TARjKZ5SxGF4DMQo/F0EpcUYUMumwqUnQ0Bn
            V5PdoJvkTCnmOVxl+F0qCnxt9BHmkRsfLLbDUc0uh19Rtji+d2CX6T4vKy+D2gvu
            9KqFup52OrZFAqDKUiLp6rWztwiO1SBg6Mgmm5Q6casK4cWxtofS4BnPgDa8+b9u
            e6w6qjbkFmD6pFQPJkjNk6GJ7Fwt6nC6yqpP/JBvkIEOobZ78k8seM9rqIGq6mHA
            ZSv/lbG65EJtF3O5zCyoLCHjjGNuOxxSMkSYawvoqD9d1c8tVHYvs8Xr9ZuOiFMC
            sc5HAz7


) <-chan int {
	out := make(chan int, 2)
	go func() {
		defer close(out)
		for n := range in {
			out <- n + 10
		}
	}()
	return out
}

func main() {
	// ساخت خط لوله با چندین مرحله
	stage1 := gen(2, 3, 5, 7)
	stage2 := sq(stage1)
	stage3 := addTen(stage2)

	// مصرف تمام خروجی pipeline
	for v := range stage3 {
		fmt.Println(v)
	}
}
{{< /play >}}

در این مثال، یک **خط لوله (Pipeline)** همزمانی واقعی و کاملاً idiomatic در زبان Go پیاده‌سازی شده است که چندین مرحله (stage) پردازشی را به صورت مستقل و موازی اجرا می‌کند. هر مرحله‌ی این pipeline یک تابع جداگانه است که داده‌های دریافتی از مرحله قبلی را از یک کانال (channel) می‌گیرد، عملیات مورد نظر خود را روی هر داده انجام می‌دهد و نتیجه را به کانال خروجی ارسال می‌کند. این مدل باعث می‌شود هر بخش از پردازش بدون وابستگی به سرعت بخش دیگر و به صورت ایمن و concurrent اجرا شود.

در کد، ابتدا با تابع `gen` داده‌های اولیه (در اینجا ۲، ۳، ۵ و ۷) تولید و وارد یک کانال می‌شوند. سپس این داده‌ها به مرحله دوم (`sq`) ارسال می‌شوند که کار هر goroutine در این مرحله گرفتن عدد و بازگرداندن مربع آن است. خروجی مرحله دوم وارد مرحله سوم (`addTen`) می‌شود که به هر عدد، مقدار ۱۰ اضافه می‌کند. هر مرحله در یک goroutine مجزا و روی یک کانال بافر‌دار اجرا می‌شود که باعث افزایش performance و decoupling کامل مراحل می‌شود.

در انتها، یک حلقه‌ی ساده روی خروجی مرحله آخر (stage3) قرار می‌گیرد و تمام نتایج به ترتیب مصرف و چاپ می‌شوند. استفاده از حلقه و `range` روی کانال، مصرف امن، بدون بلاک شدن و بدون نگرانی از goroutine leak را تضمین می‌کند، چون با بسته شدن کانال، حلقه به طور خودکار خارج می‌شود. این ساختار بسیار منعطف و قابل توسعه است؛ می‌توان به راحتی مراحل بیشتری به pipeline افزود یا منطق هر مرحله را تغییر داد، بدون


, 180, 2, "Blanchetown", 7331, "Current", "Blanchetown Primary School", "Godley St", "", "", "BLANCHETOWN", "SA", 5357, "Primary School", "Godley St", "BLANCHETOWN", "", "", "Entry via main door", -34.350469, 139.611084, 4040303, "Assisted", 236, 110, 0, 1},
		PollingPlace{5, "SA", "Barker", 180, 2, "Bordertown", 6709, "Current", "Bordertown High School", "30 South Tce", "", "", "BORDERTOWN", "SA", 5268, "High School", "30 South Tce", "BORDERTOWN", "Hall", "", "Entry via main door", -36.31303, 140.7693, 4050302, "Assisted", 1616, 84, 4, 1},
		PollingPlace{5, "SA", "Barker", 180, 2, "Cadell", 7339, "Current", "Cadell Institute", "McGuire Tce", "", "", "CADELL", "SA", 5321, "Cadell Institute", "McGuire Tce", "CADELL", "", "", "Entry via main door", -34.0393, 139.764, 4040405, "Assisted", 175, 25, 0, 1},
		PollingPlace{5, "SA", "Barker", 180, 2, "Cambrai", 7341, "Current", "Cambrai Area School", "Main Rd", "", "", "CAMBRAI", "SA", 5353, "Area School", "Main Rd", "CAMBRAI", "", "", "", -34.6526973, 139.280827, 4041905, "Assisted", 229, 36, 0, 1},
		PollingPlace{5, "SA", "Barker", 180, 2, "Carpenter Rocks", 6711, "Current", "Carpenter Rocks Recreation Hall", "Sec 617", "Carpenter Rocks Rd", "", "CARPENTER ROCKS", "SA", 5291, "Recreation Hall", "Carpenter Rocks Rd", "CARPENTER ROCKS", "", "", "Entry via main door", -37.9136, 140.399, 4051701, "Assisted", 91, 4, 0, 1},
		PollingPlace{5, "SA", "Barker", 180, 2, "Cobdogla", 6712, "Current", "Cobdogla Primary School", "Dolan St", "", "", "COBDOGLA", "SA", 5346, "Primary School", "Dolan St", "COBDOGLA", "", "", "Entry via main door", -34.2431, 140.407, 4040604, "Assisted", 346, 48, 0, 1},
		PollingPlace{5, "SA", "Barker", 180, 2, "Compton", 6713, "Current", "Compton Soldiers Memorial Hall", "1 Compton Hall Rd", "", "", "SUTTONTOWN", "SA", 5291, "Soldiers Memorial Hall", "1 Compton Hall Rd", "SUTTONTOWN", "", "", "Entry via main door", -37.8019, 140.729, 4051305, "Assisted", 309, 10, 0, 1},
		PollingPlace{5, "SA", "Barker", 180, 2, "Coomandook", 6714, "Current", "Coomandook Uniting Church Hall", "Dukes Hwy", "", "", "COOMANDOOK", "SA", 5261, "Uniting Church Hall", "Dukes Hwy", "COOMANDOOK", "", "", "Entry via main door", -35.4722, 139.701, 4041601, "None", 122, 22, 0, 1},
		PollingPlace{5, "SA", "Barker", 180, 2, "Coonalpyn", 6715, "Current", "Coonalpyn Hall", "Dukes Hwy", "", "", "COONALPYN", "SA", 5265, "Coonalpyn Hall", "Dukes Hwy", "COONALPYN", "", "", "Entry via main door", -35.6972, 139.859, 4050102, "Assisted", 228, 47, 0, 1},
		PollingPlace{5, "SA", "Barker", 180, 2, "Coonawarra", 6716, "Current", "Coonawar


 > 0 then
			print("no sectors metals expected at all")
			sector = trand(has_concrete)
			return {sector}
		else
			print("no resources expected at all on the map")
			sector = trand(eligible)
			return {sector}
		end
	end

	-- sector selected, but only has metals, pick the nearest one having concrete
	local revealed = { sector }
	if #has_concrete > 0 then
		local pt = sector.area:Center()
		table.sort(has_concrete, function(a, b) return a.area:Dist2D(pt) < b.area:Dist2D(pt) end)
		revealed[2] = has_concrete[1]
	end

	return revealed
end

--[[
function RenameSectors()
	local orient = mapdata.OverviewOrientation
	for j = 1, const.SectorCount do
		local row = g_MapSectors[j]
		for i = 1, const.SectorCount do
			local sector = row[i]
			local name
			if orient == 0 then
				name = string.char(string.byte("A") + 10 - j) .. (i - 1)
			elseif orient == 90 then
				name = string.char(string.byte("A") + 10 - i) .. (10 - j)
			elseif orient == 180 then
				name = string.char(string.byte("A") + j - 1) .. (10 - i)
			elseif orient == 270 then
				name = string.char(string.byte("A") + i - 1) .. (j - 1)
			end
			sector.id = name
			sector.display_name = name
		end
	end
end--]]

function City:UpdateBuildableRatio(bbox)
	local UnbuildableZ = buildUnbuildableZ()
	for j = 1, const.SectorCount do
		local row = g_MapSectors[j]
		for i = 1, const.SectorCount do
			local sector = row[i]
			if not bbox or bbox:Intersect2D(sector.area) ~= const.irOutside then
				sector.play_ratio = BuildableGridRatio(g_BuildableZ, UnbuildableZ, 100, sector.area)
			end
		end
	end
end

function City:InitExploration()
	if not mapdata.GameLogic then return end

	MapForEach("map", "Deposit", DoneObject)

	assert(hr.CameraRTSBorderAtMinZoom == hr.CameraRTSBorderAtMaxZoom)

	local border = mapdata.PassBorder or 0
	local tile = GetMapSectorTile()
	local eligible = {} -- list of sectors containing surface deposits

	local orient = mapdata.OverviewOrientation
	local UnbuildableZ = buildUnbuildableZ()

	local rand, trand = self:CreateMapRand("Exploration")

	if not g_BuildableZ then
		WaitMsg("BuildableGridReady")
	end

	for j = 1, const.SectorCount do
		local row = {}
		g_MapSectors[j] = row
		local x = border + (j - 1) * tile
		for i = 1, const.SectorCount do
			local name
			if orient == 0 then
				name = string.char(string.byte("A") + 10 - j) .. (i - 1)
			elseif orient == 90 then
				name = string.char(string.byte("A") + 10 - i) .. (10 - j)
			elseif orient == 180 then
				name = string.char(string.byte("A") + j - 1) .. (10 - i)
			elseif orient == 270 then
				name = string.char(string.byte("A") + i - 1) .. (j - 1)
			end
			local y = border + (i - 1) * tile
			local bbox = box(x, y, x + tile, y + tile)
			local sector = MapSector:new{
				id = name,
				display_name = name,
				area = bbox,
				play_ratio = BuildableGridRatio(g_BuildableZ, UnbuildableZ, 100, bbox),
				avg_heat = GetAverageHeatIn(bbox),
				row = i,
				col = j,


vag|01F4006A|30DD|fm
|voice/fm/event/al20213ja.vag|4EA3687B|5D05|fm
|voice/fm/event/al20301ia.vag|54D4D97D|C9ED|fm
|voice/fm/event/al20302ad.vag|3594EE80|8CB1|fm
|voice/fm/event/al20303ge.vag|693ECE0C|9871|fm
|voice/fm/event/al20304ge.vag|815BCBCC|8958|fm
|voice/fm/event/al20305ge.vag|CE0CA3DD|E480|fm
|voice/fm/event/al20306ge.vag|1FF51BEE|52E8|fm
|voice/fm/event/al20307ge.vag|50A273FF|3F30|fm
|voice/fm/event/al20308sr.vag|692ED716|019B|fm
|voice/fm/event/al20309ge_1.vag|4F7E2E3B|5A74|fm
|voice/fm/event/al20309ge_2.vag|946986AC|BEF6|fm
|voice/fm/event/al20310sr.vag|41B6703A|8ACE|fm
|voice/fm/event/al20311do.vag|52BA1D70|FF15|fm
|voice/fm/event/al20312go.vag|AE3BB2CB|E660|fm
|voice/fm/event/al20313ad.vag|21625A5B|349F|fm
|voice/fm/event/al20314Age.vag|20DB7198|0AAD|fm
|voice/fm/event/al20314ge.vag|DAFA1706|5CAE|fm
|voice/fm/event/al20315Asr.vag|D9AA779D|28C3|fm
|voice/fm/event/al20315Bdo.vag|5408CAF5|17E7|fm
|voice/fm/event/al20315Cad.vag|F62935ED|5ADD|fm
|voice/fm/event/al20315Dgo.vag|DE42B0AC|00F9|fm
|voice/fm/event/al20315Eia.vag|E1A2D7F2|FFBA|fm
|voice/fm/event/al20315ge.vag|95AD7F17|3176|fm
|voice/fm/event/al20401ad.vag|33EC3AEF|B2C0|fm
|voice/fm/event/al20402sr.vag|5338108E|0C91|fm
|voice/fm/event/al20501sr.vag|70C102DB|8F4A|fm
|voice/fm/event/al20502ad.vag|101528BA|311B|fm
|voice/fm/event/al20503do.vag|B234D7A2|4CF9|fm
|voice/fm/event/al20504ia.vag|079ECAA5|BEDE|fm
|voice/fm/event/al20505ia.vag|48C9A2B4|D306|fm
|voice/fm/event/al20506ad.vag|29899549|965A|fm
|voice/fm/event/al20507ia.vag|D6677296|08B6|fm
|voice/fm/event/al20508ad.vag|FD82837E|B408|fm
|voice/fm/event/al20509Aia.vag|9AD4944D|EA09|fm
|voice/fm/event/al20509Bia.vag|4B2D2C7E|4514|fm
|voice/fm/event/al20510Asr.vag|E66D2243|5FF0|fm
|voice/fm/event/al20510Bsr.


248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"],"exclamation-triangle":[576,512,[],"f071","M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"],expand:[448,512,[],"f065","M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z"],"expand-arrows-alt":[448,512,[],"f31e","M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36


 + _constraints.GetConstraintEnergy();

      // Take step X(n) + step + delta * 2.0
      LineSearchTakeStep(origCoords, direction, step+delta*2.0);
      e_n3 = Energy(false) + _constraints.GetConstraintEnergy();

      double denom = e_n3 - 2.0 * e_n2 + e_n1; // f'(x)
      if (denom != 0.0) {
        step = fabs(step - delta * (e_n2 - e_n1) / denom);
        if (step > max_scl) {
          //          cout << "WARNING: damped steplength " << step << " to " << max_scl << endl;
          step = max_scl;
        }
      } else {
        break;
      }
    }

    if (opt_step == 0.0) { // if we still don't have any valid steplength, try a very small step
      step = 0.001 * def_step / scale;

      // Take step X(n) + step
      LineSearchTakeStep(origCoords, direction, step);
      e_n1 = Energy(false) + _constraints.GetConstraintEnergy();

      if (e_n1 < opt_e) {
        opt_step = step;
        opt_e = e_n1;
      }

    }

    // Take optimal step
    LineSearchTakeStep(origCoords, direction, opt_step);

    //    cout << " scale: " << scale << " step: " << opt_step*scale << " maxstep " << max_scl*scale << endl;

    delete [] origCoords;

    return opt_step * scale;
  }

  void OBForceField::LineSearchTakeStep(double* origCoords, double *direction, double step)
  {
    double *currentCoords = _mol.GetCoordinates();

    for (unsigned int c = 0; c < _ncoords; ++c) {
      if (isfinite(direction[c])) {
        currentCoords[c] = origCoords[c] + direction[c] * step;
      }
    }
  }

  double OBForceField::LineSearch(double *currentCoords, double *direction)
  {
    unsigned int numCoords = _mol.NumAtoms() * 3;
    double e_n1, e_n2, step, alpha, tempStep;
    double *lastStep = new double [numCoords];

    alpha = 0.0; // Scale factor along direction vector
    step = 0.2;
    double trustRadius = 0.75; // don't move too far at once

    // The initial energy should be precomputed
    e_n1 = _e_n1; // Energy(false) + _constraints.GetConstraintEnergy();

    unsigned int i;
    for (i=0; i < 10; ++i) {
      // Save the current position, before we take a step
      memcpy((char*)lastStep,(char*)currentCoords,sizeof(double)*numCoords);

      // Vectorizing this would be a big benefit
      // Need to look up using BLAS or Eigen or whatever
      for (unsigned int c = 0; c < numCoords; ++c) {
        if (isfinite(direction[c])) {
          // make sure we don't have NaN or infinity
          tempStep = direction[c] * step;

          if (tempStep > trustRadius) // positive big step
            currentCoords[c] += trustRadius;
          else if (tempStep < -trustRadius) // negative big step
            currentCoords[c] -= trustRadius;
          else
            currentCoords[c] += tempStep;
        }
      }

      e_n2 = Energy(false) + _constraints.GetConstraintEnergy();

      // convergence


 235, .35)
}
[data-theme='translucent'] .lyear-switch.switch-outline span {
    background-color: transparent;
    border-color: rgba(0, 0, 0, .35);
}
[data-theme='translucent'] .lyear-switch span {
    border-color: rgba(0, 0, 0, .035);
    background-color: rgba(0, 0, 0, .35);
}
[data-theme='translucent'] .login-center {
    background-color: rgba(0, 0, 0, .125);
}
[data-theme='translucent'] .datepicker.dropdown-menu {
    color: #333;
}
[data-theme='translucent'] .irs--flat .irs-min,
[data-theme='translucent'] .irs--flat .irs-max {
    background-color: rgba(0, 0, 0, .035);
    color: rgba(255, 255, 255, .85);
}
[data-theme='translucent'] .irs--flat .irs-line {
    background-color: rgba(0, 0, 0, .075);
}
[data-theme='translucent'] .irs--flat .irs-grid-text {
    color: rgba(255, 255, 255, .85);
}
[data-theme='translucent'] .text-muted {
    color: rgba(255, 255, 255, .5)!important;
}

@media (max-width: 1024px) {
    [data-theme='translucent'].lyear-layout-sidebar-close .lyear-layout-sidebar-scroll,
    [data-theme='translucent'].lyear-layout-sidebar-close .sidebar-header {
        background-color: rgba(0, 0, 0, .75);
    }
}

/* 颜色搭配 */
[data-headerbg='color_2'] .lyear-layout-header,
[data-logobg='color_2'] .sidebar-header,
[data-sidebarbg='color_2'] .lyear-layout-sidebar-scroll {
    background-color: #15c377;
}
[data-headerbg='color_3'] .lyear-layout-header,
[data-logobg='color_3'] .sidebar-header,
[data-sidebarbg='color_3'] .lyear-layout-sidebar-scroll {
    background-color: #48b0f7;
}
[data-headerbg='color_4'] .lyear-layout-header,
[data-logobg='color_4'] .sidebar-header,
[data-sidebarbg='color_4'] .lyear-layout-sidebar-scroll {
    background-color: #faa64b;
}
[data-headerbg='color_5'] .lyear-layout-header,
[data-logobg='color_5'] .sidebar-header,
[data-sidebarbg='color_5'] .lyear-layout-sidebar-scroll {
    background-color: #f96868;
}
[data-headerbg='color_6'] .lyear-layout-header,
[data-logobg='color_6'] .sidebar-header,
[data-sidebarbg='color_6'] .lyear-layout-sidebar-scroll {
    background-color: #926dde;
}
[data-headerbg='color_7'] .lyear-layout-header,
[data-logobg='color_7'] .sidebar-header,
[data-sidebarbg='color_7'] .lyear-layout-sidebar-scroll {
    background-color: #33cabb;
}
[data-headerbg='color_8'] .lyear-layout-header,
[data-logobg='color_8'] .sidebar-header,
[data-sidebarbg='color_8'] .lyear-layout-sidebar-scroll {
    background-color: #465161;
}

[data-logobg*='color_'] .sidebar-header img,
[data-theme='translucent'] .sidebar-header img {
    position: relative;
	left: -220px;
    -webkit-filter: drop-shadow(rgb(255, 255, 255) 220px 0px);
	-moz-filter: drop-shadow(


ring phone)
    {
        this.phone = phone;
        Expr = GetExpression();
    }

    public override Expression<Func<Shop, bool>> GetExpression()
    {
        return s => s.Phone!.Trim().Contains(phone.Trim());
    }
}


_service io_service;

    // Set the name of the file that all logger instances will use.
    services::logger logger(io_service, "");
    logger.use_file("log.txt");

    // Resolve the address corresponding to the given host.
    boost::asio::ip::tcp::resolver resolver(io_service);
    boost::asio::ip::tcp::resolver::query query(argv[1], "daytime");
    boost::asio::ip::tcp::resolver::iterator iterator = resolver.resolve(query);

    // Start an asynchronous connect.
    debug_stream_socket socket(io_service);
    boost::asio::async_connect(socket, iterator,
        boost::bind(connect_handler,
          boost::asio::placeholders::error, &socket));

    // Run the io_service until all operations have finished.
    io_service.run();
  }
  catch (std::exception& e)
  {
    std::cerr << e.what() << std::endl;
  }

  return 0;
}
//
// sync_client.cpp
// ~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#include <iostream>
#include <istream>
#include <ostream>
#include <string>
#include <boost/asio.hpp>

using boost::asio::ip::tcp;

int main(int argc, char* argv[])
{
  try
  {
    if (argc != 3)
    {
      std::cout << "Usage: sync_client <server> <path>\n";
      std::cout << "Example:\n";
      std::cout << "  sync_client www.boost.org /LICENSE_1_0.txt\n";
      return 1;
    }

    boost::asio::io_service io_service;

    // Get a list of endpoints corresponding to the server name.
    tcp::resolver resolver(io_service);
    tcp::resolver::query query(argv[1], "http");
    tcp::resolver::iterator endpoint_iterator = resolver.resolve(query);

    // Try each endpoint until we successfully establish a connection.
    tcp::socket socket(io_service);
    boost::asio::connect(socket, endpoint_iterator);

    // Form the request. We specify the "Connection: close" header so that the
    // server will close the socket after transmitting the response. This will
    // allow us to treat all data up until the EOF as the content.
    boost::asio::streambuf request;
    std::ostream request_stream(&request);
    request_stream << "GET " << argv[2] << " HTTP/1.0\r\n";
    request_stream << "Host: " << argv[1] << "\r\n";
    request_stream << "Accept: */*\r\n";
    request_stream << "Connection: close\r\n\r\n";

    // Send the request.
    boost::asio::write(socket, request);

    // Read the response status line. The response streambuf will automatically
    // grow to accommodate the entire line. The growth may be limited by passing
    // a maximum size to the streambuf constructor.
    boost::asio::streambuf response;
    boost::asio::read_until(socket, response, "\r\n");

    // Check that response is OK.
    std::istream response_stream(&response);
    std::string http_version;
    response_stream >> http_version;
    unsigned int status_code;
    response_stream >> status_code;
    std::string status_message;
    std::getline(response_stream, status_message);
    if (!response_str


ft;
	    if ((c->type == XML_EXP_SEQ) || (c->type == XML_EXP_OR))
	        xmlExpDumpInt(buf, c, 1);
	    else
	        xmlExpDumpInt(buf, c, 0);
	    xmlBufferWriteChar(buf, " , ");
	    c = expr->exp_right;
	    if ((c->type == XML_EXP_SEQ) || (c->type == XML_EXP_OR))
	        xmlExpDumpInt(buf, c, 1);
	    else
	        xmlExpDumpInt(buf, c, 0);
            break;
        case XML_EXP_OR:
	    c = expr->exp_left;
	    if ((c->type == XML_EXP_SEQ) || (c->type == XML_EXP_OR))
	        xmlExpDumpInt(buf, c, 1);
	    else
	        xmlExpDumpInt(buf, c, 0);
	    xmlBufferWriteChar(buf, " | ");
	    c = expr->exp_right;
	    if ((c->type == XML_EXP_SEQ) || (c->type == XML_EXP_OR))
	        xmlExpDumpInt(buf, c, 1);
	    else
	        xmlExpDumpInt(buf, c, 0);
            break;
        case XML_EXP_COUNT: {
	    char rep[40];

	    c = expr->exp_left;
	    if ((c->type == XML_EXP_SEQ) || (c->type == XML_EXP_OR))
	        xmlExpDumpInt(buf, c, 1);
	    else
	        xmlExpDumpInt(buf, c, 0);
	    if ((expr->exp_min == 0) && (expr->exp_max == 1)) {
		rep[0] = '?';
		rep[1] = 0;
	    } else if ((expr->exp_min == 0) && (expr->exp_max == -1)) {
		rep[0] = '*';
		rep[1] = 0;
	    } else if ((expr->exp_min == 1) && (expr->exp_max == -1)) {
		rep[0] = '+';
		rep[1] = 0;
	    } else if (expr->exp_max == expr->exp_min) {
	        snprintf(rep, 39, "{%d}", expr->exp_min);
	    } else if (expr->exp_max < 0) {
	        snprintf(rep, 39, "{%d,inf}", expr->exp_min);
	    } else {
	        snprintf(rep, 39, "{%d,%d}", expr->exp_min, expr->exp_max);
	    }
	    rep[39] = 0;
	    xmlBufferWriteChar(buf, rep);
	    break;
	}
	default:
	    fprintf(stderr, "Error in tree\n");
    }
    if (glob)
        xmlBufferWriteChar(buf, ")");
}
/**
 * xmlExpDump:
 * @buf:  a buffer to receive the output
 * @expr:  the compiled expression
 *
 * Serialize the expression as compiled to the buffer
 */
void
xmlExpDump(xmlBufferPtr buf, xmlExpNodePtr expr) {
    if ((buf == NULL) || (expr == NULL))
        return;
    xmlExpDumpInt(buf, expr, 0);
}

/**
 * xmlExpMaxToken:
 * @expr: a compiled expression
 *
 * Indicate the maximum number of input a expression can accept
 *
 * Returns the maximum length or -1 in case of error
 */
int
xmlExpMaxToken(xmlExpNodePtr expr) {
    if (expr == NULL)
        return(-1);
    return(expr->c_max);
}

/**
 * xmlExpCtxtNbNodes:
 * @ctxt: an expression context
 *
 * Debugging facility provides the number of allocated nodes at a that point
 *
 * Returns the number of nodes in use or -1 in case of error
 */
int
xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt) {
    if (ctxt == NULL)
        return(-1);
    return(ctxt->nb_nodes);
}

/**
 * xmlExpCtxtNbCons:
 * @ctxt: an expression context
 *
 * Debugging facility provides the number of allocated nodes over lifetime
 *
 * Returns the number of nodes ever allocated or -1 in case of error
 */
int
xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt) {
    if (ctxt == NULL)
        return(-1);
    return(ctxt->nb_cons);
}

#endif /* LIBXML_EXPR_ENABLED */
#define bottom_xmlregexp
#include "elfgcchack.h"
#endif /* LIBXML_REGEXP_ENABLED */


/***************************************************************************************************************

Title:		UART1_RX_CHAR.s

Author:		Inspired Microchip library
			Davis Daidi�
			Bonani Michael
			Stephane Magnenat

History:
	11/07/05		Start day
	18/07/05		To be continued
	21/12/05		Optimisation and new function name
	12/02/07		Added possibility of clearing an external on interrupt
	12/03/07		Major rewrite, added rx buffer
	03/10/13		Fixed reading of characters when internal buffer has more than one, clear overflow

****************************************************************************************************************/

; to be used with e_uart_char.h

.include "p30F6014A.inc"

.section  .data, near

.global _U1RXBuf
.global _U1RXRcvCnt
.global _U1RXReadCnt
_U1RXBuf: .space 64							; reception buffer
_U1RXRcvCnt: .space 2						; amount of received bytes
_U1RXReadCnt: .space 2						; amount of read bytes

.ifdef UART1_CLR_BIT_ON_INT
	.align 2
	.global _e_uart1_int_clr_mask
	.global _e_uart1_int_clr_addr
	_e_uart1_int_clr_mask: .space 2			; mask to apply upon interrupt
	_e_uart1_int_clr_addr: .space 2			; pointer where to apply mask upon interrupt
.endif

.section  .text

.global __U1RXInterrupt
__U1RXInterrupt:
		push.d	w0							; Save context - w0, w1

		bclr    IFS0, #U1RXIF				; Clear the interrupt flag.

.ifdef UART1_CLR_BIT_ON_INT
		mov		_e_uart1_int_clr_addr, w1	; Load pointer in w0
		mov		[w1], w0					; Deference pointer read
		and		_e_uart1_int_clr_mask		; Mask w0 with user-specified mask
		mov		w0, [w1]					; Deference pointer wri


;

    for (int i = 0; i < NUMPLAYERS; i++)
        if (Player[i].AufPlattform == this)
            Player[i].AufPlattform = nullptr;
}
// --------------------------------------------------------------------------------------
// Die Roboter Raupe
//
// kriecht auf den Spieler zu und schiesst in regelmässigen Abständen 3 Feuerbälle
// --------------------------------------------------------------------------------------

#include "Gegner_RoboRaupe.hpp"
#include "stdafx.hpp"

// --------------------------------------------------------------------------------------
// Konstruktor
// --------------------------------------------------------------------------------------

GegnerRoboRaupe::GegnerRoboRaupe(int Wert1, int Wert2, bool Light) {
    Handlung = GEGNER::LAUFEN;
    Energy = 60;
    Value1 = Wert1;
    Value2 = Wert2;
    ChangeLight = Light;
    Destroyable = true;
    AnimEnde = 9;
    AnimSpeed = 1.0f;
    BlickRichtung = DirectionEnum::LINKS;
}

// --------------------------------------------------------------------------------------
// Bewegungs KI
// --------------------------------------------------------------------------------------

void GegnerRoboRaupe::DoKI() {
    // animieren
    AnimCount += Timer.getSpeedFactor();   // Animationscounter weiterzählen
    if (AnimCount > AnimSpeed)  // Grenze überschritten ?
    {
        AnimCount = 0;             // Dann wieder auf Null setzen
        AnimPhase++;               // Und nächste Animationsphase
        if (AnimPhase > AnimEnde)  // Animation von zu Ende	?
            AnimPhase = AnimStart;

        if (AnimPhase == 5)  // Bewegen
        {
            if (BlickRichtung == DirectionEnum::LINKS)
                xPos -= 18.0f;
            else
                xPos += 18.0f;

            // evtl schiessen wenn Spieler zu nahe
            if (PlayerAbstand(true) < 200 && GetRandom(2) == 0) {
                if (BlickRichtung == DirectionEnum::RECHTS) {
                    Projectiles.PushProjectile(xPos + 31.0f, yPos + 10.0f, ARCSHOT);

                    WinkelUebergabe = 1.5f;
                    Projectiles.PushProjectile(xPos + 15.0f, yPos + 10.0f, ARCSHOTLEFT);
                    Projectiles.PushProjectile(xPos + 51.0f, yPos + 10.0f, ARCSHOTRIGHT);
                } else {
                    Projectiles.PushProjectile(xPos + 50.0f, yPos + 10.0f, ARCSHOT);

                    WinkelUebergabe = 1.5f;
                    Projectiles.PushProjectile(xPos + 32.0f, yPos + 10.0f, ARCSHOTLEFT);
                    Projectiles.PushProjectile(xPos + 70.0f, yPos + 10.0f, ARCSHOTRIGHT);
                }

                SoundManager.PlayWave(100, 128, 11025, SOUND::GRANATE);
            }
        }
    }

    // runterfallen ?
    if (!(blocku & BLOCKWERT_WAND) && !(blocku & BLOCKWERT_PLATTFORM)) {
        yAcc = 3.0f;

        if (ySpeed > 20.0f)
            ySpeed = 20.0f;
    } else {
        ySpeed = 0.0f;
        yAcc = 0.0f;
    }

    // umdrehen ?
    if (blockl & BLOCKWERT_WAND || blockl & BLOCKWERT_GEGNERWAND)
        BlickRichtung = DirectionEnum::RECHTS;
    if (blockr & BLOCKWERT_WAND || blockr & BLOCKWERT_GEGNERWAND)
        BlickRichtung = DirectionEnum::LINKS;

    // Testen, ob der Spieler die Raupe berührt hat
    TestDamagePlayers(Timer.sync(5.0f


.execute([]string{"mv", oldPath, newPath}, nil)
	if err != nil {
		return fmt.Errorf("rename %q -> %q: stderr=%q, %v", oldPath, newPath, stderr, err)
	}
	return nil
}

func (p PodDirIO) RemoveAll(path string) error {
	_, stderr, err := p.execute([]string{"rm", "-rf", path}, nil)
	if err != nil {
		return fmt.Errorf("rm -rf %q: stderr=%q, %v", path, stderr, err)
	}
	return nil
}

func (p PodDirIO) execute(command []string, stdin io.Reader) (string, string, error) {
	stdout, stderr, err := e2epod.ExecWithOptions(p.F, e2epod.ExecOptions{
		Command:       command,
		Namespace:     p.Namespace,
		PodName:       p.PodName,
		ContainerName: p.ContainerName,
		Stdin:         stdin,
		CaptureStdout: true,
		CaptureStderr: true,
		Quiet:         true,
	})
	if p.Logger != nil {
		p.Logger.Info("Command completed", "command", command, "stdout", stdout, "stderr", stderr, "err", err)

	}
	return stdout, stderr, err

}
/*
Copyright The Kubernetes Authors.

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.
*/

// Code generated by mockery v2.40.3. DO NOT EDIT.

package driver

import (
	context "context"

	csi "github.com/container-storage-interface/spec/lib/go/csi"
	mock "github.com/stretchr/testify/mock"
)

// MockNodeServer is an autogenerated mock type for the NodeServer type
type MockNodeServer struct {
	mock.Mock
}

type MockNodeServer_Expecter struct {
	mock *mock.Mock
}

func (_m *MockNodeServer) EXPECT() *MockNodeServer_Expecter {
	return &MockNodeServer_Expecter{mock: &_m.Mock}
}

// NodeExpandVolume provides a mock function with given fields: _a0, _a1
func (_m *MockNodeServer) NodeExpandVolume(_a0 context.Context, _a1 *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error) {
	ret := _m.Called(_a0, _a1)

	if len(ret) == 0 {
		panic("no return value specified for NodeExpandVolume")
	}

	var r0 *csi.NodeExpandVolumeResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)); ok {
		return rf(_a0, _a1)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *csi.NodeExpandVolumeRequest) *csi.NodeExpandVolumeResponse); ok {
		r0 = rf(_a0, _a1)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*csi.NodeExpandVolumeResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *csi.NodeExpandVolumeRequest) error); ok {
		r1 = rf(_a0, _a1)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

/


;line-height:1.25;font-weight:400;text-transform:none;margin-top:0.5em;margin-bottom:0.25em}@media (max-width: 640px){h2{font-size:2rem;line-height:1.2}}h3{font-family:"nta","GDS-Regular",sans-serif;font-size:19px;font-size:1.9rem;line-height:1.31579;font-weight:400;text-transform:none;margin-top:0.5em;margin-bottom:0.25em}@media (max-width: 640px){h3{font-size:1.6rem;line-height:1.25}}h4{font-family:"nta","GDS-Regular",sans-serif;font-size:19px;font-size:1.9rem;line-height:1.31579;font-weight:400;text-transform:none;margin-top:0.5em;margin-bottom:0.25em}@media (max-width: 640px){h4{font-size:1.6rem;line-height:1.25}}#global-locator-form label,#global-locator-form .ask_location{display:inline}#global-locator-form label.hidden,#global-locator-form .ask_location.hidden{display:none}#global-locator-form .found_location p,#global-locator-form .finding_location p{margin:0em}.related-positioning{height:0;left:0;position:fixed;top:7em;width:100%;z-index:0;z-index:0;position:absolute !important}.related-with-cookie{top:9.5em}.related-container{position:relative;height:0;margin:0 auto;max-width:1020px;position:relative;z-index:50;width:960px}.related{position:absolute;right:0;width:15em}.related .inner{background-color:#dee0e2;padding:0.5em 1em 0 1.2em;width:auto}.related h2{font-family:"nta","GDS-Regular",sans-serif;font-size:19px;font-size:1.9rem;line-height:1.31579;font-weight:400;text-transform:none;color:#0b0c0c;margin-top:0.3em;margin-bottom:0.5em;position:relative}@media (max-width: 640px){.related h2{font-size:1.6rem;line-height:1.25}}.related ul{font-family:"nta","GDS-Regular",sans-serif;font-size:16px;font-size:1.6rem;line-height:1.25;font-weight:300;text-transform:none;list-style:none;margin:0;padding:0}@media (max-width: 640px){.related ul{font-size:1.4rem;line-height:1.14286}}.related li{margin-bottom:1em;padding-left:0}.related li.related-topic{border-top:1px solid #a1acb2;list-style:none outside none;margin:0.25em 0 0;padding:0.75em 0}.related li.related-topic a{padding:0}.related li a{background-position:0 -287px;background-repeat:no-repeat;display:block;line-height:1.25em;orphans:2;height:1%}.related li a:hover{background-position:0 0}.related li a[href*="#"]{background:none;color:#888;cursor:default;text-decoration:none}.related .return-to-top{font-family:"nta","GDS-Regular",sans-serif;font-size:16px;font-size:1.6rem;line-height:1.25;font-weight:300;text-transform:none;margin-bottom:0.5em;position:absolute;left:-9999em}@media (max-width: 640px){.related .return-to-top{font-size:1.4rem;line-height:1.14286}}#wrapper .related.sections-list li a{padding:0.1em 0em}#legacy-sources{margin-left:1.2em;margin-top:1em;display:none}#legacy-sources p{font-size:1em;margin-bottom:0;paddin


 in the LICENSE file.

// When we get a type `X` that extends a type `T`, we wouldn't be able to find
// the static members of `T`. It is a compile-time error to use an enum
// shorthand for type `X` in these cases.

// SharedOptions=--enable-experiment=dot-shorthands

import 'dart:async';

import '../dot_shorthand_helper.dart';

void extendsInteger<X extends Integer>() {
  X x = .one;
  //    ^^^^
  // [analyzer] COMPILE_TIME_ERROR.DOT_SHORTHAND_MISSING_CONTEXT
  //     ^
  // [cfe] The static getter or field 'one' isn't defined for the type 'X'.
}

void extendsIntegerNullable<X extends Integer?>() {
  X x = .one;
  //    ^^^^
  // [analyzer] COMPILE_TIME_ERROR.DOT_SHORTHAND_MISSING_CONTEXT
  //     ^
  // [cfe] The static getter or field 'one' isn't defined for the type 'X'.
}

void extendsFutureOrInteger<X extends FutureOr<Integer>>() {
  X x = .one;
  //    ^^^^
  // [analyzer] COMPILE_TIME_ERROR.DOT_SHORTHAND_MISSING_CONTEXT
  //     ^
  // [cfe] The static getter or field 'one' isn't defined for the type 'X'.
}
// Copyright (c) 2024, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// Context type is propagated down in cascades.

// SharedOptions=--enable-experiment=dot-shorthands

import '../dot_shorthand_helper.dart';

class Cascade {
  late Color color;
  late Integer integer;
  late IntegerExt integerExt;
  late IntegerMixin integerMixin;
}

class CascadeCollection {
  late List<Color> colorList;
  late Set<Color> colorSet;
  late Map<Color, Color> colorMap;
  late Map<Color, (Color, Color)> colorMap2;

  late List<Integer> integerList;
  late Set<Integer> integerSet;
  late Map<Integer, Integer> integerMap;
  late Map<Integer, (Integer, Integer)> integerMap2;

  late List<IntegerExt> integerExtList;
  late Set<IntegerExt> integerExtSet;
  late Map<IntegerExt, IntegerExt> integerExtMap;
  late Map<IntegerExt, (IntegerExt, IntegerExt)> integerExtMap2;

  late List<IntegerMixin> integerMixinList;
  late Set<IntegerMixin> integerMixinSet;
  late Map<IntegerMixin, IntegerMixin> integerMixinMap;
  late Map<IntegerMixin, (IntegerMixin, IntegerMixin)> integerMixinMap2;
}

class CascadeMethod {
  void color(Color color) => print(color);
  void integer(Integer integer) => print(integer);
  void integerExt(IntegerExt integer) => print(integer);
  void integerMixin(IntegerMixin integer) => print(integer);
}

void main() {
  Cascade()
    ..color = .red
    ..integer = .one
    ..integerExt = .one
    ..integerMixin = .mixinOne;

  dynamic mayBeNull = null;
  Cascade()
    ..color = mayBeNull ?? .red
    ..integer = mayBeNull ?? .one
    ..integerExt = mayBeNull ?? .one
    ..integerMixin = mayBeNull ?? .mixinOne;

  CascadeCollection()
    // Enum
    ..colorList = [.blue, .green, .red]
    ..colorSet = {.blue, .red}
    ..colorMap = {.blue: .blue, .green: .red}
    ..colorMap2 = {.red: (.blue, .green)}
    // Class
    ..int


		move.l #paldat,-(sp)
		move.l #34,-(sp)
		move handle,-(sp)
		move #$3f,-(sp)
		trap #1
		add.l #12,sp

setpal		move.l #paldat+2,-(sp)
		move #6,-(sp)
		trap #14
		add.l #6,sp

readpic		move.l physbase,-(sp)
		move.l #32000,-(sp)
		move handle,-(sp)
		move #$3f,-(sp)
		trap #1
		add.l #12,sp

		tst d0
		bmi end

closefile	move handle,-(sp)
		move #$3e,-(sp)
		trap #1
		add.l #4,sp
		tst d0
		beq wait

end		move.l oldstack,a7
		clr -(sp)
		trap #1

wait		move #7,-(sp)
		trap #1
		add.l #2,sp
		bra end

	even

newstack	ds.l 100
endstack	dc.l 0
oldstack	dc.l 0
text		dc.b "Name of picture? ",0
	even
inpstart	dc.b 12,0
buff		ds.b 15
	even
handle		dc.w 0
physbase	dc.l $78000
paldat		ds.w 17


        }
        return data
    }
}
package com.bajdcc.OP.syntax.stringify

import com.bajdcc.OP.syntax.ISyntaxComponent
import com.bajdcc.OP.syntax.ISyntaxComponentVisitor
import com.bajdcc.OP.syntax.exp.BranchExp
import com.bajdcc.OP.syntax.exp.RuleExp
import com.bajdcc.OP.syntax.exp.SequenceExp
import com.bajdcc.OP.syntax.exp.TokenExp
import com.bajdcc.util.VisitBag
import java.util.*

class SyntaxToString : ISyntaxComponentVisitor {

    /**
     * 文法推导式描述
     */
    private val context = StringBuilder()

    /**
     * 存放结果的栈
     */
    private val stkStringList = Stack<MutableList<String>>()

    /**
     * 当前描述表
     */
    private var arrData = mutableListOf<String>()

    /**
     * 焦点
     */
    private var focusedExp: ISyntaxComponent? = null

    /**
     * LR项目符号'*'，是否移进当前符号
     */
    private var bFront = true

    constructor()

    constructor(exp: ISyntaxComponent, front: Boolean) {
        focusedExp = exp
        bFront = front
    }

    /**
     * 开始遍历子结点
     */
    private fun beginChilren() {
        stkStringList.push(mutableListOf())
    }

    /**
     * 结束遍历子结点
     */
    private fun endChilren() {
        arrData = stkStringList.pop()
    }

    /**
     * 保存结果
     *
     * @param exp    当前表达式结点
     * @param string 描述
     */
    private fun store(exp: ISyntaxComponent, string: String) {
        var str = string
        if (focusedExp === exp) {
            /* 添加LR项目集符号 */
            if (bFront) {
                str = "*$str"
            } else {
                str += " *"
            }
        }
        if (stkStringList.isEmpty()) {
            context.append(str)
        } else {
            stkStringList.peek().add(str)
        }
    }

    override fun visitBegin(node: TokenExp, bag: VisitBag) {
        bag.visitEnd = false
        store(node, " `" + node.name + "` ")
    }

    override fun visitBegin(node: RuleExp, bag: VisitBag) {
        bag.visitEnd = false
        store(node, " " + node.name + " ")
    }

    override fun visitBegin(node: SequenceExp, bag: VisitBag) {
        beginChilren()
    }

    override fun visitBegin(node: BranchExp, bag: VisitBag) {
        beginChilren()
    }

    override fun visitEnd(node: TokenExp) {

    }

    override fun visitEnd(node: RuleExp) {

    }

    override fun visitEnd(node: SequenceExp) {
        endChilren()
        val sb = StringBuilder()
        arrData.forEach { sb.append(it) }
        store(node, sb.toString())
    }

    override fun visitEnd(node: BranchExp) {
        endChilren()
        val sb = StringBuilder()
        sb.append(" (")
        for (string in arrData) {
            sb.append(string)
            sb.append('|')
        }
        sb.deleteCharAt(sb.length - 1)
        sb.append(") ")
        store(node, sb.toString())
    }

    override fun toString(): String {
        return context.toString()
    }
}
package com.bajdcc.LL1.syntax.prediction

import com.bajdcc.


 + b) * b; }

int main() {
  int choice;
  std::cin >> choice;
  if (choice == 1) {
    binary_int_op = foo1;
  } else {
    binary_int_op = foo2;
  }

  int m, n;
  std::cin >> m >> n;
  std::cout << binary_int_op(m, n);
}
```

???+ note "`&`、`*` 和函数指针"
    在 C 语言中，诸如 `void (*p)() = foo;`、`void (*p)() = &foo;`、`void (*p)() = *foo;`、`void (*p)() = ***foo` 等写法的结果是一样的。

    因为函数（如 `foo`）是能够被隐式转换为指向函数的指针的，因此 `void (*p)() = foo;` 的写法能够成立。

    使用 `&` 运算符可以取得到对象的地址，这对函数也是成立的，因此 `void (*p)() = &foo;` 的写法仍然成立。

    对函数指针使用 `*` 运算符可以取得指针指向的函数，而对于 `**foo` 这样的写法来说，`*foo` 得到的是 `foo` 这个函数，紧接着又被隐式转换为指向 `foo` 的指针。如此类推，`**foo` 得到的最终还是指向 `foo` 的函数指针；用户尽可以使用任意多的 `*`，结果也是一样的。

    同理，在调用时使用类似 `(*p)()` 和 `p()` 的语句是一样的，可以省去 `*` 运算符。

    参考资料：[Why do function pointer definitions work with any number of ampersands '&' or asterisks '\*'? - stackoverflow.com](https://stackoverflow.com/questions/6893285/why-do-function-pointer-definitions-work-with-any-number-of-ampersands-or-as)

可以使用 `typedef` 关键字声明函数指针的类型。

```cpp
typedef int (*p_bi_int_op)(int, int);
```

这样我们就可以在之后使用 `p_bi_int_op` 这种类型，即指向「参数为 2 个 `int`，返回值亦为 `int`」的函数的指针。

可以通过使用 `std::function` 来更方便的引用函数。（未完待续）

使用函数指针，可以实现「回调函数」。（未完待续）

## 参考资料与注释

[^note1]: 参见 [Introduce the nullptr constant](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3042.htm)
## 引入

![](./images/stack.svg)

栈是 OI 中常用的一种线性数据结构。请注意，本文主要讲的是栈这种数据结构，而非程序运行时的系统栈/栈空间。

栈的修改与访问是按照后进先出的原则进行的，因此栈通常被称为是后进先出（last in first out）表，简称 LIFO 表。

??? warning "Warning"
    LIFO 表达的是 **当前在容器** 内最后进来的最先出去。

    我们考虑这样一个栈


공지능 번역 에이전트로, 한국 소설을 **러시아 독자의 감정적 선호도와 문학적 기대에 맞춰 러시아어로 정밀하게 번역하고 최적화**하는 데 중점을 둡니다. 우리는 단순한 언어 변환을 넘어, 원문의 \*\*'인지적 의미', '작가 의도', '감정적 경험', 그리고 한국 문학 고유의 섬세한 '맛'\*\*을 깊이 있게 이해하고 러시아 독자가 마치 러시아어 원작처럼 깊이 몰입하고 감동하며 그 '맛'을 온전히 느낄 수 있도록 \*\*개념 재구성(re-conceptualization)\*\*하는 데 전념합니다.

본 프로젝트는 한국 문학의 러시아 내 확산을 목표로 하며, 번역 과정에서 발생할 수 있는 문화적 및 인지적 간극을 최소화하여 한국 소설의 진정한 가치를 러시아의 광범위한 독자층에게 전달하고자 합니다.

## ✨ 주요 특징

  * **🧠 인지 기반 번역 (Когнитивно-ориентированный перевод)**: 언어학의 '인지 문법(Когнитивная грамматика)' 원리를 적용하여, 단어와 구문의 표면적 의미를 넘어 화자의 의도와 개념 도식(Схема Образа)을 포착하고 러시아어에서 정확하게 재현합니다.
  * **🇷🇺 러시아 시장 최적화 (Оптимизация для российского рынка)**: 러시아의 최신 문학 트렌드, 독자 선호도, 문화적 미묘함(특히 감정적 깊이, 사회적 메시지, 유려한 문체)을 심층적으로 분석하여 번역된 텍스트가 현지 독자에게 가장 자연스럽고 매력적으로 다가가도록 합니다.
  * **📚 장르별 특화 번역 모듈 (Жанровые модули для специализированного перевода)*


force' and 'force_only' fields cannot both be set.
  @$pb.TagNumber(5)
  $core.List<$40.QuotaSafetyCheck> get forceOnly => $_getList(4);
}

/// Request message for DeleteAdminOverride.
class DeleteAdminOverrideRequest extends $pb.GeneratedMessage {
  factory DeleteAdminOverrideRequest({
    $core.String? name,
    $core.bool? force,
    $core.Iterable<$40.QuotaSafetyCheck>? forceOnly,
  }) {
    final $result = create();
    if (name != null) {
      $result.name = name;
    }
    if (force != null) {
      $result.force = force;
    }
    if (forceOnly != null) {
      $result.forceOnly.addAll(forceOnly);
    }
    return $result;
  }
  DeleteAdminOverrideRequest._() : super();
  factory DeleteAdminOverrideRequest.fromBuffer($core.List<$core.int> i,
          [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(i, r);
  factory DeleteAdminOverrideRequest.fromJson($core.String i,
          [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'DeleteAdminOverrideRequest',
      package: const $pb.PackageName(
          _omitMessageNames ? '' : 'google.api.serviceusage.v1beta1'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'name')
    ..aOB(2, _omitFieldNames ? '' : 'force')
    ..pc<$40.QuotaSafetyCheck>(
        3, _omitFieldNames ? '' : 'forceOnly', $pb.PbFieldType.KE,
        valueOf: $40.QuotaSafetyCheck.valueOf,
        enumValues: $40.QuotaSafetyCheck.values,
        defaultEnumValue: $40.QuotaSafetyCheck.QUOTA_SAFETY_CHECK_UNSPECIFIED)
    ..hasRequiredFields = false;

  @$core.Deprecated('Using this can add significant overhead to your binary. '
      'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
      'Will be removed in next major version')
  DeleteAdminOverrideRequest clone() =>
      DeleteAdminOverrideRequest()..mergeFromMessage(this);
  @$core.Deprecated('Using this can add significant overhead to your binary. '
      'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
      'Will be removed in next major version')
  DeleteAdminOverrideRequest copyWith(
          void Function(DeleteAdminOverrideRequest) updates) =>
      super.copyWith(
              (message) => updates(message as DeleteAdminOverrideRequest))
          as DeleteAdminOverrideRequest;

  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static DeleteAdminOverrideRequest create() => DeleteAdminOverrideRequest._();
  DeleteAdminOverrideRequest createEmptyInstance() => create();
  static $pb.PbList<DeleteAdminOverrideRequest> createRepeated() =>
      $pb.PbList<DeleteAdminOverrideRequest>();
  @$core.pragma('dart2js:noInline')
  static DeleteAdminOverrideRequest getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<DeleteAdminOverrideRequest>(create);
  static DeleteAdminOverrideRequest? _defaultInstance;

  ///  The resource name of the override to delete.
  ///
  ///  An example name would be:
  ///  `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminOverrides/4a3f2c1d`
  @$pb.TagNumber(1)
  $core.String get name => $_getSZ(0);
  @


6793 L6.75192409,18.2959847 Z" id="直线-2备份-2" fillRule="nonzero" mask="url(#mask-2)" />
          </g>
          <g id="编组-3" transform="translate(47.000000, 85.000000)" fillRule="nonzero">
            <path d="M13.5,-0.75 C7.9240482,-0.75 3.40384615,3.77020205 3.40384615,9.34615385 C3.40384615,14.9221056 7.9240482,19.4423077 13.5,19.4423077 C19.0759518,19.4423077 23.5961538,14.9221056 23.5961538,9.34615385 C23.5961538,3.77020205 19.0759518,-0.75 13.5,-0.75 Z M13.5,0.75 C18.2475247,0.75 22.0961538,4.59862917 22.0961538,9.34615385 C22.0961538,14.0936785 18.2475247,17.9423077 13.5,17.9423077 C8.75247532,17.9423077 4.90384615,14.0936785 4.90384615,9.34615385 C4.90384615,4.59862917 8.75247532,0.75 13.5,0.75 Z" id="椭圆形" />
            <path d="M4.1924835,5.51717371 C4.58427107,5.38272903 5.0108666,5.59134667 5.14531127,5.98313425 C5.27975594,6.37492183 5.0711383,6.80151735 4.67935073,6.93596203 C2.37222502,7.7276685 1.32239977,8.69804236 1.32239977,9.79769193 C1.32239977,10.5307006 2.29323223,11.2539998 3.93199048,11.8412778 L4.35541987,11.9851904 L4.80562775,12.1229969 C5.11445877,12.212735 5.44044094,12.29811 5.78217191,12.3785371 L6.30640467,12.4953937 L6.85320888,12.6043898 L7.42153278,12.7050868 L8.01032461,12.7970463 L8.6185326,12.8798294 C8.72146018,12.8928376 8.82515295,12.9054451 8.92958898,12.9176429 L9.56494918,12.9858394 C9.67227066,12.9963616 9.78029158,13.0064558 9.88899005,13.0161129 L10.549136,13.0687359 L11.2244911,13.1104284 C11.3382592,13.1164419 11.4526173,13.1219817 11.5675433,13.1270386 L12.2637401,13.1515129 C12.3808504,13.1546019 12.4984848,13.1571898 12.6166216,13.1592674 L13.3312935,13.1655367 C14.463773,13.1655367 15.6147032,13.0795185 16.7331399,12.929224 L17.3396675,12.8410014 C17.4401163,12.8252788 17.54022,12.8090576 17.6399403,12.7923543 L18.2333557,12.6864784 C18.3313894,12.6679115 18.4289632,12.6488952 18.5260389,12.6294456 L19.1022082,12.5076805 C


	XXX_unrecognized []byte  `json:"-"`
}

func (m *CMsgDOTAFantasyLeaveLeagueRequest) Reset()         { *m = CMsgDOTAFantasyLeaveLeagueRequest{} }
func (m *CMsgDOTAFantasyLeaveLeagueRequest) String() string { return proto.CompactTextString(m) }
func (*CMsgDOTAFantasyLeaveLeagueRequest) ProtoMessage()    {}

func (m *CMsgDOTAFantasyLeaveLeagueRequest) GetFantasyLeagueId() uint32 {
	if m != nil && m.FantasyLeagueId != nil {
		return *m.FantasyLeagueId
	}
	return 0
}

func (m *CMsgDOTAFantasyLeaveLeagueRequest) GetFantasyTeamIndex() uint32 {
	if m != nil && m.FantasyTeamIndex != nil {
		return *m.FantasyTeamIndex
	}
	return 0
}

type CMsgDOTAFantasyLeaveLeagueResponse struct {
	Result           *CMsgDOTAFantasyLeaveLeagueResponse_EResult `protobuf:"varint,1,opt,name=result,enum=dota.CMsgDOTAFantasyLeaveLeagueResponse_EResult,def=0" json:"result,omitempty"`
	XXX_unrecognized []byte                                      `json:"-"`
}

func (m *CMsgDOTAFantasyLeaveLeagueResponse) Reset()         { *m = CMsgDOTAFantasyLeaveLeagueResponse{} }
func (m *CMsgDOTAFantasyLeaveLeagueResponse) String() string { return proto.CompactTextString(m) }
func (*CMsgDOTAFantasyLeaveLeagueResponse) ProtoMessage()    {}

const Default_CMsgDOTAFantasyLeaveLeagueResponse_Result CMsgDOTAFantasyLeaveLeagueResponse_EResult = CMsgDOTAFantasyLeaveLeagueResponse_SUCCESS

func (m *CMsgDOTAFantasyLeaveLeagueResponse) GetResult() CMsgDOTAFantasyLeaveLeagueResponse_EResult {
	if m != nil && m.Result != nil {
		return *m.Result
	}
	return Default_CMsgDOTAFantasyLeaveLeagueResponse_Result
}

type CMsgDOTAFantasyPlayerScoreDetailsRequest struct {
	FantasyLeagueId  *uint32 `protobuf:"varint,1,opt,name=fantasy_league_id" json:"fantasy_league_id,omitempty"`
	PlayerAccountId  *uint32 `protobuf:"varint,2,opt,name=player_account_id" json:"player_account_id,omitempty"`
	StartTime        *uint32 `protobuf:"varint,3,opt,name=start_time" json:"start_time,omitempty"`
	EndTime          *uint32 `protobuf:"varint,4,opt,name=end_time" json:"end_time,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (m *CMsgDOTAFantasyPlayerScoreDetailsRequest) Reset() {
	*m = CMsgDOTAFantasyPlayerScoreDetailsRequest{}
}
func (m *CMsgDOTAFantasyPlayerScoreDetailsRequest) String() string { return proto.CompactTextString(m) }
func (*CMsgDOTAFantasyPlayerScoreDetailsRequest) ProtoMessage()    {}

func (m *CMsgDOTAFantasyPlayerScoreDetailsRequest) GetFantasyLeagueId() uint32 {
	if m != nil && m.FantasyLeagueId != nil {
		return *m.FantasyLeagueId
	}
	return 0
}

func (m *CMsgDOTAFantasyPlayerScoreDetailsRequest) GetPlayerAccountId() uint32 {
	if m != nil && m.PlayerAccountId != nil {
		return *m.PlayerAccountId
	}
	return 0
}

func (m *CMsgDOTAFantasyPlayerScoreDetailsRequest) GetStartTime() uint32 {
	if m != nil && m.StartTime != nil {
		return *m.StartTime
	}
	return 0
}

func (m *CMsgDOTAFantasyPlayerScoreDetailsRequest) GetEndTime() uint32 {
	if m != nil && m.EndTime != nil {
		return *m.EndTime
	}
	return 0
}

type CMsgDOTAFantasyPlayerScoreDetailsResponse struct {
	Result           *CMsgDOTA


b.com/repos/square/okhttp/zipball/parent-2.1.0\",\n" +
            "    \"tarball_url\":\"https://api.github.com/repos/square/okhttp/tarball/parent-2.1.0\",\n" +
            "    \"commit\":{\n" +
            "      \"sha\":\"86d4716b58ad3652e5e768bc52f807817a97c61c\",\n" +
            "      \"url\":\"https://api.github.com/repos/square/okhttp/commits/86d4716b58ad3652e5e768bc52f807817a97c61c\"\n" +
            "    }\n" +
            "  }\n" +
            "]"

        val compressed = compressionUtil.gzipBase64UrlSafe(json)

        val expected = "H4sIAAAAAAAAALXVzY7TMBAH8Ps-RZXzbmKPPZ5Jr7wBV4TQ-ItWtNvQpBfQvjuGVkJa7aoGxYfkENvzT_yLxp8eNpuf" +
            "5dpsumc5pm7bTXJOz8sT9Nir7vE69GM_eTkcvlzOhzJjtyzTvB0Gmfb91_2yu_g-nI7DOU2neZi_X0qB4fTt96zhtnB4q-gi5_8r" +
            "elv4ZtGy5rhfuu31m8qDeSelejbOp2i1MMHoIoforPYYlFOQg2enciJlza1MWffPb3VNnofqqD9JL-X-8vg-gu3V08cPen2IV4XX" +
            "w3hV-B0QDIGiFyNR40gZg5SbYSWWLUZlGLPYMrACSHVULUgTjCYQdxDKD8o-JUATM8no2WcTsrWGRRSRAKOCoPQKCNVRVQimBYJp" +
            "gWDuIgQ7phRT-UHJJuV8YMgoKVJwhMplhzGCZVgBoTqqCgFaIEALBLiL4CSVnfAmlB0YS7_G0sM5GQFUOmeyKkbRqN0KCNVRVQi6" +
            "1fmgW50Puup8IO-ItPcwmjEKJIoWghgchUIOSlxiBwR-jdZUG1UL0gSjCcQdBHbRknYeWaJxCAkTOfYBIbMi1qWRl9ahwwoI1VF_" +
            "ER4-_wL2RqAwvQoAAA=="

        Assert.assertEquals(expected, compressed)
    }
}
/*
 * Copyright 2020 Simon Schiller
 *
 * 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 io.github.simonschiller.prefiller

import com.google.common.truth.Truth.assertThat
import io.github.simonschiller.prefiller.internal.util.Version
import io.github.simonschiller.prefiller.testutil.LanguageTestVersions
import io.github.simonschiller.prefiller.testutil.NoSchemaLocationTestVersions
import io.github.simonschiller.prefiller.testutil.ProjectExtension
import io.github.simonschiller.prefiller.testutil.TestVersions
import io.github.simonschiller.prefiller.testutil.outcomeOf
import io.github.simonschiller.prefiller.testutil.


#!/usr/bin/python3

"""Define a class Square."""

class Square:
    """Represent a square."""

    def __init__(self, size):
        """Initialize a new square.

        Args:
            size (int): The size of the new square.
        """
        self.size = size

    @property
    def size(self):
        """Get/set the current size of the square."""
        return (self.__size)

    @size.setter
    def size(self, value):
        if not isinstance(value, int):
            raise TypeError("size must be an integer")
        elif value < 0:
            raise ValueError("size must be >= 0")
        self.__size = value

    def area(self):
        """Return the current area of the square."""
        return (self.__size * self.__size)

    def my_print(self):
        """Print the square with the # character."""
        for i in range(0, self.__size):
            [print("#", end="") for j in range(self.__size)]
            print("")
        if self.__size == 0:
            print("")


r_->StartTimeStamp();
  uint64_t delay_ns = (now.tv_sec * NANOS_PER_SECOND + now.tv_nsec) -
                      (queued.tv_sec * NANOS_PER_SECOND + queued.tv_nsec);

  if (delay_ns >= pending_batch_delay_ns_) {
    return 0;
  }

  // Return non-zero wait microseconds to cause this thread to wait
  // until the queue delay has expired. Another thread may be awaken
  // due to incoming request to handle the pending batch before this
  // thread wakes and that is ok. But if no other request comes in
  // then this thread will wake and revisit the pending batch (and at
  // that time will then see the delay has been exceeded and will send
  // the batch).
  return (pending_batch_delay_ns_ - delay_ns) / 1000;
}

}}  // namespace nvidia::inferenceserver
// Copyright (c) 2018-2019, NVIDIA 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:
//  * Redistributions of source code must retain the above copyright
//    notice, this list of conditions and the following disclaimer.
//  * 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.
//  * Neither the name of NVIDIA CORPORATION 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 ``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 OWNER 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.

#include "src/core/autofill.h"

#include "src/backends/caffe2/autofill.h"
#include "src/backends/onnx/autofill.h"
#include "src/backends/tensorflow/autofill.h"
#include "src/backends/tensorrt/autofill.h"
#include "src/core/constants.h"
#include "src/core/logging.h"
#include "src/core/model_config.h"
#include "tensorflow/core/lib/io/path.h"
#include "tensorflow/core/platform/env.h"

namespace nvidia { namespace inferenceserver {

//
// AutoFillNull
//
class AutoFillNull : public AutoFill {
 public:
  static Status Create(std::unique_ptr<AutoFill>* autofill);
  Status Fix(ModelConfig* config);

 private:
  AutoFillNull() : AutoFill(std::string()) {}
};

Status
AutoFillNull::Create(std::unique_ptr<AutoFill>* autofill)
{
  autofill->reset(new AutoFillNull);
  return Status::Success;
}

Status
AutoFillNull::Fix(ModelConfig* config)
{
  return Status::Success;
}

//
// AutoFillSimple
//
class AutoFillSimple : public AutoFill {
 public:
  static Status Create(
      const std::string& model_name, std::unique_ptr<AutoFill>* autofill);
  Status Fix(ModelConfig* config);

 private:
  AutoFillSimple(const std::string& model_name) : AutoFill(model


estart_attempts}/{max_restart_attempts}): {e}")

            if restart_attempts < max_restart_attempts:
                # 指数退避策略
                restart_delay = min(restart_delay * 2, 300)  # 最大等待5分钟
                logger.info(f"将在 {restart_delay} 秒后重新启动Botpy客户端...")
                await asyncio.sleep(restart_delay)
            else:
                logger.critical("Botpy客户端达到最大重启次数，退出程序")

    logger.info("Botpy客户端已停止")

def init_stats_system():
    """初始化统计系统"""
    logger.info("正在初始化统计系统...")
    # 确保stats_manager已初始化
    _ = stats_manager.initialized
    logger.info("统计系统已初始化")

def register_builtin_plugins():
    """
    注册系统内置插件
    """
    plugin_manager.register_plugin(HiklqqbotAdminPlugin())
    plugin_manager.register_plugin(HiklqqbotMaintenancePlugin())
    plugin_manager.register_plugin(HiklqqbotUseridPlugin())
    plugin_manager.register_plugin(HiklqqbotReloadPlugin())
    plugin_manager.register_plugin(HiklqqbotStatsPlugin())  # 注册统计插件
    plugin_manager.register_plugin(HiklqqbotBlacklistPlugin())  # 注册黑名单插件

async def main_async():
    """异步主程序"""
    logger.info("正在启动QQ机器人...")

    # 检查环境变量
    if not check_env():
        return

    # 初始化统计系统
    init_stats_system()

    # 加载所有插件
    logger.info("正在加载插件...")
    plugin_manager.load_plugins("plugins")

    # 注册内置插件
    register_builtin_plugins()

    logger.info(f"通信模式: {COMM_MODE}")
    logger.info(f"Bot AppID: {BOT_APPID}")
    logger.info(f"使用Botpy客户端: {USE_BOTPY_CLIENT}")

    # 检查botpy客户端配置
    if USE_BOTPY_CLIENT:
        if not BOTPY_INTEGRATION_AVAILABLE:
            logger.error("Botpy集成不可用，但配置要求使用Botpy客户端")
            logger.error("请检查botpy目录是否存在，或设置USE_BOTPY_CLIENT=false")
            return
        if not BOTPY_AVAILABLE:
            logger.error("Botpy SDK不可用，但配置要求使用Botpy客户端")
            logger.error("请检查botpy目录中的SDK是否完整")
            return

    # 根据配置选择客户端类型
    if USE_BOTPY_CLIENT:
        # 使用botpy客户端（目前只支持WebSocket模式）
        if COMM_MODE.lower() == "webhook":
            logger.warning("Botpy客户端暂不支持Webhook模式，将使用WebSocket模式")
        await start_botpy_websocket_client()
    else:
        # 使用原生客户端
        if COMM_MODE.lower() == "webhook":
            await start_webhook_server()
        else:
            await start_websocket_client()

def main():
    """程序入口"""
    try:
        asyncio.run(main_async())
    except KeyboardInterrupt:
        logger.info("程序被用户中断")
    except Exception as e:
        logger.error(f"程序异常: {e}", exc_info=True)

if __name__ == "__main__":
    main()


996&itmmeta=01J70G4WE74VC7T47VQDFEKWJS&hash=item45131c5030:g:cMYAAOSwk9Zm2N2A&itmprp=enc%3AAQAJAAAA4HoV3kP08IDx%2BKZ9MfhVJKkFKqypJ7pJ2mIDKTL9NfmoB%2Bi67EddXeMj1x8q%2F7rTfLADJdyNghEsjRS4l1D3yzKrIG%2B5nW9Q04%2FvaC8adiEJHiGwKvSzQ1I2hb%2B3NmnN1f9UcjsyxEdJS9g4J4rPN9ELFgpUAuYLdbuqd7pUsI8PI3LBl4cddibieiyRX0%2FO%2B6dPPayuMJ5oLNzto1eSkeI1i9dTQrbuPHUa7MnrYVLFFSBbQF1WtTIVMdHoHQizZr%2BRAR%2BwVo%2BIRTjW20oac2SEEiYJUJ2HX9RSEFXY8KV1%7Ctkp%3ABk9SR5rHk5C4ZA">
New ListingApple iPhone 14 - 128 GB - Black (AT&T)
Opens in a new window or tab
Pre-Owned · Apple iPhone 14 · 128 GB · AT&T

<svg data-marko-key="@svg s0-60-0-12-8-4-3-0-3-0-3[5]-10-1-25-1-1-2-1[0]-0" class="icon icon--16" focusable="false" aria-hidden="true"><use href="#icon-star-filled-16"></use></svg><svg data-marko-key="@svg s0-60-0-12-8-4-3-0-3-0-3[5]-10-1-25-1-1-2-1[1]-0" class="icon icon--16" focusable="false" aria-hidden="true"><use href="#icon-star-filled-16"></use></svg><svg data-marko-key="@svg s0-60-0-12-8-4-3-0-3-0-3[5]-10-1-25-1-1-2-1[2]-0" class="icon icon--16" focusable="false" aria-hidden="true"><use href="#icon-star-filled-16"></use></svg><svg data-marko-key="@svg s0-60-0-12-8-4-3-0-3-0-3[5]-10-1-25-1-1-2-1[3]-0" class="icon icon--16" focusable="false" aria-hidden="true"><use href="#icon-star-filled-16"></use></svg><svg data-marko-key="@svg s0-60-0-12-8-4-3-0-3-0-3[5]-10-1-25-1-1-2-1[4]-0" class="icon icon--16" focusable="false" aria-hidden="true"><use href="#icon-star-filled-16"></use></svg>5.0 out of 5 stars.
<span aria-hidden="f


"""Tests the `xai.call` module."""

import sys
from unittest.mock import MagicMock, patch

from mirascope.core.openai import _utils
from mirascope.core.xai._utils import setup_call
from mirascope.core.xai.call_response import XAICallResponse
from mirascope.core.xai.call_response_chunk import XAICallResponseChunk
from mirascope.core.xai.stream import XAIStream
from mirascope.core.xai.tool import XAITool

def test_xai_call() -> None:
    """Tests the `xai_call` decorator."""

    if "mirascope.core.xai._call" in sys.modules:
        del sys.modules["mirascope.core.xai._call"]

    with patch(
        "mirascope.core.base.call_factory", new_callable=MagicMock
    ) as mock_call_factory:
        import mirascope.core.xai._call  # noqa: F401

        mock_call_factory.assert_called_once_with(
            TCallResponse=XAICallResponse,
            TCallResponseChunk=XAICallResponseChunk,
            TToolType=XAITool,
            TStream=XAIStream,
            default_call_params={},
            setup_call=setup_call,
            get_json_output=_utils.get_json_output,
            handle_stream=_utils.handle_stream,
            handle_stream_async=_utils.handle_stream_async,
        )


    no: 294,
    codes: "1F934",
    char: "🤴",
    name: "prince",
    keywords: "prince",
    category: "People & Body",
  },
  {
    no: 295,
    codes: "1F478",
    char: "👸",
    name: "princess",
    keywords: "fairy tale | fantasy | princess",
    category: "People & Body",
  },
  {
    no: 296,
    codes: "1F473",
    char: "👳",
    name: "person wearing turban",
    keywords: "person wearing turban | turban",
    category: "People & Body",
  },
  {
    no: 297,
    codes: "1F473 200D 2642 FE0F",
    char: "👳♂",
    name: "man wearing turban",
    keywords: "man | man wearing turban | turban",
    category: "People & Body",
  },
  {
    no: 298,
    codes: "1F473 200D 2640 FE0F",
    char: "👳♀",
    name: "woman wearing turban",
    keywords: "turban | woman | woman wearing turban",
    category: "People & Body",
  },
  {
    no: 299,
    codes: "1F472",
    char: "👲",
    name: "man with Chinese cap",
    keywords: "gua pi mao | hat | man | man with Chinese cap",
    category: "People & Body",
  },
  {
    no: 300,
    codes: "1F9D5",
    char: "🧕",
    name: "woman with headscarf",
    keywords:
      "headscarf | hijab | mantilla | tichel | woman with headscarf | bandana | head kerchief",
    category: "People & Body",
  },
  {
    no: 301,
    codes: "1F935",
    char: "🤵",
    name: "man in tuxedo",
    keywords: "groom | man | man in tuxedo | tuxedo",
    category: "People & Body",
  },
  {
    no: 302,
    codes: "1F470",
    char: "👰",
    name: "bride with veil",
    keywords: "bride | bride with veil | veil | wedding",
    category: "People & Body",
  },
  {
    no: 303,
    codes: "1F930",
    char: "🤰",
    name: "pregnant woman",
    keywords: "pregnant | woman",
    category: "People & Body",
  },
  {
    no: 304,
    codes: "1F931",
    char: "🤱",
    name: "breast-feeding",
    keywords: "baby | breast | breast-feeding | nursing",
    category: "People & Body",
  },
  {
    no: 305,
    codes: "1F47C",
    char: "👼",
    name: "baby angel",
    keywords: "angel | baby | face | fairy tale | fantasy",
    category: "People & Body",
  },
  {
    no: 306,
    codes: "1F385",
    char: "🎅",
    name: "Santa Claus",
    keywords: "celebration | Christmas | claus | father | santa | Santa Claus",
    category: "People & Body",
  },
  {
    no: 307,
    codes: "1F936",
    char: "🤶",
    name: "Mrs. Claus",
    keywords: "celebration | Christmas | claus | mother | Mrs. | Mrs. Claus",
    category: "People & Body",
  },
  {
    no: 308,
    codes: "1F9B8",
    char: "�


ne = true;
    }
    else {
      prev_was_newline = false;
    }
    balance += _OTHER_BALANCE->get(tok->id, 0);
    if (tok->id == Id::Op_LParen) {
      lex->PushHint(Id::Op_RParen, Id::Op_RParen);
    }
    ilabel = _Classify(gr, tok);
    if (p->addtoken(tok->id, tok, ilabel)) {
      return tok;
    }
    if ((tok->id == Id::Left_ColonPipe || tok->id == Id::Left_PercentParen)) {
      left_tok = tok;
      if (tok->id == Id::Left_PercentParen) {
        lex->PushHint(Id::Op_RParen, Id::Right_Initializer);
      }
      line_reader = Alloc<reader::DisallowedLineReader>(parse_ctx->arena, tok);
      w_parser = parse_ctx->MakeWordParser(lex, line_reader);
      words = Alloc<List<syntax_asdl::CompoundWord*>>();
      close_tok = nullptr;
      done = false;
      while (!done) {
        w = w_parser->ReadWord(lex_mode_e::ShCommand);
        switch (w->tag()) {
          case word_e::Operator: {
            tok = reinterpret_cast<Token*>(w);
            if (tok->id == Id::Right_Initializer) {
              if (left_tok->id != Id::Left_PercentParen) {
                p_die(S_ine, left_tok);
              }
              close_tok = tok;
              done = true;
            }
            else {
              if (tok->id == Id::Op_Pipe) {
                if (left_tok->id != Id::Left_ColonPipe) {
                  p_die(S_ine, left_tok);
                }
                close_tok = tok;
                done = true;
              }
              else {
                if (tok->id == Id::Op_Newline) {
                  continue;
                }
                else {
                  p_die(S_Ayd, Alloc<loc::Word>(w));
                }
              }
            }
          }
            break;
          case word_e::Compound: {
            words->append(static_cast<CompoundWord*>(w));
          }
            break;
          default: {
            assert(0);  // AssertionError
          }
        }
      }
      words2 = braces::BraceDetectAll(words);
      words3 = word_::TildeDetectAll(words2);
      typ = Id::Expr_CastedDummy;
      lit_part = Alloc<YshArrayLiteral>(left_tok, words3, close_tok);
      opaque = reinterpret_cast<Token*>(lit_part);
      done = p->addtoken(typ, opaque, gr->tokens->at(typ));
      ilabel = _Classify(gr, close_tok);
      done = p->addtoken(tok->id, close_tok, ilabel);
      continue;
    }
    if ((tok->id == Id::Left_DollarParen || tok->id == Id::Left_AtParen || tok->id == Id::Left_CaretParen)) {
      left_token = tok;
      lex->PushHint(Id::Op_RParen, Id::Eof_RParen);
      line_reader = Alloc<reader::DisallowedLineReader>(parse_ctx->arena, tok);
      c_parser = parse_ctx->MakeParserForCommandSub(line_reader, lex, Id::Eof_RParen);
      node = c_parser->ParseCommandSub();
      right_token = c_parser->w_parser->cur_token;
      cs_part = Alloc<CommandSub>(left_token, node, right_token);


 expression "，无视即可，ide不知道这个state变化后value会变，而curToken不会变，所以这个表达式并非常量
        //正常来说搜索前会生成新token，因此token必然非空，若为空，则代表取消搜索；若非空则与当前state变量进行比较，若不相等，代表开启了新的搜索，此次搜索已取消
        token.value.isEmpty() || tokenForThisSession != token.value
    }
}

fun generateNewTokenForSearch():String {
    return generateRandomString(18)
}

fun triggerReFilter(filterResultNeedRefresh:MutableState<String>) {
    filterResultNeedRefresh.value = getShortUUID()
}

@Composable
fun <T> filterTheList(
    activityContext: Context,

    needRefresh:String,
    lastNeedRefresh:MutableState<String>,

    enableFilter: Boolean,
    keyword: String,
    lastKeyword: MutableState<String>,
    searching: MutableState<Boolean>,
    token: MutableState<String>,
    resetSearchVars: () -> Unit,
    match:(idx:Int, item:T)->Boolean, // 若customTask非null，此参数无效
    list: List<T>,
    filterList: MutableList<T>,

    // 开始：file history 和 commit history用这几个变量
    lastListSize: MutableIntState? = null,
    filterIdxList:MutableList<Int>? = null,
    customTask:(suspend ()->Unit)? = null,  //若此参数非null，将忽略入参match，此参数内部应该完全自定义如何匹配条目
    // 结束：file history 和 commit history用这几个变量

    // commit history用到这个参数。若此参数返回真，则会重新执行搜索，可把附加的重新启用搜索的条件放到这个参数里执行
    orCustomDoFilterCondition:()->Boolean = {false},
    // commit history用这个参数。在搜索之前执行些附加操作，一般是清列表或者更新上次列表相关的变量
    //此函数调用的时机是已通过执行搜索的判断，但在执行搜索之前
    beforeSearchCallback:(()->Unit)? = null,
) : List<T> {
    return if (enableFilter) {
        val pageRefreshed = needRefresh != lastNeedRefresh.value;
        lastNeedRefresh.value = needRefresh

        val curListSize = list.size

        if (pageRefreshed || keyword != lastKeyword.value || (lastListSize != null && curListSize != lastListSize.intValue) || orCustomDoFilterCondition()) {
            lastListSize?.intValue = curListSize
            filterIdxList?.clear()
            beforeSearchCallback?.invoke()

            //若自定义任务为null则运行默认任务
            doJobThenOffLoading(loadingOff = { searching.value = false }) {
                // customTask若不为null，调用；若为null，调用默认task
                (customTask ?: {
                    val canceled = initSearch(keyword = keyword, lastKeyword = lastKeyword, token = token)

                    searching.value = true

                    filterList.clear()
                    search(src = list, match = match, matchedCallback = {idx, item -> filterList.add(item)}, canceled = canceled)
                }).invoke()
            }

        }

        filterList
    } else {
        resetSearchVars()
        list
    }

}

fun newScrollState(initial:Int = 0):ScrollState = ScrollState(initial = initial)

fun navToFileChooser(type: FileChooserType) {
    doJobWithMainContext {
        AppModel.navController.navigate(Cons.nav_Fi


 && e.previousActiveSegment.TrailingDiamond == "" {
		return e.previousActiveSegment.ResolveBackground()
	}

	if e.activeSegment.ResolveStyle() == config.Diamond && e.activeSegment.LeadingDiamond == "" {
		return e.previousActiveSegment.ResolveBackground()
	}

	if !e.previousActiveSegment.IsPowerline() {
		return color.Transparent
	}

	return e.previousActiveSegment.ResolveBackground()
}

func (e *Engine) adjustTrailingDiamondColorOverrides() {
	// as we now already adjusted the activeSegment, we need to change the value
	// of background and foreground to parentBackground and parentForeground
	// this will still break when using parentBackground and parentForeground as keywords
	// in a trailing diamond, but let's fix that when it happens as it requires either a rewrite
	// of the logic for diamonds or storing grandparents as well like one happy family.
	if e.previousActiveSegment == nil || e.previousActiveSegment.TrailingDiamond == "" {
		return
	}

	trailingDiamond := e.previousActiveSegment.TrailingDiamond
	// Optimize: check both conditions in a single pass
	hasBg := strings.Contains(trailingDiamond, string(color.Background))
	hasFg := strings.Contains(trailingDiamond, string(color.Foreground))

	if !hasBg && !hasFg {
		return
	}

	match := regex.FindNamedRegexMatch(terminal.AnchorRegex, trailingDiamond)
	if len(match) == 0 {
		return
	}

	adjustOverride := func(anchor string, override color.Ansi) {
		newOverride := override
		switch override { //nolint:exhaustive
		case color.Foreground:
			newOverride = color.ParentForeground
		case color.Background:
			newOverride = color.ParentBackground
		}

		if override == newOverride {
			return
		}

		newAnchor := strings.Replace(match[terminal.ANCHOR], string(override), string(newOverride), 1)
		e.previousActiveSegment.TrailingDiamond = strings.Replace(e.previousActiveSegment.TrailingDiamond, anchor, newAnchor, 1)
	}

	if len(match[terminal.BG]) > 0 {
		adjustOverride(match[terminal.ANCHOR], color.Ansi(match[terminal.BG]))
	}

	if len(match[terminal.FG]) > 0 {
		adjustOverride(match[terminal.ANCHOR], color.Ansi(match[terminal.FG]))
	}
}

func (e *Engine) rectifyTerminalWidth(diff int) {
	// Since the terminal width may not be given by the CLI flag, we should always call this here.
	_, err := e.Env.TerminalWidth()
	if err != nil {
		// Skip when we're unable to determine the terminal width.
		return
	}

	e.Env.Flags().TerminalWidth += diff
}

// New returns a prompt engine initialized with the
// given configuration options, and is ready to print any
// of the prompt components.
func New(flags *runtime.Flags) *Engine {
	env := &runtime.Terminal{}
	env.Init(flags)

	_, reload := cache.Get[bool](cache.Device, config.RELOAD)
	cfg := config.Get(flags.ConfigPath, reload)

	template.Init(env, cfg.Var, cfg.Maps)

	flags.HasExtra = cfg.DebugPrompt != nil ||
		cfg.SecondaryPrompt != nil ||
		cfg.TransientPrompt != nil ||
		cfg.ValidLine != nil ||
		cfg.ErrorLine != nil

	// when we print using https://github.com/akinomyoga/ble.sh, this needs to be unescaped for certain prompts


(0x265F, 0x2660).addRange(0x2665, 0x2666).addRange(0x267E, 0x267F).addRange(0x2692, 0x2697).addRange(0x269B, 0x269C).addRange(0x26A0, 0x26A1).addRange(0x26AA, 0x26AB).addRange(0x26B0, 0x26B1).addRange(0x26BD, 0x26BE).addRange(0x26C4, 0x26C5).addRange(0x26CE, 0x26CF).addRange(0x26D3, 0x26D4).addRange(0x26E9, 0x26EA).addRange(0x26F0, 0x26F5).addRange(0x26F7, 0x26FA).addRange(0x2708, 0x270D).addRange(0x2733, 0x2734).addRange(0x2753, 0x2755).addRange(0x2763, 0x2764).addRange(0x2795, 0x2797).addRange(0x2934, 0x2935).addRange(0x2B05, 0x2B07).addRange(0x2B1B, 0x2B1C).addRange(0x1F170, 0x1F171).addRange(0x1F17E, 0x1F17F).addRange(0x1F191, 0x1F19A).addRange(0x1F1E6, 0x1F1FF).addRange(0x1F201, 0x1F202).addRange(0x1F232, 0x1F23A).addRange(0x1F250, 0x1F251).addRange(0x1F300, 0x1F321).addRange(0x1F324, 0x1F393).addRange(0x1F396, 0x1F397).addRange(0x1F399, 0x1F39B).addRange(0x1F39E, 0x1F3F0).addRange(0x1F3F3, 0x1F3F5).addRange(0x1F3F7, 0x1F4FD).addRange(0x1F4FF, 0x1F53D).addRange(0x1F549, 0x1F54E).addRange(0x1F550, 0x1F567).addRange(0x1F56F, 0x1F570).addRange(0x1F573, 0x1F57A).addRange(0x1F58A, 0x1F58D).addRange(0x1F595, 0x1F596).addRange(0x1F5A4, 0x1F5A5).addRange(0x1F5B1, 0x1F5B2).addRange(0x1F5C2, 0x1F5C4).addRange(0x1F5D1, 0x1F5D3).addRange(0x1F5DC, 0x1F5DE).addRange(0x1F5FA, 0x1F64F).addRange(0x1F680, 0x1F6C5).addRange(0x1F6CB, 0x1F6D2).addRange(0x1F6E0, 0x1F6E5).addRange(0x1F6EB, 0x1F6EC).addRange(0x1F6F3, 0x1F6F9).addRange(0x1F910, 0x1F93A).addRange(0x1F93C, 0x1F93E).addRange(0x1F940, 0x1F945).addRange(0x1F947, 0x1F970).addRange(0x1F973, 0x1F976).addRange(0x1F97C, 0x1F9A2).addRange(0x1F9B0, 0x1F9B9).addRange(0x1F9C0, 0x1F9C2).addRange(0x1F9D0, 0x1F9FF);

/***/ }),
/* 550 */
/***/ (function(module, exports, _


o
        local entity = NetworkGetEntityFromNetworkId(peds.created[i])
        if entity and DoesEntityExist(entity) then
            local dist = #(GetEntityCoords(entity, false) - position)
            if not closestDist or dist < closestDist then
                closestNet = peds.created[i]
                closestDist = dist
            end
        end
    end

    return closestNet, closestDist
end

--- Delete shop peds
function peds.deleteAll()
    for i = 1, #peds.created do
        local netId = peds.created[i]
        local entity = NetworkGetEntityFromNetworkId(netId)
        if entity and DoesEntityExist(entity) then
            DeleteEntity(entity)
        end
    end

    table.wipe(peds.created)
end

return peds