59-5:1988",
                        "cp915", "915", "windows-28595"
                      }, "ISO-8859-5");

    new IconvMetaData("ISO-8859-6", 1.0f, 1.0f, 1.0f, 1.0f,
                      new String[]
                      {
                        "8859_6", "ibm-1089_P100-1995", "ibm-1089",
                        "iso_8859_6", "iso8859_6", "iso-8859-6", "arabic",
                        "csISOLatinArabic", "iso-ir-127", "ISO_8859-6:1987",
                        "ECMA-114", "ASMO-708", "8859_6", "cp1089", "1089",
                        "windows-28596", "ISO-8859-6-I", "ISO-8859-6-E"
                      }, "ISO-8859-6");

    new IconvMetaData("ISO-8859-7", 1.0f, 1.0f, 1.0f, 1.0f,
                      new String[]
                      {
                        "ISO8859_7", "8859_7", "ibm-813_P100-1995", "ibm-813",
                        "iso_8859_7", "iso8859_7", "iso-8859-7", "greek",
                        "greek8", "ELOT_928", "ECMA-118", "csISOLatinGreek",
                        "iso-ir-126", "ISO_8859-7:1987", "cp813", "813",
                        "windows-28597"
                      }, "ISO-8859-7");

    new IconvMetaData("ISO-8859-8", 1.0f, 1.0f, 1.0f, 1.0f,
                      new String[]
                      {
                        "ISO8859_8", "8859_8", "ibm-916_P100-1995", "ibm-916",
                        "iso_8859_8", "iso8859_8", "iso-8859-8", "hebrew",
                        "csISOLatinHebrew", "iso-ir-138", "ISO_8859-8:1988",
                        "ISO-8859-8-I", "ISO-8859-8-E", "cp916", "916",
                        "windows-28598"
                      }, "ISO-8859-8");

    new IconvMetaData("ISO-8859-9", 1.0f, 1.0f, 1.0f, 1.0f,
                      new String[]
                      {
                        "ISO8859_9", "8859_9", "ibm-920_P100-1995", "ibm-920",
                        "iso8859_9", "iso-8859-9", "iso_8859_9", "latin5",
                        "csISOLatin5", "iso-ir-148", "ISO_8859-9:1989", "l5",
                        "cp920", "920", "windows-28599", "ECMA-128"
                      }, "ISO-8859-9");

    new IconvMetaData("Johab", 2.0f, 2.0f, 0.5f, 1.0f,
                      new String[] { "ms1361", "ksc5601_1992", "ksc5601-1992", },
                      "Johab");

    new IconvMetaData("KOI8-R", 1.0f, 1.0f, 1.0f, 1.0f,
                      new String[]
                      {
                        "KOI8_R", "KOI8", "KOI-8", "KOI_8", "koi8-r", "koi8r",
                        "koi-8-r", "koi"
                      }, "KOI8-R");

    new IconvMetaData("Shift_JIS", 2.0f, 2.0f, 0.5f, 1.0f,
                      new String[]
                      {
                        "shift-jis", "x-sjis", "ms_kanji", "shift_jis",
                        "csShiftJIS", "sjis", "pck",
                      }, "Shift_JIS");

    new IconvMetaData("TIS-620", 1.0f, 1.0f,


#include <string.h>

#include "px_defs.h"
#include "px_board.h"
#include "px_uart.h"
#include "px_uart_stdio.h"
#include "px_pgm_P.h"
#include "px_cli.h"

// LED command handlers
static const char * px_cli_cmd_led_on_fn(uint8_t argc, char * argv[])
{
    PX_LED_ON();

    return NULL;
}
static const char * px_cli_cmd_led_off_fn(uint8_t argc, char * argv[])
{
    PX_LED_OFF();

    return NULL;
}

// Buzzer command handler
static const char * px_cli_cmd_buzzer_fn(uint8_t argc, char * argv[])
{
    uint16_t delay_ms;

    // <on time ms>
    if(px_cli_util_argv_to_u16(0, 0, 1000))
    {
        delay_ms = px_cli_argv_val.u16;
    }
    else
    {
        return PX_PGM_STR("Error: <on time ms> must be from 0 to 1000 ms");
    }

    BUZZER_ON();
    px_board_delay_ms(delay_ms);
    BUZZER_OFF();

    return NULL;
}

/// [CLI cmd tree declaration]
// Create CLI LED command structures
PX_CLI_CMD_CREATE(px_cli_cmd_led_on,    "on",    0, 0, "",    "Switch LED on")
PX_CLI_CMD_CREATE(px_cli_cmd_led_off,   "off",   0, 0, "",    "Switch LED off")

// Create CLI LED group and add commands
PX_CLI_GROUP_CREATE(px_cli_group_led, "led")
    PX_CLI_CMD_ADD(px_cli_cmd_led_on,  px_cli_cmd_led_on_fn)
    PX_CLI_CMD_ADD(px_cli_cmd_led_off, px_cli_cmd_led_off_fn)
PX_CLI_GROUP_END()

// Create CLI command structures
PX_CLI_CMD_CREATE(px_cli_cmd_buzzer,    "buzzer",   1, 1,   "<on time ms>",             "Switch buzzer on for specified number of milliseconds")
PX_CLI_CMD_CREATE(px_cli_cmd_help,      "help",     0, 1,   "[cmd(s) starts with...]",  "Display list of commands with help. Optionally the list can be reduced.")

// Declare CLI command list and add commands and groups
PX_CLI_CMD_LIST_CREATE(px_cli_cmd_list)
    PX_CLI_CMD_ADD  (px_cli_cmd_buzzer, px_cli_cmd_buzzer_fn)
    PX_CLI_GROUP_ADD(px_cli_group_led)
    PX_CLI_CMD_ADD  (px_cli_cmd_help,   px_cli_cmd_help_fn)
PX_CLI_CMD_LIST_END()
/// [CLI cmd tree declaration]

// UART handle
static px_uart_handle_t px_uart_handle;

int main(void)
{
    uint8_t data;

    // Initialise modules
    px_board_init();
    px_uart_init();
    // Open UART0 @ 115200 BAUD, 8 data bits, no parity, 1 stop bit
    px_uart_open2(&px_uart_handle,
                  PX_UART_NR_0,
                  115200,
                  PX_UART_DATA_BITS_8,
                  PX_UART_PARITY_NONE,
                  PX_UART_STOP_BITS_1);
    // Direct stdio to UART0
    px_uart_stdio_init(&px_uart_handle);
    // Enable interrupts
    px_interrupts_enable();
    // Initialise CLI (after STDIO is ready)
    px_cli_init(px_cli_cmd_list, PX_PGM_STR("CLI Example\n\n"));
    // Loop forever
    while(true)
    {
        // Byte received?
        if(px_uart_rd_u8(&px_uart_handle, &data))
        {
            // Pass received byte on to CLI
            px_cli_on_rx_char((char)data);
        }
    }
}


me, f2g: Flame, f2h: Flame,
      f2i: Flame, f2j: Flame, f2k: Flame, f2l: Flame,
      f2m: Flame, f2n: Flame, f2o: Flame, f2p: Flame,
      f2q: Flame, f2r: Flame, f2s: Flame, f2t: Flame,
      f2u: Flame, f2v: Flame, f2w: Flame, f2x: Flame,
      f2y: Flame, f2z: Flame, f2aa: Flame, f2ab: Flame,
      f2ac: Flame, f2ad: Flame, f2ae: Flame, f2af: Flame;

    var env1 = new DisplayObjectContainer('level3_top', '')
      .addChild(b1start = LevelFactory.MakeWall())
      .addChild(b1end = LevelFactory.MakeWall())
      .addChild(g1a = LevelFactory.MakeGate(MainGameColor.Neutral))
      .addChild(g1b = LevelFactory.MakeGate(MainGameColor.Neutral))
      .addChild(g1c = LevelFactory.MakeGate(MainGameColor.Neutral))
      .addChild(s1a = LevelFactory.MakeSwitch(MainGameColor.Red))
      .addChild(c1a = LevelFactory.MakeCandle(MainGameColor.Red))
      .addChild(c1b = LevelFactory.MakeCandle(MainGameColor.Neutral))
      .addChild(c1c = LevelFactory.MakeCandle(MainGameColor.Neutral))
      .addChild(g1d = LevelFactory.MakeTimedGateHoriz(MainGameColor.Blue, 3.0))
      .addChild(g1e = LevelFactory.MakeTimedGateHoriz(MainGameColor.Red, 3.0))
      .addChild(g1f = LevelFactory.MakeTimedGateHoriz(MainGameColor.Blue, 3.0))
      .addChild(g1g = LevelFactory.MakeTimedGateHoriz(MainGameColor.Red, 3.0))
      .addChild(g1h = LevelFactory.MakeTimedGate(MainGameColor.Red, 2.5))
      .addChild(g1i = LevelFactory.MakeTimedGate(MainGameColor.Blue, 2.5))
      .addChild(g1j = LevelFactory.MakeTimedGate(MainGameColor.Blue, 2.0))
      .addChild(g1k = LevelFactory.MakeTimedGate(MainGameColor.Red, 2.0))
      .addChild(g1l = LevelFactory.MakeTimedGate(MainGameColor.Red, 1.5))
      .addChild(g1m = LevelFactory.MakeTimedGate(MainGameColor.Neutral, 1.5))
      .addChild(g1n = LevelFactory.MakeTimedGate(MainGameColor.Neutral, 1.0))
      .addChild(g1o = LevelFactory.MakeTimedGate(MainGameColor.Blue, 1.0))
      .addChild(q1a = LevelFactory.MakeCheckpoint())
      .addChild(q1b = LevelFactory.MakeCheckpoint())
      .addChild(p1 = LevelFactory.MakeGround(4000, 80))
      .addChild(f1a = LevelFactory.MakeFlame(MainGameColor.Blue))
      .addChild(f1b = LevelFactory.MakeFlame(MainGameColor.Blue))
      .addChild(f1c = LevelFactory.MakeFlame(MainGameColor.Blue))
      .addChild(f1d = LevelFactory.MakeFlame(MainGameColor.Blue))
      .addChild(f1e = LevelFactory.MakeFlame(MainGameColor.Red))
      .addChild(f1f = LevelFactory.MakeFlame(MainGameColor


ndow);

    win->ic_focus_win = focus_win;

    /*
     * Query current focus window to see if it really needs to be set.
     * This is the safe way of checking, but for better performance we
     * could actually trigger off of the win->ic_active value:
     *
     * 	WIN_IC_ACTIVE TRUE  => XNFocusWindow set to win->ic_focus_win.
     *  WIN_IC_ACTIVE FALSE => XNFocusWindow set to win->tmp_ic_focus_win
     *
     * This has been added to help alleviate the tool hang problem (1110677).
     * This will reduce number of times XNFocusWindow is being set
     * in panel (1111354) and in ttysw (1111352).
     */
    XGetICValues(ic, XNFocusWindow, &current_focus, NULL);

    if (win->ic_active) {
	if (focus_win && (focus_win != current_focus))
            XSetICValues(ic, XNFocusWindow, focus_win, NULL);
    } else  {
	if (win->tmp_ic_focus_win && (win->tmp_ic_focus_win != current_focus))
            XSetICValues(ic, XNFocusWindow, win->tmp_ic_focus_win, NULL);
    }

    return(XV_OK);
}

Xv_private int
window_set_xungrabkeyboard(window, display, time)
    Xv_window   window;
    Display     *display;
    Time        time;
{
    Window_info         *win;

    if (!window)  {
        return(XV_OK);
    }

    win = WIN_PRIVATE(window);

    XUngrabKeyboard(display, time);
    WIN_SET_GRAB(win, FALSE);

}

Xv_private int
window_set_xgrabkeyboard(window, dpy, grab_window, owner_events,
                     ptr_mode, kbd_mode, time)
    Xv_window   window;
    Display     *dpy;
    Bool        owner_events;
    int         ptr_mode;
    int         kbd_mode;
    Time        time;
{
    Window_info         *win;
    int                 grab_status;

    if (!window)  {
        return(XV_OK);
    }

    win = WIN_PRIVATE(window);

    grab_status =  XGrabKeyboard(dpy, grab_window, owner_events,
ptr_mode,
                                 kbd_mode, time);
    if (grab_status == GrabSuccess)
        WIN_SET_GRAB(win, TRUE);

    return(grab_status);

}
#endif /* OW_I18N */


",
    height: "100%",
  },
  gradient: {
    position: "absolute",
    bottom: 0,
    left: 0,
    right: 0,
    height: 120,
    padding: 16,
    justifyContent: "flex-end",
  },
  heroTitle: {
    color: "white",
    fontSize: 24,
    fontWeight: "bold",
    marginBottom: 8,
  },
  heroDescription: {
    color: "rgba(255,255,255,0.9)",
    fontSize: 14,
  },
});
```

Benefits of static content pre-compilation:

- **Reduced render time**: Templates are pre-defined and optimized
- **Consistent UI**: Ensures visual consistency across the app
- **Memory efficiency**: Reuses the same template structure for multiple items
- **Reduced JS bridge traffic**: Minimizes prop changes and re-renders
- **Optimized image loading**: Templates can include optimized image loading strategies

### 6. Bitmap Caching for Static Images

For static images that rarely change, use bitmap caching:

```jsx
const StaticImageComponent = ({ imageUrl, title }) => (
  <View
    style={styles.container}
    shouldRasterizeIOS={true} // iOS optimization
    renderToHardwareTextureAndroid={true} // Android optimization
  >
    <FastImage
      source={{ uri: imageUrl }}
      style={styles.image}
      resizeMode={FastImage.resizeMode.cover}
    />
    <Text style={styles.title}>{title}</Text>
  </View>
);
```

When to use bitmap caching:

- Static headers with images
- Image-based UI elements that don't change frequently
- Complex image compositions with overlays or effects
- Images with applied transformations or filters

### 7. Lazy Loading Images

Implement lazy loading for images in long scrolling views:

```jsx
const LazyLoadedImage = ({ item, isVisible }) => {
  const [loaded, setLoaded] = useState(false);

  useEffect(() => {
    if (isVisible && !loaded) {
      // Only start loading when visible
      setLoaded(true);
    }
  }, [isVisible]);

  if (!loaded) {
    return <View style={[styles.imagePlaceholder, { height: item.height }]} />;
  }

  return (
    <FastImage
      source={{ uri: item.imageUrl }}
      style={[styles.image, { height: item.height }]}
      onLoad={() => console.log(`Image ${item.id} loaded`)}
    />
  );
};

// In a list component
const ImageList = ({ images }) => {
  const [visibleIndices, setVisibleIndices] = useState(new Set());

  const handleViewableItemsChanged = useCallback(({ viewableItems }) => {
    const newVisible = new Set(viewableItems.map((item) => item.index));
    setVisibleIndices(newVisible);
  }, []);

  const renderItem = ({ item, index }) => (
    <LazyLoadedImage item={item} isVisible={visibleIndices.has(index)} />
  );

  return (
    <FlashList
      data={images}
      renderItem={renderItem}
      estimatedItemSize={200}
      onViewableItemsChanged={handleViewableItemsChanged}
      viewabilityConfig={{
        itemVisiblePercentThreshold: 20,
        minimumViewTime: 300,
      }}
    />
  );
};
```

## Measuring Image Performance

To identify image performance issues:

1. **Memory Profiling**: Monitor memory usage during image-heavy operations
2. **Network Monitoring**: Track image download sizes and times
3. **Frame Rate Analysis**: Measure FPS drops during image loading and scrolling
4. **Startup Time**: Measure impact of preloaded images on app startup time

## Best Practices Summary

1. **Use FastImage** instead of the standard Image component
2. **Implement native components** for image-intensive features
3. **Apply progressive loading** for better user experience
4. **Resize and compress images** before displaying
5. **Pre-compile static content** with optimized templates
6. **Use bitmap caching** for static images
7. **Implement lazy loading** for images in scrolling views
8. **Choose appropriat


fset = this.offset

    let start = new Date(Date.UTC(
      this.datePicked.getFullYear(),
      this.datePicked.getMonth(),
      this.datePicked.getDate()
    ))

    let end = new Date(Date.UTC(
      this.datePicked.getFullYear(),
      this.datePicked.getMonth(),
      this.datePicked.getDate()
    ))

    // Take dates to the original business timezone, substract the offset
    // This will make show the UTC time like the original business timezone
    let startOriginal = new Date(this.operationTime.start.getTime() - (MS_PER_MINUTE * offset))
    let endOriginal   = new Date(this.operationTime.end.getTime() - (MS_PER_MINUTE * offset))

    start.setUTCHours(startOriginal.getUTCHours(), startOriginal.getUTCMinutes())
    end.setUTCHours(endOriginal.getUTCHours(), endOriginal.getUTCMinutes())

    // Restore original UTC
    start.setTime(start.getTime() + (MS_PER_MINUTE * offset))
    end.setTime(end.getTime() + (MS_PER_MINUTE * offset))

    //let diff = Math.abs(startOriginal.getTime() - endOriginal.getTime())
    //let end = new Date(start.getTime() + diff )

    let _reservation = new Date(start)

    // Fill the array of dates with reservation times on business timezone
    let now = new Date(Date.now())
    while (_reservation >= start
          && _reservation.getTime() <= (end.getTime() - intervalTime * MS_PER_MINUTE)
          && intervalTime > 0
      ) {
        let status = ReservationStatus.AVAILABLE
        let valid: boolean

        if (_reservation.getTime() < now.getTime())
          status = ReservationStatus.EXPIRED

        if(this.containsElement(this.reservationsTaked, _reservation))
          status = ReservationStatus.TAKED

        valid = (status == ReservationStatus.AVAILABLE) ? true : false

        this.reservationDates.push({date:_reservation, valid, status} as TimeInfo)
        _reservation = new Date(_reservation.getTime() + intervalTime * MS_PER_MINUTE)
    }
  }

}
import Markdown, { MarkdownIt } from "markdown-it";

export class MarkdownLoader extends HTMLElement {

    private renderer: MarkdownIt;
    public path: string;

    constructor(path?: string) {
        super();
        this.attachShadow({ mode: "open" });

        this.renderer = new Markdown();
        this.path = path || this.getAttribute("path") || "../markdown/test.md";
    }

    connectedCallback() {
        this.renderMarkdown();
    }

    async renderMarkdown(): Promise<void> {
        try {
            let markdownRaw = await fetch(this.path);
            let markdown = await markdownRaw.text();

            let html = this.renderer.render(markdown);

            let shadow: ShadowRoot;
            if(!this.shadowRoot)
                shadow = this.attachShadow({ mode: "open" });
            else
                shadow = this.shadowRoot;

            shadow.innerHTML = html;
        }

        catch {
            if(!this.shadowRoot)
                return;

            this.shadowRoot.innerHTML = `<p>Could not fetch markdown.</p>`;
        }
    }
}

customElements.define("markdown-loader", MarkdownLoader);import { RangeScore } from './range-score.model';

export abstract class RangeBasedTest {
    public readonly maxScore: number;
    constructor(public readonly scores: Array<RangeScore>) {
        let possibleScores = this.scores.map(indexScore


t: 'helvetica',sans-serif;
$purple: #a795ef;
$green: #b0f0ab;
$blue: #283ed8;
$lavender: #bcc4f1;
$seafoam: #cff4ed;
$cantaloupe: #eabd91; // $red: #dd99be;
$white: #FFF;
$pink: #D8117D;

@mixin truncate-ul($lineHeight: 30px, $lineCount: 6, $bgColor: white) {
    //display: -webkit-box;
    //-webkit-line-clamp: 6;
    //-webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    line-height: $lineHeight;
    max-height: $lineHeight * $lineCount;
    text-align: justify;
    margin-right: -1em;
    padding-right: 1em;
}
@mixin inline-list {
  display: inline;
  list-style: none;
  float: left;
}

@mixin attention {
  // @include pulsate();
  transition: all .3s;
  border: 2px solid $cantelope;
  box-shadow: 0px 5px 1px -5px rgba(0,0,0,0.20);
  z-index: 100;
}

@mixin clearfix {
    &:after {
        content: "";
        display: table;
        clear: both;
    }
}
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}table{border-collapse:collapse;border-spacing:0}button{border:none;padding:0}.howdy-text-button,a.howdy-text-button{cursor:pointer;font-family:"helvetica",sans-serif;border-bottom:2px solid #1432e0;background-color:transparent;padding:0.25em 0.5em;padding-top:.5em;border-radius:0;font-size:1em;line-height:1.5em;margin:0 0 0 0.5em;text-decoration:none;font-weight:400;color:#111;outline:none;transition:background-color .2s}.howdy-text-button:hover,a.howdy-text-button:hover{background-color:rgba(187,197,246,0.5);color:#111}.howdy-text-button:active,a.howdy-text-button:active{border-bottom:2px solid #b0f0ab}.howdy-text-button:focus,a.howdy-text-button:focus{outline:none}.howdy-text-button.delete,a.howdy-text-button.delete{border-bottom:2px


imationDidStop:finished: will always be NO.
 */
@property (assign, nonatomic) BOOL repeatForever;

@end

/**
 @abstract The animation delegate.
 */
@protocol POPAnimationDelegate <NSObject>
@optional

/**
 @abstract Called on animation start.
 @param anim The relevant animation.
 */
- (void)pop_animationDidStart:(POPAnimation *)anim;

/**
 @abstract Called when value meets or exceeds to value.
 @param anim The relevant animation.
 */
- (void)pop_animationDidReachToValue:(POPAnimation *)anim;

/**
 @abstract Called on animation stop.
 @param anim The relevant animation.
 @param finished Flag indicating finished state. Flag is true if the animation reached completion before being removed.
 */
- (void)pop_animationDidStop:(POPAnimation *)anim finished:(BOOL)finished;

/**
 @abstract Called each frame animation is applied.
 @param anim The relevant animation.
 */
- (void)pop_animationDidApply:(POPAnimation *)anim;

@end

@interface NSObject (POP)

/**
 @abstract Add an animation to the reciver.
 @param anim The animation to add.
 @param key The key used to identify the animation.
 @discussion The 'key' may be any string such that only one animation per unique key is added per object.
 */
- (void)pop_addAnimation:(POPAnimation *)anim forKey:(NSString *)key;

/**
 @abstract Remove all animations attached to the receiver.
 */
- (void)pop_removeAllAnimations;

/**
 @abstract Remove any animation attached to the receiver for 'key'.
 @param key The key used to identify the animation.
 */
- (void)pop_removeAnimationForKey:(NSString *)key;

/**
 @abstract Returns an array containing the keys of all animations currently attached to the receiver.
 @param The order of keys reflects the order in which animations will be applied.
 */
- (NSArray *)pop_animationKeys;

/**
 @abstract Returns any animation attached to the receiver.
 @param key The key used to identify the animation.
 @returns The animation currently attached, or nil if no such animation exists.
 */
- (id)pop_animationForKey:(NSString *)key;

@end

/**
 *  This implementation of NSCopying does not do any copying of animation's state, but only configuration.
 *  i.e. you cannot copy an animation and expect to apply it to a view and have the copied animation pick up where the original left off.
 *  Two common uses of copying animations:
 *  * you need to apply the same animation to multiple different views.
 *  * you need to absolutely ensure that the the caller of your function cannot mutate the animation once it's been passed in.
 */
@interface POPAnimation (NSCopying) <NSCopying>

@end


", () => {
			ok(!UrlUtils.checkIfUrlMatchesAContentType(undefined, tooltipsToTest));
			/* tslint:disable:no-null-keyword */
			ok(!UrlUtils.checkIfUrlMatchesAContentType(null, tooltipsToTest));
			/* tslint:enable:no-null-keyword */
			ok(!UrlUtils.checkIfUrlMatchesAContentType("", tooltipsToTest));
		});

		test("checkIfUrlMatchesAContentType for PDF should return UNDEFINED for a valid URL without .pdf at the end", () => {
			ok(!UrlUtils.checkIfUrlMatchesAContentType("https://www.fistbump.reviews", tooltipsToTest));
			ok(!UrlUtils.checkIfUrlMatchesAContentType("https://fistbumppdfs.reviews", tooltipsToTest));
		});

		test("checkIfUrlMatchesAContentType for PDF should return PDF for a valid URL with .pdf at the end, case insensitive", () => {
			strictEqual(UrlUtils.checkIfUrlMatchesAContentType("https://wwww.wen.jen/shipItFresh.pdf", tooltipsToTest), TooltipType.Pdf);
			strictEqual(UrlUtils.checkIfUrlMatchesAContentType("http://www.orimi.com/pdf-test.PDF", tooltipsToTest), TooltipType.Pdf);
		});

		test("checkIfUrlMatchesAContentType for Product should return UNDEFINED for an invalid url", () => {
			ok(!UrlUtils.checkIfUrlMatchesAContentType("https://www.onenote.com/clipper", tooltipsToTest));
		});

		test("checkIfUrlMatchesAContentType for Product should return Product for a valid Wal-mart URL", () => {
			strictEqual(UrlUtils.checkIfUrlMatchesAContentType("http://www.walmart.com/ip/49424374", tooltipsToTest), TooltipType.Product);
		});

		test("checkIfUrlMatchesAContentType for Recipe should return UNDEFINED for a valid url that isnt in the regex match", () => {
			ok(!UrlUtils.checkIfUrlMatchesAContentType("https://www.onenote.com/clipper", tooltipsToTest));
		});

		test("checkIfUrlMatchesAContentType for Recipe should return RECIPE for a valid URL", () => {
			strictEqual(UrlUtils.checkIfUrlMatchesAContentType("http://www.chowhound.com/recipes/easy-grilled-cheese-31834", tooltipsToTest), TooltipType.Recipe);
		});
	}
}

(new UrlUtilsTests()).runTests();
export class Carro{         //tornar public
    placa: string;
    cor: string;
    modelo: string;
    ano: number;
    ligado: boolean;

    andar(): void{
        if(this.ligado != true){
            console.log("O carro está desligado, precisa ser ligado antes");
            this.ligar();
        }
        console.log(`O carro ${this.modelo}(placa:${this.placa}) do ano ${this.ano} está ligado.`)
        console.log(`O carro ${this.modelo}(placa:${this.placa}) do ano ${this.ano} está andando...`);
    }

    parar(): void{
        console.log(`O carro ${this.modelo}(placa:${this.placa}) do ano ${this.ano} parou, agora precisa desligar.`);
        this.desligar();
    }

    ligar():void{
        this.ligado = true;
    }

    desligar():void{
        if(this.ligado == true){
            this.ligado = false;
        }
        console.log(`O carro ${


(290) && (num5 == 0 && Main.rand.Next(35) == 0))
                    newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 290, 0, 0.0f, 0.0f, 0.0f, 0.0f, (int) byte.MaxValue);
                  else if (flag14 && (num5 == 1 || num5 == 2) && Main.rand.Next(30) == 0)
                    newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 289, 0, 0.0f, 0.0f, 0.0f, 0.0f, (int) byte.MaxValue);
                  else if (flag14 && Main.rand.Next(20) == 0)
                  {
                    int num8 = 281;
                    if (num5 == 0)
                      num8 += 2;
                    if (num5 == 2)
                      num8 += 4;
                    int Type2 = num8 + Main.rand.Next(2);
                    if (!NPC.AnyNPCs(Type2))
                      newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, Type2, 0, 0.0f, 0.0f, 0.0f, 0.0f, (int) byte.MaxValue);
                  }
                  else if (flag14 && Main.rand.Next(3) != 0)
                  {
                    int num8 = 269;
                    if (num5 == 0)
                      num8 += 4;
                    if (num5 == 2)
                      num8 += 8;
                    newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, num8 + Main.rand.Next(4), 0, 0.0f, 0.0f, 0.0f, 0.0f, (int) byte.MaxValue);
                  }
                  else if (Main.player[index3].RollLuck(35) == 0)
                    newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 71, 0, 0.0f, 0.0f, 0.0f, 0.0f, (int) byte.MaxValue);
                  else if (num5 == 1 && Main.rand.Next(3) == 0 && !NPC.NearSpikeBall(index1, index2))
                    newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 70, 0, 0.0f, 0.0f, 0.0f, 0.0f, (int) byte.MaxValue);
                  else if (num5 == 2 && Main.rand.Next(5) == 0)
                    newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 72, 0, 0.0f, 0.0f, 0.0f, 0.0f, (int) byte.MaxValue);
                  else if (num5 == 0 && Main.rand.Next(7) == 0)
                    newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 34, 0, 0.0f, 0.0f, 0.0f, 0.0f, (int) byte.MaxValue);
                  else if (Main.rand.Next(7) == 0)
                  {
                    newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 32, 0, 0.0f, 0.0f, 0.0f, 0.0f, (int) byte.MaxValue);
                  }
                  else
                  {
                    switch (Main.rand.Next(5))
                    {
                      case 0:
                        newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 294, 0, 0.0f, 0.0f, 0.0f, 0.0f, (int) byte.MaxValue);
                        break;
                      case 1:
                        newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 295, 0, 0.0f, 0.0f, 0.0f, 0.0f, (int) byte.MaxValue);
                        break;
                      case 2:
                        newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 296,


합니다. Redis에서 제공되는 Bit 타입은 사용자의 데이터를 0,1로 표현하며 컴퓨터가 가장 빠르게 저장할 수 있도록 해석할 수 있도록 표현하는 구조입니다.
* 데이터를 처리할 때는 setbit, gebit, bitaccount 명령어릂 사용합니다.

##### Geo 타입

* Redis DB의 Geo 타입은 위치정보 데이터를 효율적으로 저장 관리할 수 있으며 이를 활용한 위치 정보 데이터 분석 및 검색에 사용할 수 있습니다.
* 데이터를 처리할 때는 `geoadd`, `gerpops`, `geodist`, `georadius`, `geohash` 명령어를 사용합니다.

##### HyperLogLogs 타입

* HyperLogLogs 타입은 관계형 DB의 테이블 구조에서 Check 제약조건과 유사한 개념의 데이터 구조입니다. 관계형 DB에서 check 제약조건을 사용하는 이유는 해당 칼럼에 반드시 저장되오야 할 데이터 값 만을 저장할 수 있또록 제한을 가하는 것입니다. Redis DB에서도 동일하게 특정 필드 또는 엘리먼트에 저장되오야 할 데이터 값을 미리 생성하여 저장한 후 필요에 따라 연결하여 사용할 수 있는 데이터 타입입니다.
* 데이터를 처리할 때는 `pfadd`, `pfcount`, `pfmerge` 명령어를 사용합니다.

## Redis 확장 Module

많은 개발자들이 Redis Server의 소스를 이용한 다양한 기능들을 개발하여 배포하게 되었는데 이를 Redis 확장 모듈 이라고 합니다.

* REJSON: JSON 데이터 타입을 이요한 데이터를 처리할 수 있는 모듈
* RedisSQL: Redis Server에서 SQLite(관계형 DB)로 데이터를 저장할 수 있는 모듈
* RedisSearch: Redis DB 내에 저장된 데이터에 대한 검색엔진을 사용할 수 있는 모듈

# 트랜잭션


mp = bsdf->pdfComponent(bRec);
								gloDist.append(pdfComp);
							} else {
								gloDist.append(0.f);
							}
						}
						gloDist.normalize();
						compSel = gloDist.sample(rRec.nextSample1D(), pdfComp);
					}
				}
			}

			bRec.component = compSel;
			Spectrum bsdfWeight = bsdf->sample(bRec, bsdfPdf, rRec.nextSample2D());
			if (bsdfWeight.isZero())
				break;
			bsdfWeight /= pdfComp;

            if(m_showGlossySurfaces) {
              Li += bsdfWeight;
              break;
            }

			scattered |= bRec.sampledType != BSDF::ENull;

			/* Prevent light leaks due to the use of shading normals */
			const Vector wo = its.toWorld(bRec.wo);
			Float woDotGeoN = dot(its.geoFrame.n, wo);
			if (m_strictNormals && woDotGeoN * Frame::cosTheta(bRec.wo) <= 0)
				break;

			/* Trace a ray in this direction */
			ray = Ray(its.p, wo, ray.time);
			if (!scene->rayIntersect(ray, its)) {
				/* Intersected nothing -- perhaps there is an environment map? */
				const Emitter *env = scene->getEnvironmentEmitter();

				if (env) {
					SLog(EError, "Env map not supported yet");
				}

				break;
			}

			/* Keep track of the throughput and relative
			   refractive index along the path */
			throughput *= bsdfWeight;
			eta *= bRec.eta;

			/* ==================================================================== */
			/*                         Indirect illumination                        */
			/* ==================================================================== */

			/* Set the recursive query type. Stop if no surface was hit by the
			   BSDF sample or if indirect illumination was not requested */
			if (!its.isValid() || !(rRec.type & RadianceQueryRecord::EIndirectSurfaceRadiance))
				break;
			rRec.type = RadianceQueryRecord::ERadianceNoEmission;

			if (rRec.depth++ >= m_rrDepth) {
				/* Russian roulette: try to keep path weights equal to one,
				   while accounting for the solid angle compression at refractive
				   index boundaries. Stop with at least some probability to avoid
				   getting stuck (e.g. due to total internal reflection) */

				Float q = std::min(throughput.max() * eta * eta, (Float) 0.95f);
				if (rRec.nextSample1D() >= q)
					break;
				throughput /= q;
			}
		}

		/* Store statistics */
		avgPathLength.incrementBase();
		avgPathLength += rRec.depth;

		return Li;
	}

	void serialize(Stream *stream, InstanceManager *manager) const {
		MonteCarloIntegrator::serialize(stream, manager);
	}

	std::string toString() const {
		std::ostringstream oss;
		oss << "MIPathTracer[" << endl
			<< "  maxDepth = " << m_maxDepth << "," << endl
			<< "  rrDepth = " << m_rrDepth << "," << endl
			<< "  strictNormals = " << m_strictNormals << endl
			<< "]";
		return oss.str();
	}

	MTS_DECLARE_CLASS()

	private:
	  Float m_roughness;
      bool m_showGlossySurfaces;
};

MTS_IMPLEMENT_CLASS_S(MIPathTracer, false, MonteCarloIntegrator)
MTS_EXPORT_PLUGIN(MIPathTracer, "MI path tracer");
MTS_NAMESPACE_END
// This file is part of the reference implementation for the paper
//   Bayesian Collaborative Denoising for Monte-Carlo Rendering
//   Malik Boughida and Tamy Boubekeur.
//   Computer Graphics Forum (Proc. EGSR


    checked: Boolean = false,
    text: String = "Radio Button",
    group: UIRadioButtonGroup = UIRadioButtonGroup(),
    block: @ViewDslMarker UIRadioButton.() -> Unit = {}
): UIRadioButton = UIRadioButton(size, checked, group, text).addTo(this).apply(block)

open class UIRadioButton(
    size: Size = UI_DEFAULT_SIZE,
    checked: Boolean = false,
    group: UIRadioButtonGroup = UIRadioButtonGroup(),
    text: String = "Radio Button",
) : UIBaseCheckBox<UIRadioButton>(size, checked, text, UIRadioButton) {
    companion object : Kind()

    var group: UIRadioButtonGroup = group
        set(value) {
            if (field !== value) {
                field.removeRadio(this)
                field = value
                value.addRadio(this)
                invalidate()
            }
        }

    override var checked: Boolean
        get() = super.checked
        set(value) {
            if (super.checked != value) {
                super.checked = value
                if (value) group.selectedButton = this
                invalidate()
            }
        }

    init {
        group.addRadio(this)
        if (checked) {
            group.selectedButton = this
        }
    }

    override fun onComponentClick() {
        checked = true
        focused = true
    }
}
package korlibs.korge.ui

import korlibs.image.color.*
import korlibs.image.font.*
import korlibs.korge.input.*
import korlibs.korge.render.*
import korlibs.korge.style.*
import korlibs.korge.view.*
import korlibs.math.geom.*

// @TODO: Replace with TextBlock
inline fun Container.uiText(
    text: String,
    size: Size = UIText.DEFAULT_SIZE,
    block: @ViewDslMarker UIText.() -> Unit = {}
): UIText = UIText(text, size).addTo(this).apply(block)

class UIText(
    text: String,
    size: Size = DEFAULT_SIZE,
) : UIView(size) {
    companion object {
        val DEFAULT_SIZE = Size(128, 18)
    }
    protected var bover by uiObservable(false) { updateState() }
    protected var bpressing by uiObservable(false) { updateState() }

    private val background = solidRect(size, Colors.TRANSPARENT)
    private val textView = text(text, font = DefaultTtfFontAsBitmap)
    var bgcolor: RGBA = Colors.TRANSPARENT

    var text: String by textView::text

    init {
        mouse {
            onOver {
                simulateOver()
            }
            onOut {
                simulateOut()
            }
            onDown {
                simulateDown()
            }
            onUpAnywhere {
                simulateUp()
            }
        }
    }

    fun simulateOver() {
        bover = true
    }

    fun simulateOut() {
        bover = false
    }

    fun simulatePressing(value: Boolean) {
        bpressing = value
    }

    fun simulateDown() {
        bpressing = true
    }

    fun simulateUp() {
        bpressing = false
    }

    private var textBounds = Rectangle()

    override fun renderInternal(ctx: RenderContext) {
        background.visible = bgcolor.a != 0
        background.colorMul = bgcolor
        textBounds = Rectangle(Point.ZERO, unscaledSize)
        textView.setFormat(face = styles.textFont, size = styles.textSize.toInt(), color = styles.textColor, align = styles.textAlignment)
        textView.setTextBounds(textBounds.immutable)
        //background.size(width


flag"
	"fmt"
	"io"
	"log"
	"net/http"
	"net/http/httputil"
	"net/url"
	"os"
	"time"

	"cloud.google.com/go/errorreporting"
	"cloud.google.com/go/logging"
	"cloud.google.com/go/storage"
	"contrib.go.opencensus.io/exporter/stackdriver"
	"github.com/google/goblet"
	googlehook "github.com/google/goblet/google"
	"github.com/google/uuid"
	"go.opencensus.io/stats/view"
	"go.opencensus.io/tag"
	"golang.org/x/oauth2/google"

	logpb "google.golang.org/genproto/googleapis/logging/v2"
)

const (
	scopeCloudPlatform = "https://www.googleapis.com/auth/cloud-platform"
	scopeUserInfoEmail = "https://www.googleapis.com/auth/userinfo.email"
)

var (
	port      = flag.Int("port", 8080, "port to listen to")
	cacheRoot = flag.String("cache_root", "", "Root directory of cached repositories")

	stackdriverProject      = flag.String("stackdriver_project", "", "GCP project ID used for the Stackdriver integration")
	stackdriverLoggingLogID = flag.String("stackdriver_logging_log_id", "", "Stackdriver logging Log ID")

	backupBucketName   = flag.String("backup_bucket_name", "", "Name of the GCS bucket for backed-up repositories")
	backupManifestName = flag.String("backup_manifest_name", "", "Name of the backup manifest")

	latencyDistributionAggregation = view.Distribution(
		100,
		200,
		400,
		800,
		1000, // 1s
		2000,
		4000,
		8000,
		10000, // 10s
		20000,
		40000,
		80000,
		100000, // 100s
		200000,
		400000,
		800000,
		1000000, // 1000s
		2000000,
		4000000,
		8000000,
	)
	views = []*view.View{
		{
			Name:        "github.com/google/goblet/inbound-command-count",
			Description: "Inbound command count",
			TagKeys:     []tag.Key{goblet.CommandTypeKey, goblet.CommandCanonicalStatusKey, goblet.CommandCacheStateKey},
			Measure:     goblet.InboundCommandCount,
			Aggregation: view.Count(),
		},
		{
			Name:        "github.com/google/goblet/inbound-command-latency",
			Description: "Inbound command latency",
			TagKeys:     []tag.Key{goblet.CommandTypeKey, goblet.CommandCanonicalStatusKey, goblet.CommandCacheStateKey},
			Measure:     goblet.InboundCommandProcessingTime,
			Aggregation: latencyDistributionAggregation,
		},
		{
			Name:        "github.com/google/goblet/outbound-command-count",
			Description: "Outbound command count",
			TagKeys:     []tag.Key{goblet.CommandTypeKey, goblet.CommandCanonicalStatusKey},
			Measure:     goblet.OutboundCommandCount,
			Aggregation: view.Count(),
		},
		{
			Name:        "github.com/google/goblet/outbound-command-latency",
			Description: "Outbound command latency",
			TagKeys:     []tag.Key{goblet.CommandTypeKey, goblet.CommandCanonicalStatusKey},
			Measure:     goblet.OutboundCommandProcessingTime,
			Aggregation: latencyDistributionAggregation,
		},
		{
			Name:        "github.com/google/goblet/upstream-fetch-blocking-time",
			Description: "Duration that requests are waiting for git-fetch from the upstream",
			Measure:     goblet.UpstreamFetchWaitingTime,
			Aggregation: latencyDistributionAggregation,
		},
	}


看做一个特殊的列表。基于这样的认识，我们再来认识这三个工具 `std::tuple_cat()`，`std::tuple_size()` 以及 `std::tuple_element`。注意，以下内容均在不同程度上涉及了模板编程的知识，初学者可以先行放弃待积累了一定的模板编程经验之后再重新学习本小节的知识。

### 以下内容初学者可跳过

首先转变观念，把 `tuple` 看做一种特殊的要求每一个元素的数据类型的不定长列表。基于这样的考虑，我们先给自己设置一个目标，实现两个元组的拼接操作。拼接其实并不难，因为如果已知两个元组内部的元素之后只需要提取出来然后 `std::make_tuple()` 就行了。这个问题的难点就在于，由于 C++ 要求所有的变量类型必须在编译时声明，所以如果要实现两个元组的拼接就需要对它们分别进行解包操作，同时还需要声明数据类型。所以现在我们关注这样一个问题，给定一个元组，能否实现以下的三种操作：自动解包，得到元组内部元素的个数，得到确定某一元素的数据类型。这时需要注意，刚刚所提到的三种操作实际上只是一种操作。得到元组内部元素的个数，等价于自动解包时把元组内部的每一个元素都看作自然数 1 然后把解包操作修改为自然数的加法。而得到确定某一元素的数据类型则更为方便，我们只需要在某一个位置上应用一次 `decltype` 就大功告成了。所以基于以上的思路，我们的任务只有一个，就是如何自动分解元组。

这里一种很简单的方法就是递归处理，每一次把当前元组分解为两部分，当前元祖的头部（第一个元素）和剩余部分，之后再对剩余部分进行处理，直到剩余部分是一个只包含一个元素的元组为止。基于这一思路，我们可以写出下面所示的简单代码。

```cpp
#include <iostream>
#include <string>
#include <tuple>

template<class Func, class Tuple, int N>
struct TupleHelper
{
	static void func(Func f, const Tuple &_)
	{
		TupleHelper<Func, Tuple, N - 1>::func(f, _);
		f(std::get<N - 1>(_), N - 1);
	}
};

template<class Func, class Tuple>
struct TupleHelper<Func, Tuple, 1>
{
	static void func(Func f, const Tuple &_)
	{
		f(std::get<0>(_), 0);
	}
};

template<class Func, class ...Args>
void manipulate_tuple(Func f, const std::tuple<Args...> &_)
{
	TupleHelper<Func, decltype(_), sizeof...(Args)>::func(f, _);
}

template<class ...Args>
void print_tuple(const std::tuple<Args...> &_)
{
	std::cout << "(";
	manipulate_tuple(
		[](auto _, std::size_t idx)
		{
			if (id


{0.5, 0.5, 0.25, 0.25, 0.10},

-- set cell selection wrap right behavior
	cell_wrap = "/select/down",
	row_wrap = "/insert/row/expression",

-- default terminal dimensions (in cells) used for a newly spawned
-- terminal or for a lash style cli
	terminal_size = {80, 25},

-- default resolution (pixels) for generic media/vm/game/... contents
	media_size = {1280, 720},

-- default 'output' size for fullscreened wayland / x11 windows
	x11_wl_size = {1280, 720},

-- set to empty for builtin/bitmap, additional fonts will be used for fallback
-- when


using UnityEngine;

namespace KadenZombie8.BIMOS
{
    // Created by SparkMint.

    /// <summary>
    /// A PD Controller that outputs a Vector3 value.
    /// </summary>
    public class PDVector3
    {
        private readonly PDScalar _xPD, _yPD, _zPD;

        public PDVector3(float pGain, float dGain)
        {
            _xPD = new PDScalar(pGain, dGain);
            _yPD = new PDScalar(pGain, dGain);
            _zPD = new PDScalar(pGain, dGain);
        }

        /// <summary>
        /// Updates the Proportional Gain of this PD Controller to the specified value.
        /// </summary>
        /// <param name="pGain">The Proportional Gain to provide this Controller.</param>
        public void UpdateProportionalGain(float pGain)
        {
            _xPD.UpdateProportionalGain(pGain);
            _yPD.UpdateProportionalGain(pGain);
            _zPD.UpdateProportionalGain(pGain);
        }

        /// <summary>
        /// Updates the Derivative Gain of this PD Controller to the specified value.


button):not(.usa-current){color:#565c65}.usa-sidenav a:not(.usa-button):not(.usa-current):hover{color:#005ea2}.usa-sidenav a:not(.usa-button):not(.usa-current):focus{outline-offset:0}.usa-sidenav .usa-current{position:relative;color:#005ea2;font-weight:700}.usa-sidenav .usa-current::after{background-color:#005ea2;border-radius:99rem;content:"";display:block;position:absolute;bottom:.25rem;top:.25rem;width:.25rem;left:.25rem}@media all and (min-width:40em){.usa-sidenav .usa-current{position:relative}.usa-sidenav .usa-current::after{background-color:#005ea2;border-radius:99rem;content:"";display:block;position:absolute;bottom:.25rem;top:.25rem;width:.25rem;left:0}}.grid-container .usa-sidenav{margin-left:-1rem;margin-right:-1rem}@media all and (min-width:40em){.grid-container .usa-sidenav{margin-left:0;margin-right:0}}.usa-sidenav__sublist{list-style-type:none;padding-left:0;margin:0;font-size:1rem}.usa-sidenav__sublist-item{border-top:1px solid #dfe1e2;font-size:.93rem}.usa-sidenav__sublist .usa-current::after{display:none}@media all and (min-width:40em){.usa-sidenav__sublist .usa-current::after{display:none}}.usa-sidenav__sublist a:not(.usa-button){padding-left:2rem}.usa-sidenav__sublist .usa-sidenav__sublist a:not(.usa-button){padding-left:3rem}.usa-sidenav__sublist .usa-sidenav__sublist .usa-sidenav__sublist a:not(.usa-button){padding-left:4rem}.usa-site-alert .usa-alert{background-color:#f0f0f0;border-left:.5rem solid #a9aeb1;color:#1b1b1b}.usa-site-alert .usa-alert .usa-alert__body{font-family:Source Sans Pro Web,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;font-size:1.06rem;line-height:1.5;padding-bottom:1rem;padding-top:1rem;position:relative}.usa-site-alert .usa-alert .usa-alert__text{margin-bottom:0;margin-top:0}.usa-site-alert .usa-alert .usa-alert__text:only-child{padding-bottom:0;padding-top:0}.usa-site-alert .usa-alert .usa-alert__heading{font-family:Source Sans Pro Web,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;font-size:1.46rem;line-height:.9;margin-top:0;margin-bottom:.5rem}.usa-site-alert .usa-alert .usa-alert__body>.usa-list,.usa-site-alert .usa-alert>.usa-list{padding-left:2ch}.usa-site-alert .usa-alert .usa-alert__body>.usa-list:last-child,.usa-site-alert .usa-alert>.usa-list:last-child{margin-bottom:0}.usa-site-alert .usa-alert .usa-alert__body{max-width:64rem;padding-left:1.25rem;padding-right:1.25rem}.usa-site-alert .usa-alert .usa-alert__body::before{left:1.0833333333rem}@media all and (min-width:64em){.usa-site-alert .usa-alert .usa-alert__body{margin-left:auto;margin-right:auto;padding-left:1.75rem;padding-right:1.75rem}.usa-site-alert .usa-alert .usa-alert__body::before{left:1.5833333333rem}}.usa-site-alert


)
 * [Pasta Salad With Garbanzo Beans Tomatoes And Feta Cheese](../../index/p/pasta-salad-with-garbanzo-beans-tomatoes-and-feta-cheese-4286.json)
 * [Pasta Salad With Mozzarella Sun Dried Tomatoes And Olives](../../index/p/pasta-salad-with-mozzarella-sun-dried-tomatoes-and-olives-103773.json)
 * [Pasta Salad With Tomatoes And Corn](../../index/p/pasta-salad-with-tomatoes-and-corn-103246.json)
 * [Pasta Salad With Tomatoes And Peas](../../index/p/pasta-salad-with-tomatoes-and-peas-12038.json)
 * [Pasta Shells With Chicken Mushrooms Escarole And Sun Dried Tomatoes](../../index/p/pasta-shells-with-chicken-mushrooms-escarole-and-sun-dried-tomatoes-106220.json)
 * [Pasta With Anchovies And Tomatoes](../../index/p/pasta-with-anchovies-and-tomatoes-13602.json)
 * [Pasta With Arugula And Plum Tomatoes](../../index/p/pasta-with-arugula-and-plum-tomatoes-103787.json)
 * [Pasta With Cherry Tomatoes Basil Lemon And Clams](../../index/p/pasta-with-cherry-tomatoes-basil-lemon-and-clams-104811.json)
 * [Pasta With Chicken Sun Dried Tomatoes Gorgonzola And Pine Nuts](../../index/p/pasta-with-chicken-sun-dried-tomatoes-gorgonzola-and-pine-nuts-4667.json)
 * [Pasta With Chickpeas And Charred Tomatoes](../../index/p/pasta-with-chickpeas-and-charred-tomatoes-363654.json)
 * [Pasta With Lobster Tomatoes And Herbes De Maquis](../../index/p/pasta-with-lobster-tomatoes-and-herbes-de-maquis-341.json)
 * [Pasta With Roasted Fennel And Tomatoes](../../index/p/pasta-with-roasted-fennel-and-tomatoes-4681.json)
 * [Pasta With Roasted Vegetables Tomatoes And Basil](../../index/p/pasta-with-roasted-vegetables-tomatoes-and-basil-105764.json)
 * [Pasta With Roasted Vegetables Tomatoes And Basil](../../index/p/pasta-with-roasted-vegetables-tomatoes-and-basil-3041.json)
 * [Pasta With Sausage Tomatoes And Mushrooms](../../index/p/pasta-with-sausage-tomatoes-and-mushrooms-106961.json)
 * [Pasta With Shrimp Tomatoes And Arugula](../../index/p/pasta-with-shrimp-tomatoes-and-arugula-1038.json)
 * [Pasta With Shrimp Tomatoes And Garlic](../../index/p/pasta-with-shrimp-tomatoes-and-garlic-5169.json)
 * [Pasta With Smoked Whitefish Tomatoes And Garlic](../../index/p/pasta-with-smoked-whitefish-tomatoes-and-garlic-5468.json)
 * [Pasta With Spicy Sausage Radicchio And Sun Dried Tomatoes](../../index/p/pasta-with-spicy-sausage-radicchio-and-sun-dried-tomatoes.json)
 * [Pasta With Squid Tomatoes And Capers](../../index/p/pasta-with-squid-tomatoes-and-capers-107796.json)
 * [Pasta With Sun Dried Tomatoes Olive And Goat Cheese](../../index/p/pasta-with-sun-dried-tomatoes-olive-and-goat-cheese-13530.json)
 * [Pasta With Tomatoes And Goat Cheese](../../index/


) : Components.SpreadFromIcon(module, (uint)IconID.ShockWhiteFast, AID.ShockWhiteSpread, 5, 5.1f);
class ManipulateEnergy(BossModule module) : Components.BaitAwayIcon(module, new AOEShapeCircle(3), (uint)IconID.Tankbuster, AID.ManipulateEnergy, 5.2f, centerAtTarget: true, damageType: AIHints.PredictedDamageType.Tankbuster);

class ShockWhiteSlow(BossModule module) : Components.SpreadFromIcon(module, (uint)IconID.ShockWhiteSlow, AID.ShockWhiteSpread, 5, 10.1f)
{
    public override void Update()
    {
        Spreads.RemoveAll(s => s.Target.IsDead);
    }
}
class ShockBlackSlow(BossModule module) : Components.SpreadFromIcon(module, (uint)IconID.ShockBlackSlow, AID.ShockBlackSpread, 5, 10.1f)
{
    public override void Update()
    {
        Spreads.RemoveAll(s => s.Target.IsDead);
    }
}

class A34RedGirlStates : StateMachineBuilder
{
    public A34RedGirlStates(BossModule module) : base(module)
    {
        // TODO: figure out how to disambiguate wipes
        SimplePhase(0, Phase1, "P1").Raw.Update = () => module.Enemies(OID.RedSphere).Any();
        SimplePhase(1, Phase2, "Hacking").Raw.Update = () => module.Enemies(OID.BossP2).Any();
        SimplePhase(2, Phase3, "P2").Raw.Update = () => module.Enemies(OID.BossP2).All(b => b.IsDeadOrDestroyed);
    }

    private void Phase1(uint id)
    {
        Timeout(id, 9999, "P1 enrage")
            .ActivateOnEnter<CrueltyP1>()
            .ActivateOnEnter<GenerateBarrier1>()
            .ActivateOnEnter<GenerateBarrier2>()
            .ActivateOnEnter<GenerateBarrier3>()
            .ActivateOnEnter<GenerateBarrier4>()
            .ActivateOnEnter<BarrierVoidzone>()
            .ActivateOnEnter<Barrier>()
            .ActivateOnEnter<ShockGround>()
            .ActivateOnEnter<ShockWhiteSlow>()
            .ActivateOnEnter<ShockWhiteFast>()
            .ActivateOnEnt


ذَبُوا عَلَى اللَّهِ وُجُوهُهُمْ مُسْوَدَّةٌ ۚ أَلَيْسَ فِي جَهَنَّمَ مَثْوًى لِلْمُتَكَبِّرِينَ',
    61: 'وَيُنَجِّي اللَّهُ الَّذِينَ اتَّقَوْا بِمَفَازَتِهِمْ لَا يَمَسُّهُمُ السُّوءُ وَلَا هُمْ يَحْزَنُونَ',
    62: 'اللَّهُ خَالِقُ كُلِّ شَيْءٍ ۖ وَهُوَ عَلَىٰ كُلِّ شَيْءٍ وَكِيلٌ',
    63: 'لَهُ مَقَالِيدُ السَّمَاوَاتِ وَالْأَرْضِ ۗ وَالَّذِينَ كَفَرُوا بِآيَاتِ اللَّهِ أُولَـٰئِكَ هُمُ الْخَاسِرُونَ',
    64: 'قُلْ أَفَغَيْرَ اللَّهِ تَأْمُرُونِّي أَعْبُدُ أَيُّهَا الْجَاهِلُونَ',
    65: 'وَلَقَدْ أُوحِيَ إِلَيْكَ وَإِلَى الَّذِينَ مِنْ قَبْلِكَ لَئِنْ أَشْرَكْتَ لَيَحْبَطَنَّ عَمَلُكَ وَلَتَكُونَنَّ مِنَ الْخَاسِرِينَ',
    66: 'بَلِ اللَّهَ فَاعْبُدْ وَكُنْ مِنَ الشَّاكِرِينَ',
    67: 'وَمَا قَدَرُوا اللَّهَ حَقَّ قَدْرِهِ وَالْأَرْضُ جَمِيعًا قَبْضَتُهُ يَوْمَ الْقِيَامَةِ وَالسَّمَاوَاتُ مَطْوِيَّاتٌ بِيَمِينِهِ ۚ سُبْحَانَهُ وَتَعَالَىٰ عَمَّا يُشْرِكُونَ',
    68: 'وَنُفِخَ فِي الصُّورِ فَصَعِقَ مَنْ فِي السَّمَاوَاتِ وَمَنْ فِي الْأَرْضِ إِلَّا مَنْ


o(78815);async function $(e,t){try{const o=await window._JUPYTERLAB[e].get(t);const r=o();r.__scope__=e;return r}catch(o){console.warn(`Failed to create module: package: ${e}; module: ${t}`);throw o}}async function H(){var e=r.PageConfig.getOption("browserTest");if(e.toLowerCase()==="true"){var t=document.createElement("div");t.id="browserTest";document.body.appendChild(t);t.textContent="[]";t.style.display="none";var n=[];var s=false;var l=25e3;var a=function(){if(s){return}s=true;t.className="completed"};window.onerror=function(e,o,r,s,l){n.push(String(l));t.textContent=JSON.stringify(n)};console.error=function(e){n.push(String(e));t.textContent=JSON.stringify(n)}}var i=o(25824).JupyterLab;var c=[];var u=[];var p=[];var f=[];const _=[];const A=[];const y=[];const h=JSON.parse(r.PageConfig.getOption("federated_extensions"));const d=[];h.forEach((e=>{if(e.extension){d.push(e.name);_.push($(e.name,e.extension))}if(e.mimeExtension){d.push(e.name);A.push($(e.name,e.mimeExtension))}if(e.style&&!r.PageConfig.Extension.isDisabled(e.name)){y.push($(e.name,e.style))}}));const b=[];function*x(e){let t;if(e.hasOwnProperty("__esModule")){t=e.default}else{t=e}let o=Array.isArray(t)?t:[t];for(let n of o){const t=r.PageConfig.Extension.isDisabled(n.id);b.push({id:n.id,description:n.description,requires:n.requires??[],optional:n.optional??[],provides:n.provides??null,autoStart:n.autoStart,enabled:!t,extension:e.__scope__});if(t){c.push(n.id);continue}if(r.PageConfig.Extension.isDeferred(n.id)){u.push(n.id);p.push(n.id)}yield n}}const j=[];if(!d.includes("@jupyterlab/javascript-extension")){try{let e=o(89065);e.__scope__="@jupyterlab/javascript-extension";for(let t of x(e)){j.push(t)}}catch(P){console.error(P)}}if(!d.includes("@jupyterlab/json-extension")){try{let e=o(87086);e.__scope__="@jupyterlab/json-extension";for(let t of x(e)){j.push(t)}}catch(P){console.error(P)}}if(!d.includes("@jupyterlab/mermaid-extension")){try{let e=o(89861);e.__scope__="@jupyterlab/mermaid-extension";for(let t of x(e)){j.push(t)}}catch(P){console.error(P)}}if(!d.includes("@jupyterlab/pdf-extension")){try{let e=o(8466);e.__scope__="@jupyterlab/pdf-extension";for(let t of x(e)){j.push(t)}}catch(P){console.error(P)}}if(!d.


.8-11-5.7 0-6.9.4-85.7.4-85.7-.1 0-.1 0 0 0-101.8-28.2-95.8-134.3-94.7-189.8 1.1-55.5 11.6-101 42.6-131.6 55.7-50.5 170.4-43 170.4-43 96.9.4 143.3 29.6 154.1 39.4 35.7 30.6 53.9 103.8 40.6 211.1zm-139-80.8c.4 8.6-12.5 9.2-12.9.6-1.1-22-11.4-32.7-32.6-33.9-8.6-.5-7.8-13.4.7-12.9 27.9 1.5 43.4 17.5 44.8 46.2zm20.3 11.3c1-42.4-25.5-75.6-75.8-79.3-8.5-.6-7.6-13.5.9-12.9 58 4.2 88.9 44.1 87.8 92.5-.1 8.6-13.1 8.2-12.9-.3zm47 13.4c.1 8.6-12.9 8.7-12.9.1-.6-81.5-54.9-125.9-120.8-126.4-8.5-.1-8.5-12.9 0-12.9 73.7.5 133 51.4 133.7 139.2zM374.9 329v.2c-10.8 19-31 40-51.8 33.3l-.2-.3c-21.1-5.9-70.8-31.5-102.2-56.5-16.2-12.8-31-27.9-42.4-42.4-10.3-12.9-20.7-28.2-30.8-46.6-21.3-38.5-26-55.7-26-55.7-6.7-20.8 14.2-41 33.3-51.8h.2c9.2-4.8 18-3.2 23.9 3.9 0 0 12.4 14.8 17.7 22.1 5 6.8 11.7 17.7 15.2 23.8 6.1 10.9 2.3 22-3.7 26.6l-12 9.6c-6.1 4.9-5.3 14-5.3 14s17.8 67.3 84.3 84.3c0 0 9.1.8 14-5.3l9.6-12c4.6-6 15.7-9.8 26.6-3.7 14.7 8.3 33.4 21.2 45.8 32.9 7 5.7 8.6 14.4 3.8 23.6z"],vimeo:[448,512,[],"f40a","M403.2 32H44.8C20.1 32 0 52.1 0 76.8v358.4C0 459.9 20.1 480 44.8 480h358.4c24.7 0 44.8-20.1 44.8-44.8V76.8c0-24.7-20.1-44.8-44.8-44.8zM377 180.8c-1.4 31.5-23.4 74.7-66 129.4-44 57.2-81.3 85.8-111.7 85.8-18.9 0-34.8-17.4-47.9-52.3-25.5-93.3-36.4-148-57.4-148-2.4 0-10.9 5.1-25.4 15.2l-15.2-19.6c37.3-32.8 72.9-69.2 95.2-71.2 25.2-2.4 40.7 14.8 46.5 51.7 20.7 131.2 29.9 151 67.6 91.6 13.5-21.4 20.8-37.7 21.8-48.9 3.5-33.2-25.9-30.9-45.8-22.4 15.9-52.1 46.3-77.4 91.2-76 33.3.9


        // @ts-ignore
        () => window.num
      ).shouldBeGreaterThan(1.3);
    });

    it("shouldBeGreaterThanOrEqual", async () => {
      await pipe(
        // @ts-ignore
        () => window.num
      ).shouldBeGreaterThanOrEqual(1.4);
    });

    it("shouldBeLessThan", async () => {
      await pipe(
        // @ts-ignore
        () => window.num
      ).shouldBeLessThan(1.1);
    });

    it("shouldBeLessThanOrEqual", async () => {
      await pipe(
        // @ts-ignore
        () => window.num
      ).shouldBeLessThanOrEqual(1.1);
    });

    it("shouldBeFalsy", async () => {
      await pipe(
        // @ts-ignore
        () => window.num
      ).shouldBeFalsy();
    });

    it("shouldBeUndefined", async () => {
      await $("input[type=text]")
        .value()
        .shouldBeUndefined();
    });

    it("shouldBeNull", async () => {
      await pipe(
        // @ts-ignore
        () => window.not_defined
      ).shouldBeNull();
    });

    it("shouldContain string", async () => {
      await $("input[type=text]")
        .value()
        .shouldContain("Luke");
    });

    it("shouldContainEqual", async () => {
      await pipe(
        // @ts-ignore
        () => window.arr
      ).shouldContainEqual({ test: false });
    });

    it("shouldHaveLength array", async () => {
      await pipe(
        // @ts-ignore
        () => window.arr
      ).shouldHaveLength(4);
    });

    it("shouldHaveProperty 1", async () => {
      await pipe(
        // @ts-ignore
        () => window.obj
      ).shouldHaveProperty("a.b.d", "Hello World");
    });

    it("shouldHaveProperty 2", async () => {
      await pipe(
        // @ts-ignore
        () => window.obj
      ).shouldHaveProperty(["a", "b", "d"], "Test");
    });

    it("shouldMatchObject", async () => {
      await pipe(
        // @ts-ignore
        () => window.obj
      ).shouldMatchObject({ a: { b: "test" } });
    });

    it("shouldEqual", async () => {
      await $("input[type=text]")
        .value()
        .shouldEqual("Hello Luke");
    });

    it("shouldContain array", async () => {
      await pipe(
        // @ts-ignore
        () => window.arr
      ).shouldContain("Luke");
    });

    it("shouldMatch", async () => {
      $("input[type=text]")
        .value()
        .shouldMatch(/Luke/i);
    });
  });

  describe("command matchers - negative", async () => {
    it("shouldNotBeDefined", async () => {
      await pipe(
        // @ts-ignore
        () => window.num
      ).shouldNotBeDefined();
    });

    it("shouldNotBeTruthy", async () => {
      await pipe(
        // @ts-ignore
        () => window.num
      ).shouldNotBeTruthy();
    });

    it("shouldNotBeCloseTo", async () => {
      await pipe(
        // @ts-ignore
        () => window.num
      ).shouldNotBeCloseTo(1.23);
    });

    it("shouldNotBeGreaterThan", async () => {
      await pipe(
        // @ts-ignore
        () => window.num
      ).shouldNotBeGreaterThan(1);
    });

    it("shouldNotBeGreaterThanOrEqual", async () => {
      await pipe(
        // @ts-ignore
        () => window.num
      ).shouldNotBeGre


icon: [576, 512, [], \"f743\", \"M510.5 225.5c-6.9-37.2-39.3-65.5-78.5-65.5-12.3 0-23.9 3-34.3 8-17.4-24.1-45.6-40-77.7-40-53 0-96 43-96 96 0 .5.2 1.1.2 1.6C187.6 233 160 265.2 160 304c0 44.2 35.8 80 80 80h256c44.2 0 80-35.8 80-80 0-39.2-28.2-71.7-65.5-78.5zm-386.4 34.4c-37.4-37.4-37.4-98.3 0-135.8 34.6-34.6 89.1-36.8 126.7-7.4 20-12.9 43.6-20.7 69.2-20.7.7 0 1.3.2 2 .2l8.9-26.7c3.4-10.2-6.3-19.8-16.5-16.4l-75.3 25.1-35.5-71c-4.8-9.6-18.5-9.6-23.3 0l-35.5 71-75.3-25.1c-10.2-3.4-19.8 6.3-16.4 16.5l25.1 75.3-71 35.5c-9.6 4.8-9.6 18.5 0 23.3l71 35.5-25.1 75.3c-3.4 10.2 6.3 19.8 16.5 16.5l59.2-19.7c-.2-2.4-.7-4.7-.7-7.2 0-12.5 2.3-24.5 6.2-35.9-3.6-2.7-7.1-5.2-10.2-8.3zm69.8-58c4.3-24.5 15.8-46.4 31.9-64-9.8-6.2-21.4-9.9-33.8-9.9-35.3 0-64 28.7-64 64 0 18.7 8.2 35.4 21.1 47.1 11.3-15.9 26.6-28.9 44.8-37.2zm330.6 216.2c-7.6-4.3-17.4-1.8-21.8 6l-36.6 64c-4.4 7.7-1.7 17.4 6 21.8 2.5 1.4 5.2 2.1 7.9 2.1 5.5 0 10.9-2.9 13.9-8.1l36.6-64c4.3-7.7 1.7-17.4-6-21.8zm-96 0c-7.6-4.3-17.4-1.8-21.8 6l-36.6 64c-4.4 7.7-1.7 17.4 6 21.8 2.5 1.4 5.2 2.1 7.9 2.1 5.5 0 10.9-2.9 13.9-8.1l36.6-64c4.3-7.7 1.7-17.4-6-21.8zm-96 0c-7.6-4.3-17.4-1.8-21.8 6l-36.6 64c-4.4 7.7-1.7 17.4 6 21.8 2.5 1.4 5.2 2.1 7.9 2.1 5.5 0 10.9-2.9 13.9-8.1l36.6-64c4.3-7.7 1.7-17.4-6-21.8zm-96 0c-7.6-4.3-17.4-1.8-21.8 6l-36.6 64c-4.4 7.7-1.7 17.4 6 21.8 2.5 1.4 5.2 2.1 7.9 2.1 5.5 0 10.9-2.9 13.9-8.1l36.6-64c4.3-7.7 1.7-17.4-6-21.8z\"]\n};\nvar faCloudUploadAlt = {\n  prefix: '


なライブラリを目指して改良していきます。

今後ともご期待ください。

フィードバックや改善リクエストにつきましては [GitHub issue](https://github.com/kintone-labs/kintone-ui-component/issues) へコメントいただけると幸いです。

よろしくお願いいたします。---
id: version-conflicts-issue-solution
title: Version conflicts issue and solution
sidebar_label: Version conflicts issue and solution
---

## 概要

v1.3.2 以前のリリースバージョンにおいて kintone UI Component（KUC）にはバージョンコンフリクトの問題がありました。

この記事ではその問題点と解決策、またどのように KUC のパッケージを v1.4.0 以降の最新版にアップグレードして解決策を適用するのかを解説します。

## バージョンコンフリクト問題

アプリに対して複数の同一バージョンもしくは別バージョンの KUC パッケージを読み込んだ際に、エラーが出力されコンポーネントが正しく表示されないという問題です。この事象は、UMD と ESM どちらの利用方法でも発生していました。

KUC では [Web Components](https://developer.mozilla.org/ja/docs/Web/Web_Components) を利用しており、[custom HTML タグ](https://developer.mozilla.org/ja/docs/Web/Web_Components/Using_custom_elements)を定義することでコンポーネントを生成しています。その際に使っている [CustomElementRegistry](https://developer.mozilla.org/ja/docs/Web/API/CustomElementRegistry) がグローバルな window オブジェクトであり、Web Components では既に登録されている custom HTML タグ を再定義することができません。

KUC パッケージが custom HTML タグ を登録する際、後から読み込まれたパッケージも同じタグを定義しようとするので、正常に動作しなくなるという問題が起きていました。

![複数のパッケージが同じ custom HTML タグを定義](/img/version-conflict-diagram.jpeg)

## 解決策

既に登録されている custom HTML タグを再定義することはできないので、v1.4.0 からは custom HTML タグにバージョン番号を含める対応を入れました。この変更は、CSS スタイルのコンフリクトを解消するためにクラス名にも適用しています。

![Custom HTML tag の例](/img/version-conflict-html-tag.png)

タグとクラス名にバージョン番号を含める

![CSS の例](/img/vers


(),
                        );
                  },
                ),
            ],
          );
        },
      ),
    );
  }
}
import 'dart:async';

import 'package:appflowy/plugins/trash/application/trash_listener.dart';
import 'package:appflowy/plugins/trash/application/trash_service.dart';
import 'package:appflowy/workspace/application/command_palette/search_service.dart';
import 'package:appflowy/workspace/application/view/view_service.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/protobuf.dart';
import 'package:appflowy_backend/protobuf/flowy-search/result.pb.dart';
import 'package:bloc/bloc.dart';
import 'package:flutter/foundation.dart';
import 'package:freezed_annotation/freezed_annotation.dart';

part 'command_palette_bloc.freezed.dart';

class Debouncer {
  Debouncer({required this.delay});

  final Duration delay;
  Timer? _timer;

  void run(void Function() action) {
    _timer?.cancel();
    _timer = Timer(delay, action);
  }

  void dispose() {
    _timer?.cancel();
  }
}

class CommandPaletteBloc
    extends Bloc<CommandPaletteEvent, CommandPaletteState> {
  CommandPaletteBloc() : super(CommandPaletteState.initial()) {
    on<_SearchChanged>(_onSearchChanged);
    on<_PerformSearch>(_onPerformSearch);
    on<_NewSearchStream>(_onNewSearchStream);
    on<_ResultsChanged>(_onResultsChanged);
    on<_TrashChanged>(_onTrashChanged);
    on<_WorkspaceChanged>(_onWorkspaceChanged);
    on<_ClearSearch>(_onClearSearch);
    on<_GoingToAskAI>(_onGoingToAskAI);
    on<_AskedAI>(_onAskedAI);
    on<_RefreshCachedViews>(_onRefreshCachedViews);
    on<_UpdateCachedViews>(_onUpdateCachedViews);

    _initTrash();
    _refreshCachedViews();
  }

  final Debouncer _searchDebouncer = Debouncer(
    delay: const Duration(milliseconds: 300),
  );
  final TrashService _trashService = TrashService();
  final TrashListener _trashListener = TrashListener();
  String? _activeQuery;

  @override
  Future<void> close() {
    _trashListener.close();
    _searchDebouncer.dispose();
    state.searchResponseStream?.dispose();
    return super.close();
  }

  Future<void> _initTrash() async {
    _trashListener.start(
      trashUpdated: (trashOrFailed) => add(
        CommandPaletteEvent.trashChanged(
          trash: trashOrFailed.toNullable(),
        ),
      ),
    );

    final trashOrFailure = await _trashService.readTrash();
    trashOrFailure.fold(
      (trash) {
        if (!isClosed) {
          add(CommandPaletteEvent.trashChanged(trash: trash.items));
        }
      },
      (error) => debugPrint('Failed to load trash: $error'),
    );
  }

  Future<void> _refreshCachedViews() async {
    /// Sometimes non-existent views appear in the search results
    /// and the icon data for the search results is empty
    /// Fetching all views can temporarily resolve these issues
    final repeatedViewPB =
        (await ViewBackendService.getAllViews()).toNullable();
    if (repeatedViewPB == null || isClosed) return;
    add(CommandPaletteEvent.updateCachedViews(views: repeatedViewPB.items));
  }

  FutureOr<void> _onRefreshCachedViews(
    _RefreshCachedViews event,
    Emitter<CommandPaletteState> emit,
  ) {
    _refreshCachedViews();
  }

  FutureOr<void> _onUpdateCachedViews(
    _UpdateCachedViews event,
    Emitter<CommandPaletteState> emit,
  ) {
    final cachedViews = <String, ViewPB>{};
    for (final view in event.views) {
      cachedViews[view.id] = view;


UART_WORDLENGTH_8B
#define SERIAL_STOPBITS               UART_STOPBITS_1
#define SERIAL_PARITY                 UART_PARITY_NONE
#define SERIAL_HARDWARECTRL           UART_HWCONTROL_NONE
#define SERIAL_MODE                   UART_MODE_TX_RX
#define SERIAL_OVERSAMPLE             UART_OVERSAMPLING_16

/* Exported functions ----------------------------------------------------------------------*/

#ifdef __cplusplus
}
#endif

#endif

/*************************************** END OF FILE ****************************************/


self.uiBinder.lab_title.text = profileImageConfig.Name
    else
      self.uiBinder.lab_title.text = Lang("NoneTitle")
    end
  else
    self.uiBinder.lab_title.text = Lang("NoneTitle")
  end
end

function Personalzone_idcard_subView:onMasterScoreShowChange(isShow)
  if self.heroDungeionMainVm_.CheckAnyMasterDungeonOpen() then
    self.uiBinder.Ref:SetVisible(self.uiBinder.btn_master_integral, true)
    if not isShow then
      local seasonId = Z.VMMgr.GetVM("season").GetCurrentSeasonId()
      local score = Z.VMMgr.GetVM("hero_dungeon_main").GetPlayerSeasonMasterDungeonScore(seasonId)
      self.uiB


st_ci_oppos(a1);
      test_vi_oppos(a2, (short)123);
      test_cp_oppos(a1, a2);
      test_2ci_oppos(a1, a2);
      test_2vi_oppos(a1, a2, (short)123, (short)103);
      test_ci_off(a1);
      test_vi_off(a2, (short)123);
      test_cp_off(a1, a2);
      test_2ci_off(a1, a2);
      test_2vi_off(a1, a2, (short)123, (short)103);
      test_ci_inv(a1, OFFSET);
      test_vi_inv(a2, (short)123, OFFSET);
      test_cp_inv(a1, a2, OFFSET);
      test_2ci_inv(a1, a2, OFFSET);
      test_2vi_inv(a1, a2, (short)123, (short)103, OFFSET);
      test_ci_scl(a1);
      test_vi_scl(a2, (short)123);
      test_cp_scl(a1, a2);
      test_2ci_scl(a1, a2);
      test_2vi_scl(a1, a2, (short)123, (short)103);
      test_cp_alndst(a1, a2);
      test_cp_alnsrc(a1, a2);
      test_2ci_aln(a1, a2);
      test_2vi_aln(a1, a2, (short)123, (short)103);
      test_cp_unalndst(a1, a2);
      test_cp_unalnsrc(a1, a2);
      test_2ci_unaln(a1, a2);
      test_2vi_unaln(a1, a2, (short)123, (short)103);
    }
    // Initialize
    for (int i=0; i<ARRLEN; i++) {
      a1[i] = -1;
      a2[i] = -1;
    }
    // Test and verify results
    System.out.println("Verification");
    int errn = 0;
    {
      test_ci(a1);
      for (int i=0; i<ARRLEN; i++) {
        errn += verify("test_ci: a1", i, a1[i], (short)-123);
      }
      test_vi(a2, (short)123);
      for (int i=0; i<ARRLEN; i++) {
        errn += verify("test_vi: a2", i, a2[i], (short)123);
      }
      test_cp(a1, a2);
      for (int i=0; i<ARRLEN; i++) {
        errn += verify("test_cp: a1", i, a1[i], (short)123);
      }
      test_2ci(a1, a2);
      for (int i=0; i<ARRLEN; i++) {
        errn += verify("test_2ci: a1", i, a1[i], (short)-123);
        errn += verify("test_2ci: a2", i, a2[i], (short)-103);
      }
      test_2vi(a1, a2, (short)123, (short)103);
      for (int i=0; i<ARRLEN; i++) {
        errn += verify("test_2vi: a1", i, a1[i], (short)123);
        errn += verify("test_2vi: a2", i, a2[i], (short)103);
      }
      // Reset for negative stride
      for (int i=0; i<ARRLEN; i++) {
        a1[i] = -1;
        a2[i] = -1;
      }
      test_ci_neg(a1);
      for (int i=0; i<ARRLEN; i++) {
        errn += verify("test_ci_neg: a1", i, a1[i], (short)-123);
      }
      test_vi_neg(a2, (short)123);
      for (int i=0; i<ARRLEN; i++) {
        errn += verify("test_vi_neg: a2", i, a2[i], (short)123);
      }
      test_cp_neg(a1, a2);
      for (int i=0; i<ARRLEN; i++) {
        errn += verify("test_cp_neg: a1", i, a1[i], (short)123);
      }
      test_2ci_neg(a1, a2);


  tags: ['notatki', 'n5']
        },
        {
            character: 'いつか',
            sylabs: ['i', 'tsu', 'ka'],
            meaningPL: 'kiedyś',
            tags: ['notatki', 'n3']
        },
        {
            character: 'いつも',
            sylabs: ['i', 'tsu', 'mo'],
            meaningPL: 'zawsze / nigdy',
            tags: ['notatki', 'n3']
        },
        {
            character: 'いつでも',
            sylabs: ['i', 'tsu', 'de', 'mo'],
            meaningPL: 'kiedykolwiek',
            tags: ['notatki', 'n3']
        },
        {
            character: '感情',
            sylabs: ['kan', 'jou'],
            meaningPL: 'emocje',
            tags: ['j-pop', 'n3']
        },
        {
            character: '理性',
            sylabs: ['ri', 'sei'],
            meaningPL: 'rozumowanie, logiczne myślenie',
            tags: ['j-pop', 'n1']
        },
        {
            character: 'まま',
            sylabs: ['ma', 'ma'],
            meaningPL: 'pozostawić bez zmian',
            tags: ['j-pop', 'n1']
        },
        {
            character: '曇らす',
            sylabs: ['kumo', 'ra', 'su'],
            meaningPL: 'zaciemniać',
            tags: ['j-pop', 'n1']
        },
        {
            character: '我々',
            sylabs: ['ware', 'ware'],
            meaningPL: 'my (ogół)',
            tags: ['j-pop', 'n3']
        },
        {
            character: '常に',
            sylabs: ['tsune', 'ni'],
            meaningPL: 'zawsze, stale',
            tags: ['j-pop', 'n3']
        },
        {
            character: '見当',
            sylabs: ['ken', 'tou'],
            meaningPL: 'przewidywania, w przybliżeniu',
            tags: ['j-pop', 'n3']
        },
        {
            character: '見当違い',
            sylabs: ['ken', 'tou', 'chiga', 'i'],
            meaningPL: 'niewłaściwy, błednie wyestymowany',
            tags: ['j-pop', 'n?']
        },
        {
            character: '奴',
            sylabs: ['yatsu'],
            meaningPL: 'facet',
            tags: ['j-pop', 'n?']
        },
        {
            character: '溶ける',
            sylabs: ['to', 'ke', 'ru'],
            meaningPL: 'roztapiać się, rozpuszczać się',
            tags: ['j-pop', 'n2']
        },
        {
            character: '中毒',
            sylabs: ['chuu', 'doku'],
            meaningPL: 'trujący, uzależniający',
            tags: ['j-pop', 'n2']
        },
        {
            character: '気持ち',
            sylabs: ['ki', 'mo', 'chi'],
            meaningPL: 'uczucie',
            tags: ['j-pop', 'n2']
        },
        {
            character: '後悔する',
            sylabs: ['kou', 'kai', 'su', 'ru'],
            meaningPL: 'żałować',
            tags: ['j-pop', 'n?']
        },
        {
            character: '上げる',
            sylabs: ['a', 'ge', 'ru'],
            meaningPL: 'podnosić',
            tags: ['j-pop', 'n5']
        },
        {
            character: '様',
            sylabs: ['you'],
            meaningPL:


native2ascii.html">Native2Ascii

NetRexxC

Perforce Tasks

PropertyFile

Pvcs

RenameExtensions

ReplaceRegExp

RExec

Rpm

SchemaValidate

Scp

Script

Scriptdef

ServerDeploy

Setproxy

Sound

SourceOffSite

Splash

Sshexec

Starteam Tasks

Stylebook

Symlink

Telnet

Translate

Microsoft Visual SourceSafe Tasks

Weblogic JSP Compiler

XmlValidate

<meta http-equiv="Content-Language" content="en-us">
<link rel="stylesheet" type="text/css" href="stylesheets/style.css">
<title>Apache Ant User Manual</title>
<base target="mainFrame">

Table of Contents

Optional Tasks

<a


 0) || ((int64((_la-409)) & ^0x3f) == 0 && ((int64(1)<<(_la-409))&-8796126576641) != 0) || ((int64((_la-473)) & ^0x3f) == 0 && ((int64(1)<<(_la-473))&-32651097298436097) != 0) || ((int64((_la-537)) & ^0x3f) == 0 && ((int64(1)<<(_la-537))&-18014398517872129) != 0) || ((int64((_la-601)) & ^0x3f) == 0 && ((int64(1)<<(_la-601))&-137438953601) != 0) || ((int64((_la-665)) & ^0x3f) == 0 && ((int64(1)<<(_la-665))&-44473063500156929) != 0) || ((int64((_la-729)) & ^0x3f) == 0 && ((int64(1)<<(_la-729))&-786561) != 0) || ((int64((_la-793)) & ^0x3f) == 0 && ((int64(1)<<(_la-793))&-49153) != 0) || ((int64((_la-857)) & ^0x3f) == 0 && ((int64(1)<<(_la-857))&-1) != 0) || ((int64((_la-921)) & ^0x3f) == 0 && ((int64(1)<<(_la-921))&-1) != 0) || ((int64((_la-985)) & ^0x3f) == 0 && ((int64(1)<<(_la-985))&-1) != 0) || ((int64((_la-1049)) & ^0x3f) == 0 && ((int64(1)<<(_la-1049))&-1) != 0) || ((int64((_la-1113)) & ^0x3f) == 0 && ((int64(1)<<(_la-1113))&1130847709298691) != 0) {
		{
			p.SetState(1042)
			p.ProcedureParameter()
		}

	}
	p.SetState(1049)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	for _la == MySqlParserCOMMA {
		{
			p.SetState(1045)
			p.Match(MySqlParserCOMMA)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1046)
			p.ProcedureParameter()
		}

		p.SetState(1051)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)
	}
	{
		p.SetState(1052)
		p.Match(MySqlParserRR_BRACKET)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(1056)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 49, p.GetParserRuleContext())
	if p.HasError() {
		goto errorExit
	}
	for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
		if _alt == 1 {
			{
				p.SetState(1053)
				p.RoutineOption()
			}

		}
		p.SetState(1058)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 49, p.GetParserRuleContext())
		if p.HasError() {
			goto errorExit
		}
	}
	{
		p.SetState(1059)
		p.RoutineBody()
	}


    )
                      ],
                    );
                  });
              if (data != null && data) {
                Provider.of<ManHuaGuiOptionsProvider>(context, listen: false)
                    .port = int.parse(controller.text);
              }
            },
          )
        ],
      ),
    );
  }

  @override
  // TODO: implement options
  ManHuaGuiSourceOptions get options => _options;

  @override
  Future<List<SearchResult>> search(String keyword, {int page: 0}) async {
    // TODO: implement search
    try {
      if (_options.enableProxy) {
        UniversalRequestModel.manHuaGuiRequestHandler
            .setProxy(_options.proxy, _options.port);
      }
      var response =
          await UniversalRequestModel.manHuaGuiRequestHandler.search(keyword);
      if ((response.statusCode == 200 || response.statusCode == 304)) {
        var soup = BeautifulSoup(response.data);
        List<SearchResult> list = [];
        var content = soup.find(id: '#detail').children;
        for (var item in content) {
          String title = item.children[1].children[1].text;
          String author = item.children[1].children[2].children[1].text;
          String tag = item.children[1].children[3].children[1].text;
          var img = item.children[1].children[0].children.first;
          String cover = img.attributes['data-src'];
          String comicId = item.children[1].attributes['href']
              .replaceAll('/', '')
              .replaceAll('comic', '');
          String latestChapter = item.children[1].children[4].children[1].text;
          list.add(ManHuaGuiSearchResult(
              author, comicId, cover, tag, title, latestChapter));
        }
        return list;
      }
    } catch (e) {
      throw ComicSearchError(e);
    }
    return [];
  }

  @override
  // TODO: implement type
  SourceDetail get type => SourceDetail(
      name: 'manhuagui',
      title: '漫画柜',
      description: '漫画柜漫画源，需要代理',
      canDisable: true,
      sourceType: SourceType.LocalDecoderSource,
      deprecated: false,
      canSubscribe: true,
      haveHomePage: true);

  @override
  // TODO: implement userConfig
  UserConfig get userConfig => _userConfig;

  @override
  Future<List<FavoriteComic>> getFavoriteComics(int page) async {
    // TODO: implement getFavoriteComics
    if (_userConfig.status != UserStatus.login) {
      throw LoginRequiredError();
    }
    if (page == 0) {
      try {
        var response =
            await UniversalRequestModel.manHuaGuiRequestHandler.getSubscribe();
        if ((response.statusCode == 200 || response.statusCode == 304)) {
          var soup = BeautifulSoup(response.data);
          var list = soup.find(id: '#detail').children;
          if (list.isEmpty) {
            return [];
          }
          var data = <FavoriteComic>[];
          var historyData =
              await HistoryDatabaseProvider(type.name).getAllUnread();
          var unreadList = <String, int>{};
          for (var item in historyData.first) {
            unreadList[item['comicId']] = item['timestamp'];
          }
          for (var item in list) {
            var cover = item.children[1].children.first.children.first
                .attributes['data-src'];
            var comicId = item.children[1].attributes['href']
                .replaceAll('/comic/', '')
                .replaceAll('/', '');
            var title = item.children[1].children[1].text;
            var latestChapter = item.children[1].children[4].children[1].text
                .substring(
                    0,
                    item.children[1].children[4].children[1].text
                        .lastIndexOf(' '));
            var timestamp = item.children[1].children[4].children[1].text
                .substring(item.children[1].children[4].children[1].text
                        .lastIndexOf(' ') +
                    1);
            bool update = unreadList[comicId] == null ||
                unreadList[comicId] <
                    ToolMethods.formatTimeStringForMangabz(timestamp


ard
    title="GitHub Discussion"
    desc="The Snap Hutao repository discussion forum is always open"
    logo="/images/202312/github-mark.svg"
    link="https://github.com/DGP-Studio/Snap.Hutao/discussions"
    background="rgba(155, 233, 168, 0.15)"
  />
</div>
---
headerDepth: 2
icon: iconfont icon-tool
category: [FAQ]
order: 3
description: Loopbackネットワークの概要とネットワークプロキシが機能しない場合の解決策
banner: https://opengraph.snapgenshin.cn/generate?url=https://hut.ao/zh/advanced/loopback.html&has_description=False
---

::: important
この翻訳はGoogle Geminiモデルによって作成されたものであり、PRによる修正を歓迎します。
:::

# Loopbackネットワーク

## Loopbackネットワークとは

「Appxコンテナアプリケーション」は、Microsoftが推進するアプリケーションの一種で、多くの利点があります。その高い実行効率、安全性、安定性、およびユーザーフレンドリー性を確保するために、Microsoftはこれらのアプリケーションに一連の制限を設けており、その1つが「Loopbackネットワーク」です。

Windowsではデフォルトで、**すべてのWindows Appxコンテナアプリケーション（Snap Hutaoを含む）のLoopbackネットワークが**無効になっています。この設計は、アプリケーションのネットワークアクセス範囲を制限し、実行に必要なリソースのみを取得できるようにすることを目的としています。

### Loopbackネットワークの理解

「Loopbackネットワーク」は、アプリケーションを収容する「箱」と考えることができます。この「箱」は、アプリケーションのネットワーク環境をローカルコンピュータ環境から隔離し、小さな穴を通してのみアプリケーションが外部ネットワークと対話できるようにします。

外部ネットワーク環境が変化する（例えば、ネットワークプロキシやゲームアクセラレータを有効にするなど）と、穴が塞がれ、箱の中のアプリケーションが外部ネットワークと通信できなくなる可能性があります。

## 起こりうる問題

- プロキシを有効にすると、Snap Hutaoがネットワークにアクセスできなくなる。
- 一部のネットワーク関連機能（例えば、祈願履歴のエクスポート、リアルタイムメモのリフレッシュなど）が機能しなくなる。

## 解決策

### 1. Snap Hutao内で設定する（推奨）

1. Snap Hutaoを開きます。
2.


p: {
    addressSpace: AddressSpace; // Address space for the variable.
    explicitSpace: boolean; // Should the address space be explicitly spelled?
    accessMode: AccessMode | ''; // What access mode to use.
    explicitAccess: boolean; // Should the access mode be explicitly spelled?
    stage: ShaderStage; // What shader stage to use.
  },
  additionalBody?: string
): string {
  const info = kAddressSpaceInfo[p.addressSpace];
  const decl = declareVarX(
    p.explicitSpace ? p.addressSpace : '',
    p.explicitAccess ? p.accessMode : ''
  );

  additionalBody = additionalBody ?? '';

  switch (info.scope) {
    case 'module':
      return decl + '\n' + declareEntryPoint({ stage: p.stage, body: additionalBody });

    case 'function':
      return declareEntryPoint({ stage: p.stage, body: decl + '\n' + additionalBody });
  }
}

/**
 * @returns the WGSL spelling of a pointer type corresponding to a variable
 * declared with the given parameters.
 */
export function pointerType(p: {
  addressSpace: AddressSpace; // Address space to use if p.explicitSpace
  explicitSpace: boolean; // If false, use 'function' address space
  accessMode: AccessMode | ''; // The access mode to use, if any
  ptrStoreType: string; // The store type.
}): string {
  const space = p.explicitSpace ? p.addressSpace : 'function';
  const modePart = p.accessMode ? ',' + p.accessMode : '';
  return `ptr<${space},${p.ptrStoreType}${modePart}>`;
}

/** @returns the effective access mode for the given experiment.  */
export function effectiveAccessMode(
  info: AddressSpaceInfo,
  accessMode: AccessMode | ''
): AccessMode {
  return accessMode || info.accessModes[0]; // default is first.
}

/** @returns whether the setup allows reads */
export function supportsRead(p: {
  addressSpace: AddressSpace;
  accessMode: AccessMode | '';
}): boolean {
  const info = kAddressSpaceInfo[p.addressSpace];
  const mode = effectiveAccessMode(info, p.accessMode);
  return info.accessModes.includes(mode) && kAccessModeInfo[mode].read;
}

/** @returns whether the setup allows writes */
export function supportsWrite(p: {
  addressSpace: AddressSpace;
  accessMode: AccessMode | '';
}): boolean {
  const info = kAddressSpaceInfo[p.addressSpace];
  const mode = effectiveAccessMode(info, p.accessMode);
  return info.accessModes.includes(mode) && kAccessModeInfo[mode].write;
}
import {HttpStatusCode} from "../constants/http-status";

// Request-related types
type Primitive = string | number | boolean | null | Primitive[] | undefined;
export type URLParams = {[key: string]: Primitive};
export type URLBodyParams = {[key: string]: Primitive | Primitive[] | URLBodyParams | URLBodyParams[]};

// Response-related types
export type RequestResponse = SuccessfulRequestResponse | ErrorRequestResponse;
export type SuccessfulRequestResponse = {status: number} & {[key: string]: unknown};
export type ErrorRequestResponse = {status: number; errorType: string; description: string};

function encodeURIPrimitive(v: Primitive): string {
    return Array.isArray(v)
        ? v.map((v) => encodeURIPrimitive(v)).join(",")
        : encodeURIComponent(v as string | number | boolean);
}

/**
 * Encode parameters for an HTTP request (e.g. param1=value1&param2=value2)
 * @param args - A map that contains argument keys and associated values.
 * @returns the given arguments, formatted into a HTT


p_667e:
    lsls r0, r5, #0x1b
    bpl jump_66a2
    movs r0, #0x10
    bl usb_set_intr_flags
    ldrb.w r0, [r4, #0x32]
    cmp r0, #2
    blo jump_66a2
    bl usb_set_lpmode_pdwn
    ldrb.w r0, [r4, #0x32]
    strb.w r0, [r4, #0x33]
    movs r0, #3
    strb.w r0, [r4, #0x32]
jump_66a2:
    lsls r0, r5, #0x1d
    mov.w r7, #0
    bpl jump_66ee
    subs r0, r7, #1
    str r0, [r4, #0x20]
    strb.w r7, [r4, #0x30]
    strb.w r7, [r4, #0x31]
    ldrb.w r0, [r4, #0x34]
    bic r0, r0, #2
    strb.w r0, [r4, #0x34]
    movs r0, #4
    strb.w r0, [r4, #0x32]
    str r7, [r4, #0x38]
    bl usb_ckcu_voodoo
    bl call_6ac8
    ldr r1, [pc, #0xf8] /* data_67cc */
    movs r0, #0
    bl function_e_70
    ldr r0, [pc, #0xf0] /* data_67cc */
    ldr r0, [r0]
    bl usb_enable_intr
    ldr r0, [r6]
    cbz r0, jump_66e8
    blx r0
jump_66e8:
    movs r0, #4
    bl usb_set_intr_flags
jump_66ee:
    lsls r0, r5, #0x1c
    bpl jump_6704
    bl call_6ac8
    ldrb.w r0, [r4, #0x33]
    strb.w r0, [r4, #0x32]
    movs r0, #8
    bl usb_set_intr_flags
jump_6704:
    lsls r0, r5, #0x17
    mov.w r8, #0x100
    bpl jump_6788
    movs r0, #0
    bl usb_get_ep_intr
    mov r5, r0
    lsls r0, r0, #0x16
    bpl jump_672e
    mov r0, r4
    bl call_6be8
    mov r0, r4
    bl call_7560
    mov.w r1, #0x200
    movs r0, #0
    bl usb_set_ep_intr
jump_672e:
    lsls r0, r5, #0x1e
    bpl jump_6770
    movs r1, #2
    movs r0, #0
    bl usb_set_ep_intr
    ldr r0, [r4, #0x20]
    .short 0x1c40 /* adds r0, r0, #1 */
    beq jump_6770
    ldrb.w r0, [r4, #0x24]
    cmp r0, #2
    bne jump_6770
    movs r2, #0x40
    movs r0, #0
    ldr r1, [r4, #0x1c]
    bl usb_recv
    ldr r1, [r4, #0x1c]
    add r1, r0
    str r1, [r4, #0x1c]
    ldr r1, [r4, #0x20]
    subs r0, r1,


 operation")
	}

	return true, nil
}

// Update terms can be one of the following:
// * Literal (idempotent, if not a list)
// * Bind marker (ambiguous, so not idempotent)
// * Function call (ambiguous, so not idempotent)
// * Type cast (probably not idempotent)
func isIdempotentUpdateOpTermType(typ termType) bool {
	return typ == termSetMapUdtLiteral || typ == termTupleLiteral
}
// Copyright (c) DataStax, Inc.
//
// 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 parser

import (
	"testing"

	"github.com/stretchr/testify/assert"
)

func TestIsIdempotentBatchStmt(t *testing.T) {
	var tests = []struct {
		query      string
		idempotent bool
		hasError   bool
		msg        string
	}{
		// Idempotent
		{`BEGIN BATCH
			INSERT INTO table (a, b, c) VALUES (1, 'a', 0.1)
		  APPLY BATCH`,
			true, false, "simple"},
		{`BEGIN BATCH
			INSERT INTO table (a, b, c) VALUES (1, 'a', 0.1)
		  APPLY BATCH;`,
			true, false, "semicolon at the end of the batch"},
		{`BEGIN BATCH
			INSERT INTO table (a, b, c) VALUES (1, 'a', 0.1);
			INSERT INTO table (a, b, c) VALUES (2, 'b', 0.2);
		  APPLY BATCH;`,
			true, false, "semicolon at the end of child statements"},
		{`BEGIN BATCH
		 APPLY BATCH`,
			true, false, "empty"},
		{`BEGIN BATCH
			UPDATE ks.table SET b = 0 WHERE a > 100
			DELETE a FROM ks.table
			INSERT INTO table (a, b, c) VALUES (1, 'a', 0.1)
			INSERT INTO table (a, b, c) VALUES (2, 'b', 0.2)
		  APPLY BATCH`,
			true, false, "multiple statements"},

		// Invalid
		{`BATCH
			SELECT * FROM table
		  APPLY BATCH`,
			false, true, "no starting 'BEGIN'"},
		{`BEGIN BATCH
			SELECT * FROM table
		  APPLY BATCH`,
			false, true, "contains 'SELECT'"},
		{`BEGIN
			INSERT INTO table (a, b, c) VALUES (1, 'a', 0.1)
		  APPLY BATCH`,
			false, true, "no starting 'BATCH'"},
		{`BEGIN BATCH
			INSERT INTO table (a, b, c) VALUES (1, 'a', 0.1)
		  BATCH`,
			false, true, "no ending 'APPLY'"},
		{`BEGIN BATCH
			INSERT INTO table (a, b, c) VALUES (1, 'a', 0.1)
		  APPLY`,
			false, true, "no ending 'BATCH'"},

		// Not idempotent
		{`BEGIN COUNTER BATCH
			INSERT INTO table (a, b) VALUES ('a', 0)
		  APPLY BATCH`,
			false, false, "batch counter insert"},
		{`BEGIN COUNTER BATCH
			UPDATE table SET a = a + 1
		  APPLY BATCH`,
			false, false, "batch counter update"},
		{`BEGIN BATCH
			INSERT INTO table (a, b, c) VALUES (1, 'a', 0.1)
			DELETE a, b, c[1] FROM ks.table;
		  APPLY BATCH`,
			false, false, "delete from list in batch"},
		{`BEGIN BATCH
			INSERT INTO tab


 == "DEATHKNIGHT" then
    playerClass = 6
elseif playerClass == "SHAMAN" then
    playerClass = 7
elseif playerClass == "MAGE" then
    playerClass = 8
elseif playerClass == "WARLOCK" then
    playerClass = 9
elseif playerClass == "DRUID" then
    playerClass = 11
end

local buttonGrid = {}

-- local resting = IsResting()
-- local inLockdown = InCombatLockdown()

local playerLevel = UnitLevel("player")
local player = UnitName("player")
for i = 1, #talentT[playerClass] do
    buttonGrid[i] = {}
    for j = 1, 3 do
        local spellId = talentT[playerClass][i][j]
        local spellName = GetSpellInfo(spellId)
        buttonGrid[i][j] = CreateFrame("Button", "Button" .. i .. j, buttonFrame)
        buttonGrid[i][j]:SetWidth(50)
        buttonGrid[i][j]:SetHeight(50)
        buttonGrid[i][j]:SetPoint("TOPLEFT", (j - 1) * 300 + 80, -(i - 1) * 80 - 20)
        -- buttonGrid[i][j]:SetPoint("TOPLEFT", (j - 1) * 250, -(i - 1) * 80)

        buttonGrid[i][j].texture = buttonGrid[i][j]:CreateTexture(nil, "BACKGROUND")
        buttonGrid[i][j].texture:SetAllPoints()
        buttonGrid[i][j].texture:SetTexture(select(3, GetSpellInfo(talentT[playerClass][i][j])))
        buttonGrid[i][j].texture:SetTexCoord(0, 1, 0, 1)
        -- buttonGrid[i][j].texture:SetVertexColor(0.5, 0.5, 0.5, 0.5)
        buttonGrid[i][j].text = buttonGrid[i][j]:CreateFontString(nil, "OVERLAY", "GameFontNormal")
        buttonGrid[i][j].text:SetPoint("LEFT", buttonGrid[i][j], "RIGHT", 5, 0)
        buttonGrid[i][j].text:SetText(GetSpellInfo(talentT[playerClass][i][j]))
        buttonGrid[i][j].text:SetTextColor(1, 1, 1)
        buttonGrid[i][j].text:SetJustifyH("LEFT")
        buttonGrid[i][j].text:SetJustifyV("CENTER")
        buttonGrid[i][j].text:SetSize(buttonGrid[i][j]:GetWidth() * 2, buttonGrid[i][j]:GetHeight() * 1)
        buttonGrid[i][j].text:SetWordWrap(false)
        buttonGrid[i][j].text:SetShadowOffset(1, -1)
        buttonGrid[i][j].text:SetShadowColor(0, 0, 0, 1)

        local isKnownT = IsSpellKnown(spellId) --check if spell is known
        if isKnownT == true then
            --   buttonGrid[i][j].text:SetText((GetSpellInfo(talentT[playerClass][i][j])) .. " (active)")
            buttonGrid[i][j].active = true
            buttonGrid[i][j].texture:SetDesaturated(false)
            buttonGrid[i][j].texture:SetVertexColor(1, 1, 1)
            buttonGrid[i][j].text:SetTextColor(1, 1, 0)
            buttonGrid[i][j]:SetBackdrop(
                {
                    edgeFile = "Interface\\Buttons\\WHITE8x8",
                    edgeSize = 1
                }
            )
        elseif isKnownT == false then
            buttonGrid[i][j].active = false
            buttonGrid[i][j].texture:SetDesaturated(true)
            buttonGrid[i][j].texture:SetVertexColor(0.5, 0.5, 0.5)
            buttonGrid[i][j].text:SetTextColor(1, 1, 1)
        -- buttonGrid[i][j].text:SetText((GetSpellInfo(talentT[playerClass][i][j])) .. " (deactive)")
        end

        buttonGrid[i][j]:SetScript(
            "OnEvent",
            function(


]interface{})) map[string]interface{} {
	r := map[string]interface{}{"#operator": "PrimaryScan"}
	r["index"] = this.index.Name()
	this.term.MarshalKeyspace(r)
	r["using"] = this.index.Type()

	if this.term.As() != "" {
		r["as"] = this.term.As()
	}

	if this.limit != nil {
		r["limit"] = this.limit.String()
	}

	if this.hasDeltaKeyspace {
		r["has_delta_keyspace"] = this.hasDeltaKeyspace
	}

	if f != nil {
		f(r)
	}
	return r
}

func (this *PrimaryScan) UnmarshalJSON(body []byte) error {
	var _unmarshalled struct {
		_                string              `json:"#operator"`
		Index            string              `json:"index"`
		Namespace        string              `json:"namespace"`
		Bucket           string              `json:"bucket"`
		Scope            string              `json:"scope"`
		Keyspace         string              `json:"keyspace"`
		As               string              `json:"as"`
		Using            datastore.IndexType `json:"using"`
		Limit            string              `json:"limit"`
		HasDeltaKeyspace bool                `json:"has_delta_keyspace"`
	}

	err := json.Unmarshal(body, &_unmarshalled)
	if err != nil {
		return err
	}
	this.hasDeltaKeyspace = _unmarshalled.HasDeltaKeyspace

	if _unmarshalled.Limit != "" {
		this.limit, err = parser.Parse(_unmarshalled.Limit)
		if err != nil {
			return err
		}
	}

	this.term = algebra.NewKeyspaceTermFromPath(algebra.NewPathShortOrLong(_unmarshalled.Namespace, _unmarshalled.Bucket,
		_unmarshalled.Scope, _unmarshalled.Keyspace), _unmarshalled.As, nil, nil)
	this.keyspace, err = datastore.GetKeyspace(this.term.Path().Parts()...)
	if err != nil {
		return err
	}

	this.indexer, err = this.keyspace.Indexer(_unmarshalled.Using)
	if err != nil {
		return err
	}

	index, err := this.indexer.IndexByName(_unmarshalled.Index)
	if err != nil {
		return err
	}

	primary, ok := index.(datastore.PrimaryIndex)
	if !ok {
		return fmt.Errorf("Unable to unmarshal %s as primary index.", _unmarshalled.Index)
	}
	this.index = primary

	planContext := this.PlanContext()
	if planContext != nil {
		if this.limit != nil {
			_, err = planContext.Map(this.limit)
			if err != nil {
				return err
			}
		}
		planContext.addKeyspaceAlias(this.term.Alias())
	}

	return nil
}

func (this *PrimaryScan) verify(prepared *Prepared) errors.Error {
	return verifyIndex(this.index, this.indexer, verifyCoversAndSeqScan(nil, this.keyspace, this.indexer), prepared)
}
//  Copyright 2025-Present Couchbase, Inc.
//
//  Use of this software is governed by the Business Source License included
//  in the file licenses/BSL-Couchbase.txt.  As of the Change Date specified
//  in that file, in accordance with the Business Source License, use of this
//  software will be governed by the Apache License, Version 2.0, included in
//  the file licenses/APL2.txt.

package plan

import (
	"github.com/couchbase/query/expression"
	"github.com/couchbase/query/value"
)

type planContext struct {
	expression.MapperBase

	withs


="gfm"]:after {
  content: "GFW";
}

pre[lang="gherkin"]:after {
  content: "Gherkin";
}

pre[lang="glsl"]:after {
  content: "GLSL";
}

pre[lang="Go"]:after {
  content: "Go";
}

pre[lang="Groovy"]:after {
  content: "Groovy";
}

/* ———————————————————— H ———————————————————— */
pre[lang="Handlebars"]:after {
  content: "Handlebars";
}

pre[lang="Haskell"]:after {
  content: "Haskell";
}

pre[lang="Haxe"]:after {
  content: "Haxe";
}

pre[lang="Hive"]:after {
  content: "Hive";
}

pre[lang="Htaccess"]:after {
  content: "Htaccess";
}

pre[lang="HTML"]:after {
  content: "HTML";
}

pre[lang="HTTP"]:after {
  content: "HTTP";
}

pre[lang="HXML"]:after {
  content: "HXML";
}

/* ———————————————————— I ———————————————————— */
pre[lang="IDL"]:after {
  content: "IDL";
}

pre[lang="INI"]:after {
  content: "INI";
}

/* ———————————————————— J ———————————————————— */
pre[lang="Jade"]:after {
  content: "Jade";
}

pre[lang="Java"]:after {
  content: "Java";
}

pre[lang="JavaScript"]:after,
pre[lang="JS"]:after {
  content: "JavaScript";
}

pre[lang="Jinja2"]:after {
  content: "Jinja2";
}

pre[lang="JSON"]:after {
  content: "JSON";
}

pre[lang="JSP"]:after {
  content: "JSP";
}

pre[lang="JSX"]:after {
  content: "JSX";
}

pre[lang="Julia"]:after {
  content: "Julia";
}

/* ———————————————————— K ———————————————————— */
pre[lang="Kotlin"]:after {
  content: "Kotlin";
}

/* ———————————————————— L ———————————————————— */
pre[lang="Latex"]:after {
  content: "LaTeX";
}

pre[lang="Less"]:after {
  content: "Less";
}

pre[lang="LISP"]:after {
  content: "LISP";
}

pre[lang="LiveScript"]:after {
  content: "LiveScript";
}

pre[lang="lua"]:after {
  content: "Lua";
}

/* ———————————————————— M ———————————————————— */
pre[lang="Makefile"]:after {
  content: "Makefile";
}

pre[lang="MariaDB"]:after {
  content: "MariaDB";
}

pre[lang="Markdown"]:after {
  content: "Markdown";
}

pre[lang="Mathematica"]:after {
  content: "Mathematica";
}

pre[lang="MATLAB"]:after {
  content: "MATLAB";
}

pre[lang="MBOX"]:after {
  content: "MBOX";
}

pre[lang="Mermaid"]:after {
  content: "Mermaid";
}

pre[lang="MSSQL"]:after {
  content: "MSSQL";
}

pre[lang="MySQL"]:after {
  content: "MySQL";
}

/* ———————————————————— N ———————————————————— */
pre[lang="Nginx"]:after {
  content: "Nginx";
}

pre[lang="Nim"]:after {
  content: "Nim";
}

pre[lang="NSIS"]:after


odality (major or minor) of a track, the type of scale
  /// from which its melodic content is derived. Major is represented by 1 and
  /// minor is `0`.
  @JsonKey(fromJson: convertToIntIfDoubleValue)
  int? mode;

  /// Speechiness detects the presence of spoken words in a track. The more
  /// exclusively speech-like the recording (e.g. talk show, audio book, poetry),
  /// the closer to `1.0` the attribute value. Values above 0.66 describe tracks
  /// that are probably made entirely of spoken words. Values between `0.33` and
  /// `0.66` describe tracks that may contain both music and speech, either in
  /// sections or layered, including such cases as rap music. Values below `0.33`
  /// most likely represent music and other non-speech-like tracks.
  double? speechiness;

  /// The overall estimated tempo of a track in beats per minute (BPM). In
  /// musical terminology, tempo is the speed or pace of a given piece and
  /// derives directly from the average beat duration.
  double? tempo;

  /// An estimated overall time signature of a track. The time signature (meter)
  /// is a notational convention to specify how many beats are in each bar (or
  /// measure).
  @JsonKey(name: 'time_signature', fromJson: convertToIntIfDoubleValue)
  int? timeSignature;

  /// A link to the Web API endpoint providing full details of the track.
  @JsonKey(name: 'track_href')
  String? trackHref;

  /// The object type: "audio_features"
  String? type;

  /// The Spotify URI for the track.
  String? uri;

  /// A measure from `0.0` to `1.0` describing the musical positiveness conveyed by
  /// a track. Tracks with high valence sound more positive (e.g. happy,
  /// cheerful, euphoric), while tracks with low valence sound more negative
  /// (e.g. sad, depressed, angry).
  double? valence;
}
// Copyright (c) 2020, deandreamatias, rinukkusu. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

part of '../../spotify.dart';

/// Endpoint of shows `v1/shows`
class Shows extends EndpointPaging {
  @override
  String get _path => 'v1/shows';

  Shows(super.api);

  /// Get a single show
  ///
  /// [market]: An ISO 3166-1 alpha-2 country code or the string 'from_token'.
  /// If a country code is specified, only artists, albums, and tracks with
  /// content that is playable in that market is returned.
  Future<Show> get(String showId, {Market? market}) async {
    String jsonString;
    if (market != null) {
      var queryMap = {'market': market.name};
      var query = _buildQuery(queryMap);
      jsonString = await _get('$_path/$showId?$query');
    } else {
      jsonString = await _get('$_path/$showId');
    }

    var map = json.decode(jsonString);

    return Show.fromJson(map);
  }

  /// Get one or several shows
  Future<Iterable<Show>> list(List<String> showsId) async => _listWithIds(
      path: _path, ids: showsId, jsonKey: 'shows', fromJson: Show.fromJson);

  /// Get a Show's Episodes
  ///
  /// [market]: An ISO 3166-1 alpha-2 country code or the string 'from_token'.
  /// If a country code is specified, only artists, albums, and tracks with
  /// content that is playable in that market is returned.
  Pages<Episode> episodes(String showId, [Market? market]) {
    var query = _buildQuery({
      'market': market?.name,
    });
    var queryString = query.isNotEmpty ? '?$query' : '';

    return _getPages('$_path/$showId/episodes$queryString',
        (json) => Episode.fromJson(json));
  }
}
import 'package:flutter_test/fl


31, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

</style>
<link rel="stylesheet" type="text/css" href="bframe_data/styles__ltr.css">

<input id="recaptcha-token" value="03AEMEkEmMzEck2nCeMMnEvOnsC6OZNSDVKIgf7bEIvnjdJAhXvA7XaknBH6GlEEowxgs_HHc6umcdn9ckzX2CDG2E-h8Tbigv6qGCBdFfi0NZ8Xd1anLmcGDXbTCrd3iLd0j93-B5vTJKYrwfiWW_hZCn2hm4oz-x62RDtzdfwCuM-BgM83N9yl5JtY9FCzEz_Sf7M8rMWgBw1rBvcILikL2C1NLfjbaACPbBfhJCDLIpS0BXP-na1yzWrWGRvBT9oL2vbM5tDk6zO5gfl5T8NjtrwDsn9tq65bfqSGMZz4IHUgpl_TGA7IOC0BhvnJLp291hsokBbbsSFhKmYen1qxxhadY3aVrPaVJ5-y5e7HE2eTDUVhxsJR9pYtzZ0vvhJg21b0a07vPssaNaMyGnSJZaWUvB536xTuMdhuUuWGk_0xll2QZgT8Fvgx28WLaRceSNehO7-H0u" type="hidden">