w_Any_LSX, I422AlphaToARGBRow_LSX, 1, 0, 4, 15)
#endif
#ifdef HAS_I422ALPHATOARGBROW_LASX
ANY41C(I422AlphaToARGBRow_Any_LASX, I422AlphaToARGBRow_LASX, 1, 0, 4, 15)
#endif
#undef ANY41C

// Any 4 planes to 1 plane of 8 bit with yuvconstants
#define ANY41CT(NAMEANY, ANY_SIMD, UVSHIFT, DUVSHIFT, T, SBPP, BPP, MASK)      \
  void NAMEANY(const T* y_buf, const T* u_buf, const T* v_buf, const T* a_buf, \
               uint8_t* dst_ptr, const struct YuvConstants* yuvconstants,      \
               int width) {                                                    \
    SIMD_ALIGNED(T vin[16 * 4]);                                               \
    SIMD_ALIGNED(uint8_t vout[64]);                                            \
    memset(vin, 0, sizeof(vin)); /* for YUY2 and msan */                       \
    int r = width & MASK;                                                      \
    int n = width & ~MASK;                                                     \
    if (n > 0) {                                                               \
      ANY_SIMD(y_buf, u_buf, v_buf, a_buf, dst_ptr, yuvconstants, n);          \
    }                                                                          \
    ptrdiff_t np = n;                                                          \
    memcpy(vin, y_buf + np, r * SBPP);                                         \
    memcpy(vin + 16, u_buf + (np >> UVSHIFT), SS(r, UVSHIFT) * SBPP);          \
    memcpy(vin + 32, v_buf + (np >> UVSHIFT), SS(r, UVSHIFT) * SBPP);          \
    memcpy(vin + 48, a_buf + np, r * SBPP);                                    \
    ANY_SIMD(vin, vin + 16, vin + 32, vin + 48, vout, yuvconstants, MASK + 1); \
    memcpy(dst_ptr + (np >> DUVSHIFT) * BPP, vout, SS(r, DUVSHIFT) * BPP);     \
  }

#ifdef HAS_I210ALPHATOARGBROW_NEON
ANY41CT(I210AlphaToARGBRow_Any_NEON,
        I210AlphaToARGBRow_NEON,
        1,
        0,
        uint16_t,
        2,
        4,
        7)
#endif
#ifdef HAS_I410ALPHATOARGBROW_NEON
ANY41CT(I410AlphaToARGBRow_Any_NEON,
        I410AlphaToARGBRow_NEON,
        0,
        0,
        uint16_t,
        2,
        4,
        7)
#endif

#ifdef HAS_I210ALPHATOARGBROW_SSSE3
ANY41CT(I210AlphaToARGBRow_Any_SSSE3,
        I210AlphaToARGBRow_SSSE3,
        1,
        0,
        uint16_t,
        2,
        4,
        7)
#endif

#ifdef HAS_I210ALPHATOARGBROW_AVX2
ANY41CT(I210AlphaToARGBRow_Any_AVX2,
        I210AlphaToARGBRow_AVX2,
        1,
        0,
        uint16_t,
        2,
        4,
        15)
#endif

#ifdef HAS_I410ALPHATOARGBROW_SSSE3
ANY41CT(I410AlphaToARGBRow_Any_SSSE3,
        I410AlphaToARGBRow_SSSE3,
        0,
        0,
        uint16_t,
        2,
        4,
        7)
#endif

#ifdef HAS_I410ALPHATOARGBROW_AVX2
ANY41CT(I410AlphaToARGBRow_Any_AVX2,
        I410AlphaToARGBRow_AVX2,


00001), %l4

! Initialize running FP counter in register %f16
sethi %hi(0x4c000001), %l7
or    %l7, %lo(0x4c000001), %l7
stw %l7, [%i5]
ld [%i5], %f16

! Initialize FP counter increment value in register %f17 (constant)
sethi %hi(0x40800000), %l7
or    %l7, %lo(0x40800000), %l7
stw %l7, [%i5]
ld [%i5], %f17

! Initialize LFSR to 0xf8e^4
sethi %hi(0xf8e), %l0
or    %l0, %lo(0xf8e), %l0
mulx  %l0, %l0, %l0
mulx  %l0, %l0, %l0

!-- init shared addrs 12 to 12 ---
stx %g0, [%i3+0]

! use untouched cache-line (offset 4K) in replacement area for sync
sub %i1, %i0, %o5
add %i3, %o5, %o5
sub %o5, -4096, %o5

!-- begin of sync_init ---
or %g0, 1, %l3
or %g0, %l3, %l6
swap [%o5+4], %l6
membar #Sync
sync_init_1_25:
brnz,pt %l3, sync_init_1_25
lduw [%o5+4], %l3 ! delay slot
sync_init_2_25:
lduw [%o5], %l3
sub %l3, 1, %l6
cas [%o5], %l3, %l6
cmp %l3, %l6
bne,pt %xcc, sync_init_2_25
nop
membar #Sync
sync_init_3_25:
lduw [%o5], %l3 ! delay slot
brnz,pt %l3, sync_init_3_25
nop
!-- end of sync_init ---

BEGIN_NODES25: ! Test istream for CPU 25 begins

P12926: !_BLD [12] (FP) (CBR)
wr %g0, 0xf0, %asi
membar #Sync
ldda [%i3 + 0] %asi, %f0
membar #Sync
! 1 addresses covered

! cbranch
andcc %l0, 1, %g0
be,pt  %xcc, TARGET12926
nop
RET12926:

! lfsr step begin
srlx %l0, 1, %l7
xnor %l7, %l0, %l7
sllx %l7, 63, %l7
or  %l7, %l0, %l0
srlx %l0, 1, %l0

P12927: !_ST [13] (maybe <- 0xc800001) (Int)
stw   %l4, [%i3 + 64 ]
add   %l4, 1, %l4

P12928: !_BLD [0] (FP)
wr %g0, 0xf0, %asi
membar #Sync
ldda [%i0 + 0] %asi, %f32
membar #Sync
! 4 addresses covered
fmovd %f32, %f18
fmovs %f18, %f1
fmovs %f19, %f2
fmovd %f34, %f18
fmovs %f19, %f3
fmovd %f40, %f4

P12929: !_BLD [6] (FP)
wr %g0, 0xf0, %asi
membar #Sync
ldda [%i1 + 64] %asi, %f32
membar #Sync
! 3 addres


 = "loc_adamant_male_c__conversation_beast_of_nurgle_weakpoint_c_01",
			[2] = "loc_adamant_male_c__conversation_beast_of_nurgle_weakpoint_c_02",
		},
		sound_events_duration = {
			[1] = 3.098667,
			[2] = 3.374667,
		},
		randomize_indexes = {},
	},
	conversation_plague_ogryn_weakpoint_01 = {
		randomize_indexes_n = 0,
		sound_events_n = 2,
		sound_events = {
			[1] = "loc_adamant_male_c__conversation_plague_ogryn_weakpoint_01_01",
			[2] = "loc_adamant_male_c__conversation_plague_ogryn_weakpoint_01_02",
		},
		sound_events_duration = {
			[1] = 4.513333,
			[2] = 2.934667,
		},
		randomize_indexes = {},
	},
	conversation_plague_ogryn_weakpoint_02 = {
		randomize_indexes_n = 0,
		sound_events_n = 2,
		sound_events = {
			[1] = "loc_adamant_male_c__conversation_plague_ogryn_weakpoint_02_01",
			[2] = "loc_adamant_male_c__conversation_plague_ogryn_weakpoint_02_02",
		},
		sound_events_duration = {
			[1] = 3.530667,
			[2] = 4.191333,
		},
		randomize_indexes = {},
	},
	conversation_plague_ogryn_weakpoint_03 = {
		randomize_indexes_n = 0,
		sound_events_n = 2,
		sound_events = {
			[1] = "loc_adamant_male_c__conversation_plague_ogryn_weakpoint_03_01",
			[2] = "loc_adamant_male_c__conversation_plague_ogryn_weakpoint_03_02",
		},
		sound_events_duration = {
			[1] = 3.232,
			[2] = 4.007333,
		},
		randomize_indexes = {},
	},
	graffiti_response = {
		randomize_indexes_n = 0,
		sound_events_n = 2,
		sound_events = {
			[1] = "loc_adamant_male_c__graffiti_response_01",
			[2] = "loc_adamant_male_c__graffiti_response_02",
		},
		sound_events_duration = {
			[1] = 9.124688,
			[2] = 4.328667,
		},
		randomize_indexes = {},
	},
	info_extraction_response = {
		randomize_indexes_n = 0,
		sound_events_n = 2,
		sound_events = {
			[1] = "loc_adamant_male_c__info_extraction_response_01",
			[2] = "loc_adamant_male_c__info_extraction_response_02",
		},
		sound_events_duration = {
			[1] = 1.584677,
			[2] = 1.772146,
		},
		randomize_indexes = {},
	},
	mission_deception = {
		randomize_indexes_n = 0,
		sound_events_n = 2,
		sound_events = {
			[1] = "loc_adamant_male_c__mission_deception_01",
			[2] = "loc_adamant_male_c__mission_deception_02",
		},
		sound_events_duration = {
			[1] = 4.059802,
			[2] = 3.033813,


sition: absolute;
  right: 23%;
  width: 20px; }

/* line 785, /Users/Devin/GitHub/spotio/skin/components/_media-objects.scss */
.mo-verified .spoticon-check-16 {
  display: block;
  text-align: center; }

/* line 789, /Users/Devin/GitHub/spotio/skin/components/_media-objects.scss */
.mo-verified .spoticon-check-16:before {
  font-size: 12px;
  line-height: inherit; }

/* line 793, /Users/Devin/GitHub/spotio/skin/components/_media-objects.scss */
.media-object-simple.media-object-artist .mo-verified,
.media-object-simple.media-object-user .mo-verified,
.media-object-transparent.media-object-artist .mo-verified,
.media-object-transparent.media-object-user .mo-verified {
  bottom: 9%;
  right: 20%; }

/* line 800, /Users/Devin/GitHub/spotio/skin/components/_media-objects.scss */
.media-object-artist.verified .mo-verified,
.media-object-user.verified .mo-verified {
  display: block; }

/* line 804, /Users/Devin/GitHub/spotio/skin/components/_media-objects.scss */
.media-object-small.media-object-horizontal .mo-verified {
  height: 14px;
  line-height: 15px;
  margin: 0 -7px -7px 0;
  width: 14px; }

/* line 810, /Users/Devin/GitHub/spotio/skin/components/_media-objects.scss */
.media-object-small.media-object-horizontal .mo-verified .spoticon-check-16:before {
  font-size: 10px; }

/* line 813, /Users/Devin/GitHub/spotio/skin/components/_media-objects.scss */
.mo-info {
  background-color: #E5E8EA;
  padding: 13px 8px 4px;
  height: 63px; }

/* line 818, /Users/Devin/GitHub/spotio/skin/components/_media-objects.scss */
.mo-info.description {
  height: 117px; }

/* line 821, /Users/Devin/GitHub/spotio/skin/components/_media-objects.scss */
.mo-info.meta {
  height: 94px; }

/* line 824, /Users/Devin/GitHub/spotio/skin/components/_media-objects.scss */
.mo-info.subtitle {
  height: 90px; }

/* line 827, /Users/Devin/GitHub/spotio/skin/components/_media-objects.scss */
.mo-info.description.meta {
  height: 144px; }

/* line 830, /Users/Devin/GitHub/spotio/skin/components/_media-objects.scss */
.mo-info.description.subtitle {
  height: 144px; }

/* line 833, /Users/Devin/GitHub/spotio/skin/components/_media-objects.scss */
.mo-info.subtitle.meta {
  height: 121px; }

/* line 836, /Users/Devin/GitHub/spotio/skin/components/_media-objects.scss */
.mo-info.subtitle.meta.description {
  height: 175px; }

/* line 839, /Users/Devin/GitHub/spotio/skin/components/_media-objects.scss */
.mo-info.socialproof.description {
  height: 154px; }

/* line 842, /Users/Devin/GitHub/spotio/skin/components/_media-objects.scss */
.mo-info.socialproof.meta {
  height: 131px; }

/* line 845, /Users/Devin/GitHub/spotio/skin/components/_media-objects.scss */
.mo-info.socialproof.subtitle {
  height: 127px; }


(device);
            libUSB.close(deviceHandle);
            _pinecilState = _PinecilState.Connected;
          } on LibUSBException catch (e) {
            if (e.code == LIBUSB_ERROR_NOT_SUPPORTED) {
              _pinecilState = _PinecilState.ConnectedNoDriver;
            } else {
              _pinecilState = _PinecilState.Error;
            }
          }
          break;
        }
      }
      setState(() {
        if (_currentStep == 0 && _isPinecilConnected) {
          _currentStep = 1;
        } else if (_currentStep == 1 && !_isPinecilConnected) {
          _currentStep = 0;
        }
      });
    }
    devicesList.free();
  }

  void _copyLog() {
    String logData = _log.map((e) => e.message).join('\n');
    FlutterClipboard.copy(logData);
    ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
      content: Text("The log has been copied"),
    ));
  }

  void _flashFirmware(
      {String? firmwarePath, _FirmwareEntry? firmwareEntry}) async {
    String filePath = "";

    // region Custom Firmware Check
    if (firmwareEntry == null) {
      if (firmwarePath == null) {
        ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
          content: Text("You need to specify custom firmware path"),
        ));
        return;
      }
      if (!(await File(firmwarePath).exists())) {
        ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
          content: Text("Specified file doesn't exists"),
        ));
      }
      filePath = firmwarePath;
    }
    // endregion

    _usbTimer?.cancel();
    _usbTimer = null;
    setState(() {
      _currentStep = 2;
    });
    // TODO: custom dfu-util.exe support?
    /* late List<String> arguments;

    if (path.extension(filePath) == '.dfu') {
      arguments = [
        "-a",
        "0",
        "-D",
        filePath,
        // TODO: Mass-Erase support
      ];
    } else {
      arguments = [
        "-d",
        "28e9:0189",
        "-a",
        "0",
        "-D",
        filePath,
        "-s",
        "0x08000000" + (false ? ":mass-erase:force" : "")
      ];
    }
    var dfuUtil = await Process.start(
        '$currentWorkingDirectory/dfu-util.exe', arguments,
        runInShell: true);
    stdout.addStream(dfuUtil.stdout);
    stderr.addStream(dfuUtil.stderr); */

    // region Download Firmware
    if (firmwareEntry != null) {
      setState(() {
        _state = "Downloading firmware... 0%";
        _log.add(_LogMessage(
            "Downloading firmware " + firmwareEntry.fileName, false));
      });
      try {
        final firmwaresZipResponse = await _dio.get(
          firmwareEntry.zipUrl,
          onReceiveProgress: (count, total) => setState(() {
            _state =
                "Downloading firmware... ${((count / total) * 100.0).round()}%";
            _progress = ((count / total) * 45.0).round();
          }),
          options: Options(responseType: ResponseType.bytes),
        );
        final firmwaresZip =
            ZipDecoder().decodeBytes(firmwaresZipResponse.data);

        final firmwareZipFile = firmwaresZip.files
            .singleWhere((element) => element.name == firmwareEntry.fileName);
        final firmwareFile = File("$currentWorkingDirectory/_tmpfirm.dfu");
        await firmwareFile.create(recursive: true);
        await firmwareFile.writeAsBytes(firmwareZipFile.content);


IAAAASAgMAAAAroGbEAAAACVBMVEUAAIjd6vvD2f9LKLW+AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfYAR0BKwNDEVT0AAAAG0lEQVQI12NgAAOtVatWMTCohoaGUY+EmIkEAEruEzK2J7tvAAAAAElFTkSuQmCC") repeat}.note-popover .popover-content .note-style .dropdown-style blockquote,.note-popover .popover-content .note-style .dropdown-style pre,.note-editor .note-toolbar .note-style .dropdown-style blockquote,.note-editor .note-toolbar .note-style .dropdown-style pre{margin:0}.note-popover .popover-content .note-style .dropdown-style h1,.note-popover .popover-content .note-style .dropdown-style h2,.note-popover .popover-content .note-style .dropdown-style h3,.note-popover .popover-content .note-style .dropdown-style h4,.note-popover .popover-content .note-style .dropdown-style h5,.note-popover .popover-content .note-style .dropdown-style h6,.note-popover .popover-content .note-style .dropdown-style p,.note-editor .note-toolbar .note-style .dropdown-style h1,.note-editor .note-toolbar .note-style .dropdown-style h2,.note-editor .note-toolbar .note-style .dropdown-style h3,.note-editor .note-toolbar .note-style .dropdown-style h4,.note-editor .note-toolbar .note-style .dropdown-style h5,.note-editor .note-toolbar .note-style .dropdown-style h6,.note-editor .note-toolbar .note-style .dropdown-style p{margin:0;padding:0}.note-popover .popover-content .note-style .dropdown-style h1,.note-editor .note-toolbar .note-style .dropdown-style h1{font-size:3rem}.note-popover .popover-content .note-style .dropdown-style h2,.note-editor .note-toolbar .note-style .dropdown-style h2{font-size:2rem}.note-popover .popover-content .note-style .dropdown-style h3,.note-editor .note-toolbar .note-style .dropdown-style h3{font-size:1.75rem}.note-popover .popover-content .note-style .dropdown-style>li,.note-editor .note-toolbar .note-style .dropdown-style>li{padding:.25rem 1rem}.note-popover .popover-content .note-style .dropdown-style>li[aria-label=pre],.note-editor .note-toolbar .note-style .dropdown-style>li[aria-label=pre]{border-bottom:1px solid #dbdfea;margin-bottom:.5rem;padding-bottom:.75rem}.note-popover .popover-content .note-color-all .note-dropdown-menu,.note-editor .note-toolbar .note-color-all .note-dropdown-menu{padding:.375rem;min-width:326px}.note-popover .popover-content .note-color .dropdown-toggle,.note-editor .note-toolbar .note-color .dropdown-toggle{width:20px;padding-left:5px}.note-popover .popover-content .note-color .note-dropdown-menu .note-palette,.note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette{display:inline-block;margin:0;width:156px;padding:.375rem}.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-palette-title,.note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-palette-title{font-size:12px;margin:2px 0;font-weight:700}.note-popover .popover-content .note-color .note-dropdown


 = "many-to-many";

   public static final String JPA_REL_TYPE = "jpa-relation-type";

   /**
    * Whether the field is an Id.
    */
   public static final String PRIMARY_KEY = "primary-key";

   /**
    * The reverse primary key of a JPA relationship.
    */
   public static final String REVERSE_PRIMARY_KEY = "reverse-primary-key";

   /**
    * Whether the field represents a generated value
    */
   public static final String GENERATED_VALUE = "generated-value";

   /**
    * The owning field of a bi-directional relationship
    */
   public static final String OWNING_FIELD = "owning-field";

   /**
    * The inverse field of a bi-directional relationship
    */
   public static final String INVERSE_FIELD = "inverse-field";

   /**
    *
    */
   public static final String TOP_LEVEL_PARAMETERIZED_TYPE = "top-level-parameterized-type";

   //
   // Private constructor
   //

   private ForgeInspectionResultConstants()
   {
      // Can never be called
   }
}
/**
 * Copyright 2016 Red Hat, Inc. and/or its affiliates.
 *
 * Licensed under the Eclipse Public License version 1.0, available at
 * http://www.eclipse.org/legal/epl-v10.html
 */
package org.jboss.forge.addon.javaee.websocket;

import javax.inject.Inject;

import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.forge.addon.dependencies.builder.DependencyBuilder;
import org.jboss.forge.addon.facets.FacetFactory;
import org.jboss.forge.addon.facets.FacetIsAmbiguousException;
import org.jboss.forge.addon.javaee.facets.JavaEE7Facet;
import org.jboss.forge.addon.projects.Project;
import org.jboss.forge.addon.projects.ProjectFactory;
import org.jboss.forge.addon.projects.dependencies.DependencyInstaller;
import org.jboss.forge.arquillian.AddonDependencies;
import org.jboss.forge.arquillian.AddonDependency;
import org.jboss.forge.arquillian.archive.AddonArchive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;

@RunWith(Arquillian.class)
public class WebSocketFacetTest
{
   @Deployment
   @AddonDependencies({
            @AddonDependency(name = "org.jboss.forge.addon:javaee"),
            @AddonDependency(name = "org.jboss.forge.addon:maven"),
            @AddonDependency(name = "org.jboss.forge.furnace.container:cdi")
   })
   public static AddonArchive getDeployment()
   {
      return ShrinkWrap.create(AddonArchive.class).addBeansXML();
   }

   @Inject
   private ProjectFactory projectFactory;

   @Inject
   private FacetFactory facetFactory;

   @Inject
   private DependencyInstaller dependencyInstaller;

   @Test(expected = FacetIsAmbiguousException.class)
   public void testCannotInstallAmbiguousFacetType() throws Exception
   {
      Project project = projectFactory.createTempProject();
      facetFactory.install(project, WebSocketFacet.class);
   }

   @Test
   public void testWebSocket_1_0() throws Exception
   {
      Project project = projectFactory.createTempProject();
      WebSocketFacet_1_0 facet = facetFactory.install(project, WebSocketFacet_1_0.class);
      Assert.assertNotNull(facet);
      Assert.assertTrue(dependencyInstaller.isInstalled(projec


Mean difference is too large";
    EXPECT_LT(max_diff, 1.0f) << "Max difference is too large";

    // Check that the mean values are similar (within 20%)
    auto ref_mean = ref_renders.mean().item<float>();
    auto gs_mean = gs_renders_stacked.mean().item<float>();
    EXPECT_NEAR(ref_mean, gs_mean, std::abs(ref_mean) * 0.2f + 0.01f)
        << "Mean values differ too much";
}

TEST_F(RasterizationComparisonTest, TestDifferentRenderModes) {
    torch::manual_seed(42);

    // Smaller test for different configurations
    const int N = 1000;
    const int width = 64;
    const int height = 64;
    const float focal = 100.0f;

    // Test configurations
    std::vector<std::pair<int, std::string>> configs = {
        {0, "DC only"},
        {1, "SH degree 1"},
        {2, "SH degree 2"},
        {3, "SH degree 3"}};

    for (const auto& [sh_degree, desc] : configs) {
        std::cout << "\n=== Testing " << desc << " ===" << std::endl;

        // Create test data
        auto means = torch::rand({N, 3}, device) * 2.0f;
        means.select(1, 2) = torch::abs(means.select(1, 2)) + 1.0f;

        auto quats = torch::randn({N, 4}, device);
        quats = torch::nn::functional::normalize(quats, torch::nn::functional::NormalizeFuncOptions().dim(-1));

        auto scales = torch::rand({N, 3}, device) * 0.05f + 0.01f;
        auto opacities = torch::rand({N}, device) * 0.8f + 0.1f;

        const int num_sh_coeffs = (sh_degree + 1) * (sh_degree + 1);
        auto sh_coeffs = torch::randn({N, num_sh_coeffs, 3}, device) * 0.1f;

        // Single camera
        auto K = torch::tensor(
                     {{focal, 0.0f, width / 2.0f},
                      {0.0f, focal, height / 2.0f},
                      {0.0f, 0.0f, 1.0f}},
                     device)
                     .unsqueeze(0);

        auto viewmat = torch::eye(4, device).unsqueeze(0);
        auto bg_color = torch::ones({1, 3}, device) * 0.1f; // Gray background

        // Reference implementation
        auto ref_render = reference_rasterize(
            means, quats, scales, opacities, sh_coeffs,
            viewmat, K, bg_color, width, height, sh_degree, 1.0f);

        // gs::rasterize implementation
        auto sh0 = sh_coeffs.slice(1, 0, 1);
        auto shN = sh_coeffs.slice(1, 1, num_sh_coeffs);

        auto gaussians = SplatData(
            sh_degree, means, sh0, shN,
            torch::log(scales), quats,
            torch::logit(opacities).unsqueeze(-1), 1.0f);

        while (gaussians.get_active_sh_degree() < sh_degree) {
            gaussians.increment_sh_degree();
        }

        auto R = torch::eye(3, torch::kCPU);
        auto T = torch::zeros({3}, torch::kCPU);
        float fov = 2.0f * std::atan(width / (2.0f * focal));

        Camera camera(R, T, focal, focal,
                      0.5 * width,
                      0.5 * height, torch::empty({0}, torch::kFloat3


to a db type.

use std::{collections::HashMap, marker::PhantomData, str::FromStr};

use nom::bytes::complete::tag;
use nom::character::complete::alpha1;
use nom::sequence::{delimited, separated_pair};
use nom::IResult;

use fabrix::{SqlError, Value, ValueType};

trait SqlTypeTagMarker: Sync + Send {
    fn to_str(&self) -> &str;

    fn to_dtype(&self) -> ValueType;
}

struct SqlTypeTag<T>(&'static str, PhantomData<T>)
where
    T: Into<Value>;

impl<T> SqlTypeTag<T>
where
    T: Into<Value>,
{
    fn new(name: &'static str) -> Self {
        SqlTypeTag(name, PhantomData)
    }
}

// sql type binds to `bool`
impl SqlTypeTagMarker for SqlTypeTag<bool> {
    fn to_str(&self) -> &str {
        self.0
    }

    fn to_dtype(&self) -> ValueType {
        ValueType::Bool
    }
}

type Sttm = Box<dyn SqlTypeTagMarker>;

lazy_static::lazy_static! {
    // Mysql types map
    static ref MYSQL_TMAP: HashMap<&'static str, Sttm> = {
        HashMap::from([
            (
                "BOOLEAN",
                Box::new(SqlTypeTag::<bool>::new("BOOLEAN")) as Sttm,
            )
        ])
    };

    // Postgres types map
    static ref PG_TMAP: HashMap<&'static str, Sttm> = {
        HashMap::from([
            (
                "BOOL",
                Box::new(SqlTypeTag::<bool>::new("BOOL")) as Sttm,
            )
        ])
    };
}

fn get_sql_type(input: &str) -> IResult<&str, (&str, &str)> {
    let sql_type = alpha1;
    let data_type = alpha1;

    let ctn = separated_pair(sql_type, tag(":"), data_type);
    let mut par = delimited(tag("["), ctn, tag("]"));

    par(input)
}

// "[MYSQL:BOOLEAN]" -> MYSQL_TMAP["BOOLEAN"]
// "[PG:BOOL]" -> PG_TMAP["BOOL"]
impl FromStr for &Sttm {
    type Err = SqlError;

    fn from_str(s: &str) -> Result<Self, Self::Err> {
        match get_sql_type(s) {
            Ok((_, (db_type, sql_type))) => match db_type {
                "MYSQL" => MYSQL_TMAP
                    .get(sql_type)
                    .ok_or_else(|| SqlError::new_common_error("MYSQL data type not found")),
                "PG" => PG_TMAP
                    .get(sql_type)
                    .ok_or_else(|| SqlError::new_common_error("PG data type not found")),
                _ => Err(SqlError::new_common_error("DB type not found")),
            },
            Err(_) => Err(SqlError::new_common_error("parsing error")),
        }
    }
}

#[test]
fn test_parsing() {
    let x = "[MYSQL:BOOLEAN]";
    let x = x.parse::<&Sttm>();

    println!("{:?}", x.unwrap().to_dtype());

    let bar = "[PG:BOOL]";
    let bar = bar.parse::<&Sttm>();

    println!("{:?}", bar.unwrap().to_dtype());
}
<reponame>Quadrocompile/syntaxdot
use std::io::{self, Write};

use prost::Message;

use crate::event_writer::event::What;
use crate::record_writer::TfRecordWriter;
use std::time::SystemTime;

pub struct EventWriter<W> {
    writer: TfRecordWriter<W>,
}

impl<W> EventWriter<W> {
    fn wall_time() -> f64 {
        SystemTime::now()
            .duration_since(SystemTime::UNIX_EPOCH)
            .unwrap()
            .as_nanos() as f64
            / 1e9
    }
}

impl<W> EventWriter<W>
where
    W: Write,
{
    pub fn new(write: W) -> io::Result<Self> {
        Self::new_with_wall_time(write, Self::wall_time())
    }

    pub fn new_with_wall_time(write: W, wall_time: f64) -> io::Result<Self> {
        let mut writer = EventWriter {


@Test
  void deleteRecommendations() {

    int productId = 1;
    int recommendationId = 1;

    sendCreateRecommendationEvent(productId, recommendationId);
    assertEquals(1, (long)repository.findByProductId(productId).count().block());

    sendDeleteRecommendationEvent(productId);
    assertEquals(0, (long)repository.findByProductId(productId).count().block());

    sendDeleteRecommendationEvent(productId);
  }

  @Test
  void getRecommendationsMissingParameter() {

    getAndVerifyRecommendationsByProductId("", BAD_REQUEST)
      .jsonPath("$.path").isEqualTo("/recommendation")
      .jsonPath("$.message").isEqualTo("Required query parameter 'productId' is not present.");
  }

  @Test
  void getRecommendationsInvalidParameter() {

    getAndVerifyRecommendationsByProductId("?productId=no-integer", BAD_REQUEST)
      .jsonPath("$.path").isEqualTo("/recommendation")
      .jsonPath("$.message").isEqualTo("Type mismatch.");
  }

  @Test
  void getRecommendationsNotFound() {

    getAndVerifyRecommendationsByProductId("?productId=113", OK)
      .jsonPath("$.length()").isEqualTo(0);
  }

  @Test
  void getRecommendationsInvalidParameterNegativeValue() {

    int productIdInvalid = -1;

    getAndVerifyRecommendationsByProductId("?productId=" + productIdInvalid, UNPROCESSABLE_ENTITY)
      .jsonPath("$.path").isEqualTo("/recommendation")
      .jsonPath("$.message").isEqualTo("Invalid productId: " + productIdInvalid);
  }

  private WebTestClient.BodyContentSpec getAndVerifyRecommendationsByProductId(int productId, HttpStatus expectedStatus) {
    return getAndVerifyRecommendationsByProductId("?productId=" + productId, expectedStatus);
  }

  private WebTestClient.BodyContentSpec getAndVerifyRecommendationsByProductId(String productIdQuery, HttpStatus expectedStatus) {
    return client.get()
      .uri("/recommendation" + productIdQuery)
      .accept(APPLICATION_JSON)
      .exchange()
      .expectStatus().isEqualTo(expectedStatus)
      .expectHeader().contentType(APPLICATION_JSON)
      .expectBody();
  }

  private void sendCreateRecommendationEvent(int productId, int recommendationId) {
    Recommendation recommendation = new Recommendation(productId, recommendationId, "Author " + recommendationId, recommendationId, "Content " + recommendationId, "SA");
    Event<Integer, Recommendation> event = new Event(CREATE, productId, recommendation);
    messageProcessor.accept(event);
  }

  private void sendDeleteRecommendationEvent(int productId) {
    Event<Integer, Recommendation> event = new Event(DELETE, productId, null);
    messageProcessor.accept(event);
  }
}
package se.magnus.api.composite.product;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import reactor.core.publisher.Mono;

@Tag(name = "ProductComposite", description = "REST API for composite product information.")
public interface ProductCompositeService {

  /**
   * Sample usage, see below.
   *
   * curl -X POST $HOST:$PORT/product-composite \
   *   -H "Content-Type: application/json" --data \
   *   '{"productId":123,"name":"product 123","weight":123}'
   *
   * @param body A JSON representation of the new composite product
   */
  @Operation(
    summary


lic KafkaEventData<string, string> CreateKafkaEventObjWithOutTraceParentHeader(string topicName)
        {
            var kafkaEvent = new KafkaEventData<string, string>("key", "value");
            kafkaEvent.Topic = topicName;
            kafkaEvent.Partition = 1;
            return kafkaEvent;
        }

        public void GetTraceIdAndSpanIdFromKafkaHeader(KafkaEventData<string, string> kafkaEvent, out string traceId, out string spanId)
        {
            kafkaEvent.Headers.TryGetFirst("traceparent", out var traceparentInBytes);
            var traceparent = Encoding.UTF8.GetString(traceparentInBytes);
            var traceParentFields = traceparent.Split('-');
            traceId = traceParentFields[1];
            spanId = traceParentFields[2];
        }
    }
}


 that can be found in the LICENSE file.

package hash

// A is the default constant for Robin-Karp rolling hash. This is a random
// prime.
const A = 0x97b548add41d5da1

// RabinKarp supports the computation of a rolling hash.
type RabinKarp struct {
	A uint64
	// a^n
	aOldest uint64
	h       uint64
	p       []byte
	i       int
}

// NewRabinKarp creates a new RabinKarp value. The argument n defines the
// length of the byte sequence to be hashed. The default constant will will be
// used.
func NewRabinKarp(n int) *RabinKarp {
	return NewRabinKarpConst(n, A)
}

// NewRabinKarpConst creates a new RabinKarp value. The argument n defines the
// length of the byte sequence to be hashed. The argument a provides the
// constant used to compute the hash.
func NewRabinKarpConst(n int, a uint64) *RabinKarp {
	if n <= 0 {
		panic("number of bytes n must be positive")
	}
	aOldest := uint64(1)
	// There are faster methods. For the small n required by the LZMA
	// compressor O(n) is sufficient.
	for i := 0; i < n; i++ {
		aOldest *= a
	}
	return &RabinKarp{
		A: a, aOldest: aOldest,
		p: make([]byte, 0, n),
	}
}

// Len returns the length of the byte sequence.
func (r *RabinKarp) Len() int {
	return cap(r.p)
}

// RollByte computes the hash after x has been added.
func (r *RabinKarp) RollByte(x byte) uint64 {
	if len(r.p) < cap(r.p) {
		r.h += uint64(x)
		r.h *= r.A
		r.p = append(r.p, x)
	} else {
		r.h -= uint64(r.p[r.i]) * r.aOldest
		r.h += uint64(x)
		r.h *= r.A
		r.p[r.i] = x
		r.i = (r.i + 1) % cap(r.p)
	}
	return r.h
}
// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Package xlog provides a simple logging package that allows to disable
// certain message categories. It defines a type, Logger, with multiple
// methods for formatting output. The package has also a predefined
// 'standard' Logger accessible through helper function Print[f|ln],
// Fatal[f|ln], Panic[f|ln], Warn[f|ln], Print[f|ln] and Debug[f|ln]
// that are easier to use then creating a Logger manually. That logger
// writes to standard error and prints the date and time of each logged
// message, which can be configured using the function SetFlags.
//
// The Fatal functions call os.Exit(1) after the message is output
// unless not suppressed by the flags. The Panic functions call panic
// after the writing the log message unless suppressed.
package xlog

import (
	"fmt"
	"io"
	"os"
	"runtime"
	"sync"
	"time"
)

// The flags define what information is prefixed to each log entry
// generated by the Logger. The Lno* versions allow the suppression of
// specific output. The bits are or'ed together to control what will be
// printed. There is no control over the order of the items printed and
// the format. The full format is:
//
//	2009-01-23 01:23:23.123123 /a/b/c/d.go:23: message
const (
	Ldate         = 1 << iota // the date: 2009-01-23
	Ltime                     // the time:


* Requires: Array with: 3*JPEGColorComponent bits WordArray with: 3*Integer (residuals)
     * ditherMask
     */

    /* JPEGReaderPlugin>>#primitiveColorConvertMCU */
    @TruffleBoundary(transferToInterpreterOnException = false)
    public void primitiveColorConvertMCU(final PointersObject componentArray, final NativeObject bits, final NativeObject residualArray, final long mask) {
        ditherMask = (int) mask;
        residuals = residualArray.getIntStorage();
        jpegBits = bits.getIntStorage();
        jpegBitsSize = jpegBits.length;
        if (!yColorComponentFrom(fetchPointerofObject(0, componentArray))) {
            throw PrimitiveFailed.GENERIC_ERROR;
        }
        if (!cbColorComponentFrom(fetchPointerofObject(1, componentArray))) {
            throw PrimitiveFailed.GENERIC_ERROR;
        }
        if (!crColorComponentFrom(fetchPointerofObject(2, componentArray))) {
            throw PrimitiveFailed.GENERIC_ERROR;
        }
        /* begin colorConvertMCU */
        yComponent[CurrentXIndex] = 0;
        yComponent[CurrentYIndex] = 0;
        cbComponent[CurrentXIndex] = 0;
        cbComponent[CurrentYIndex] = 0;
        crComponent[CurrentXIndex] = 0;
        crComponent[CurrentYIndex] = 0;
        for (int i = 0; i < jpegBitsSize; i += 1) {
            final int y = nextSampleY();
            int cb = nextSampleCb();
            cb -= SampleOffset;
            int cr = nextSampleCr();
            cr -= SampleOffset;
            int red = y + FIXn1n40200 * cr / 65536 + residuals[RedIndex];
            red = Math.min(red, MaxSample);
            red = Math.max(red, 0);
            residuals[RedIndex] = red & ditherMask;
            red = red & MaxSample - ditherMask;
            red = Math.max(red, 1);
            int green = y - FIXn0n34414 * cb / 65536 - FIXn0n71414 * cr / 65536 + residuals[GreenIndex];
            green = Math.min(green, MaxSample);
            green = Math.max(green, 0);
            residuals[GreenIndex] = green & ditherMask;
            green = green & MaxSample - ditherMask;
            green = Math.max(green, 1);
            int blue = y + FIXn1n77200 * cb / 65536 + residuals[BlueIndex];
            blue = Math.min(blue, MaxSample);
            blue = Math.max(blue, 0);
            residuals[BlueIndex] = blue & ditherMask;
            blue = blue & MaxSample - ditherMask;
            blue = Math.max(blue, 1);
            jpegBits[i] = (int) (0xFF000000 + (Integer.toUnsignedLong(red) << 16) + (Integer.toUnsignedLong(green) << 8) + blue);
        }
    }

    /*
     * In: anArray WordArray of: DCTSize2 aColorComponent JPEGColorComponent dcTable WordArray
     * acTable WordArray stream JPEGStream
     */

    /* JPEGReaderPlugin>>#primitiveDecodeMCU */
    @TruffleBoundary(transferToInterpreterOnException = false)
    public void primitiveDecodeMCU(final NativeObject sampleBuffer, final PointersObject comp, final NativeObject dcTableValue, final NativeObject acTableValue,
                    final PointersObject jpegStream) {
        if (!loadJPEGStreamFrom(jpegStream)) {
            throw PrimitiveFailed.GENERIC_ERROR;
        }
        acTable = acTableValue.getIntStorage();
        acTableSize = acTable.length;
        dcTable = dcTableValue.getIntStorage();
        dcTableSize = dcTable.length;
        if (!colorComponentfrom(yComponent, comp)) {
            throw PrimitiveFailed.GENERIC_ERROR;
        }
        decodeBlockIntocomponent(sampleBuffer.getIntStorage(), yComponent);
        if


0,.02);z-index:2;box-shadow:none}#main{position:relative;z-index:2;border-top:1px dotted #adadad}label[for=toggle-all]{display:none}#toggle-all{position:absolute;top:-42px;left:-4px;width:40px;text-align:center;border:0}#toggle-all:before{content:'»';font-size:28px;color:#d9d9d9;padding:0 25px 7px}#toggle-all:checked:before{color:#737373}#todo-list{margin:0;padding:0;list-style:none}#todo-list li{position:relative;font-size:24px;border-bottom:1px dotted #ccc}#todo-list li:last-child{border-bottom:0}#todo-list li.editing{border-bottom:0;padding:0}#todo-list li.editing .edit{display:block;width:506px;padding:13px 17px 12px;margin:0 0 0 43px}#todo-list li.editing .view{display:none}#todo-list li .toggle{text-align:center;width:40px;height:auto;position:absolute;top:0;bottom:0;margin:auto 0;border:0;-webkit-appearance:none;-ms-appearance:none;-o-appearance:none;appearance:none}#todo-list li .toggle:after{content:'✔';line-height:43px;font-size:20px;color:#d9d9d9;text-shadow:0 -1px 0 #bfbfbf}#todo-list li .toggle:checked:after{color:#85ada7;text-shadow:0 1px 0 #669991;bottom:1px;position:relative}#todo-list li label{word-break:break-word;padding:15px;margin-left:45px;display:block;line-height:1.2;-webkit-transition:color .4s;-moz-transition:color .4s;-ms-transition:color .4s;-o-transition:color .4s;transition:color .4s}#todo-list li.completed label{color:#a9a9a9;text-decoration:line-through}#todo-list li .destroy{display:none;position:absolute;top:0;right:10px;bottom:0;width:40px;height:40px;margin:auto 0;font-size:22px;color:#a88a8a;-webkit-transition:all .2s;-moz-transition:all .2s;-ms-transition:all .2s;-o-transition:all .2s;transition:all .2s}#todo-list li .destroy:hover{text-shadow:0 0 1px #000,0 0 10px rgba(199,107,107,.8);-webkit-transform:scale(1.3);-moz-transform:scale(1.3);-ms-transform:scale(1.3);-o-transform:scale(1.3);transform:scale(1.3)}#todo-list li .destroy:after{content:'✖'}#todo-list li:hover .destroy{display:block}#todo-list li .edit{display:none}#todo-list li.editing:last-child{margin-bottom:-1px}#footer{color:#777;padding:0 15px;position:absolute;right:0;bottom:-31px;left:0;height:20px;z-index:1;text-align:center}#footer:before{content:'';position:absolute;right:0;bottom:31px;left:0;height:50px;z-index:-1;box-shadow:0 1px 1px rgba(0,0,0,.3),0 6px 0 -3px rgba(255,255,255,.8),0 7px 1px -3px rgba(0,0,0,.3),0 43px 0 -6px rgba(255,255,255,.8),0 44px 2px -6px rgba(0,0,0,.2)}#todo-count{float:left;text-a


 getNum();

    var /*@type=int**/ v4 = super. /*@target=Base.intProp*/ intProp
         ??= getInt();

    var /*@type=num**/ v5 = super. /*@target=Base.intProp*/ intProp
         ??= getNum();

    var /*@type=int**/ v7 = super. /*@target=Base.intProp*/ intProp
        /*@target=num.+*/ += getInt();

    var /*@type=num**/ v8 = super. /*@target=Base.intProp*/ intProp
        /*@target=num.+*/ += getNum();

    var /*@type=int**/ v10 = /*@target=num.+*/ ++super
        . /*@target=Base.intProp*/ intProp;

    var /*@type=int**/ v11 = super
        . /*@type=int**/ /*@target=Base.intProp*/
        /*@type=int**/ intProp /*@target=num.+*/ ++;
  }
}

class Test2 extends Base {
  void test() {
    var /*@type=int**/ v1 = super.numProp = getInt();

    var /*@type=num**/ v2 = super.numProp = getNum();

    var /*@type=double**/ v3 = super.numProp = getDouble();

    var /*@type=num**/ v4 = super. /*@target=Base.numProp*/ numProp
         ??= getInt();

    var /*@type=num**/ v5 = super. /*@target=Base.numProp*/ numProp
         ??= getNum();

    var /*@type=num**/ v6 = super. /*@target=Base.numProp*/ numProp
         ??= getDouble();

    var /*@type=num**/ v7 = super. /*@target=Base.numProp*/ numProp
        /*@target=num.+*/ += getInt();

    var /*@type=num**/ v8 = super. /*@target=Base.numProp*/ numProp
        /*@target=num.+*/ += getNum();

    var /*@type=num**/ v9 = super. /*@target=Base.numProp*/ numProp
        /*@target=num.+*/ += getDouble();

    var /*@type=num**/ v10 = /*@target=num.+*/ ++super
        . /*@target=Base.numProp*/ numProp;

    var /*@type=num**/ v11 = super
        . /*@type=num**/ /*@target=Base.numProp*/
        /*@type=num**/ numProp /*@target=num.+*/ ++;
  }
}

class Test3 extends Base {
  void test3() {
    var /*@type=num**/ v2 = super.doubleProp = getNum();

    var /*@type=double**/ v3 = super.doubleProp = getDouble();

    var /*@type=num**/ v5 = super. /*@target=Base.doubleProp*/ doubleProp
         ??= getNum();

    var /*@type=double**/ v6 = super. /*@target=Base.doubleProp*/ doubleProp
         ??= getDouble();

    var /*@type=double**/ v7 = super
        . /*@target=Base.doubleProp*/
        doubleProp /*@target=double.+*/ += getInt();

    var /*@type=double**/ v8 = super
        . /*@target=Base.doubleProp*/
        doubleProp /*@target=double.+*/ += getNum();

    var /*@type=double**/ v9 = super
        . /*@target=Base.doubleProp*/
        doubleProp /*@target=double.+*/ += getDouble();

    var /*@type=double**/ v10 =
        /*@target=double.+*/ ++super
            . /*@target=Base.doubleProp*/
            doubleProp;

    var /*@type=double**/ v11 = super
        . /*@type=double**/ /*@target=Base.doubleProp*/
        /*@type=double**/ doubleProp /*@target=double.+*/ ++;
  }
}

main() {}
// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

/*@testedFeatures=inference*/
library test;

int getInt() => 0;
num getNum() =>


1 00 48 */	addi r30, r1, 0x48
/* 801863F0 00182050  3B E1 00 08 */	addi r31, r1, 8
/* 801863F4 00182054  3B A0 00 00 */	li r29, 0
/* 801863F8 00182058  3B 80 00 00 */	li r28, 0
/* 801863FC 0018205C  48 00 00 D4 */	b lbl_801864D0
lbl_80186400:
/* 80186400 00182060  2C 13 00 00 */	cmpwi r19, 0
/* 80186404 00182064  41 82 00 C8 */	beq lbl_801864CC
/* 80186408 00182068  57 80 06 3E */	clrlwi r0, r28, 0x18
/* 8018640C 0018206C  80 97 00 00 */	lwz r4, 0(r23)
/* 80186410 00182070  1C 00 00 2C */	mulli r0, r0, 0x2c
/* 80186414 00182074  7C 73 00 2E */	lwzx r3, r19, r0
/* 80186418 00182078  7C B3 02 14 */	add r5, r19, r0
/* 8018641C 0018207C  7C 03 20 40 */	cmplw r3, r4
/* 80186420 00182080  41 82 00 10 */	beq lbl_80186430
/* 80186424 00182084  80 17 00 04 */	lwz r0, 4(r23)
/* 80186428 00182088  7C 03 00 40 */	cmplw r3, r0
/* 8018642C 0018208C  40 82 00 10 */	bne lbl_8018643C
lbl_80186430:
/* 80186430 00182090  80 05 00 04 */	lwz r0, 4(r5)
/* 80186434 00182094  7C 00 20 40 */	cmplw r0, r4
/* 80186438 00182098  41 82 00 14 */	beq lbl_8018644C
lbl_8018643C:
/* 8018643C 0018209C  80 65 00 04 */	lwz r3, 4(r5)
/* 80186440 001820A0  80 17 00 04 */	lwz r0, 4(r23)
/* 80186444 001820A4  7C 03 00 40 */	cmplw r3, r0
/* 80186448 001820A8  40 82 00 58 */	bne lbl_801864A0
lbl_8018644C:
/* 8018644C 001820AC  7E C3 B3 78 */	mr r3, r22
/* 80186450 001820B0  7F 04 C3 78 */	mr r4, r24
/* 80186454 001820B4  7E A6 AB 78 */	mr r6, r21
/* 80186458 001820B8  57 92 0D FC */	rlwinm r18, r28, 1, 0x17, 0x1e
/* 8018645C 001820BC  7F 47 07 74 */	extsb r7, r26
/* 80186460 001820C0  48 00 04 4D */	bl func_801868AC
/* 80186464 001820C4  7C 64 07 34 */	extsh r4, r3
/* 80186468 001820C8  7F A0 07 34 */	extsh r0, r29
/* 8018646C 001820CC  7C 00 20 00 */	cmpw r0, r4
/* 80186470 001820D0  7C 7E 93 2E */	sthx r3, r30, r18
/* 80186474 001820D4  40 80 00 14 */	bge lbl_80186488
/* 80186478 001820D8  9B 81 00 08 */	stb r28, 8(r1)
/* 8018647C 001820DC  7C 9D 23 78 */	mr r29, r4
/*


 2, 14, 2, 30, -3) == -3 then
	return 0
else
	return -1
end


writelinkp(id, id1, "_trdy1", "i_trdyplus", idp1, writer);
        writelinkp(id, id2, "_trdy1", "i_trdyplus", idp2, writer);
        writelinkp(id, id1, "_trdy0", "i_trdyminus", idp1, writer);
        writelinkp(id, id2, "_trdy0", "i_trdyminus1", idp2, writer);

    }

    private static void genJoin(String id, String id1, String idp, int fieldgr, PrintWriter writer) {
        if (printoutput) {
            System.out.println("//genjoin " + id);
        }
        writer.println("//genjoin " + id);
        if (fieldgr > 0) {
            System.out.println("//gr " + fieldgr);
            writer.println("//gr " + fieldgr);
        }
        writeMarking(id, "a_trdy", writer);
        writeblock(id, "a_trdy", writer);
        if (printoutput) {
            System.out.println("p_" + id + "a_trdy1  t_" + id + "a_trdyminus1");
            System.out.println("t_" + id + "a_trdyminus1  p_" + id + "a_trdy0");
        }
        writer.println("p_" + id + "a_trdy1  t_" + id + "a_trdyminus1");
        writer.println("t_" + id + "a_trdyminus1  p_" + id + "a_trdy0");
        writeMarking(id, "b_trdy", writer);
        writeblock(id, "b_trdy", writer);
        if (printoutput) {
            System.out.println("p_" + id + "b_trdy1  t_" + id + "b_trdyminus1");
            System.out.println("t_" + id + "b_trdyminus1  p_" + id + "b_trdy0");
        }
        writer.println("p_" + id + "b_trdy1  t_" + id + "b_trdyminus1");
        writer.println("t_" + id + "b_trdyminus1  p_" + id + "b_trdy0");
        writeMarking(id, "o_irdy", writer);
        writeblock(id, "o_irdy", writer);
        if (printoutput) {
            System.out.println("p_" + id + "o_irdy1  t_" + id + "o_irdyminus1");
            System.out.println("t_" + id + "o_irdyminus1  p_" + id + "o_irdy0");
        }
        writer.println("p_" + id + "o_irdy1  t_" + id + "o_irdyminus1");
        writer.println("t_" + id + "o_irdyminus1  p_" + id + "o_irdy0");
        String id3 = searchListFirst(id);
        String id4 = searchListSecond(id);
        String id5 = searchListFirst2(id);
        String id6 = searchListSecond2(id);
        writelinki(id, id3, "_irdy0", "a_trdyminus1", id5, writer);
        writelinki(id, id3, "_irdy1", "a_trdyplus", id5, writer);
        writelinki(id, id4, "_irdy0", "b_trdyminus1", id6, writer);
        writelinki(id, id4, "_irdy1", "b_trdyplus", id6, writer);
        writelinki(id, id3, "_irdy1", "o_irdyplus", id5, writer);
        writelinki(id, id4, "_irdy1", "o_irdyplus", id6, writer);
        writelinki(


.md
│   │   ├── 新月社批评家的任务.md
│   │   ├── 柔石作《二月》小引.md
│   │   ├── 现今的新文学的概观.md
│   │   ├── 在钟楼上（夜记之二）.md
│   │   ├── 《吾国征俄战史之一页》.md
│   │   ├── 叶永蓁作《小小十年》小引.md
│   │   ├── 文坛的掌故（并徐匀来信）.md
│   │   ├── 文艺与革命（并冬芬来信）.md
│   │   ├── 《近代世界短篇小说集》小引.md
│   │   ├── 文学的阶级性（并恺良来信）.md
│   │   ├── “革命军马前卒”和“落伍者”.md
│   │   └── 辞顾颉刚教授令“候审”（并来信）.md
│   ├── 二心集
│   │   ├── 序言.md
│   │   ├── 风马牛.md
│   │   ├── 以脚报国.md
│   │   ├── 柔石小传.md
│   │   ├── 知难行难.md
│   │   ├── 习惯与改革.md
│   │   ├── 唐朝的钉梢.md
│   │   ├── 宣传与做戏.md
│   │   ├── 沉滓的泛起.md
│   │   ├── 我们要批评家.md
│   │   ├── 新的“女将”.md
│   │   ├── “友邦惊诧”论.md
│   │   ├── “好政府主义”.md
│   │   ├── 上海文艺之一瞥.md
│   │   ├── 答北斗杂志社问.md
│   │   ├── 答文艺新闻社问.md
│   │   ├── 《夏娃日记》小引.md
│   │   ├── 《艺术论》译本序.md
│   │   ├── 几条“顺”的翻译.md
│   │   ├── 答中学生杂志社问.md
│   │   ├── 中华民国的新“堂·吉诃德”们.md
│   │   ├── “智识劳动者”万岁.md
│   │   ├── 《进化和退化》小引.md
│   │   ├── 《野草》英文译本序.md
│   │   ├── 做古文和做好人的秘诀.md
│   │   ├── 再来一条“顺”的翻译.md
│   │   ├── 张资平氏的“小说学”.md
│   │   ├── 非革命的急进革命论者.md
│   │   ├── 一八艺社习作展览会小引.md
�


           } catch(FileNotFoundException e) {
                    System.out.println(
                            "FileNotFoundException: " + e);
                } catch(IOException e) {
                    System.out.println("IOException: " + e);
                } catch(Throwable e) {
                    System.out.println("Throwable: " + e);
                }
            }
    }
}
```

输出为：

```
FileNotFoundException: java.io.FileNotFoundException
IOException: java.io.IOException
Throwable: java.lang.RuntimeException: Where am I?
SomeOtherException: SomeOtherException
```

WrapCheckedException.throwRuntimeException() 的代码可以生成不同类型的异常。这些异常被捕获并包装进了 RuntimeException 对象，所以它们成了这些运行时异常的"cause"了。

在 TurnOfChecking 里，可以不用 try 块就调用 throwRuntimeException()，因为它没有抛出“被检查的异常”。但是，当你准备好去捕获异常的时候，还是可以用 try 块来捕获任何你想捕获的异常的。应该捕获 try 块肯定会抛出的异常，这里就是 SomeOtherException，RuntimeException 要放到最后去捕获。然后把 getCause() 的结果（也就是被包装的那个原始异常）抛出来。这样就把原先的那个异常给提取出来了，然后就可以用它们自己的 catch 子句进行处理。

本书余下部分将会在合适的时候使用这种“用 RuntimeException 来包装，被检查的异常”的技术。另一种解决方案是创建自己的 RuntimeException 的子类。在这种方式中，不必捕获它，但是希望得到它的其他代码都可以捕获它。

<!-- Exception Guidelines -->

## 异常指南

应该在下列情况下使用异常：

1. **尽可能使用 try-with-resource。**
2. **在恰当的级别处理问题。（在知道该如何处理的情况下才捕获异常。）**
3. 解决问题并且重新调用产生异常的方法。
4. 进行少许修补，然后绕过异常发生的地方继续执行。
5. 用别的数据进行计算，以代替方法预计会返回的值。
6. 把当前运行环境下能做的事情尽量做完，然后把相同的异常重抛到更高层。
7. 把当前运行环境下能做的事情尽量做完，然后把不同的异常抛到更高层。
8. 终止程序。
9. **进行简化。（如果你的异常模式使问题变得太复杂，那用起来会非常痛苦也很烦人。）**
10. 让类库和程序更安全。（这既是在为调试做短期投资，也是在为程序的健壮性做长期投资。）

<!-- Summary -->

## 本章小结

异常是 Java 程序设计不可分割的一部分，如果不了解如何使用它们，那你只能完成很有限的工作。正因为如此，本书专门在此介绍了异常——对于许多类库（例如提到过的 I/O 库），如果不处理异常，你就无法使用它们。

**异常处理的优点之一就是它使得你可以在某处集中精力处理你要解决的问题，而在另一处处理你编写的这段代码中产生的错误。**尽管异常通常被认为是一种工具，使得你可以在运行时报告错误并从错误中恢复，但是我一直怀疑到底有多少时候“恢复”真正得以实现了，或者能够得以实现。我认为这种情况少于 10%，并且即便是这 10%，也只是将栈展开到某个已知的稳定状态，而并没有实际执行任何种类的恢复性行为。无论这是否正确，我一直相信“**报告”功能是异常的精髓所在.** Java 坚定地强调将所有的错误都以异常�


local Applicator = {}

local Packages = script.Parent.Parent.Parent.Packages
local Fusion = require(Packages.Fusion)
local Utility = require(script.Parent.Parent.Utility)
local New = Fusion.New
local Hydrate = Fusion.Hydrate
local Children = Fusion.Children

local function GetOffsettedSizeAndPositionFromShadow(Shadow)
    local Offset = Shadow.Offset
    local Radius = Shadow.Radius
    local Spread = Shadow.Spread
    local OffsettedSize = Vector2.new(Radius, Radius) + Vector2.new(Spread, Spread)

    return OffsettedSize, Offset
end

function Applicator:ApplyChangesFromData(SelectedInstance : Instance, Data : {[string] : any})
    local Size = Vector2.new(Data.Size.X, Data.Size.Y)
    local Position = Vector2.new(Data.Position.X, Data.Position.Y)

    Utility.CreateUndoMarkerStart()

    for SettingName, SettingValue in Data.Settings do
        SelectedInstance:SetAttribute(`FigmaSetting_{SettingName}`, SettingValue)
    end

    if SelectedInstance:IsA("ScreenGui") then
        SelectedInstance:SetAttribute("FigmaSize", Size)
        SelectedInstance:SetAttribute("FigmaPosition", Position)
        SelectedInstance.Name = Data.Name
        Utility.CreateUndoMarkerEnd()
        return
    end

    local AnchorPoint = Vector2.new(Data.AnchorPoint.X or 0, Data.AnchorPoint.Y or 0)
    local Stroke = Data.Stroke
    local ShadowOffsettedSize, ShadowOffset = GetOffsettedSizeAndPositionFromShadow(Data.Shadow)
    local ShadowOffsetFinal = ShadowOffsettedSize--ShadowOffset / 2 + ShadowOffsettedSize
    local CorrectedSize = Size + Vector2.new(Stroke * 2, Stroke * 2) + ShadowOffsettedSize * 2 + ShadowOffset
    local CorrectedPosition = Position - Vector2.new(Stroke, Stroke) - ShadowOffsetFinal + ShadowOffset / 2
    local FinalSize = CorrectedSize
    local FinalPosition = CorrectedPosition

    SelectedInstance:SetAttribute("FigmaSize", Size)
    SelectedInstance:SetAttribute("FigmaPosition", Position)
    SelectedInstance:SetAttribute("FigmaShadowOffset", ShadowOffset)
    SelectedIns


000F381E, 0),
        MAKE_INST(INST_PABSW            , "pabsw"            , I_MMU_RMI       , O_MM_XMM        , O_MM_XMM_MEM    , 0, 0x000F381D, 0),
        MAKE_INST(INST_PACKSSDW         , "packssdw"         , I_MMU_RMI       , O_MM_XMM        , O_MM_XMM_MEM    , 0, 0x00000F6B, 0),
        MAKE_INST(INST_PACKSSWB         , "packsswb"         , I_MMU_RMI       , O_MM_XMM        , O_MM_XMM_MEM    , 0, 0x00000F63, 0),
        MAKE_INST(INST_PACKUSDW         , "packusdw"         , I_MMU_RMI       , O_XMM           , O_XMM_MEM       , 0, 0x660F382B, 0),
        MAKE_INST(INST_PACKUSWB         , "packuswb"         , I_MMU_RMI       , O_MM_XMM        , O_MM_XMM_MEM    , 0, 0x00000F67, 0),
        MAKE_INST(INST_PADDB            , "paddb"            , I_MMU_RMI       , O_MM_XMM        , O_MM_XMM_MEM    , 0, 0x00000FFC, 0),
        MAKE_INST(INST_PADDD            , "paddd"            , I_MMU_RMI       , O_MM_XMM        , O_MM_XMM_MEM    , 0, 0x00000FFE, 0),
        MAKE_INST(INST_PADDQ            , "paddq"            , I_MMU_RMI       , O_MM_XMM        , O_MM_XMM_MEM    , 0, 0x00000FD4, 0),
        MAKE_INST(INST_PADDSB           , "paddsb"           , I_MMU_RMI       , O_MM_XMM        , O_MM_XMM_MEM    , 0, 0x00000FEC, 0),
        MAKE_INST(INST_PADDSW           , "paddsw"           , I_MMU_RMI       , O_MM_XMM        , O_MM_XMM_MEM    , 0, 0x00000FED, 0),
        MAKE_INST(INST_PADDUSB          , "paddusb"          , I_MMU_RMI       , O_MM_XMM        , O_MM_XMM_MEM    , 0, 0x00000FDC, 0),
        MAKE_INST(INST_PADDUSW          , "paddusw"          , I_MMU_RMI       , O_MM_XMM        , O_MM_XMM_MEM    , 0, 0x00000FDD, 0),
        MAKE_INST(INST_PADDW            , "paddw"            , I_MMU_RMI       , O_MM_XMM        , O_MM_XMM_MEM    , 0, 0x00000FFD, 0),
        MAKE_INST(INST_PALIGNR          , "palignr"          , I_MMU_RM_IMM8   , O_MM_XMM        , O_MM_XMM_MEM    , 0, 0x000F3A0F, 0),
        MAKE_INST(INST_PAND             , "pand"             , I_MMU_RMI       , O_MM_XMM        , O_MM_XMM_MEM    , 0, 0x00000FDB, 0),
        MAKE_INST(INST_PANDN            , "pandn"            , I_MMU_RMI       , O_MM_XMM        , O_MM_XMM_MEM    , 0, 0x00000FDF, 0),
        MAKE_INST(INST_PAUSE            , "pause"            , I_EMIT          , 0               , 0               , 0, 0xF3000090, 0),
        MAKE_INST(INST_PAVGB            , "


3)
            },
            {
                vec2(0.18, 0.162),
                vec2(0.214, 0.162),
            },
            {
                vec2(0.833, 0.186),
                vec2(0.833, 0.282)
            },
            {
                vec2(0.768, 0.161),
                vec2(0.82, 0.161)
            }
        }
    end

    return {}
end

---Gets the random port position.
---@param portBounds vector2[]
---@return vector2
local function getRandomPortPosition(portBounds)
    if not portBounds or #portBounds < 2 then
        error(('[Generic] portBounds not formatted, count: %s'):format(#portBounds))
        return vec2(0)
    end

    local portX = math.random(math.round(portBounds[1].x * 1000, -1), math.round(portBounds[2].x * 1000, -1)) / 1000
    local portY = math.random(math.round(portBounds[1].y * 1000, -1), math.round(portBounds[2].y * 1000, -1)) / 1000

    return vec2(portX, portY)
end

---Gets the port heading.
---@param portPosition vector2
---@return number
local function getPortHeading(portPosition)
    local minX = 0.159
    local maxX = 0.841
    local minY = 0.153
    local maxY = 0.848
    local xBounds = {minX, maxX}
    local yBounds = {minY, maxY}

    table.sort(xBounds, function(a, b)
        local x1 = math.abs(portPosition.x - a)
        local x2 = math.abs(portPosition.x - b)
        return x1 < x2
    end)

    table.sort(yBounds, function(a, b)
        local y1 = math.abs(portPosition.y - a)
        local y2 = math.abs(portPosition.y - b)
        return y1 < y2
    end)

    local closestX = xBounds[1]
    local closestY = yBounds[1]

    if math.abs(portPosition.x - closestX) < math.abs(portPosition.y - closestY) then
        return math.abs(closestX - minX) < math.abs(closestX - maxX) and 0 or 180
    end

    return math.abs(closestY - minY) < math.abs(closestY - maxY) and 90 or 270
end

---Gets the finish port position.
---@param levelNumber integer
---@param startPortPosition vector2
---@return vector2
local function getFinishPortPosition(levelNumber, startPortPosition)
    local potentialPortBounds = getPortPositionBounds(levelNumber)
    local maxDist = 0
    local endPos = vec2(0)
    for i = 1, #potentialPortBounds do
        local potentialPos = vec2(0)
        while potentialPos == vec2(0) do
            potentialPos = getRandomPortPosition(potentialPortBounds[i])
        end

        local startEndDistance = #(startPortPosition - potentialPos)
        if startEndDistance > maxDist then
            maxDist = startEndDistance
            endPos = potentialPos
        end
    end

    return endPos
end

---Gets the start port position
---@param levelNumber integer
---@return vector2
local function getStartPortPosition(levelNumber)
    local potentialPortBounds = getPortPositionBounds(levelNumber)
    if table.type(potentialPortBounds) == 'empty' then return vec2(0) end

    local startPortBounds = potentialPortBounds[math.random(1, #potentialPortBounds)]
    local startPos = vec2(0)
    local attempts = 20
    while startPos == vec2(0) and attempts > 0 do
        startPos = getRandomPortPosition(startPortBounds)
        attempts -= 1
    end

    return startPos
end

---@return vector2[]
function generic:getWinBounds()
    local headingSet = self.finishPortHeading == 0 or self.finish


2954] = "刺背鬥豬",
		[7733] = "旅店老闆菲茲格瑞博",
		[7765] = "羅克比特",
		[7797] = "盧茲魯",
		[4099] = "[Deprecated for 4.x]Galak Marauder",
		[2099] = "處女號的船員",
		[5412] = "古爾達·蠻鬃",
		[1939] = "腐皮蠻卒",
		[7957] = "耶爾卡·月紋",
		[15977] = "毒性誘捕者",
		[8021] = "奧爾文·吉茲米克",
		[16105] = "艾里斯坦·莫塔",
		[2927] = "兇惡梟獸",
		[8117] = "維茲班恩·轟鳴",
		[16297] = "突變的幼蟲",
		[16361] = "指揮官湯瑪斯·海勒瑞",
		[8905] = "戰鬥傀儡",
		[8298] = "『先知』阿庫巴爾",
		[2091] = "納克羅什酋長",
		[2107] = "蓋洛拉斯·塔文斯倫",
		[2123] = "黑暗教士杜斯騰",
		[8554] = "刺鬃酋長",
		[2155] = "哨兵莎依拉·夜風",
		[2171] = "黑木薩滿",
		[2187] = "老年深海蛇頸龍",
		[2203] = "灰霧先知",
		[10469] = "通靈學院專家",
		[2235] = "暗礁蟹",
		[2251] = "巨型雪人",
		[2267] = "希爾斯布萊德農民",
		[2283] = "鴉爪攝政者",
		[2299] = "博古斯·粗臂",
		[9258] = "裂盾劫掠者",
		[2331] = "派格·查迪斯",
		[2347] = "野生獅鷲獸",
		[2363] = "學徒哈尼維爾",
		[2379] = "管理員斯密瑟斯",
		[2395] = "溫娜·韋恩",
		[2411] = "瑞克特爾",
		[9706] = "尤爾巴·斯庫比格特",
		[9562] = "赫林迪斯·河角",
		[2459] = "摩塔莫爾·蒙泰古",
		[13137] = "魯格巴中尉",
		[2491] = "威士忌·狡黠",
		[2507] = "巡山人尤薩恩",
		[10090] = "貝莉亞·雷岩",
		[15165] = "傲慢的店主",
		[2555] = "枯木巫醫",
		[2571] = "石拳領主",
		[2587] = "辛


          'last_page',
                   'go_to',
                   'refresh_archive',
                   'next_archive',
                   'previous_archive',
                   'next_directory',
                   'previous_directory',
                   'keep_transformation',
                   'enhance_image')

        comment = ('comments',)

        general_sensitive = False
        comment_sensitive = False

        if self._window.filehandler.file_loaded:
            general_sensitive = True

            if self._window.filehandler.get_number_of_comments():
                comment_sensitive = True

        for name in general:
            self._actiongroup.get_action(name).set_sensitive(general_sensitive)

        for name in comment:
            self._actiongroup.get_action(name).set_sensitive(comment_sensitive)

        self.bookmarks.set_sensitive(general_sensitive)
        self.bookmarks_popup.set_sensitive(general_sensitive)

# vim: expandtab:sw=4:ts=4


 *     _setNativeRef = setAndForwardRef({
 *       getForwardedRef: () => this.props.forwardedRef,
 *       setLocalRef: ref => {
 *         this._nativeRef = ref;
 *       },
 *     });
 *
 *     render() {
 *       return <View ref={this._setNativeRef} />;
 *     }
 *   }
 *
 *   const MyViewWithRef = React.forwardRef((props, ref) => (
 *     <MyView {...props} forwardedRef={ref} />
 *   ));
 *
 *   module.exports = MyViewWithRef;
 ]]

local function setAndForwardRef(ref_: Args): (ref: ElementRef<any>) -> ()
	local getForwardedRef, setLocalRef = ref_.getForwardedRef, ref_.setLocalRef
	return function(ref: ElementRef<any>)
		local forwardedRef = getForwardedRef()
		setLocalRef(ref)

		-- Forward to user ref prop (if one has been specified)
		if typeof(forwardedRef) == "function" then
			-- Handle function-based refs. String-based refs are handled as functions.
			forwardedRef(ref)
		elseif typeof(forwardedRef) == "table" then
			-- Handle createRef-based refs
			forwardedRef.current = ref
		end
	end
end

return setAndForwardRef


 Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA  02110-1301  USA
 */

package org.jdmp.stanfordpos;

import edu.stanford.nlp.ling.CoreLabel;
import org.ujmp.core.listmatrix.AbstractListMatrix;
import org.ujmp.core.listmatrix.DefaultListMatrix;
import org.ujmp.core.mapmatrix.MapMatrix;

import java.util.List;

public class CoreLabelListMatrix extends AbstractListMatrix<MapMatrix<String, String>> {
    private static final long serialVersionUID = 5210805150750331628L;

    private final List<CoreLabelMapMatrix> list = new DefaultListMatrix<CoreLabelMapMatrix>();

    public CoreLabelListMatrix(List<CoreLabel> data) {
        for (CoreLabel l : data) {
            list.add(new CoreLabelMapMatrix(l));
        }
    }

    @Override
    public MapMatrix<String, String> get(int i) {
        return list.get(i);
    }

    @Override
    protected boolean addToList(MapMatrix<String, String> stringStringMapMatrix) {
        throw new RuntimeException("not implemented");
    }

    @Override
    protected void addToList(int i, MapMatrix<String, String> stringStringMapMatrix) {
        throw new RuntimeException("not implemented");
    }

    @Override
    protected MapMatrix<String, String> removeFromList(int i) {
        throw new RuntimeException("not implemented");
    }

    @Override
    protected boolean removeFromList(Object o) {
        throw new RuntimeException("not implemented");
    }

    @Override
    protected MapMatrix<String, String> setToList(int i, MapMatrix<String, String> stringStringMapMatrix) {
        throw new RuntimeException("not implemented");
    }

    @Override
    protected void clearList() {
        throw new RuntimeException("not implemented");
    }

    @Override
    public int size() {
        return list.size();
    }
}
/*
 * Copyright (C) 2008-2015 by Holger Arndt
 *
 * This file is part of the Java Data Mining Package (JDMP).
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership and licensing.
 *
 * JDMP is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * JDMP is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with JDMP; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA  02110-1301  USA
 */

package org.jdmp.weka;

import org.ujmp.core.util.AbstractPlugin;

public class Plugin extends AbstractPlugin {

	public Plugin() {
		super("Plugin to incorporate classification and clustering algorithms from Weka");
		dependencies.add("ujmp-core");
		dependencies.add("jdmp-core");
		dependencies.add("weka.jar");
		neededClasses.add("weka.classifiers.Classifier");
	}

}
/*
 * Copyright (C) 2008-2015 by Holger Arndt
 *
 * This file is part of the Java Data Mining Package (JDMP).
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership and licensing.
 *
 * JDMP is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by th


ForgeAnnotations()
                this += TransformNeoForgeEnvironment()
            }
        ) {
            override val titledId: String
                get() = "NeoForge"
        }

        fun applyNeoForgeForgeLikeDev(loom: LoomInterface, transform: Transform): List<TransformerPair> {
            val properties = mutableMapOf<String, Any>()
            properties[BuiltinProperties.NEOFORGE_LIKE_REMAPS] = transform.extraForgeLikeToNeoForgeRemaps
            return listOf(TransformerPair(TransformForgeLikeToNeoForge::class.java, Gson().toJsonTree(properties).asJsonObject))
        }

        fun applyNeoForgeForgeLikeProd(loom: LoomInterface, settings: ArchitectPluginExtension.CommonSettings): ClassEditTransformer {
            val properties = mutableMapOf<String, Any>()
            properties[BuiltinProperties.NEOFORGE_LIKE_REMAPS] = settings.extraForgeLikeToNeoForgeRemaps
            val transform = TransformForgeLikeToNeoForge()
            transform.supplyProperties(Gson().toJsonTree(properties).asJsonObject)
            return transform
        }

        val QUILT = ModLoader(
            id = "quilt",
            transformDevelopment = {
                val transform = this
                this += RuntimeMixinRefmapDetector::class.java
                this += GenerateFakeQuiltMod::class.java
                add(TransformExpectPlatform::class.java) { file ->
                    this[BuiltinProperties.UNIQUE_IDENTIFIER] = projectGeneratedPackage(project, file)
                    if (transform.platformPackage != null) {
                        this[BuiltinProperties.PLATFORM_PACKAGE] = transform.platformPackage!!
                    }
                }
                add(RemapInjectables::class.java) { file ->
                    this[BuiltinProperties.UNIQUE_IDENTIFIER] = projectGeneratedPackage(project, file)
                }
                this += TransformPlatformOnly::class.java
                envAnnotationProvider = "org.quiltmc:quilt-loader:+"
            },
            transformProduction = { _, settings ->
                this += RemapMixinVariables()
                add(TransformExpectPlatform()) { file ->
                    this[BuiltinProperties.UNIQUE_IDENTIFIER] = projectGeneratedPackage(project, file)
                    settings.platformPackages[valueOf("quilt")]?.let { platformPackage ->
                        this[BuiltinProperties.PLATFORM_PACKAGE] = platformPackage
                    }
                }
                add(RemapInjectables()) { file ->
                    this[BuiltinProperties.UNIQUE_IDENTIFIER] = projectGeneratedPackage(project, file)
                }
                this += AddRefmapName()
                this += TransformPlatformOnly()
            }
        )
    }
}plugins {
    `java-library`
    `java-test-fixtures`
}

repositories {
    mavenCentral()
    maven("https://central.sonatype.com/repository/maven-snapshots/")
    maven("https://repo.aikar.co/content/groups/aikar/")
    maven("https://www.jitpack.io")
}

dependencies {
    api(project(":api"))
    api("net.kyori:adventure-api:4.17.0")
    api("co.aikar:acf-core:0.5.1-SNAPSHOT")
    api("net.kyori:adventure-text-serializer-legacy:4.17.0")
    api("dev.aurelium:polyglot:1.2.4")
    api("com.ezylang:EvalEx:3.3.0")
    api("org.spongepowered:configurate-yaml:4.2.0")
    implementation("com.zaxxer:HikariCP:5.1.0") {
        exclude("org.slf4j", "slf4j-api"


,	0,	1.0,	1.0);
	End_Tri_Strip();

	Set_Dirty();
}

RenderObjClass * Bitmap2DObjClass::Clone(void) const
{
	return NEW_REF( Bitmap2DObjClass, (*this));
}
//
// Copyright 2020 Electronic Arts Inc.
//
// TiberianDawn.DLL and RedAlert.dll and corresponding source code is free
// software: you can redistribute it and/or modify it under the terms of
// the GNU General Public License as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.

// TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed
// in the hope that it will be useful, but with permitted additional restrictions
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
// distributed with this program. You should have received a copy of the
// GNU General Public License along with permitted additional restrictions
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection

/* $Header: g:/library/source/rcs/./dipthong.c 1.15 1994/05/20 15:35:17 joe_bostic Exp $ */
/***************************************************************************
 **   C O N F I D E N T I A L --- W E S T W O O D   A S S O C I A T E S   **
 ***************************************************************************
 *                                                                         *
 *                 Project Name : Westwood Library                         *
 *                                                                         *
 *                    File Name : DIPTHONG.C                               *
 *                                                                         *
 *                   Programmer : Joe L. Bostic                            *
 *                                                                         *
 *                   Start Date : February 23, 1992                        *
 *                                                                         *
 *                  Last Update : February 13, 1995 [BWG]                  *
 *                                                                         *
 * DIGRAM or DIATOMIC encoding is the correct term for this method.        *
 * This is a fixed dictionary digram encoding optimized for English text.  *
 *                                                                         *
 *-------------------------------------------------------------------------*
 * Functions:                                                              *
 *   Extract_String -- Extracts a string pointer from a string data block. *
 *   UnDip_Text -- Undipthongs a text string into specified buffer.        *
 *   Dip_Text -- Compresses text by using dipthonging.                     *
 *   Fixup_Text -- Converts dipthonged foreign text into normal text.      *
 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

//#include	"function.h"
//#include	"ems.h"
#include <keyboard.h>
#include "dipthong.h"

/***************************************************************************
 * Fixup_Text -- Converts dipthonged foreign text into normal text.        *
 *                                                                         *
 *    Takes text that has been processed (or undipped) to hold foriegn     *
 *    language character pairs (needed for Window_Print) and converts it   *
 *    so that Text_Print will print it


external
            "built_in"
        ensure
            tagged_out_not_void: Result /= Void
        end

    print (o: detachable ANY)
            -- Write terse external representation of `o'
            -- on standard output.
        do
            if o /= Void then
                io.put_string (o.out)
            end
        end

feature -- Platform

    Operating_environment: OPERATING_ENVIRONMENT
            -- Objects available from the operating system
        once
            create Result
        ensure
            operating_environment_not_void: Result /= Void
        end

feature {NONE} -- Initialization

    default_create
            -- Process instances of classes with no creation clause.
            -- (Default: do nothing.)
        do
        end

feature -- Basic operations

    default_rescue
            -- Process exception for routines with no Rescue clause.
            -- (Default: do nothing.)
        do
        end

    frozen do_nothing
            -- Execute a null action.
        do
        end

    frozen default: detachable like Current
            -- Default value of object's type
        do
        end

    frozen default_pointer: POINTER
            -- Default value of type `POINTER'
            -- (Avoid the need to write `p'.`default' for
            -- some `p' of type `POINTER'.)
        do
        ensure
            -- Result = Result.default
        end

    frozen as_attached: attached like Current
            -- Attached version of Current
            -- (Can be used during transitional period to convert
            -- non-void-safe classes to void-safe ones.)
        do
            Result := Current
        end

invariant
    reflexive_equality: standard_is_equal (Current)
    reflexive_conformance: conforms_to (Current)

note
    copyright: "Copyright (c) 1984-2012, Eiffel Software and others"
    license:   "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
    source: "[
            Eiffel Software
            5949 Hollister Ave., Goleta, CA 93117 USA
            Telephone 805-685-1006, Fax 805-685-6869
            Website http://www.eiffel.com
            Customer support http://support.eiffel.com
        ]"

end

</textarea></form>

MIME types defined: text/x-eiffel.

 Created by YNH.

<!doctype html>

<title>CodeMirror: mIRC mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">

<link rel="stylesheet" href="../../lib/codemirror.css">
<link rel="stylesheet" href="../../theme/twilight.css">


Modrinth announcement title has not been set correctly")
    }

    @SetEnvironmentVariable(key = "MODRINTH_TOKEN", value = "a-test-token-123.123")
    @SetEnvironmentVariable(key = "MODRINTH_ID", value = "an-even-better-test-id-456.456")
    @Test
    fun `modrinth publishing can be configured for a multi-loader project`() {
        gradleTest.setStonecutterVersion("1.21.4", "fabric", "forge")
        gradleTest.setStonecutterVersion("1.21", "neoforge")
        gradleTest.setModProperty("mod.version", "3.4.5")

        val br = gradleTest.run("publishingSettings")

        val versionCount1 = Regex(Regex.escape("modrinth.minecraftVersions=[1.21.4]")).findAll(br.output).count()
        val versionCount2 = Regex(Regex.escape("modrinth.minecraftVersions=[1.21]")).findAll(br.output).count()
        val versionCount3 = Regex(Regex.escape("modrinth.accessToken=a-test-token-123.123")).findAll(br.output).count()
        val versionCount4 = Regex(Regex.escape("modrinth.projectId=an-even-better-test-id-456.456")).findAll(br.output).count()

        assertEquals(2, versionCount1, "Modrinth minecraft versions have not been set correctly for 1.21.4")
        assertEquals(1, versionCount2, "Modrinth minecraft versions have not been set correctly for 1.21")
        assertEquals(3, versionCount3, "Modrinth access token has not been set correctly for all versions")
        assertEquals(3, versionCount4, "Modrinth project ID has not been set correctly for all versions")

        assertTrue(br.output.contains("modrinth.announcementTitle=Download 3.4.5+fabric-1.21.4 from Modrinth"), "Modrinth announcement title has not been set correctly for 1.21.4 Fabric")
        assertTrue(br.output.contains("modrinth.announcementTitle=Download 3.4.5+forge-1.21.4 from Modrinth"), "Modrinth announcement title has not been set correctly for 1.21.4 Forge")
        assertTrue(br.output.contains("modrinth.announcementTitle=Download 3.4.5+neoforge-1.21 from Modrinth"), "Modrinth announcement title has not been set correctly for 1.21 Neoforge")
    }

    @SetEnvironmentVariable(key = "CURSEFORGE_SLUG", value = "a-test-slug-123")
    @SetEnvironmentVariable(key = "CURSEFORGE_ID", value = "an-even-better-test-id-456")
    @SetEnvironmentVariable(key = "CURSEFORGE_TOKEN", value = "a-test-token-123")
    @Test
    fun `curseforge publishing can be configured for a single project`() {
        gradleTest.setStonecutterVersion("1.21.4", "fabric")
        gradleTest.setModProperty("mod.version", "0.1.2")

        val br = gradleTest.run("publishingSettings")

        assertTrue(br.output.contains("curseforge.projectSlug=a-test-slug-123"), "CurseForge project slug has not been set correctly")
        assertTrue(br.output.contains("curseforge.projectId=an-even-better-test-id-456"), "CurseForge project ID has not been set correctly")
        assertTrue(br.output.contains("curseforge.accessToken=a-test-token-123"), "CurseForge access token has not been set correctly")
        assertTrue(br.output.contains("curseforge.minecraftVersions=[1.21.4]"), "CurseForge minecraft versions have not been set correctly")
        assertTrue(br.output.contains("curseforge.announcementTitle=Download 0.1.2+fabric-1.21.4 from CurseForge"), "CurseForge announcement title has not been set correctly")
    }

    @SetEnvironmentVariable


 (string, bool, error) {
	directory, fileName := filepath.Split(zipFilePath)

	if !strings.EqualFold(fileName, ".version") {
		if strings.TrimSpace(fileName) == "" || strings.HasPrefix(fileName, ".") || strings.EqualFold(fileName, "README.md") {
			return "", true, nil
		}
	}

	var (
		directoryPathChunks                 []string
		relativeDirectoryPathWithoutZipRoot string
	)
	if folderutil.IsUnixOS() {
		directoryPathChunks = strings.Split(directory, string(os.PathSeparator))
	} else if folderutil.IsWindowsOS() {
		pathInfo, _ := folderutil.NewPathInfo(directory)
		directoryPathChunks = pathInfo.Parts
	}
	relativeDirectoryPathWithoutZipRoot = filepath.Join(directoryPathChunks[1:]...)

	if strings.HasPrefix(relativeDirectoryPathWithoutZipRoot, ".") {
		return "", true, nil
	}

	templateDirectory := filepath.Join(configuredTemplateDirectory, relativeDirectoryPathWithoutZipRoot)

	if err := os.MkdirAll(templateDirectory, os.ModePerm); err != nil {
		return "", false, fmt.Errorf("failed to create template folder: %s. %w", templateDirectory, err)
	}

	return filepath.Join(templateDirectory, fileName), false, nil
}

// GetpdtmParams returns encoded query parameters sent to update check endpoint
func GetpdtmParams(version string) string {
	params := &url.Values{}
	params.Add("os", runtime.GOOS)
	params.Add("arch", runtime.GOARCH)
	params.Add("go_version", runtime.Version())
	params.Add("v", version)
	params.Add("machine_id", buildMachineId())
	return params.Encode()
}

func buildMachineId() string {
	machineId, err := machineid.ProtectedID("pdtm")
	if err != nil {
		return "unknown"
	}
	return machineId
}

func init() {
	DefaultHttpClient = &http.Client{
		Timeout: VersionCheckTimeout,
		Transport: &http.Transport{
			Proxy:           http.ProxyFromEnvironment,
			TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
		},
	}
}
package core

import (
	"log"
	"dataMiner/utils"
	"dataMiner/dblib"
	"dataMiner/models"
	"golang.org/x/net/proxy"
	"github.com/gookit/color"
)

/*
  Load the tnsnamse.ora file and get the available database address in this file
  @Param proxyConn (socks5 proxy dialer)
  @Param info (the information user inputs)
  @Return string type (available database address)
*/
func TNSAddressConnect(info *models.InitData,proxyConn *proxy.Dialer)string{
	// use tnsnames.ora to connect oracle database
	var connStrFinal string
	tnsEntries,err := utils.LoadTNS(info.TNSFile)
	if err != nil {
		log.Fatalf("err: %v\n", err)
	}
	for _,v:=range tnsEntries{
		if v.Service==""||len(v.Servers)==0{
			continue
		}
		for _,j:=range v.Servers {
			connStr := "oracle://" + info.DatabaseUser + ":" + info.DatabasePassword + "@" + j.Host + ":" + j.Port + "/" + v.Service
			color.Infoln("[*] Trying "+info.DatabaseUser+":"+info.DatabasePassword+"@"+j.Host+":"+j.Port+"/"+v.Service, " to connect oracle database ...")
			// use socks5 proxy to connect database
			if proxyConn != nil {
				connection, err := ProxyConnectNoExit(j.Host + ":" + j.Port)
				if err != nil {
					log.Println(err)
					con


ast byte it always included in the
	 * hash which is a good default as changing parts of the string are
	 * more often in the suffix than in the prefix.
	 */

	hash = heap->hash_seed ^ ((duk_uint32_t) len);  /* Bernstein hash init value is normally 5381 */
	step = (len >> DUK_USE_STRHASH_SKIP_SHIFT) + 1;
	for (off = len; off >= step; off -= step) {
		DUK_ASSERT(off >= 1);  /* off >= step, and step >= 1 */
		hash = (hash * 33) + str[off - 1];
	}

#if defined(DUK_USE_STRHASH16)
	/* Truncate to 16 bits here, so that a computed hash can be compared
	 * against a hash stored in a 16-bit field.
	 */
	hash &= 0x0000ffffUL;
#endif
	return hash;
}
#endif  /* DUK_USE_STRHASH_DENSE */

/* automatic undefs */
#undef DUK__STRHASH_BLOCKSIZE
#undef DUK__STRHASH_MEDIUMSTRING
#undef DUK__STRHASH_SHORTSTRING
#line 1 "duk_heap_markandsweep.c"
/*
 *  Mark-and-sweep garbage collection.
 */

/* #include duk_internal.h -> already included */

DUK_LOCAL_DECL void duk__mark_heaphdr(duk_heap *heap, duk_heaphdr *h);
DUK_LOCAL_DECL void duk__mark_heaphdr_nonnull(duk_heap *heap, duk_heaphdr *h);
DUK_LOCAL_DECL void duk__mark_tval(duk_heap *heap, duk_tval *tv);
DUK_LOCAL_DECL void duk__mark_tvals(duk_heap *heap, duk_tval *tv, duk_idx_t count);

/*
 *  Marking functions for heap types: mark children recursively.
 */

DUK_LOCAL void duk__mark_hstring(duk_heap *heap, duk_hstring *h) {
	DUK_UNREF(heap);
	DUK_UNREF(h);

	DUK_DDD(DUK_DDDPRINT("duk__mark_hstring: %p", (void *) h));
	DUK_ASSERT(h);

	/* nothing to process */
}

DUK_LOCAL void duk__mark_hobject(duk_heap *heap, duk_hobject *h) {
	duk_uint_fast32_t i;

	DUK_DDD(DUK_DDDPRINT("duk__mark_hobject: %p", (void *) h));

	DUK_ASSERT(h);

	/* XXX: use advancing pointers instead of index macros -> faster and smaller? */

	for (i = 0; i < (duk_uint_fast32_t) DUK_HOBJECT_GET_ENEXT(h); i++) {
		duk_hstring *key = DUK_HOBJECT_E_GET_KEY(heap, h, i);
		if (key == NULL) {
			continue;
		}
		duk__mark_heaphdr_nonnull(heap, (duk_heaphdr *) key);
		if (DUK_HOBJECT_E_SLOT_IS_ACCESSOR(heap, h, i)) {
			duk__mark_heaphdr(heap, (duk_heaphdr *) DUK_HOBJECT_E_GET_VALUE_PTR(heap, h, i)->a.get);
			duk__mark_heaphdr(heap, (duk_heaphdr *) DUK_HOBJECT_E_GET_VALUE_PTR(heap, h, i)->a.set);
		} else {
			duk__mark_tval(heap, &DUK_HOBJECT_E_GET_VALUE_PTR(heap, h, i)->v);
		}
	}

	for (i = 0; i < (duk_uint_fast32_t) DUK_HOBJECT_GET_ASIZE(h); i++) {
		duk__mark_tval(heap, DUK_HOBJECT_A_GET_VALUE_PTR(heap, h, i));
	}

	/* Hash part is a 'weak reference' and does not contribute. */

	duk__mark_heaphdr(heap, (duk_heaphdr *) DUK_HOBJECT_GET


365, "name": "WriteStringMaybeAliased(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)"}, {"value": 4, "name": "kMessageSetItemStartTag"}, {"value": 8, "name": "kMessageSetItemTagsSize"}, {"value": 428, "name": "WriteMessageMaybeToArray(int, google::protobuf::MessageLite const&, google::protobuf::io::CodedOutputStream*)"}, {"value": 246, "name": "ReadPackedEnumPreserveUnknowns(google::protobuf::io::CodedInputStream*, int, bool (*)(int), google::protobuf::io::CodedOutputStream*, google::protobuf::RepeatedField<int>*)"}, {"value": 23, "name": "MakeTag(int, google::protobuf::internal::WireFormatLite::WireType)"}, {"value": 102, "name": "EnumSize(google::protobuf::RepeatedField<int> const&)"}, {"value": 25, "name": "EnumSize(int)"}, {"value": 58, "name": "WriteTag(int, google::protobuf::internal::WireFormatLite::WireType, google::protobuf::io::CodedOutputStream*)"}, {"value": 102, "name": "Int32Size(google::protobuf::RepeatedField<int> const&)"}, {"value": 25, "name": "Int32Size(int)"}, {"value": 546, "name": "ReadBytes(google::protobuf::io::CodedInputStream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)"}, {"value": 721, "name": "ReadBytes(google::protobuf::io::CodedInputStream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >**)"}, {"value": 396, "name": "SkipField(google::protobuf::io::CodedInputStream*, unsigned int)"}, {"value": 666, "name": "SkipField(google::protobuf::io::CodedInputStream*, unsigned int, google::protobuf::io::CodedOutputStream*)"}, {"value": 60, "name": "WriteBool(int, bool, google::protobuf::io::CodedOutputStream*)"}, {"value": 52, "name": "WriteEnum(int, int, google::protobuf::io::CodedOutputStream*)"}], "name": "WireFormatLite::"}, {"value": 36, "name": "InitEmptyString()"}, {"value": 1073, "name": "UTF8GenericScan(google::protobuf::internal::UTF8StateMachineObj const*, char const*, int, int*)"}, {"children": [{"value": 79, "name": "Run()"}, {"value": 82, "name": "FunctionClosure0(void (*)(), bool)"}, {"value": 131, "name": "~FunctionClosure0()"}], "name": "FunctionClosure0::"}, {"value": 155, "name": "DefaultLogHandler(google::protobuf::LogLevel, char const*, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)"}, {"value": 21, "name": "DeleteEmptyString()"}, {"children": [{"value": 15, "name": "NewFromPrototype(cockroach::roachpb::ReplicaIdent const*, google::protobuf::Arena*)"}, {"value": 14, "name": "Merge(cockroach::roachpb::ReplicaIdent const&, cockroach::roachpb::ReplicaIdent*)"}], "name": "GenericTypeHandler<cockroach::roachpb::ReplicaIdent>::"}, {"children": [{"value": 15, "name": "NewFromPrototype(cockroach::roachpb::ObservedTimestamp const*, google::protobuf::Arena*)"}, {"value": 14, "name": "Merge(cockroach::roachpb::ObservedTimestamp const&, cockroach::roachpb::ObservedTimestamp*)"}], "name": "GenericTypeHandler<cockroach::roachpb::ObservedTimestamp>::"}, {"children": [{"value": 15, "name": "NewFromPrototype(cockroach::roachpb::ReplicaDescriptor const*, google::protobuf::Arena*)"}, {"value": 14, "name": "Merge(cockroach::roachpb::Re


A> for u8 {
    #[inline(always)]
    fn from(variant: CLKOUTSEL_A) -> Self {
        variant as _
    }
}
#[doc = "Reader of field `CLKOUTSEL`"]
pub type CLKOUTSEL_R = crate::R<u8, CLKOUTSEL_A>;
impl CLKOUTSEL_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, CLKOUTSEL_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(CLKOUTSEL_A::_0000),
            1 => Val(CLKOUTSEL_A::_0001),
            2 => Val(CLKOUTSEL_A::_0010),
            3 => Val(CLKOUTSEL_A::_0011),
            6 => Val(CLKOUTSEL_A::_0110),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `_0000`"]
    #[inline(always)]
    pub fn is_0000(&self) -> bool {
        *self == CLKOUTSEL_A::_0000
    }
    #[doc = "Checks if the value of the field is `_0001`"]
    #[inline(always)]
    pub fn is_0001(&self) -> bool {
        *self == CLKOUTSEL_A::_0001
    }
    #[doc = "Checks if the value of the field is `_0010`"]
    #[inline(always)]
    pub fn is_0010(&self) -> bool {
        *self == CLKOUTSEL_A::_0010
    }
    #[doc = "Checks if the value of the field is `_0011`"]
    #[inline(always)]
    pub fn is_0011(&self) -> bool {
        *self == CLKOUTSEL_A::_0011
    }
    #[doc = "Checks if the value of the field is `_0110`"]
    #[inline(always)]
    pub fn is_0110(&self) -> bool {
        *self == CLKOUTSEL_A::_0110
    }
}
#[doc = "Write proxy for field `CLKOUTSEL`"]
pub struct CLKOUTSEL_W<'a> {
    w: &'a mut W,
}
impl<'a> CLKOUTSEL_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: CLKOUTSEL_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "SCG SLOW Clock"]
    #[inline(always)]
    pub fn _0000(self) -> &'a mut W {
        self.variant(CLKOUTSEL_A::_0000)
    }
    #[doc = "System OSC (SOSC_CLK)"]
    #[inline(always)]
    pub fn _0001(self) -> &'a mut W {
        self.variant(CLKOUTSEL_A::_0001)
    }
    #[doc = "Slow IRC (SIRC_CLK)"]
    #[inline(always)]
    pub fn _0010(self) -> &'a mut W {
        self.variant(CLKOUTSEL_A::_0010)
    }
    #[doc = "Fast IRC (FIRC_CLK)"]
    #[inline(always)]
    pub fn _0011(self) -> &'a mut W {
        self.variant(CLKOUTSEL_A::_0011)
    }
    #[doc = "System PLL (SPLL_CLK)"]
    #[inline(always)]
    pub fn _0110(self) -> &'a mut W {
        self.variant(CLKOUTSEL_A::_0110)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x0f << 24)) | (((value as u32) & 0x0f) << 24);
        self.w
    }
}
impl R {
    #[doc = "Bits


s.animalName = null};
    if (this.animalSpecie == '') {this.animalSpecie = null};
    // If any parameter is null thens we tell in the UI that 'ONE OR MORE PARAMETERS IS MISSING' (this.missingParameters => show())
    if (this.animalName == null || this.animalSpecie == null || this.animalAge == null) {
      this.missingParameters = '';
      this.missingNumberParameters = this.animalCreatedSucess = 'none';
    }
    // If the user doesn't provide a Number for the animalAge Parameter (this.missingNumberParameters => show())
    if (isNaN(this.animalAge)) {
      this.animalAge = null;
      this.missingNumberParameters = '';
      this.animalCreatedSucess = 'none';
    }
     // If the user doesn't provide a Number for the animalPrice Parameter (this.missingNumberParameters => show())
     if (isNaN(this.animalPrice)) {
      this.animalPrice = null;
      this.missingNumberParameters = '';
      this.animalCreatedSucess = 'none';
    }
    // If the user doesn't provide animalDescription or animalImage the system provides both by default
    if (this.animalDescription == null || this.animalDescription == '') {
      this.animalDescription = "No Description is available for this animal.";
    }
    if (this.animalImage == null || this.animalImage == '') {
      this.animalImage = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSIKHDuxy1qrI0duPY4vRpy5aJZniYuq7SHGthof-SzT38CVexCcw&s";
    }
  }

  createNewAnimal() {
    this.ngModelValidation();
    // If the User provides the correct parameters then a New Animal is created.
    if (this.animalName != null && this.animalSpecie != null && !isNaN(this.animalAge) && !isNaN(this.animalPrice) && this.animalAge !== null && this.animalPrice !== null){
      this.animalService.newAnimal(new Animal(null, this.animalName, this.animalSpecie, this.animalAge, this.animalImage, this.animalPrice, sessionStorage.getItem('username'), this.animalDescription))
      .subscribe(x => console.log(x));
      this.missingNumberParameters = this.missingParameters = 'none';
      this.animalCreatedSucess = '';
      window.scrollTo(0, 0);

    }
  }
  }
/*!
 * XML-Query
 * Copyright (c) 2016 Pedro Ladaria
 * https://github.com/pladaria/xml-query
 * MIT Licensed
 */
const flatMap = (arr: any[], fn: (v: any, i: number, a: any[]) => any) =>
    Array.prototype.concat.apply([], arr.map(fn));

const xmlQuery = (ast: xmlQuery.XmlNode | xmlQuery.XmlNode[]) => {

    const nodes = Array.isArray(ast) ? ast : (ast ? [ast] : []);
    const length = nodes.length;

    /**
     * Retrieve one of the elements
     */
    const get = (index: number) => nodes[index];

    /**
     * Returns a new xmlQuery object containing the children of the top level elements
     */
    const children = () =>
        xmlQuery(flatMap(nodes, (node) => node.children));

    /**
     * Recursively find by name starting in the provided node
     */
    const findInNode = (node: xmlQuery.XmlNode, sel: string) => {
        const res = (node.name === sel) ? [node] : [];
        return res.concat(flatMap(node.children, (node) => findInNode(node, sel)));
    };

    /**
     * Find by name. Including top level nodes and all its children.
     */
    const find = (sel: string) =>
        xmlQuery(flatMap(nodes, (node) => findInNode(node, sel)));

    /**
     * Returns true if it has the given element


，空间定位能力较弱。

## FCN模型优势

FCN模型相比传统分类网络具有以下优势：

1. **像素级分类**：可生成精确的分割图，识别病害的精确位置和范围
2. **空间信息保留**：通过跳跃连接保留多尺度特征，增强感染区域识别能力
3. **注意力引导**：通过注意力机制自动关注重要区域，减少背景干扰
4. **更好的可解释性**：生成的分割图和注意力图提供了可视化解释
5. **性能提升**：在维持计算效率的同时提高分类准确率和等级预测精度

## 后续优化方向

1. **多光谱信息利用**：更有效地利用多光谱数据的丰富信息
2. **模型轻量化**：压缩模型大小，提高推理速度，适应边缘设备
3. **预训练策略**：探索在相似任务上的预训练，提高迁移学习效果
4. **自监督学习**：利用未标注数据提高模型泛化能力
5. **模型集成**：尝试多模型集成方法，提高预测稳定性好的！下面给你一份**从 0 到 1 的可落地实现步骤**（工程视角），按层分解，并给出阶段目标、模块清单、数据结构、算法选择、评测与里程碑。遵循你的偏好：**给方案不贴实现代码**，但足够细到“照着做就能落地”。

---

# 一、总架构与最小可行系统（MVP）

## 目标

先做一个能“活、能记、能想、能用工具、能自省”的**单体智能体**，再演进到多智能体协作与自我层。

## 核心循环（Agent Loop）

1. 观察（Perceive）→
2. 检索记忆（Retrieve）→
3. 规划（Plan）→
4. 执行动作/工具（Act/Tool）→
5. 反馈评估（Evaluate/Reward）→
6. 反思与更新（Reflect/Learn）→ 回到 1)

## MVP 成功标准

* 能持续运行（有看门狗与资源自检）
* 能把上下文与知识“记住并复用”（短期+长期记忆）
* 能使用至少 2 个外部工具完成任务（如网页检索/文件读写）
* 有内在奖励（好奇/新奇性）与基本风险控制（拒绝危险指令）
* 能输出可解释的行动计划与反思日志

---

# 二、分层实现步骤

## A. 本能层（Instinct Layer）

### A1. 生


 ) ) + half_dt_ov_dz * ( ( *Ey3Drel )( i, j, k ) - ( *Ey3Drel )( i, j, k-1 ) );
                // sum to the fields on grid
                ( *Bx3D )( i, j, k ) += ( *Bx_rel_t_plus_halfdt )( i, j, k );
                ( *Bx3D0 )( i, j, k ) += ( *Bx_rel_t_minus_halfdt )( i, j, k );
            }
        }
    }

    // Magnetic field By^(d,p,d)
    for( unsigned int i=1 ; i<nx_d-1 ; i++ ) {
        for( unsigned int j=0 ; j<ny_p ; j++ ) {
            for( unsigned int k=1 ; k<nz_d-1 ; k++ ) {
                // forward advance by dt/2
                ( *By_rel_t_plus_halfdt )( i, j, k ) += -half_dt_ov_dz * ( ( *Ex3Drel )( i, j, k ) - ( *Ex3Drel )( i, j, k-1 ) ) + half_dt_ov_dx * ( ( *Ez3Drel )( i, j, k ) - ( *Ez3Drel )( i-1, j, k ) );
                // backward advance by dt/2
                ( *By_rel_t_minus_halfdt )( i, j, k ) -= -half_dt_ov_dz * ( ( *Ex3Drel )( i, j, k ) - ( *Ex3Drel )( i, j, k-1 ) ) + half_dt_ov_dx * ( ( *Ez3Drel )( i, j, k ) - ( *Ez3Drel )( i-1, j, k ) );
                // sum to the fields on grid
                ( *By3D )( i, j, k ) += ( *By_rel_t_plus_halfdt )( i, j, k );
                ( *By3D0 )( i, j, k ) += ( *By_rel_t_minus_halfdt )( i, j, k );
            }
        }
    }

    // Magnetic field Bz^(d,d,p)
    for( unsigned int i=1 ; i<nx_d-1 ; i++ ) {
        for( unsigned int j=1 ; j<ny_d-1 ; j++ ) {
            for( unsigned int k=0 ; k<nz_p ; k++ ) {
                // forward advance by dt/2
                ( *Bz_rel_t_plus_halfdt )( i, j, k ) += -half_dt_ov_dx * ( ( *Ey3Drel )( i, j, k ) - ( *Ey3Drel )( i-1, j, k ) ) + half_dt_ov_dy * ( ( *Ex3Drel )( i, j, k ) - ( *Ex3Drel )( i, j-1, k ) );
                // backward advance by dt/2
                ( *Bz_rel_t_minus_halfdt )( i, j, k ) -= -half_dt_ov_dx * ( ( *Ey3Drel )( i, j, k ) - ( *Ey3Drel )( i-1, j, k ) ) + half_dt_ov_dy * ( ( *Ex3Drel )( i, j, k ) - ( *Ex3Drel )( i, j-1, k ) );
                // sum to the fields on grid
                ( *Bz3D )( i, j, k ) += ( *Bz_rel_t_plus_halfdt )( i, j, k );
                ( *Bz3D0 )( i, j, k ) += ( *Bz_rel_t_minus_halfdt )( i, j, k );
            }
        }
    }

    // delete temporary fields used for relativistic initialization
    delete Ex_rel_;
    delete Ey_rel_;
    delete Ez_rel_;
    delete Bx_rel_;
    delete By_rel_;
    delete Bz_rel_;

    delete Bx_rel_t_plus_halfdt;
    delete By_rel_t_plus_halfdt;


，譬如特殊的方式来插入和布局子视图。如果你想更深入了解，可以阅读`RCTMapManager`和其它的组件的[源代码](https://github.com/facebook/react-native/blob/master/React/Views)。

显示一个圆形的loading提示符号。

### 属性

View props... #

animating bool #

是否要显示指示器，默认为true，表示显示。

color string #

滚轮的前景颜色（默认为灰色）。

ioshidesWhenStopped bool #

在没有动画的时候，是否要隐藏指示器（默认为true）。

size enum('small', 'large') #

指示器的大小。small的高度为20，large为36。

### 例子

```javascript
'use strict';

const React = require('react');
const ReactNative = require('react-native');
const {
  ActivityIndicator,
  StyleSheet,
  View,
} = ReactNative;
const TimerMixin = require('react-timer-mixin');

const ToggleAnimatingActivityIndicator = React.createClass({
  mixins: [TimerMixin],

  getInitialState() {
    return {
      animating: true,
    };
  },

  setToggleTimeout() {
    this.setTimeout(() => {
      this.setState({animating: !this.state.animating});
      this.setToggleTimeout();
    }, 2000);
  },

  componentDidMount() {
    this.setToggleTimeout();
  },

  render() {
    return (
      <ActivityIndicator
        animating={this.state.animating}
        style={[styles.centering, {height: 80}]}
        size="large"
      />
    );
  }
});

exports.displayName = (undefined: ?string);
exports.framework = 'React';
exports.title = '<ActivityIndicator>';
exports.description = 'Animated loading indicators.';

exports.examples = [
  {
    title: 'Default (small, white)',
    render() {
      return (
        <ActivityIndicator
          style={[styles.centering, styles.gray]}
          color="white"
        />
      );
    }
  },
  {
    title: 'Gray',
    render() {
      return (
        <View>
          <ActivityIndicator
            style={[styles.centering]}
          />
          <ActivityIndicator
            style={[styles.centering, {backgroundColor: '#eeeeee'}]}
          />
        </View>
      );
    }
  },
  {
    title: 'Custom colors',
    render() {
      return (
        <View style={styles.horizontal}>
          <ActivityIndicator color="#0000ff" />


::core::fmt::ArgumentV1::new(arg1, ::core::fmt::Debug::fmt),
//                         ],
//                     },
//                 ));
//                 res
//             })
//         }
//         match inner(ctx, args) {
//             Ok(v) => Ok(ctx.heap().alloc(v)),
//             Err(e) => Err(e),
//         }
//     }
//     {
//         #[allow(unused_mut)]
//         let mut signature = starlark::eval::ParametersSpec::new("cc_binary".to_owned());
//         signature.required("name");
//         signature.required("srcs");
//         globals_builder.set(
//             name,
//             starlark::values::function::NativeFunction::new(cc_binary, signature),
//         );
//     }
//     globals_builder
// }
// ```

/// Write Starlark modules concisely in Rust syntax.
///
/// For example:
///
/// ```ignore
/// #[starlark_module]
/// fn global(registry: &mut GlobalsBuilder) {
///     fn cc_binary(name: &str, srcs: Vec<&str>) -> String {
///         Ok(format!("{:?} {:?}", name, srcs))
///     }
/// }
/// ```
///
/// Parameters operate as named parameters of a given type, with five possible tweaks:
///
/// * `args` means the argument is the `*args`.
/// * `kwargs` means the argument is the `**kwargs`.
/// * `ref name` means the argument must be passed by position, not by name.
/// * A type of `Option` means the argument is optional.
/// * A pattern `x @ foo : bool` means the argument defaults to `foo` if not
///   specified.
///
/// During execution there are two local variables injected into scope:
///
/// * `ctx` is the `Evaluator`.
/// * `heap` is the `Heap`, obtained from `ctx.heap()`.
///
/// A function with the `#[starlark_module]` attribute can be added to a `GlobalsBuilder` value
/// using the `with` function. Those `Globals` can be passed to `Evaluator` to provide global functions.
/// Alternatively, you can return `Globals` from `get_members` to _attach_ functions to
/// a specific type (e.g. the `string` type).
///
/// * When unattached, you can define constants with `const`. We define `True`, `False` and
///   `None` that way.
/// * When attached, you can annotate the functions with `#[attribute]` to turn the name into
///   an attribute on the value. Such a function must take exactly one argument, namely a value
///   of the type you have attached it to.
/// * The attribute `#[starlark_type("test")]` causes `f.type` to return `"test"`.
///
/// All these functions interoperate properly with `dir()`, `getattr()` and `hasattr()`.
///
/// If a desired function name is also a Rust keyword, use the `r#` prefix, e.g. `r#type`.
#[proc_macro_attribute]
pub fn starlark_module(attr: TokenStream, input: TokenStream) -> TokenStream {
    let input = parse_macro_input!(input as ItemFn);
    assert!(attr.is_empty());

    let visibility = input.vis;
    let name = input.sig.ident;
    let arg_ty = match input.sig.inputs.first() {
        Some(FnArg::Typed(PatType { ty, .. })) if is_mut_globals_builder(ty) => ty,
        _ => panic!("Must take on argument of type &mut GlobalsBuilder"),
    };
    let body = input.block.stmts.map(add_stmt);
    let result = quote! {
        #visibility fn #name(g