ds`, () => {
        expect(mock.checksum).toEqual(Mnemonic.getEntropyChecksum(mock.randomValue));
      });
    }
  });

  describe('getEntropyChecksum', () => {
    for (const mock of mockMnemonics) {

      it(`should return a correct checksum entropy with random value for ${mock.numOfWords} words`, () => {
        expect(mock.checksum).toEqual(Mnemonic.getEntropyChecksum(mock.randomValue));
      });
    }
  });

  describe('getWordsByIndexes', () => {
    for (const mock of mockMnemonics) {
      it(`should return a correct words array with index array for ${mock.numOfWords} words`, () => {
        const words = Mnemonic.getWordsByIndexes(mock.indexes, mock.wordList);
        expect(mock.words).toEqual(words);
        expect(mock.numOfWords).toEqual(words.length);
      });
    }

    it('should throw error when index array include -1', () => {
      expect(
        () => Mnemonic.getWordsByIndexes(mockMnemonics[0].indexes.concat(-1), mockMnemonics[0].wordList)
      ).toThrowError('Invalid index[-1] for transferring word!');
    });
  });

  describe('getMnemonic', () => {
    for (const mock of mockMnemonics) {
      it(`should return correct mnemonic with random bytes for ${mock.numOfWords} words`, () => {
        const words = Mnemonic.getMnemonic(mock.randomValue, mock.wordList);
        expect(words.length).toEqual(mock.numOfWords);
        expect(words).toEqual(mock.words);
      });
    }

    it('should throw error if number of words cannot divisible by 3', () => {
      expect(
        () => Mnemonic.getMnemonic(Buffer.from([99]), mockMnemonics[0].wordList)
      ).toThrowError('Invalid length[1] of the random bytes');
    });
  });

  describe('calcMnemonic', () => {
    let getRandomBytesStub: SinonStub;
    loadSandbox(sandbox => {
      getRandomBytesStub = sandbox.stub(Mnemonic, 'getRandomBytes');
    });

    for (const mock of mockMnemonics) {
      it(`should return correct mnemonic for ${mock.numOfWords} words`, () => {
        getRandomBytesStub.returns(mock.randomValue);
        const mnemonicInfo = Mnemonic.calcMnemonic(mock.numOfWords, mock.wordList);
        expect(getRandomBytesStub.calledWith(mock.numOfWords)).toBeTruthy();
        expect({
          ...pick(mock, ['numOfWords', 'seed', 'rootKey']),
          words: mock.words.join(' '),
        }).toEqual(mnemonicInfo);
      });
    }
  });
});
/***************************************************/
//  THIS IS MOCK STORAGE, USE IT ON YOUR OWN RISK
/***************************************************/

type Id = string | number;

export class InMemoryStorage<T> {
  protected entityName: string;
  protected storage: Array<T>;

  constructor(entityName: string, example: Array<T>=[]) {
    this.entityName = entityName;
    this.storage = example;
  }

  async insert(data: T): Promise<Id> {
    this.storage = [...this.storage, data];
    return (this.storage.length - 1).toString();
  }

  async findOne(propName: string, value: string):Promise<T | undefined> {
    return this.storage.find((item: any) => item[propName] === value);
  }

  async findOneById(value: Id):Promise<T | undefined> {
    return this.storage[value as number];
  }

  async updateOneById(taskId:


  // Verify
        _fileSystemHandlerMock.Verify(fs => fs.GetMappingFolder(), Times.Never);
        _fileSystemHandlerMock.Verify(fs => fs.FolderExists(path), Times.Exactly(_numMappings));
        _fileSystemHandlerMock.Verify(fs => fs.WriteMappingFile(It.IsAny<string>(), It.IsAny<string>()), Times.Exactly(_numMappings));
        _fileSystemHandlerMock.VerifyNoOtherCalls();
    }
}
#endif


# Author: Tomas Hodan (hodantom@cmp.felk.cvut.cz)
# Center for Machine Perception, Czech Technical University in Prague

"""An interface to the C++ based renderer (bop_renderer)."""

import sys
import numpy as np

from bop_toolkit_lib import config
from bop_toolkit_lib import renderer

# C++ renderer (https://github.com/thodan/bop_renderer)
sys.path.append(config.bop_renderer_path)
import bop_renderer

class RendererCpp(renderer.Renderer):
  """An interface to the C++ based renderer."""

  def __init__(self, width, height):
    """See base class."""
    super(RendererCpp, self).__init__(width, height)
    self.renderer = bop_renderer.Renderer()
    self.renderer.init(width, height)
    self._set_light()

  def _set_light(self):
    self.renderer.set_light(
      list(self.light_cam_pos), list(self.light_color),
      self.light_ambient_weight, self.light_diffuse_weight,
      self.light_specular_weight, self.light_specular_shininess)

  def set_light_cam_pos(self, light_cam_pos):
    """See base class."""
    super(RendererCpp, self).set_light_cam_pos(light_cam_pos)
    self._set_light()

  def set_light_ambient_weight(self, light_ambient_weight):
    """See base class."""
    super(RendererCpp, self).set_light_ambient_weight(light_ambient_weight)
    self._set_light()

  def add_object(self, obj_id, model_path, **kwargs):
    """See base class.

    NEEDS TO BE CALLED RIGHT AFTER CREATING THE RENDERER (this is due to some
    memory issues in the C++ renderer which need to be fixed).
    """
    self.renderer.add_object(obj_id, model_path)

  def remove_object(self, obj_id):
    """See base class."""
    self.renderer.remove_object(obj_id)

  def render_object(self, obj_id, R, t, fx, fy, cx, cy):
    """See base class."""
    R_l = R.astype(np.float32).flatten().tolist()
    t_l = t.astype(np.float32).flatten().tolist()
    self.renderer.render_object(obj_id, R_l, t_l, fx, fy, cx, cy)
    rgb = self.renderer.get_color_image(obj_id)
    depth = self.renderer.get_depth_image(obj_id).astype(np.float32)
    return {'rgb': rgb, 'depth': depth}


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

@import '../base/color';
@import '../base/layout';
@import '../base/breakpoints';

.card__container {
  margin: 0 auto;
  max-width: 1600px;
}

.card {
  display: block;

  .card-content {
    padding: 24px;

    &.box {
      height: 105vw;
      width: 100%;

      > a {
        display: block;
        height: 100%;
        width: 100%;
        overflow: hidden;
      }

      &.box-full {
        width: 100%;
      }
    }

    &.fullbleed {
      padding: 0;
    }

    &.bg-cyan-300,
    &.bg-cyan-400 {
      a {
        color: $color-cyan-card-link;
        outline-color: #fff;

        &:hover,
        &:focus {
          color: $color-cyan-card-link-hover;
        }
      }
    }

    &.card-content--no-padding-top {
      padding-top: 0 !important;
    }

    &.card-content--no-padding-right {
      padding-right: 0 !important;
    }
  }

  .card__title {
    padding-bottom: 12px;
  }

  .card__photo {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 50% 50%;
  }

  .card__sub-title {
    line-height: 28px;
  }

  .-no-bottom-margin,
  .-no-bottom-margin p {
    margin-bottom: 0;
    padding-bottom: 0;
  }

}

.card--force-compositing {
  transform: translateZ(0);
}

.card--top-left-clip {
  border-top-left-radius: inherit;
}
.card--top-right-clip {
  border-top-right-radius: inherit;
}
.card--bottom-left-clip {
  border-bottom-left-radius: inherit;
}
.card--bottom-right-clip {
  border-bottom-right-radius: inherit;
}

.card--allow-a-wrap a {
  white-space: normal;
}

@media (max-width: $phone-breakpoint-min + 1) {
  .card {
    .box.box-more-height-mobile {
      height: 115vw;
    }
  }
}

@media (min-width: $tablet-breakpoint-min) {
  .card {
    .card-content {
      padding: 24px;

      h5 {
        padding-right: 24px;
      }

      &.box {
        width: 50%;
        height: 50vw;
        transition: box-shadow 120ms ease-out;

        &:hover {
          box-shadow: 0px 2px 20px 0px rgba(0, 0, 0, 0.25),
                      0px 2px 3px 0px rgba(0, 0, 0, 0.25);
        }
      }
    }

    .card__title p {
      margin-bottom: 12px;
    }

  }
}

@media (min-width: $tablet-breakpoint-min) and (max-width: 960px) {
  .card {
    .card-content {
      h5 {
        font-size: 16px;
      }
      h2 {
        @include typo-card();
      }
    }
    h3,
    .card__title p,
    .card__sub-title {
      @include typo-card();
    }
  }
}

@media (min-width


6 & 53.2 \\\\ Emu2-37B [106] & 8 & – & – & – & 67.8 & 49.3 & 54.7 & 54.1 \\\\  & 16 & 110.5 & – & – & 68.8 & 50.3 & 57.0 & 57.1 \\\\ \\hline \\hline \\end{tabular}\n' +
      '\\end{table}\n' +
      '표 6: 완전 MM1 사전 훈련 소샷 평가 결과. (*) IDEFICS는 그 트레이닝 데이터에 PMD를 포함한다(COCO 포함). (\\({\\dagger}\\)) 이러한 모델에는 "0" 프롬프트에 두 개의 텍스트 전용 시범이 포함된 반면 MM1은 그렇지 않다.\n' +
      '\n' +
      '이 작업에서 표 7에 나와 있다. 단순화를 위해 실제 MM1 3B, 7B 및 30B 모델에 대해 각각 6e-5, 4e-5 및 2e-5와 동일한 \\(\\eta\\)을 사용했다. 마지막으로, 모든 모델 크기에 대해 MM1의 무작위로 초기화된 비전 언어 커넥터의 피크 LR을 \\(\\eta=\\)8e-5로 고정한다. 향후 MM1 버전의 경우 비용이 많이 드는 하이퍼파라미터 검색을 수행할 필요가 없도록 [122]와 유사한 기술을 통합할 계획입니다.\n' +
      '\n' +
      '*학습률 및 가중치 감소 그리드 검색.** 그림 6의 최종 곡선 적합에 해당하는 개별 그리드 검색 결과는 그림 9와 같다. [120]이 결론을 변경하지 않는다는 것을 발견함에 따라 \\(5e^{4}\\) 단계에 대한 그리드 검색 모델을 훈련한다. 그림 8과 같이 가중치 감쇠값을 예측하기 위해 최적의 학습률을 예측하는 데 사용된 것과 동일한 절차를 적용할 수 있다. 파란색 원은 8-샷 평균 성능에 비례하는 샘플링 확률(및 색상의 어두움)을 갖는 그리드 검색의 실제 데이터 포인트에 해당한다. 이 작업의 주요 모델 크기 각각에 대한 해당 예측은 표 7에 나와 있다.\n' +
      '\n' +
      '그림 9: 다양한 LLM 크기에 대한 최대 학습 속도(y축) 및 가중치 감소(x축)에 대한 그리드 검색에 대한 8-샷 평균. 검은색 세포는 우리가 해당 실험을 실행하지 않은 설정에 해당한다.\n' +
      '\n' +
      '###SFT(Supervised Fine-tuning)\n' +
      '\n' +
      '학습률 1e-5와 코사인 감쇠를 0으로 하는 AdaFactor optimizer를 사용하여 학습률을 달리 실험하였으며, 경험적으로 1e-5의 값이 최�


#ifndef SHARED_WITH_SHADERS_H
#define SHARED_WITH_SHADERS_H

#ifdef __cplusplus
// include vec & mat types (same namings as in GLSL)
#include "framework/common.h"
#endif // __cplusplus

//
#define SWS_PRIMARY_HIT_SHADERS_IDX     0
#define SWS_PRIMARY_MISS_SHADERS_IDX    0
#define SWS_SHADOW_HIT_SHADERS_IDX      1
#define SWS_SHADOW_MISS_SHADERS_IDX     1

// resource locations
#define SWS_SCENE_AS_SET                0
#define SWS_SCENE_AS_BINDING            0
#define SWS_RESULT_IMAGE_SET            0
#define SWS_RESULT_IMAGE_BINDING        1
#define SWS_CAMDATA_SET                 0
#define SWS_CAMDATA_BINDING             2

#define SWS_MATIDS_SET                  1
#define SWS_ATTRIBS_SET                 2
#define SWS_FACES_SET                   3
#define SWS_TEXTURES_SET                4
#define SWS_ENVS_SET                    5

#define SWS_NUM_SETS                    6

// cross-shader locations
#define SWS_LOC_PRIMARY_RAY             0
#define SWS_LOC_HIT_ATTRIBS             1
#define SWS_LOC_SHADOW_RAY              2

#define SWS_MAX_RECURSION               10

#define OBJECT_ID_BUNNY                 0.0f
#define OBJECT_ID_PLANE                 1.0f
#define OBJECT_ID_TEAPOT                2.0f

struct RayPayload {
    vec4 colorAndDist;
    vec4 normalAndObjId;
};

struct ShadowRayPayload {
    float distance;
};

struct VertexAttribute {
    vec4 normal;
    vec4 uv;
};

// packed std140
struct UniformParams {
    // Lighting
    vec4 sunPosAndAmbient;

    // Camera
    vec4 camPos;
    vec4 camDir;
    vec4 camUp;
    vec4 camSide;
    vec4 camNearFarFov;
};

// shaders helper functions
vec2 BaryLerp(vec2 a, vec2 b, vec2 c, vec3 barycentrics) {
    return a * barycentrics.x + b * barycentrics.y + c * barycentrics.z;
}

vec3 BaryLerp(vec3 a, vec3 b, vec3 c, vec3 barycentrics) {
    return a * barycentrics.x + b * barycentrics.y + c * barycentrics.z;
}

float LinearToSrgb(float channel) {
    if (channel <= 0.0031308f) {
        return 12.92f * channel;
    } else {
        return 1.055f * pow(channel, 1.0f / 2.4f) - 0.055f;
    }
}

vec3 LinearToSrgb(vec3 linear) {
    return vec3(LinearToSrgb(linear.r), LinearToSrgb(linear.g), LinearToSrgb(linear.b));
}

#endif // SHARED_WITH_SHADERS_H


p Button
//
.help_button {
  border-radius: 0;
}

//
// Popover
//
GraniteWidgetsPopOver {
  -GraniteWidgetsPopOver-arrow-width: 21;
  -GraniteWidgetsPopOver-arrow-height: 10;
  -GraniteWidgetsPopOver-border-radius: 2px;
  -GraniteWidgetsPopOver-border-width: 1;
  -GraniteWidgetsPopOver-shadow-size: 12;

  border: 1px solid transparentize(black, 0.7);
  margin: 0;
}

.popover_bg {
  background-image: linear-gradient(to bottom, if($variant=='light', darken($base_color, 2%), mix($bg_color,$base_color, 80%)));
  border: 1px solid if($variant=='light', transparentize(black, 0.7), transparentize(black, 0.3));
}

GraniteWidgetsPopOver .sidebar.view,
GraniteWidgetsPopOver * {
  background-color: transparent;
}

//
// Text Styles
//
.h1 { font: open sans 24px; }
.h2 { font: open sans light 18px; }
.h3 { font: open sans 11px; }
.h4,
.category-label {
    color: mix($bg_color, $text_color, 30%);
    font-weight: 600;
    text-shadow: 0 1px transparentize(white, 0.4);
}

.h4 {
    padding-bottom: 6px;
    padding-top: 6px;
}

GtkListBox .h4{
	padding-left: 6px;
}
//
// Special Tabs
//

$tab_asset_suffix: if($darker=='false', $asset_suffix, -darker);

NautilusNotebook.notebook,
NemoNotebook.notebook,
MarlinViewWindow .notebook,
EmpathyChatWindow .notebook,
GeditNotebook.notebook,
ScratchMainWindow .notebook,
EphyNotebook.notebook,
MidoriNotebook .notebook,
PantheonTerminalPantheonTerminalWindow .notebook {
  -GtkNotebook-tab-overlap: 6;

  tab .active-page GtkLabel,
  tab GtkLabel.active-page,
  .active-page .button {
      color: $wm_title;
      text-shadow: 0 #{$shadow_pos * $darker_shadow_pos}px $wm_title_shadow;
      icon-shadow: 0 #{$shadow_pos * $darker_shadow_pos}px $wm_title_shadow;
  }
  .active-page .button:hover {
    color: lighten(red, 10%);
    border: 1px solid if($variant=='dark' or $darker=='true', transparentize(white, 0.9), $borders_color);
  }
  .active-page .button:active {
    color: $wm_title;

    @if $darker=='true' or $variant=='dark' {
      border: 1px solid nth($_borders_color, 2);
      background-image: linear-gradient(to bottom, darken(nth($_bg_color, 2), 10%),
                                                   darken(nth($_bg_color, 2), 5%));
    }
  }

  tab.reorderable-page.top,
  &.header.top {

    background-color: if($variant=='light', $notebook_bg_color, darken($notebook_bg_color, 2.5%));
    border-bottom-width: 0px;

    @if $darker=='false' {
      box-shadow: inset 0 5px transparentize(black, 0.99),
                  inset 0 4px transparentize(black, 0.985),
                  inset 0 3px transparentize(black, 0.98),
                  inset 0 2px transparentize(black, 0.975),
                  inset 0 1px transparentize(black, 0.


et.full != nil && cache != nil {
		cache.DidFullUserLoad(ret.GetUID())
	}
	return ret, err
}

func (i *identifyUser) trackChainLinkFor(m libkb.MetaContext, name libkb.NormalizedUsername, uid keybase1.UID) (ret *libkb.TrackChainLink, err error) {
	defer m.Trace(fmt.Sprintf("identifyUser#trackChainLinkFor(%s)", name), &err)()

	if i.full != nil {
		m.Debug("| Using full user object")
		return i.full.TrackChainLinkFor(m, name, uid)
	}

	if i.thin != nil {

		m.Debug("| Using thin user object")

		// In the common case, we look at the thin UPAK and get the chain link
		// ID of the track chain link for tracking the given user. We'll then
		// go ahead and load that chain link from local level DB, and it's almost
		// always going to be there, since it was written as a side effect of
		// fetching the full user. There's a corner case, see just below...
		ret, err = libkb.TrackChainLinkFromUPK2AI(m, i.thin, name, uid)
		if _, inconsistent := err.(libkb.InconsistentCacheStateError); !inconsistent {
			m.Debug("| returning in common case -> (found=%v, err=%v)", (ret != nil), err)
			return ret, err
		}

		m.Debug("| fell through to forceFullLoad corner case")

		//
		// NOTE(max) 2016-12-31
		//
		// There's a corner case here -- the track chain link does exist, but
		// it wasn't found on disk. This is probably because the db cache was nuked.
		// Thus, in this case we force a full user reload, and we're sure to get
		// the tracking information then.
		//
		// See Jira ticket CORE-4310
		//
		err = i.forceFullLoad(m)
		if err != nil {
			return nil, err
		}
		return i.full.TrackChainLinkFor(m, name, uid)
	}

	// No user loaded, so no track chain link.
	m.Debug("| fell through the empty default case")
	return nil, nil
}

//
// TODOs:
//   - think harder about what we're caching in failure cases; right now we're only
//     caching full successes.
//   - Better error typing for various failures.
//   - Work back in the identify card
//

// Identify2WithUID is the Identify engine used in KBFS, chat, and as a
// subroutine of command-line crypto.
type Identify2WithUID struct {
	libkb.Contextified

	arg           *keybase1.Identify2Arg
	testArgs      *Identify2WithUIDTestArgs
	trackToken    keybase1.TrackToken
	confirmResult keybase1.ConfirmResult
	cachedRes     *keybase1.Identify2ResUPK2

	metaContext libkb.MetaContext

	// If we just resolved a user, then we can plumb this through to loadUser()
	ResolveBody *jsonw.Wrapper

	me   *identifyUser
	them *identifyUser

	themAssertion   libkb.AssertionExpression
	remoteAssertion libkb.AssertionAnd
	localAssertion  libkb.AssertionAnd

	state        libkb.IdentifyState
	useTracking  bool
	identifyKeys []keybase1.IdentifyKey

	resultCh chan<- error

	// For eagerly checking remote Assertions as they come in, these


/*
 * SPDX-FileCopyrightText: (C) 2020 Red Hat (www.redhat.com)
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

#ifndef E_M365_BACKEND_H
#define E_M365_BACKEND_H

#include <libebackend/libebackend.h>

/* Standard GObject macros */
#define E_TYPE_M365_BACKEND \
	(e_m365_backend_get_type ())
#define E_M365_BACKEND(obj) \
	(G_TYPE_CHECK_INSTANCE_CAST \
	((obj), E_TYPE_M365_BACKEND, EM365Backend))
#define E_M365_BACKEND_CLASS(cls) \
	(G_TYPE_CHECK_CLASS_CAST \
	((cls), E_TYPE_M365_BACKEND, EM365BackendClass))
#define E_IS_M365_BACKEND(obj) \
	(G_TYPE_CHECK_INSTANCE_TYPE \
	((obj), E_TYPE_M365_BACKEND))
#define E_IS_M365_BACKEND_CLASS(cls) \
	(G_TYPE_CHECK_CLASS_TYPE \
	((cls), E_TYPE_M365_BACKEND))
#define E_M365_BACKEND_GET_CLASS(obj) \
	(G_TYPE_INSTANCE_GET_CLASS \
	((obj), E_TYPE_M365_BACKEND, EM365BackendClass))

G_BEGIN_DECLS

typedef struct _EM365Backend EM365Backend;
typedef struct _EM365BackendClass EM365BackendClass;
typedef struct _EM365BackendPrivate EM365BackendPrivate;

struct _EM365Backend {
	ECollectionBackend parent;
	EM365BackendPrivate *priv;
};

struct _EM365BackendClass {
	ECollectionBackendClass parent_class;
};

GType		e_m365_backend_get_type		(void) G_GNUC_CONST;
void		e_m365_backend_type_register	(GTypeModule *type_module);

G_END_DECLS

#endif /* E_M365_BACKEND_H */


];
}
use tracing::{info};

use crate::riverdb::worker::Worker;
use crate::riverdb::server::{Connections, Listener};
use crate::riverdb::pg::ClientConn;

pub struct PostgresService {
    listener: Listener,
    connections: &'static Connections<ClientConn>
}

impl PostgresService {
    pub fn new(address: String, max_connections: u32, timeout_seconds: u32, reuseport: bool) -> Self{
        Self{
            listener: Listener::new(address, reuseport).expect("could not create listener"),
            connections: Connections::new(max_connections, timeout_seconds),
        }
    }

    pub async fn run(&self) {
        info!(adress = %self.listener.address.as_str(), "starting PostgresService on worker thread {}", Worker::get().id);
        // Use an explicit handle here rather than looking it up in thread local storage each time
        let tokio = tokio::runtime::Handle::current();
        while let Some(sock) = self.listener.accept().await {
            let conn = self.connections.add(sock);
            if conn.is_some() {
                tokio.spawn(async move {
                    // We already handled this error, including logging it, in run()
                    let _ = conn.run().await;
                });
            }
            // Else drop the connection, we're at capacity
        }
    }
}<filename>packages/cw20/src/lib.rs
pub use cw0::Expiration;

pub use crate::balance::Balance;
pub use crate::coin::{Cw20Coin, Cw20CoinVerified};
pub use crate::denom::Denom;
pub use crate::helpers::Cw20Contract;
pub use crate::logo::{EmbeddedLogo, Logo, LogoInfo};
pub use crate::msg::Cw20ExecuteMsg;
pub use crate::query::{
    AllAccountsResponse, AllAllowancesResponse, AllowanceInfo, AllowanceResponse, BalanceResponse,
    Cw20QueryMsg, DownloadLogoResponse, MarketingInfoResponse, MinterResponse, TokenInfoResponse,
};
pub use crate::receiver::Cw20ReceiveMsg;

mod balance;
mod coin;
mod denom;
mod helpers;
mod logo;
mod msg;
mod query;
mod receiver;

#[cfg(test)]
mod tests {
    #[test]
    fn it_works() {
        // test me
    }
}
use super::*;
use traduora::{api::users::*, Query};

/// precondition: default user exists.
#[ignore]
#[test]
fn get_me() {
    let client = build_auth_test_client();
    let user = Me.query(&client).unwrap();
    assert_eq!(super::MAIL, user.email);
    assert_eq!("Tester", user.name);
}

/// precondition: logged in as user
#[ignore]
#[test]
fn delete_me() {
    let client = build_auth_test_client();
    DeleteMe.query(&client).unwrap();
}

/// precondition: logged in as user
#[ignore]
#[test]
fn patch_me() {
    let client = build_auth_test_client();
    let endpoint = EditMe::name_and_mail("new name", "<EMAIL>");
    let user = endpoint.query(&client).unwrap();

    println!("{:#?}", user);
    assert_eq!(user.name, "<NAME>");
    assert_eq!(user.email, "<EMAIL>");
}
<reponame>frol/rsnake<gh_stars>10-100
use piston_window::types::Color;

pub const BACKGROUND: Color = [0.0, 0.0, 0.0, 1.0];
pub const SCORE: Color


>= 201103L)
        #define HAVE_VARIADIC_MACROS 1
    #elif defined(__GNUC__)
        #define HAVE_VARIADIC_MACROS 1
    #elif wxCHECK_VISUALC_VERSION(8)
        #define HAVE_VARIADIC_MACROS 1
    #endif
#endif /* !HAVE_VARIADIC_MACROS */

#ifdef HAVE_VARIADIC_MACROS

/*
   This is a hack to make it possible to use variadic macros with g++ 3.x even
   when using -pedantic[-errors] option: without this, it would complain that

       "anonymous variadic macros were introduced in C99"

   and the option disabling this warning (-Wno-variadic-macros) is only
   available in gcc 4.0 and later, so until then this hack is the only thing we
   can do.
 */
#if defined(__GNUC__) && __GNUC__ == 3
    #pragma GCC system_header
#endif /* gcc-3.x */

/*
   wxCALL_FOR_EACH(what, ...) calls the macro from its first argument, what(pos, x),
   for every remaining argument 'x', with 'pos' being its 1-based index in
   *reverse* order (with the last argument being numbered 1).

   For example, wxCALL_FOR_EACH(test, a, b, c) expands into this:

       test(3, a) \
       test(2, b) \
       test(1, c)

   Up to eight arguments are supported.

   (With thanks to https://groups.google.com/d/topic/comp.std.c/d-6Mj5Lko_s/discussion
   and http://stackoverflow.com/questions/1872220/is-it-possible-to-iterate-over-arguments-in-variadic-macros)
*/
#define wxCALL_FOR_EACH_NARG(...)   wxCALL_FOR_EACH_NARG_((__VA_ARGS__, wxCALL_FOR_EACH_RSEQ_N()))
#define wxCALL_FOR_EACH_NARG_(args) wxCALL_FOR_EACH_ARG_N args
#define wxCALL_FOR_EACH_ARG_N(_1, _2, _3, _4, _5, _6, _7, _8, N, ...) N
#define wxCALL_FOR_EACH_RSEQ_N() 8, 7, 6, 5, 4, 3, 2, 1, 0

#define wxCALL_FOR_EACH_1_(args)   wxCALL_FOR_EACH_1 args
#define wxCALL_FOR_EACH_2_(args)   wxCALL_FOR_EACH_2 args
#define wxCALL_FOR_EACH_3_(args)   wxCALL_FOR_EACH_3 args
#define wxCALL_FOR_EACH_4_(args)   wxCALL_FOR_EACH_4 args
#define wxCALL_FOR_EACH_5_(args)   wxCALL_FOR_EACH_5 args
#define wxCALL_FOR_EACH_6_(args)   wxCALL_FOR_EACH_6 args
#define wxCALL_FOR_EACH_7_(args)   wxCALL_FOR_EACH_7 args
#define wxCALL_FOR_EACH_8_(args)   wxCALL_FOR_EACH_8 args

#define wxCALL_FOR_EACH_1(what, x)        what(1, x)
#define wxCALL_FOR_EACH_2(what, x, ...)   what(2, x)  wxCALL_FOR_EACH_1_((what, __VA_ARGS__))
#define wxCALL_FOR_EACH_3(what, x, ...)   what(3, x)  wxCALL_FOR_EACH_2_((what, __VA_ARGS__))
#define wxCALL_FOR_EACH_4(what, x, ...)   what(4, x)  wxCALL_FOR_EACH_3_((what, __VA_ARGS__))
#define wxCALL_FOR_EACH_5(what, x, ...)   what(5, x)  wxCALL_FOR_EACH_4_((what, __VA_ARGS__))
#define wxCALL_FOR_EACH_6(what, x, ...)   what(6, x)  wxCALL_FOR_EACH_5_((what, __VA_ARGS__))
#define wxCALL_FOR_EACH_7(what, x, ...)   what(7, x)  wxCALL_FOR_EACH_6_((what, __VA_ARGS__))
#define wxCALL_FOR_EACH_8(what, x, ...)   what(8, x)  wxCALL_FOR_EACH_7_((what, __VA_ARGS__))

#define wxCALL_FOR_EACH_(N, args) \
    wxCONCAT(wxCALL_FOR_EACH_, N) args

#define wxCALL_FOR_EACH(what, ...) \
    wxCALL_FOR_EACH_(wxCALL_FOR_EACH_NARG(__VA_ARGS__), (what, __VA_ARGS__))

#else
    #define wxCALL_FOR_EACH  Error_wx_CALL_FOR_EACH_requires_variadic_macros_support
#endif /* HAVE_VARIADIC_MACROS */

#endif /* _WX_CPP_H_ */


 {
  background: transparent;
  outline: none; }

h1 {
  font-size: 2em;
  margin: 0.67em 0; }

h2 {
  font-size: 1.5em;
  margin: 0.83em 0; }

h3 {
  font-size: 1.17em;
  margin: 1em 0; }

h4 {
  font-size: 1em;
  margin: 1.33em 0; }

h5 {
  font-size: 0.83em;
  margin: 1.67em 0; }

h6 {
  font-size: 0.75em;
  margin: 2.33em 0; }

select, button, textarea, input {
  margin: 0;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline; }

input[type="reset"], input[type="submit"], html input[type="button"], button {
  cursor: pointer;
  -webkit-appearance: button; }
  input[type="reset"][disabled], input[type="submit"][disabled], html input[type="button"][disabled], button[disabled] {
    cursor: default; }

textarea {
  vertical-align: top;
  overflow: auto; }

input[type="radio"], input[type="checkbox"] {
  padding: 0;
  box-sizing: border-box; }
input[type="search"] {
  -webkit-appearance: textfield;
  box-sizing: content-box;
  -webkit-box-sizing: content-box; }
  input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none; }

@font-face {
  font-family: 'RobotoDraft';
  font-style: normal;
  font-weight: 100;
  src: local('RobotoDraft Thin'), local('RobotoDraft-Thin'), url(//fonts.gstatic.com/s/robotodraft/v1/hope9NW9iJ5hh8P5PM_EAyeJLMOzE6CCkidNEpZOseY.woff) format('woff'); }

@font-face {
  font-family: 'RobotoDraft';
  font-style: normal;
  font-weight: 300;
  src: local('RobotoDraft Light'), local('RobotoDraft-Light'), url(//fonts.gstatic.com/s/robotodraft/v1/u0_CMoUf3y3-4Ss4ci-VwR_xHqYgAV9Bl_ZQbYUxnQU.woff) format('woff'); }

@font-face {
  font-family: 'RobotoDraft';
  font-style: normal;
  font-weight: 400;
  src: local('RobotoDraft'), local('RobotoDraft-Regular'), url(//fonts.gstatic.com/s/robotodraft/v1/0xES5Sl_v6oyT7dAKuoni4bN6UDyHWBl620a-IRfuBk.woff) format('woff'); }

@font-face {
  font-family: 'RobotoDraft';
  font-style: normal;
  font-weight: 500;
  src: local('RobotoDraft Medium'), local('RobotoDraft-Medium'), url(//fonts.gstatic.com/s/robotodraft/v1/u0_CMoUf3y3-4Ss4ci-VwSqHEX2q--o2so14pIEl08w.woff) format('woff'); }

@font-face {
  font-family: 'RobotoDraft';
  font-style: normal;
  font-weight: 700;
  src: local('RobotoDraft Bold'), local('RobotoDraft-Bold'), url(//fonts.gstatic.com/s/robotodraft/v1/u0_CMoUf3y3-4Ss


览器以及相册中双指缩放的全面启用，谷歌和苹果的智能手机战争也就此拉开序幕。在接下来的几年中，两家公司会变成死敌。双指缩放功能更新的一个月后，苹果开始了它的征途，起诉了所有使用安卓的公司。HTC、摩托罗拉以及三星都被告上法庭，直到现在都还有一些诉讼还没解决。施密特也辞去了苹果董事会的职务。谷歌地图和 Youtube 被从 iPhone 中移除，苹果甚至开始打造自己的地图服务。今天，这两位选手几乎是 “AppleGoo” 竞赛的唯一选手，涉及领域十分广泛：智能手机、平板、笔记本、电影、TV 秀、音乐、书籍、应用、邮件、生产力工具、浏览器、个人助理、云存储、移动广告、即时通讯、地图以及机顶盒……以及不久它们将会在汽车智能、穿戴设备、移动支付，以及客厅娱乐等进行竞争。

### Android 2.2 Froyo——更快更华丽 ###

[安卓 2.2][3] 在 2010 年 5 月，也就是 2.1 发布后的四个月后亮相。Froyo（冻酸奶）的亮点主要是底层优化，只为更快的速度。Froyo 最大的改变是增加了 JIT 即时编译。JIT 自动在运行时将 java 字节码转换为原生码，这会给系统全面带来显著的性能改善。

浏览器同样得到了性能改善，这要感谢整合了来自 Chrome 的 V8 Javascript 引擎。这是安卓浏览器从 Chrome 借鉴的许多特性中的第一个，最终系统内置的浏览器会被移动版 Chrome 彻底替代掉。在那之前，安卓团队还是需要提供一个浏览器。从 Chrome 借鉴特性是条升级的捷径。

在谷歌专注于让它的平台更快的同时，苹果正在让它的平台更全面。这位谷歌的竞争对手在一个月前发布了  10 英寸的 iPad，先行进入了平板时代。尽管有些搭载 Froyo 和 Gingerbread 的安卓平板发布，但谷歌的官方回应——安卓 3.0  Honeycomb（蜂巢）以及摩托罗拉 Xoom——在 9 个月后才来到。

![Froyo底部添加了双图标停靠栏以及全局搜索。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/22-2.png)

*Froyo 底部添加了双图标停靠栏以及全局搜索。
[Ron Amadeo 供图]*

Froyo 主屏幕最大的变化是底部的新停�


s aç metodu");
  }

  @override
   void herhangiBirMethot(){
    print("Herhangi bir metot tetiklendi");
  }

  @override
  void sesAzalt(){
    print("Televisyon sınıfı ses azalt metodu");
  }

}

 class SesSistemi implements Kumanda{
    @override
  void sesAc(){
    print("Ses sistemi sınıfı ses aç metodu");
  }

  @override
  void sesAzalt(){
    print("Ses sistemi sınıfı ses azalt metodu");
  }

 }import 'dart:math';
import 'package:flame/components.dart';
import '../game/prove_of_survive_game.dart';
import 'enemy.dart';

class OctopusEnemy extends Enemy {
  final Random _random = Random();
  double _directionChangeTimer = 0;
  double _directionChangeCooldown = 2.0; // 2 saniyede bir yön değiştir
  double _horizontalSpeed = 0;

  OctopusEnemy({
    required Vector2 position,
    required Vector2 size,
    required ProveOfSurviveGame game,
  }) : super(position: position, size: size, game: game) {
    // Ahtapot özellikleri: daha güçlü ve dayanıklı
    health = 140;    // Daha fazla can
    damage = 15;     // Daha fazla hasar
    scoreValue = 25; // Daha fazla puan
  }

  @override
  Future<void> onLoad() async {
    await super.onLoad();

    // Ahtapot sprite'ını yükle
    sprite = await game.loadSprite('enemies/octopus.png');

    // Ahtapot daha yavaş ama daha güçlü
    _horizontalSpeed = _random.nextDouble() * 100 - 50; // -50 ile 50 arası rastgele hız
  }

  @override
  void update(double dt) {
    super.update(dt);

    // Ahtapota özel hareket: daha kompleks ve kurnaz
    _directionChangeTimer += dt;
    if (_directionChangeTimer >= _directionChangeCooldown) {
      _horizontalSpeed = _random.nextDouble() * 140 - 70; // -70 ile 70 arası rastgele hız
      _directionChangeTimer = 0;
      _directionChangeCooldown = 1.0 + _random.nextDouble() * 2.0; // 1-3 saniye arası
    }

    // Yatay hareket
    position.x += _horizontalSpeed * dt;

    // Ekranın dışına çıkmasını önle
    if (position.x < 0) {
      position.x = 0;
      _horizontalSpeed *= -1;
    } else if (position.x > game.size.x - size.x) {
      position.x = game.size.x - size.x;
      _horizontalSpeed *= -1;
    }

    // Tentacle animasyonu (kolların salınması)
    angle = sin(game.currentTime() * 2) * 0.05; // Hafif sallanma

    // Pulsing efekti (büyüyüp küçülme)
    final pulseFactor = 1.0 + sin(game.currentTime() * 3) * 0.05;
    scale = Vector2.all(pulseFactor);
  }

  @override
  void takeDamage(int damage) {
    // Ahtapot daha dayanıklı, daha az hasar alır
    print('Octopus taking damage: $damage, with damage reduction');
    super.takeDamage((damage * 0.7).toInt());

    // Hasar alınca kaçmaya çalışır - yön değiştirme
    _horizontalSpeed = (_random.nextBool() ? 1 : -1) * (_random


== RotationOperation.Turn)
                    elNode.Add(new XAttribute("rotation", "turn"));

                arrangerNode.Add(elNode);
            }
        }

        return arrangerNode;
    }

    private string Stringify(XElement resourceElement)
    {
        var xws = new XmlWriterSettings
        {
            Indent = true,
            IndentChars = "\t",
        };

        using var writer = new Utf8StringWriter();
        using var xw = XmlWriter.Create(writer, xws);

        resourceElement.Save(xw);
        xw.Flush();

        return writer.ToString();
    }

    private Dictionary<IProjectResource, string> CreateResourceMap()
    {
        var resourceMap = new Dictionary<IProjectResource, string>();

        foreach (var resource in _globalResources)
            resourceMap.Add(resource, resource.Name);

        foreach (var node in _tree.EnumerateDepthFirst().Where(x => x is not ResourceFolderNode))
            resourceMap.Add(node.Item, _tree.CreatePathKey(node));

        return resourceMap;
    }
}


x63, 0x0b, 0xbc,
            };
            var iv = new byte[]
            {
                0xf3, 0x03, 0x23, 0xf7, 0x30, 0x38, 0xea, 0x77, 0x53, 0xf7, 0xc9, 0xee, 0xe0, 0x00, 0xd4, 0xec,
            };

            // echo -n -e '\xb0\xbd\x19\xdd\x5d\xc6\xa2\x28\x0b\x1e\x56\xfb\x21\xac\xf3\xae\x35\x8c\xb9\x9c\x8d\x80\x85\x2f\x66\x09\xce\xd8\x3a\x2a\x1d\x82\x0e\xc4\x37' | openssl enc -e -aes-128-cfb -K A3778607E94375BCF38472DBC8630BBC -iv F30323F73038EA7753F7C9EEE000D4EC -nopad | hd
            var expected = new byte[]
            {
                0xea, 0x51, 0x2a, 0x19, 0xd1, 0xc0, 0xcf, 0x4d, 0x81, 0x92, 0xc8, 0x69, 0xdd, 0x37, 0x89, 0x11,
                0xeb, 0x39, 0xf7, 0xfd, 0xbf, 0xa7, 0x2c, 0xb3, 0x69, 0x6a, 0x3a, 0x22, 0xe1, 0x83, 0xc9, 0x71,
                0xfc, 0x42, 0x49,
            };

            var actual = new AesCipher(key, (byte[])iv.Clone(), AesCipherMode.CFB, pkcs7Padding: false).Encrypt(input);

            CollectionAssert.AreEqual(expected, actual);

            var decrypted = new AesCipher(key, (byte[])iv.Clone(), AesCipherMode.CFB, pkcs7Padding: false).Decrypt(actual);

            CollectionAssert.AreEqual(input, decrypted);
        }

        [TestMethod]
        public void AES_CFB_128_Length64_NoPad()
        {
            var input = new byte[]
            {
                0x5d, 0x75, 0x50, 0x36, 0xaf, 0x84, 0xcf, 0x58, 0x17, 0xc3, 0x91, 0xaa, 0xf3, 0x2d, 0x06, 0x74,
                0x2e, 0x6e, 0x29, 0x7e, 0xeb, 0xcc, 0x06, 0x6b, 0x8d, 0x0f, 0xb4, 0xf1, 0x7a, 0x87, 0xdb, 0xf3,
                0xb0, 0x86, 0x7e, 0x52, 0x13, 0xd4, 0x0c, 0x6f, 0x34, 0xca, 0xe0, 0x6d, 0xa6, 0x3f, 0x83, 0x25,
                0xf1, 0x54, 0xbf, 0x72, 0xd7, 0x55, 0x00, 0x90, 0x6f, 0xe5, 0xa9, 0x9f, 0xd0, 0xde, 0xde, 0x8f,
            };
            var key = new byte[]
            {
                0xe7, 0x9e, 0xfa, 0x6d, 0xaf, 0xb3, 0x61, 0x5a, 0x61, 0xba, 0x4a, 0x21, 0xec, 0x98, 0xc4, 0x4d,
            };
            var iv = new byte[]


the fj's
	movss   xmm3, [edi + eax*4]
	movss   xmm4, [edi + eax*4 + 4]
	movss   xmm5, [edi + eax*4 + 8]
	subss   xmm3, xmm0
	subss   xmm4, xmm1
	subss   xmm5, xmm2
	movss   [edi + eax*4], xmm3
	movss   [edi + eax*4 + 4], xmm4
	movss   [edi + eax*4 + 8], xmm5

	shufps  xmm0, xmm0, 225  ;# constant 11100001
	shufps  xmm1, xmm1, 225  ;# constant 11100001
	shufps  xmm2, xmm2, 225  ;# constant 11100001

	movss   xmm3, [edi + ebx*4]
	movss   xmm4, [edi + ebx*4 + 4]
	movss   xmm5, [edi + ebx*4 + 8]
	subss   xmm3, xmm0
	subss   xmm4, xmm1
	subss   xmm5, xmm2
	movss   [edi + ebx*4], xmm3
	movss   [edi + ebx*4 + 4], xmm4
	movss   [edi + ebx*4 + 8], xmm5

.nb330_checksingle:
	mov   edx, [esp + nb330_innerk]
	and   edx, 1
	jnz    .nb330_dosingle
	jmp    .nb330_updateouterdata
.nb330_dosingle:
	mov esi, [ebp + nb330_charge]
	mov edi, [ebp + nb330_pos]
	mov   ecx, [esp + nb330_innerjjnr]
	mov   eax, [ecx]
	xorps  xmm6, xmm6
	movss xmm6, [esi + eax*4]	;# xmm6(0) has the charge
	mulps  xmm6, [esp + nb330_iq]
	movaps [esp + nb330_qq], xmm6

	mov esi, [ebp + nb330_type]
	mov ecx, eax
	mov ecx, [esi + ecx*4]
	mov esi, [ebp + nb330_vdwparam]
	shl ecx, 1
	add ecx, [esp + nb330_ntia]
	movlps xmm6, [esi + ecx*4]
	movaps xmm4, xmm6
	shufps xmm4, xmm4, 252  ;# constant 11111100
	shufps xmm6, xmm6, 253  ;# constant 11111101

	movaps [esp + nb330_c6], xmm4
	movaps [esp + nb330_c12], xmm6

	lea   eax, [eax + eax*2]

	;# move coordinates to xmm0-xmm2
	movss xmm0, [edi + eax*4]
	movss xmm1, [edi + eax*4 + 4]
	movss xmm2, [edi + eax*4 + 8]

	movaps xmm4, [esp + nb330_ix]
	movaps xmm5, [esp + nb330_iy]
	movaps xmm6, [esp + nb330_iz]

	;# calc dr
	subps xmm4, xmm0
	subps xmm5, xmm1
	subps xmm6, xmm2

	;# store dr
	movaps [esp + nb330_dx], xmm4
	movaps [esp + nb330_dy], xmm5
	movaps [esp + nb330_dz], xmm6
	;# square it
	mulps xmm4,xmm4


x_fmt=jpeg)

在图中，蓝色边框所标记的代码块为过滤代码块。

仔细一看过滤是没有什么问题，简单翻译下来就是，将传递过来的 $_GET[p] 中的单引号实体化，将 %20 删除（这里需要注意，在 url 传输时，%20 已经被解析为空格，所以这里不会过滤空格），如果键值在以下数组中：

```
array('m','a','p','d','ip','web','host','ajaxbool','token','adminid')
```

那么将经过 xssrepstr 方法处理，最终返回 reteistrs 方法的结果，reteistrs 方法的主要内容是将 “/*” 以及 “*/” 字符进行递归删除处理。

### 绝对路径泄露：

最直接的问题来自于图中黄色边框所标记的 $this->jm->base64decode($s); 代码块，此时我们的 jm 成员属性并没有被初始化，当前值为 NULL，如果直接调用 base64decode，那么 PHP 会直接抛出错误。

传递 “?p=basejm_”，如图：

![](https://mmbiz.qpic.cn/mmbiz_jpg/9wVk7PSWIjKtgpia8agxErhYRxh1YL0Bhewk2JyicoazjVz2G6WLTglM7jzZA5XWiaBFh5LKbbvN6ic2QIolRm6UDw/640?wx_fmt=jpeg)

这里会直接暴露出目标的绝对路径。

那么 get 方法的封装我们就了解到这里，我们继续往下通读，如图：

![](https://mmbiz.qpic.cn/mmbiz_jpg/9wVk7PSWIjKtgpia8agxErhYRxh1YL0BhHscNZ21cw2fxJKgBQOHhvOdEBQUMS9QOAibia8k6pZibgriaT59nSXvtFw/640?wx_fmt=jpeg)

在 58 行中，我们可以看到调用了 rock 对象的 strformat 方法，该方法的封装非常类似于 python 的 format 方法。随后包含了 “WEB 根目录 / webmain/webmainConfig.php” 文件，该文件为配置文件，将该文件的数组结构依次传递给 $config 变量。

### 黑名单 IP 绕过：

继续往下通读：

![](https://mmbiz.qpic.cn/mmbiz_jpg/9wVk7PSWIjKtgpia8agxErhYRxh1YL0BhiaeLBE6icgwBmvUkCDiatYuoTIDSicRaU8BcNb2wj6okEyIxwBJ1ibjLkYg/640?wx_fmt=jpeg)

但其实这里的 ip 封杀模块，是可以通过 client-ip 进行伪造的，这里也是功能模块出现的问题，那么我们把目光放到最后一行的 $rock->initRock(); 方法，如图：

![](https://mmbiz.qpic.cn/mmbiz_jpg/9wVk7PSWIjKtgpia8agxErhYRxh1YL0BhicflicRYwzibR979LXzyALoLpSd4n1oPEXj0x44xP3LqtNkyq0qR8icWww/


ype];
  }
}
import 'package:dio/dio.dart';
import 'package:flutter_picgo/api/github_api.dart';
import 'package:flutter_picgo/model/github_config.dart';
import 'package:flutter_picgo/model/uploaded.dart';
import 'package:flutter_picgo/resources/pb_type_keys.dart';
import 'package:flutter_picgo/utils/encrypt.dart';
import 'package:flutter_picgo/utils/image_upload.dart';
import 'package:flutter_picgo/utils/strings.dart';
import 'dart:io';
import 'dart:convert';
import 'package:path/path.dart' as path;
import 'package:flutter_picgo/utils/strategy/image_upload_strategy.dart';

class GithubImageUpload implements ImageUploadStrategy {
  static const UPLOAD_COMMIT_MESSAGE = "Upload by Flutter-PicGo";
  static const DELETE_COMMIT_MESSAGE = "Delete by Flutter-PicGo";

  @override
  Future<Uploaded> delete(Uploaded uploaded) async {
    GithubUploadedInfo info;
    try {
      info = GithubUploadedInfo.fromJson(json.decode(uploaded.info));
    } catch (e) {}
    if (info != null) {
      String realUrl =
          path.joinAll(['repos', info.ownerrepo, 'contents', info.path]);
      await GithubApi.deleteContent(realUrl, {
        "message": DELETE_COMMIT_MESSAGE,
        "sha": info.sha,
        "branch": info.branch
      });
    }
    return uploaded;
  }

  @override
  Future<Uploaded> upload(File file, String renameImage) async {
    try {
      String configStr = await ImageUploadUtils.getPBConfig(PBTypeKeys.github);
      if (!isBlank(configStr)) {
        GithubConfig config = GithubConfig.fromJson(json.decode(configStr));
        String realUrl = path.joinAll(
            ['repos', config.repo, 'contents', config.path, renameImage]);
        var result = await GithubApi.putContent(realUrl, {
          "message": UPLOAD_COMMIT_MESSAGE,
          "content": await EncryptUtils.image2Base64(file.path),
          "branch": config.branch
        });
        String imagePath = result["content"]["path"];
        String downloadUrl = result["content"]["download_url"];
        String sha = result["content"]["sha"];
        String imageUrl = isBlank(config.customUrl)
            ? downloadUrl
            : '${path.joinAll([config.customUrl, imagePath])}';
        var uploadedItem = Uploaded(-1, imageUrl, PBTypeKeys.github,
            info: json.encode(GithubUploadedInfo(
                path: imagePath,
                sha: sha,
                branch: config.branch,
                ownerrepo: config.repo)));
        await ImageUploadUtils.saveUploadedItem(uploadedItem);
        return uploadedItem;
      } else {
        throw GithubError(error: '读取配置文件错误！请重试');
      }
    } on DioError catch (e) {
      if (e.type == DioErrorType.response &&
          e.error.toString().indexOf('422') > 0) {
        throw GithubError(error: '文件已存在！');
      } else {
        throw e;
      }
    }
  }
}

/// GithubError describes the error info  when request failed.
class GithubError implements Exception {
  GithubError({
    this.error,
  });


568298827E-002, 4.166664568298827E-002, 4.166664568298827E-002, 4.166664568298827E-002
    .float -1.6666654611E-1, -1.6666654611E-1, -1.6666654611E-1, -1.6666654611E-1
    .float 0.5, 0.5, 0.5, 0.5
    .float 1.0, 1.0, 1.0, 1.0

_fast_exp_scalar: // (const A: Single): Single;
    adr         r2, EXP_FACTORS_D
    vmov.f32    s0, r0
    vld1.32     {d16-d19}, [r2]!
    vld1.32     {d20-d23}, [r2]!
    vld1.32     {d24-d26}, [r2]

    vmla.f32    d23, d0, d22 // Val := 12102203.1615614 * A + 1065353216.0;
    vmin.f32    d0, d23, d21 // if (Val >= EXP_CST) then Val := EXP_CST;
    vcgt.f32    d1, d0, #0   // (Val > 0)? Yes: $FFFFFFFF, No: $00000000
    vcvt.s32.f32 d0, d0      // IVal := Trunc(Val)
    vand.32     d0, d0, d1   // (Val > 0)? Yes: IVal := Trunc(Val), No: IVal := 0
    vand.32     d1, d0, d24  // XU.I := IVal and $7F800000;
    vand.32     d2, d0, d25
    vorr.32     d2, d2, d26  // XU2.I := (IVal and $007FFFFF) or $3F800000;

    vmla.f32    d19, d2, d20 // F4+B*F5
    vmla.f32    d18, d2, d19 // F3+B*(F4+B*F5)
    vmla.f32    d17, d2, d18 // F2+B*(F3+B*(F4+B*F5))
    vmla.f32    d16, d2, d17 // F1+B*(F2+B*(F3+B*(F4+B*F5)))
    vmul.f32    d0, d1, d16  // XU.S*(F1+B*(F2+B*(F3+B*(F4+B*F5))))
    vmov.f32    r0, s0
    bx          lr

_fast_exp_vector2: // (const A: TVector2; out Result: TVector2);
    adr         r2, EXP_FACTORS_D
    vld1.32     {d0}, [r0]
    vld1.32     {d16-d19}, [r2]!
    vld1.32     {d20-d23}, [r2]!
    vld1.32     {d24-d26}, [r2]

    vmla.f32    d23, d0, d22 // Val := 12102203.1615614 * A + 1065353216.0;
    vmin.f32    d0, d23, d21 // if (Val >= EXP_CST) then Val := EXP_CST;
    vcgt.f32    d1, d0, #0   // (Val > 0)? Yes: $FFFFFFFF, No: $00000000
    vcvt.s32.f32 d0, d0      // IVal := Trunc(Val)
    vand.32     d0, d0, d1   // (Val > 0)? Yes: IVal := Trunc(Val), No: IVal := 0
    vand.32     d1, d0, d24  // XU.I := IVal and $7F800000;
    vand.32     d2, d0, d25
    vorr.32     d2,


///////////////////////////////////////////////////////////////////////////////
//
//  Celeste Classic (remake) - for ZX Spectrum Next / N-Go
//
//  (c) 2024 David Crespo - https://github.com/dcrespo3d
//                          https://davidprograma.itch.io
//                          https://www.youtube.com/@Davidprograma
//
//  Based on Celeste Classic for Pico-8 - (c) 2015 Maddy Thorson, Noel Berry
//
///////////////////////////////////////////////////////////////////////////////
//
//  This program 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.
//
//  This program 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 General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with this program.  If not, see <https://www.gnu.org/licenses/>.
//
///////////////////////////////////////////////////////////////////////////////

#include "joystick.h"
#include "print_tile.h"

#define JOY_UP    0x08
#define JOY_DOWN  0x04
#define JOY_LEFT  0x02
#define JOY_RIGHT 0x01
#define JOY_BUT1  0x10
#define JOY_BUT2  0x20
#define JOY_BUT3  0x40
#define JOY_BUT4  0x80

const char* joystick_ch4short = "\x13\x12\x11\x10\x0C\x0D\x0E\x0F";

void joystick_print_debug(u8 x, u8 y)
{
    print_set_pos(x, y);
    print_str("joy:");
    print_hex_byte(joydata);
}

void joystick_codes_debug(u8 x, u8 y)
{
    print_set_pos(x, y);
    print_str("any:");
    print_hex_nibble(joystick_any());

    print_str(" cnt:");
    print_hex_byte(joystick_count());

    print_str(" cod:");
    u8 joycode = joystick_code();
    print_hex_word(joycode);

    print_str(" shrt: ");
    u8 shortcode = joystick_short_for_code(joycode);
    print_hex_byte(shortcode);

    print_str(" chr: ");
    if (shortcode != 0xFF)
        print_char(joystick_ch4short[shortcode]);
    else
        print_char('-');
}


#pragma once

#include "morphan/LemmatizerLib/Homonym.h"
#include "LemmaList.h"

class CSentence;
class CSyntaxOpt;
struct COborotForSyntax;

class CSynHomonym : public CHomonym
{
	void ResetSelfMembers();
public:
	bool m_bAdvAdj;
	bool m_bCanSynDependOnAdj;
	bool m_bCanSynDependOnAdv;
	bool m_bCanSubdueInfinitive;
	bool m_bCanSubdueInstr;
	bool m_bNounHasAdjectiveDeclination;
	int m_CoordConjNo;
	bool m_bMonth;
	bool m_bPassive; // is used for German verbs only

	// a special slot which is now used only in CSentence::FindTermins to select all  homonyms which
	// suit the found termin
	bool m_bGoodHomonym;

	// all German verbs which should have special Perfect order in  subclauses, for example
	//  Ich weiss, dass du die Gefahr hast kommen sehen
	bool	m_bPerfectAnomalie;

	// all German verbs which can subdue an infinitive without zu
	//  Ich bleibe stehen.
	bool m_bInfinitiveConstruction;

	// all German adjectives  which can subdue at least on NP
	//  "arm an+D"
	bool m_bAdjWithActiveValency;

	const CSentence* m_pSent;

	CSynHomonym(MorphLanguageEnum l);

	CSynHomonym(const CHomonym& h);

	void SetSentence(const CSentence*);

	const COborotForSyntax* GetOborotPtr()  const;

	const	CSyntaxOpt* GetOpt() const;

	bool	CompareWithPredefinedWords(const CLemmaList& arr) const;

};


战部：

   一

   为贯彻中央“层层传达，普遍深入”的方针，经市委决定对资产阶级宣传贯彻过渡时期总路线的工作分四个步骤进行：

   （一）培养骨干分子；

   （二）召开工商联代表会议；

   （三）召开各区工商界代表会议；

   （四）全市性的普遍宣传并转入经常教育。

   培养骨干分子工作，已于12月14日结束。在我们直接领导下，由民建会及工商联出面组织了先进分子及必要吸收进来的中上层代表人物共124人，进行了8天的学习讨论。接着于12月16日召开了工商联二届二次会员代表会议。会期9天，25日闭幕。出席此次会议的正式代表350人，列席代表148人，并新吸收列席175人（全体民建会员及各区骨干分子149人，派进统战干部18人，各区银行主任8人），共600余人，资产阶级的主要部分均已参加了这次会议。

   这次会议基本上是学习会，要求通过报告、讨论，对国家过渡时期总路线的精神及主要问题初步明确化，使思想情绪初步稳定，制止目前的混乱盲动现象，争取大多数接受并拥护总路线，并为贯彻总路线初步打下思想基础。

   二

   总路线公布后，资本家认为社会主义“快”了，共产党的政策“变”了，资产阶级就要“完”了，因而一般表现紧张、怀疑，有的表现恐慌、混乱、消极、对抗。工业及零售商业在生产经营上基本是正常的，波动程度较轻，主要顾虑前途及如何过渡的问题。害怕过社会主义“关”，认为这一关“苦头不轻”，“剥削多年，工人一定会‘报复’”，甚而怀疑要流血斗争。中小工业资本家反映：“方向明确了，


+00:00")?;
    ///
    /// client
    ///     .create_guild_scheduled_event(guild_id)
    ///     .external(
    ///         "Garfield Con 2022",
    ///         "Baltimore Convention Center",
    ///         &garfield_con_start_time,
    ///         &garfield_con_end_time
    ///     )?
    ///     .description("In a spiritual successor to BronyCon, Garfield fans \
    /// from around the globe celebrate all things related to the loveable cat.")?
    ///     .exec()
    ///     .await?;
    /// # Ok(()) }
    /// ```
    ///
    /// [the Discord docs]: https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event
    pub const fn create_guild_scheduled_event(
        &self,
        guild_id: Id<GuildMarker>,
    ) -> CreateGuildScheduledEvent<'_> {
        CreateGuildScheduledEvent::new(self, guild_id)
    }

    /// Get a scheduled event in a guild.
    pub const fn guild_scheduled_event(
        &self,
        guild_id: Id<GuildMarker>,
        scheduled_event_id: Id<ScheduledEventMarker>,
    ) -> GetGuildScheduledEvent<'_> {
        GetGuildScheduledEvent::new(self, guild_id, scheduled_event_id)
    }

    /// Get a list of users subscribed to a scheduled event.
    ///
    /// Users are returned in ascending order by `user_id`. [`before`] and
    /// [`after`] both take a user id. If both are specified, only [`before`] is
    /// respected. The default [`limit`] is 100. See [the Discord docs] for more
    /// information.
    ///
    /// [`after`]: GetGuildScheduledEventUsers::after
    /// [`before`]: GetGuildScheduledEventUsers::before
    /// [`limit`]: GetGuildScheduledEventUsers::limit
    /// [the Discord docs]: https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users
    pub const fn guild_scheduled_event_users(
        &self,
        guild_id: Id<GuildMarker>,
        scheduled_event_id: Id<ScheduledEventMarker>,
    ) -> GetGuildScheduledEventUsers<'_> {
        GetGuildScheduledEventUsers::new(self, guild_id, scheduled_event_id)
    }

    /// Get a list of scheduled events in a guild.
    pub const fn guild_scheduled_events(
        &self,
        guild_id: Id<GuildMarker>,
    ) -> GetGuildScheduledEvents<'_> {
        GetGuildScheduledEvents::new(self, guild_id)
    }

    /// Update a scheduled event in a guild.
    ///
    /// This endpoint supports changing the type of event. When changing the
    /// entity type to either [`EntityType::StageInstance`] or
    /// [`EntityType::Voice`], an [`Id<ChannelMarker>`] must be provided if it
    /// does not already exist.
    ///
    /// When changing the entity type to [`EntityType::External`], the
    /// `channel_id` field is cleared and the [`channel_id`] method has no
    /// effect. Additionally, you must set a location with [`location`].
    ///
    /// [`EntityType::External`]: twilight_model::scheduled_event::EntityType::External
    /// [`EntityType::StageInstance`]: twilight_model::scheduled_event::EntityType::StageInstance
    /// [`EntityType::Voice`]: twilight_model::scheduled_event::EntityType::Voice


0}):","Powered by {0}":"Szolg\xe1ltat\xf3: {0}","Pre":"Pre","Preferences":"Be\xe1ll\xedt\xe1sok","Preformatted":"El\u0151form\xe1zott","Premium plugins:":"Pr\xe9mium be\xe9p\xfcl\u0151 modulok:","Press the Up and Down arrow keys to resize the editor.":"","Press the arrow keys to resize the editor.":"","Press {0} for help":"","Preview":"El\u0151n\xe9zet","Previous":"El\u0151z\u0151","Print":"Nyomtat\xe1s","Print...":"Nyomtat\xe1s...","Purple":"Lila","Quotations":"Id\xe9z\u0151jelek","R":"R","Range 0 to 255":"0-t\xf3l 255-ig","Red":"Piros","Red component":"Piros komponens","Redo":"Ism\xe9t","Remove":"Elt\xe1vol\xedt\xe1s","Remove color":"Sz\xedn t\xf6rl\xe9se","Remove link":"Hivatkoz\xe1s t\xf6rl\xe9se","Replace":"Csere","Replace all":"Az \xf6sszes cser\xe9je","Replace with":"Csere erre:","Resize":"\xc1tm\xe9retez\xe9s","Restore last draft":"Utols\xf3 piszkozat vissza\xe1ll\xedt\xe1sa","Reveal or hide additional toolbar items":"","Rich Text Area":"Szabadsz\xf6veges mez\u0151","Rich Text Area. Press ALT-0 for help.":"Vizu\xe1lis szerkeszt\u0151 ter\xfclet. Nyomjon ALT-0-t a s\xfag\xf3hoz.","Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help":"Vizu\xe1lis szerkeszt\u0151 ter\xfclet. Nyomjon ALT-F9-et a men\xfch\xf6z. Nyomjon ALT-F10-et az eszk\xf6zt\xe1rhoz. Nyomjon ALT-0-t a s\xfag\xf3hoz","Ridge":"Dombor\xfa","Right":"Jobbra","Right to left":"Jobbr\xf3l balra","Row":"Sor","Row clipboard actions":"Sor v\xe1g\xf3lapi m\u0171veletek","Row group":"Sorcsoport","Row header":"Sorfejl\xe9c","Row properties":"Sor tulajdons\xe1gai","Row type":"Sort\xedpus","Rows":"Sorok","Save":"Ment\xe9s","Save (if save plugin activated)":"Ment\xe9s (ha a ment\xe9s be\xe9p\xfcl\u0151 modul enged\xe9lyezett)","Scope":"Tartom\xe1ny","Search":"Keres\xe9s","Select all":"Minden kijel\xf6l\xe9se","Select...":"V\xe1lasszon...","Selection":"Kiv\xe1laszt\xe1s","Shortcut":"Billenty\u0171kombin\xe1ci\xf3","Show blocks":"Blokkok mutat\xe1sa","Show caption":"Felirat megjelen\xedt\xe9se","Show invisible characters":"L\xe1thatatlan karakterek mutat\xe1sa","Size":"M\xe9ret","Solid":"Szimpla","Source":"Forr\xe1s","Source code":"Forr\xe1sk\xf3d","Special Character":"Speci\xe1lis karakter","Special character...":"Speci\xe1lis karakter...","Split cell":"Cell\xe1k sz\xe9tv\xe1laszt\xe1sa","Square":"N\xe9gyzet","Start list at number":"Lista kezd\xe9se ett\u0151l a sz\xe1mt\xf3l","Stri


-share__links">' +
						'' +
							'<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /></svg>' +
							'Facebook' +
						'' +
						'' +
							'<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/></svg>' +
							'Pinterest' +
						'' +
						'' +
							'<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /></svg>' +
							'Twitter' +
						'' +
					'
' +
					'
<input class="fancybox-share__input" type="text" value="{{url_raw}}" />
' +
				'
'
		}
	});

	function escapeHtml(string) {
		var entityMap = {
		  '&': '&',
		  '<': '<',
		  '>': '>',
		  '"': '"',
		  "'": ''',
		  '/': '/',
		  '`': '`',
		  '=': '='
		};

		return String(string).replace(/[&<>"'`=\/]/g, function (s) {
			return entityMap[s];
		});
	}

	$(document).on('click', '[data-fancybox-share]', function() {
		var f = $.fancybox.getInstance(),
			url,
			tpl;

		if ( f ) {
			url = f.current.opts.hash === false ? f.current.src : window.location;
			tpl = f.current.opts.share.tpl
					.replace( /\{\{media\}\}/g, f.current.type === 'image' ? encodeURIComponent( f.current.src ) : '' )
					.replace( /\{\{url\}\}/g, encodeURIComponent( url ) )
					.replace( /\{\{url_raw\}\}/g, escapeHtml( url ) )
					.replace( /\{\{descr\}\}/g, f.$caption ? encodeURIComponent( f.$caption.text() ) : '' );

			$.fancybox.open({
				src  : f.translate( f, tpl ),
				type : 'html',
				opts : {
					animationEffect   : "fade",
					animationDuration : 250,
					afterLoad : function(instance, current) {
						// Opening links in a popup window


355037 1.240601 0 2.23939 -1.055861 2.23939 -2.355037 V 11.798242 c 0 -0.04356 -0.009 -0.08862 -0.0134 -0.127671 0.0044 -0.03153 0.009 -0.06157 0.0134 -0.09313 -0.0044 -1.240598 -1.069379 -2.2393873 -2.391085 -2.2393873 h -10.1546 c -1.323205 0 -2.38958 0.9987893 -2.38958 2.2393873 0 1.233091 1.066375 2.237887 2.38958 2.240891 h 4.858768 l -8.995102 8.9921 c -0.874129 0.872625 -0.874129 2.288954 0 3.161578 0.874127 0.880137 2.288951 0.880137 3.16308 1.5e-4%27 id=%27path600%27 style=%27fill:%23ffffff%3Bstroke-width:1.50194%27 /%3E%3Cpath d=%27m 17.264988 13.822853 h 4.857265 c 1.320202 -0.0031 2.388079 -1.0078 2.388079 -2.240889 0 -1.240601 -1.067877 -2.2393893 -2.388079 -2.2393893 H 11.967654 c -1.321707 0 -2.388082 0.9987883 -2.391085 2.2393893 0.0031 0.03153 0.009 0.06157 0.01211 0.09313 -0.0031 0.03905 -0.0015 0.08262 -0.0015 0.127671 l 0.0031 10.020926 c 0 1.299176 1.00029 2.355038 2.237887 2.355038 1.233092 -0.0044 2.242393 -1.055862 2.242393 -2.355038 v -4.881295 l 9.026644 9.041661 c 0.877132 0.878635 2.293459 0.878635 3.169087 0 0.871125 -0.872624 0.871125 -2.288953 0 -3.161577 l -8.995282 -8.993616%27 id=%27path602%27 style=%27fill:%23ffffff%3Bstroke-width:1.50194%27 /%3E%3C/svg%3E";

/***/ }),

/***/ "data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27108%27 height=%2762%27 viewBox=%270 0 108 62%27%3E%3Ctitle%3Eaframe-armode-noborder-reduced-tracking%3C/title%3E%3Cpath d=%27M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0Zm8,50a8,8,0,0,1-8,8H12a8,8,0,0,1-8-8V12a8,8,0,0,1,8-8H96a8,8,0,0,1,8,8Z%27 fill=%27%23fff%27/%3E%3Cpath d=%27M43.35,39.82H32.51L30.45,46H23.88L35,16h5.73L52,46H45.43Zm-9.17-5h7.5L37.91,23.58Z%27 fill=%27%23fff%27/%3E%3Cpath d=%27M68.11,35H63.18V46H57V16H68.15q5.31,0,8.2,2.37a8.18,8.18,0,0,1,2.88,6.7,9.22,9.22,0,0,1-1.


lir_instruction_id(op_id - 2);
  }
  assert(idx == num_instructions, "must match");
  assert(idx * 2 == op_id, "must match");

  _has_call = BitMap(num_instructions); _has_call.clear();
  _has_info = BitMap(num_instructions); _has_info.clear();
}

// ********** Phase 2: compute local live sets separately for each block
// (sets live_gen and live_kill for each block)

void LinearScan::set_live_gen_kill(Value value, LIR_Op* op, BitMap& live_gen, BitMap& live_kill) {
  LIR_Opr opr = value->operand();
  Constant* con = value->as_Constant();

  // check some asumptions about debug information
  assert(!value->type()->is_illegal(), "if this local is used by the interpreter it shouldn't be of indeterminate type");
  assert(con == NULL || opr->is_virtual() || opr->is_constant() || opr->is_illegal(), "asumption: Constant instructions have only constant operands");
  assert(con != NULL || opr->is_virtual(), "asumption: non-Constant instructions have only virtual operands");

  if ((con == NULL || con->is_pinned()) && opr->is_register()) {
    assert(reg_num(opr) == opr->vreg_number() && !is_valid_reg_num(reg_numHi(opr)), "invalid optimization below");
    int reg = opr->vreg_number();
    if (!live_kill.at(reg)) {
      live_gen.set_bit(reg);
      TRACE_LINEAR_SCAN(4, tty->print_cr("  Setting live_gen for value %c%d, LIR op_id %d, register number %d", value->type()->tchar(), value->id(), op->id(), reg));
    }
  }
}

void LinearScan::compute_local_live_sets() {
  TIME_LINEAR_SCAN(timer_compute_local_live_sets);

  int  num_blocks = block_count();
  int  live_size = live_set_size();
  bool local_has_fpu_registers = false;
  int  local_num_calls = 0;
  LIR_OpVisitState visitor;

  BitMap2D local_interval_in_loop = BitMap2D(_num_virtual_regs, num_loops());
  local_interval_in_loop.clear();

  // iterate all blocks
  for (int i = 0; i < num_blocks; i++) {
    BlockBegin* block = block_at(i);

    BitMap live_gen(live_size);  live_gen.clear();
    BitMap live_kill(live_size); live_kill.clear();

    if (block->is_set(BlockBegin::exception_entry_flag)) {
      // Phi functions at the begin of an exception handler are
      // implicitly defined (= killed) at the beginning of the block.
      for_each_phi_fun(block, phi,
        live_kill.set_bit(phi->operand()->vreg_number())
      );
    }

    LIR_OpList* instructions = block->lir()->instructions_list();
    int num_inst = instructions->length();

    // iterate all instructions of the block. skip the first because it is always a label
    assert(visitor.no_operands(instructions->at(0)), "first operation must always be a label");
    for (int j = 1; j < num_inst; j++) {
      LIR_Op* op = instructions->at(j);

      // visit operation to collect all operands
      visitor.visit(op);

      if (visitor.has_call()) {
        _has_call.set_bit(op->id() >> 1);
        local_num_calls++;
      }
      if (visitor.info_count() > 0) {
        _has_info.set_bit(op->id() >> 1);
      }

      // iterate input operands of instruction
      int k, n, reg;
      n = visitor.opr_count(LIR_OpVisitState::inputMode);
      for (k


derer withouth a backing bitmap");
    }

//    WritableRaster raster = ((BufferedImage) image).getRaster();
//    raster.setDataElements(0, 0, width, height, pixels);
    bitmap.setPixels(pixels, 0, width, 0, 0, width, height);
  }

  /**
   * Update the pixels[] buffer to the PGraphics image.
   * <P>
   * Unlike in PImage, where updatePixels() only requests that the
   * update happens, in PGraphicsJava2D, this will happen immediately.
   */
  @Override
  public void updatePixels(int x, int y, int c, int d) {
    //if ((x == 0) && (y == 0) && (c == width) && (d == height)) {
    if ((x != 0) || (y != 0) || (c != width) || (d != height)) {
      // Show a warning message, but continue anyway.
      showVariationWarning("updatePixels(x, y, w, h)");
    }
    updatePixels();
  }

  @Override
  public void resize(int wide, int high) {
    showMethodWarning("resize");
  }

  @Override
  protected void clearState() {
    super.clearState();
    if (restoreFilename != null) {
      File cacheFile = new File(restoreFilename);
      cacheFile.delete();
    }
  }

  @Override
  protected void saveState() {
    super.saveState();

    Context context = parent.getContext();
    if (context == null || bitmap == null || parent.getSurface().getComponent().isService()) return;
    try {
      // Saving current width and height to avoid restoring the screen after a screen rotation
      restoreWidth = pixelWidth;
      restoreHeight = pixelHeight;

      int size = bitmap.getHeight() * bitmap.getRowBytes();
      ByteBuffer restoreBitmap = ByteBuffer.allocate(size);
      bitmap.copyPixelsToBuffer(restoreBitmap);

      // Tries to use external but if not mounted, falls back on internal storage, as shown in
      // https://developer.android.com/topic/performance/graphics/cache-bitmap#java
      File cacheDir = Environment.MEDIA_MOUNTED == Environment.getExternalStorageState() || !isExternalStorageRemovable() ?
          context.getExternalCacheDir() : context.getCacheDir();
      File cacheFile = new File(cacheDir + File.separator + "restore_pixels");
      restoreFilename = cacheFile.getAbsolutePath();

      FileOutputStream stream = new FileOutputStream(cacheFile);
      ObjectOutputStream dout = new ObjectOutputStream(stream);
      byte[] array = new byte[size];
      restoreBitmap.rewind();
      restoreBitmap.get(array);
      dout.writeObject(array);
      dout.flush();
      stream.getFD().sync();
      stream.close();
    } catch (Exception ex) {
      PGraphics.showWarning("Could not save screen contents to cache");
      ex.printStackTrace();
    }
  }

  @Override
  protected void restoreSurface() {
    if (changed) {
      changed = false;
      if (restoreFilename != null && restoreWidth == pixelWidth && restoreHeight == pixelHeight) {
        // Set the counter to 1 so the restore bitmap is drawn in the next frame.
        restoreCount = 1;
      }
    } else if (restoreCount > 0) {
      restoreCount--;
      if (restoreCount == 0) {
        Context context = parent.getContext();
        if (context == null) return;
        try {
          // Load cached bitmap and draw
          File cacheFile = new File(restoreFilename);
          FileInputStream inStream = new FileInputStream(cacheFile);
          ObjectInputStream din = new ObjectInputStream(inStream);
          byte[] array = (byte[]) din.readObject();
          ByteBu


lesToDisk
	DPRINT	"exportSavedStateModulesToDisk"
    tst.b   win(a5)
    beq     .x
	tst.b	savestate(a5)
	beq	.x

	lea	savedStateModuleFileName(pc),a0
	lea	moduleListHeader(a5),a1
	jsr 	exportModuleProgramToFile

	* Formatting parameters into d0,d1,d2,d3

	* Store current file browser dir, if
	* currently in browser mode
	cmp.b	#LISTMODE_BROWSER,listMode(a5)
	bne.b	.notBrowser
	move.l	fileBrowserCurrentDirLock(a5),d1
	beq.b	.notBrowser

	pushpea	probebuffer(a5),d2	* temp buffer
	move.l	#200,d3
	bsr		getNameFromLock
	tst.l	d0
	beq.b	.notBrowser
	pushpea	probebuffer(a5),d3
	bra.b	.yesDir
.notBrowser

	* Store last used dir as well
	* Try the reqtools dir first
	move.l	req_file(a5),d3
	beq.b	.doEmpty
	move.l	d3,a0
	move.l	rtfi_Dir(a0),d3
	bne.b	.yesDir
.doEmpty
	* ..then the previously stored one
	move.l	lastStoredFileReqDirectory(a5),d3
	bne.b	.yesDir
	pushpea	.empty(pc),d3
.yesDir

	* Store playing state and chosen module into comment
	move.l	chosenmodule(a5),d0

	moveq	#0,d1
	tst.l	playingmodule(a5)
	bmi.b	.no
	moveq	#1,d1
.no

* Store list mode
	moveq	#0,d2
	move.b	listMode(a5),d2

	lea	.comment(pc),a0
	lea	probebuffer(a5),a1 	* nice temp buffer
	jsr	desmsg

 if DEBUG
	pushpea desbuf(a5),d0
	DPRINT	"->%s"
 endif

	pushpea	savedStateModuleFileName(pc),d1
	pushpea	desbuf(a5),d2
	lore	Dos,SetComment

.x	rts

* <chosenmodule< <play/noplay><listmode> <filereq path>
.comment	dc.b	"%08lx %ld%ld %s"
.empty		dc.b	0
		even

savedStateModuleFileName
	dc.b	"S:HippoSavedList.prg",0
 even

********************************************************************************
*** SECTION ********************************************************************
*
* File browser mode operations
*
********************************************************************************

freeFileBrowserList
	push	a6
	move.l	(a5),a6		* execbase
	lea	fileBrowserListHeader(a5),a2
.loop
	* a0: list, a1: destroyed, d0: node, or zero
	move.l	a2,a0
	lob	RemHead
	beq.b	.listFreed
	move.l	d0,a0
	jsr	freemem
	bra.b	.loop
.listFreed
	cmp.b	#LISTMODE_BROWSER,listMode(a5)
	bne


分析遍",
"analysis phase":"[计] 分析阶段",
"analysis pitch":"[机] 实测节距",
"analysis procedure":"[计] 分析过程",
"analysis program":"[计] 分析程序",
"analysis record":"[计] 分析记录",
"analysis report":"[经] 化验报告",
"analysis room":"[化] 分析室",
"analysis sheet":"[经] 分析表",
"analysis signal":"[计] 分析信号",
"analysis situs":" 拓朴（学）; 拓扑学",
"analysis-based":" 基于查询; 基于分析",
"analysis/synthesis system":"[计] 分析综合系统",
"analysor":"[医] 分析器",
"analyst":"n. 分析者, 精神分析学家\\n[化] 分析员; 化验员",
"analyst-programmer":"[计] 程序分析员",
"analysts":"n. 分析家；分析师；分析员（analyst的复数）",
"analyt":"分析化学",
"analyte":"[化] 分析物; 被分析物",
"analytes":"(analyte 的复数) [化] 分析物; 被分析物",
"analytic":"a. 分析的, 善于分析的, 解析的\\n[医] 分析的",
"analytic activity":"[医] 分析活动",
"analytic derivation":"[计] 解析推导",
"analytic engine":"[计] 分析机, 解析机",
"analytic factor":"[机] 分析因数",
"analytic function":"[机] 解析函数",
"analytic function generator":"[计] 解析函数发生器",
"analytic geometry":"[计] 解析几何",
"analytic grammar":"[计] 分析文法",
"analytic hierarchy process":"[化] 层次分析法",
"analytic method":"[计] 解析法",
"analytic model":"[计] 解析模型, 分析模型",
"analytic philosophy":" 分析哲学",
"analytic plotter":"[计] 解析绘图仪",
"analytic probability model":"[计] 解析概率模型",
"analytic procedure":"[计] 分析方法",
"analytic psychology":"[医] 分析心理学, 精神分析学",
"analytic relationship":"[计] 解析关系",
"analytic signal":"[电] 解析讯号",
"analytic study":"[计] 分析研究",
"analytic system":"[计] 分析系统",
"analytic technique":"[计] 分析技术, 分析方法",
"analytic theory of number":"[计] 解析数论",
"analytic thinking":" 分析思维",
"analytical":"a. 分析的, 善于分析的, 解析的\\n[机] 分析的",
"analytical accounting":"[经] 分析会计, 分析会计学",
"analytical balance":"[化] 分析天平\\n[医] 分析天平",
"analytical chemistry":"[化] 分析化学\\n[医] 分析化学",
"analytical chromatograph":"[化] 分析用色谱仪",
"analytical columns":"[经] 分析栏",
"analytical concentration":"[化] 分析浓度",
"analytical contin


import os
import sys
import django
from datetime import datetime
from django.conf import settings
from django.test.utils import get_runner

def run_ai_tests():
    """运行AI搜索测试并生成报告"""
    # 设置Django环境
    os.environ['DJANGO_SETTINGS_MODULE'] = 'music_recommendation.settings'
    django.setup()

    # 获取测试运行器
    TestRunner = get_runner(settings)
    test_runner = TestRunner(verbosity=2, interactive=True)

    # 创建测试报告目录
    report_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'test_reports')
    if not os.path.exists(report_dir):
        os.makedirs(report_dir)

    # 生成报告文件名
    timestamp = datetime.now().strftime('%Y%m%d_%H%M%S')
    report_file = os.path.join(report_dir, f'ai_search_test_report_{timestamp}.txt')

    # 运行测试并捕获输出
    with open(report_file, 'w', encoding='utf-8') as f:
        # 重定向标准输出到文件
        original_stdout = sys.stdout
        sys.stdout = f

        try:
            # 运行测试
            failures = test_runner.run_tests(['search.test_ai.test_ai_search'])

            # 添加测试总结
            print('\n' + '='*50)
            print('AI搜索测试报告总结')
            print('='*50)
            print(f'测试时间: {datetime.now().strftime("%Y-%m-%d %H:%M:%S")}')
            print(f'测试结果: {"成功" if failures == 0 else "失败"}')
            print(f'失败数量: {failures}')
            print('\n测试用例列表:')
            print('1. 基本搜索功能')
            print('   - 成功搜索')
            print('   - 空查询处理')
            print('   - 无搜索结果处理')
            print('2. 高级搜索功能')
            print('   - 按歌手搜索')
            print('   - 按标签搜索')
            print('3. 分页功能')
            print('   - 第一页测试')
            print('   - 第二页测试')
            print('4. 排序功能')
            print('   - 按标题排序')
            print('   - 按发行日期排序')
            print('='*50)

        finally:
            # 恢复标准输出
            sys.stdout = original_stdout

    print(f'\nAI搜索测试报告已生成: {report_file}')
    return failures

if __name__ == '__main__':
    failures = run_ai_tests()
    sys.exit(bool(failures))


ityExponent(val);var exp10=Math.pow(10,exponent);var f=val/exp10;// 1 <= f < 10\nvar nf;if(round){if(f<1.5){nf=1;}else if(f<2.5){nf=2;}else if(f<4){nf=3;}else if(f<7){nf=5;}else{nf=10;}}else{if(f<1){nf=1;}else if(f<2){nf=2;}else if(f<3){nf=3;}else if(f<5){nf=5;}else{nf=10;}}val=nf*exp10;// Fix 3 * 0.1 === 0.30000000000000004 issue (see IEEE 754).\n// 20 is the uppper bound of toFixed.\nreturn exponent>=-20?+val.toFixed(exponent<0?-exponent:0):val;}/**\n * This code was copied from \"d3.js\"\n * <https://github.com/d3/d3/blob/9cc9a875e636a1dcf36cc1e07bdf77e1ad6e2c74/src/arrays/quantile.js>.\n * See the license statement at the head of this file.\n * @param {Array.<number>} ascArr\n */function quantile(ascArr,p){var H=(ascArr.length-1)*p+1;var h=Math.floor(H);var v=+ascArr[h-1];var e=H-h;return e?v+e*(ascArr[h]-v):v;}/**\n * Order intervals asc, and split them when overlap.\n * expect(numberUtil.reformIntervals([\n *     {interval: [18, 62], close: [1, 1]},\n *     {interval: [-Infinity, -70], close: [0, 0]},\n *     {interval: [-70, -26], close: [1, 1]},\n *     {interval: [-26, 18], close: [1, 1]},\n *     {interval: [62, 150], close: [1, 1]},\n *     {interval: [106, 150], close: [1, 1]},\n *     {interval: [150, Infinity], close: [0, 0]}\n * ])).toEqual([\n *     {interval: [-Infinity, -70], close: [0, 0]},\n *     {interval: [-70, -26], close: [1, 1]},\n *     {interval: [-26, 18], close: [0, 1]},\n *     {interval: [18, 62], close: [0, 1]},\n *     {interval: [62, 150], close: [0, 1]},\n *     {interval: [150, Infinity], close: [0, 0]}\n * ]);\n * @param {Array.<Object>} list, where `close` mean open or close\n *        of the interval, and Infinity can be used.\n * @return {Array.<Object>} The origin list, which has been reformed.\n */function reformIntervals(list){list.sort(function(a,b){return littleThan(a,b,0)?-1:1;});var curr=-Infinity;var currClose=1;for(var i=0;i<list.length;){var interval=list[i].interval;var close=list[i].close;for(var lg=0;lg<2;lg++){if(interval[lg]<=curr){interval[lg]=curr;close[lg]=!lg?1-currClose:1;}curr=interval[lg];currClose=close[lg];}if(interval[0]===interval[1]&&close[0]*close[1]!==1){list.splice(i,1);}else{i++;}}return list;function littleThan(a,b,lg){return a.interval[lg]<b.interval[lg]||a.interval[lg]===b.interval[lg]&&(a.close[lg]-b.close[lg]===(!lg?1:-1)||!lg&&littleThan(a,b,1));}}/**\n * parseFloat NaNs numeric-cast false positives (null|true|false|\"\")\n * ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n * subtraction forces infinities to NaN\n *\n * @param {*} v\n * @return {boolean}\n */function isNumeric(v){return v-parseFloat(v)>=0;}var number=(Object.freeze||Object)({linearMap:


/**
 * blk_queue_invalidate_tags - invalidate all pending tags
 * @q:  the request queue for the device
 *
 *  Description:
 *   Hardware conditions may dictate a need to stop all pending requests.
 *   In this case, we will safely clear the block side of the tag queue and
 *   readd all requests to the request queue in the right order.
 *
 *  Notes:
 *   queue lock must be held.
 **/
void blk_queue_invalidate_tags(struct request_queue *q)
{
	struct list_head *tmp, *n;

	list_for_each_safe(tmp, n, &q->tag_busy_list)
		blk_requeue_request(q, list_entry_rq(tmp));
}
EXPORT_SYMBOL(blk_queue_invalidate_tags);


lorName);
            } catch (Exception e) {
                //
            }
        }

        return color;
    }

    private static Color brighter(Color color) {
        // brighter black give value 7,7,7
        float factor = 0.97265625f;

        // into white color
        float r = 256f - factor * (256 - color.getRed());
        float g = 256f - factor * (256 - color.getGreen());
        float b = 256f - factor * (256 - color.getBlue());

        return new Color((int) r, (int) g, (int) b);
    }

    /**
     * Returns a Color based on 'colorName' which must be one of the predefined colors in
     * java.awt.Color. Returns null if colorName is not valid.
     * @param colorName
     * @return
     */
    public static Color getColorByJava(String colorName) {
        try {
            // Find the field and value of colorName
            Field field = Class.forName("java.awt.Color").getField(colorName);
            return (Color) field.get(null);
        } catch (Exception e) {
            return null;
        }
    }
}
package kendzi.kendzi3d.editor.ui;

import java.awt.Color;
import java.util.ArrayList;
import java.util.List;

import javax.inject.Inject;
import com.jogamp.opengl.GL;
import com.jogamp.opengl.GL2;
import com.jogamp.opengl.GLAutoDrawable;
import com.jogamp.opengl.GLEventListener;
import com.jogamp.opengl.fixedfunc.GLLightingFunc;
import com.jogamp.opengl.fixedfunc.GLMatrixFunc;

import kendzi.jogl.camera.SimpleMoveAnimator;
import kendzi.jogl.camera.Viewport;
import kendzi.jogl.camera.ViewportUtil;
import kendzi.jogl.util.ColorUtil;
import kendzi.kendzi3d.editor.EditableObject;
import kendzi.kendzi3d.editor.EditorCore;
import kendzi.kendzi3d.editor.drawer.SelectionDrawer;
import kendzi.kendzi3d.editor.drawer.SquareIcon;
import kendzi.kendzi3d.editor.example.objects.Box;
import kendzi.kendzi3d.editor.selection.ObjectSelectionManager;
import kendzi.kendzi3d.editor.selection.Selection;
import kendzi.kendzi3d.editor.selection.ViewportProvider;
import kendzi.kendzi3d.editor.ui.event.CloseWindowListener;

import org.apache.log4j.Logger;

public class BaseEditorGLEventListener implements GLEventListener, ViewportProvider, CloseWindowEventSource {

    private static final Logger LOG = Logger.getLogger(Box.class);

    @Inject
    private Viewport viewport;

    @Inject
    private SimpleMoveAnimator camera;

    @Inject
    private ObjectSelectionManager objectSelectionListener;

    @Inject
    private EditorCore core;

    @Inject
    private SquareIcon squareIcon;

    private final SelectionDrawer selectionDrawer = new SelectionDrawer();

    private boolean windowClosed = false;

    @Override
    public void init(GLAutoDrawable drawable) {

        GL2 gl = drawable.getGL().getGL2();

        if (!checkRequiredExtensions(gl)) {
            LOG.error("can't find required openGl extensions closing window");
            windowClosed = true;
            fireCloseWindow();
        }

        // Enable VSync.
        gl.setSwapInterval(1);

        // Clear z-buffer.
        gl.glClearDepth(1.0);
        gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);

        // Enable z-buffer.
        gl.glEnable(GL.GL_DEPTH_TEST);

        // Background color.
        gl.glClearColor(0.17f, 0.65f, 0.92f, 0.0f);

        // Smooth shade model.
        gl.glShadeModel(GLLightingFunc.GL_SMOOTH);

        // Enable Antialiasing for lines.
        gl.glEnable(GL.


Workstation GT2" },
	{ PCI_DID_INTEL_KBL_GT2_SULXM, "Kaby Lake ULX GT2" },
	{ PCI_DID_INTEL_KBL_GT2_SULTM, "Kaby Lake ULT GT2" },
	{ PCI_DID_INTEL_KBL_GT2_SULTMR, "Kaby Lake-R ULT GT2" },
	{ PCI_DID_INTEL_KBL_GT2_SHALM, "Kaby Lake HALO GT2" },
	{ PCI_DID_INTEL_KBL_GT2_DT2P2, "Kaby Lake DT GT2" },
	{ PCI_DID_INTEL_KBL_GT2F_SULTM, "Kaby Lake ULT GT2F" },
	{ PCI_DID_INTEL_KBL_GT3E_SULTM_1, "Kaby Lake ULT (15W) GT3E" },
	{ PCI_DID_INTEL_KBL_GT3E_SULTM_2, "Kaby Lake ULT (28W) GT3E" },
	{ PCI_DID_INTEL_KBL_GT4_SHALM, "Kaby Lake HALO GT4" },
	{ PCI_DID_INTEL_AML_GT2_ULX, "Amberlake ULX GT2" },
};

static uint8_t get_dev_revision(pci_devfn_t dev)
{
	return pci_read_config8(dev, PCI_REVISION_ID);
}

static uint16_t get_dev_id(pci_devfn_t dev)
{
	return pci_read_config16(dev, PCI_DEVICE_ID);
}

static void report_cpu_info(void)
{
	u32 i, cpu_id, cpu_feature_flag;
	char cpu_name[49];
	int vt, txt, aes;
	static const char *const mode[] = {"NOT ", ""};
	const char *cpu_type = "Unknown";

	fill_processor_name(cpu_name);
	cpu_id = cpu_get_cpuid();

	/* Look for string to match the name */
	for (i = 0; i < ARRAY_SIZE(cpu_table); i++) {
		if (cpu_table[i].cpuid == cpu_id) {
			cpu_type = cpu_table[i].name;
			break;
		}
	}

	printk(BIOS_DEBUG, "CPU: %s\n", cpu_name);
	printk(BIOS_DEBUG, "CPU: ID %x, %s, ucode: %08x\n",
	       cpu_id, cpu_type, get_current_microcode_rev());

	cpu_feature_flag = cpu_get_feature_flags_ecx();
	aes = (cpu_feature_flag & CPUID_AES) ? 1 : 0;
	txt = (cpu_feature_flag & CPUID_SMX) ? 1 : 0;
	vt = (cpu_feature_flag & CPUID_VMX) ? 1 : 0;
	printk(BIOS_DEBUG,
		"CPU: AES %ssupported, TXT %ssupported, VT %ssupported\n",
		mode[aes], mode[txt], mode[vt]);
}

static void report_mch_info(void)
{
	int i;
	pci_devfn_t dev = SA_DEV_ROOT;
	uint16_t mchid = get_dev_id(dev);
	uint8_t mch_revision = get_dev_revision(dev);
	const char *mch_type = "Unknown";

	for (i = 0; i < ARRAY_SIZE(mch_table); i++) {
		if (mch_table[i].mchid == mchid) {
			mch_type = mch_table[i].name;
			break;
		}
	}

	printk(BIOS_DEBUG, "MCH: device id %04x (rev %02x) is %s\n",
	       mchid, mch_revision, mch_type);
}

static void report_pch_info(void)
{
	int i;
	pci_devfn_t dev = PCH_DEV_LPC;
	uint16_t lpcid = get_dev_id(dev);
	const char *pch_type = "Unknown";

	for (i = 0; i < ARRAY_SIZE(pch_table); i++) {
		if (pch_table[i].lpcid == lpcid) {
			pch_type = pch_table[i].name;
			break;
		}
	}
	printk(BIOS_DEBUG, "PCH: device id %04x (rev %02x) is %s\n",
	       lpcid, get_dev_revision(dev), pch_type);
}

static void report_igd_info(void)
{
	int i;
	pci_devfn_t dev = SA_DEV_IGD;
	uint16_t igdid = get_dev_id(dev);
	const char *igd_type = "Unknown";

	for (i = 0; i < ARRAY_SIZE(igd_table); i++) {
		if (igd_table[i].igdid == igdid) {
			igd_type = igd_table[i].name;
			break;
		}
	}
	printk(BIOS_DEBUG, "IGD: device id %04x (rev %02x) is %s\n",
	       igdid, get_dev_revision(dev), igd_type);
}

void report_platform_info(void)
{
	report_cpu_info();
	report_mch_info();
	report_pch_info();
	report_igd_info();
}


  "⫔": "⫔",
  "⫖": "⫖",
  "⇙": "⇙",
  "⤦": "⤦",
  "↙": "↙",
  "↙": "↙",
  "⤪": "⤪",
  "ß": "ß",
  "⌖": "⌖",
  "τ": "τ",
  "⎴": "⎴",
  "ť": "ť",
  "ţ": "ţ",
  "т": "т",
  "⃛": "⃛",
  "⌕": "⌕",
  "𝔱": "𝔱",
  "∴": "∴",
  "∴": "∴",
  "θ": "θ",
  "ϑ": "ϑ",
  "ϑ": "ϑ",
  "≈": "≈",
  "∼": "∼",
  " ": " ",
  "≈": "≈",
  "∼": "∼",
  "þ": "þ",
  "˜": "˜",
  "×": "×",
  "⊠": "⊠",
  "⨱": "⨱",
  "⨰": "⨰",
  "∭": "∭",
  "⤨": "⤨",
  "⊤": "⊤",
  "⌶": "⌶",
  "⫱": "⫱",
  "𝕥": "𝕥",
  "⫚": "⫚",
  "⤩": "⤩",
  "‴": "‴",
  "™": "™",
  "▵": "▵",
  "▿": "▿",
  "◃": "◃",
  "⊴": "⊴",
  "≜": "≜",
  "▹": "▹",
  "⊵": "⊵",
  "◬": "◬",
  "≜": "≜",
  "⨺": "⨺",
  "⨹": "⨹",
  "⧍": "⧍",
  "⨻": "⨻",
  "⏢": "⏢",
  "𝓉": "𝓉",
  "ц": "ц",
  "ћ": "ћ",
  "ŧ": "ŧ",
  "≬": "≬",
  "↞": "↞",
  "↠": "↠",
  "⇑": "⇑",
  "⥣": "⥣",
  "ú": "ú",
  "↑": "↑",
  "ў": "ў",
  "ŭ": "ŭ",
  "û": "û",
  "у": "у",
  "⇅": "⇅",
  "ű": "ű",
  "⥮": "⥮",
  "⥾": "⥾",
  "𝔲": "𝔲",
  "ù": "ù",
  "↿": "↿",


0, -1.0,
            -1.0, -1.0,  1.0,
            -1.0,  1.0,  1.0,
            -1.0,  1.0, -1.0
            ];

        let uvs: Vec<f32> = vec![
            // Front face
            0.0, 0.0,
            1.0, 0.0,
            1.0, 1.0,
            0.0, 1.0,

            // Back face
            1.0, 0.0,
            1.0, 1.0,
            0.0, 1.0,
            0.0, 0.0,

            // Top face
            0.0, 1.0,
            0.0, 0.0,
            1.0, 0.0,
            1.0, 1.0,

            // Bottom face
            1.0, 1.0,
            0.0, 1.0,
            0.0, 0.0,
            1.0, 0.0,

            // Right face
            1.0, 0.0,
            1.0, 1.0,
            0.0, 1.0,
            0.0, 0.0,

            // Left face
            0.0, 0.0,
            1.0, 0.0,
            1.0, 1.0,
            0.0, 1.0,
        ];

        let normals = vec![
            // Front face
             0.0,  0.0,  1.0,
             0.0,  0.0,  1.0,
             0.0,  0.0,  1.0,
             0.0,  0.0,  1.0,
            // Back face
             0.0,  0.0, -1.0,
             0.0,  0.0, -1.0,
             0.0,  0.0, -1.0,
             0.0,  0.0, -1.0,
            // Top face
             0.0,  1.0,  0.0,
             0.0,  1.0,  0.0,
             0.0,  1.0,  0.0,
             0.0,  1.0,  0.0,
            // Bottom face
             0.0, -1.0,  0.0,
             0.0, -1.0,  0.0,
             0.0, -1.0,  0.0,
             0.0, -1.0,  0.0,
            // Right face
             1.0,  0.0,  0.0,
             1.0,  0.0,  0.0,
             1.0,  0.0,  0.0,
             1.0,  0.0,  0.0,
            // Left face
            -1.0,  0.0,  0.0,
            -1.0,  0.0,  0.0,
            -1.0,  0.0,  0.0,
            -1.0,  0.0,  0.0
        ];

        let indices: Vec<u16> = vec![
            0, 1, 2,      0, 2, 3,    // Front face
            4, 5, 6,      4, 6, 7,    // Back face
            8, 9, 10,     8, 10, 11,  // Top face
            12, 13, 14,   12, 14, 15, // Bottom face
            16, 17, 18,   16, 18, 19, // Right face
            20, 21, 22,   20, 22, 23  // Left face
        ];

        MeshData {
            vertices: vertices,
            uvs: Some(uvs),
            normals: Some(normals),
            indices: indices,
            tangents: None,
            bitangents: None,
        }
    }
}

impl PlaneMesh {
    pub fn new() -> MeshData {
        let vertices: Vec<f32> = vec![
            // Top face
            -10.0,  0.0, -10.0,
            -10.0,  0.0,  10.0,
             10.0,  0.0,  10.0,
             10.0,  0.0, -10.0,
            ];

        let uvs: Vec<f32> = vec![
            // Top face


eventComponent), tostring(eventComponent_))

    -- get component by class name
    local eventComponent_ = cc.getComponent(sheep, Event.__cname)
    check.equals(tostring(eventComponent), tostring(eventComponent_))

    -- bind listeners
    local results = {}

    local tag1 = eventComponent:bind("RUN", function(event)
        results[#results + 1] = {event.name, event.step}
    end)

    local tag2 = eventComponent:bind("RUN", function(event)
        results[#results + 1] = {event.name, event.step}
    end) -- add second listener for event "RUN"

    local tag3 = eventComponent:bind("WALK", function(event)
        results[#results + 1] = {event.name, event.step}
    end)

    -- trigger events
    local step1   = math.random(10000, 20000)
    local step2   = math.random(30000, 40000)
    local step3   = math.random(50000, 60000)

    eventComponent:trigger({name = "RUN", step = step1})
    eventComponent:trigger({name = "WALK", step = step2})

    -- unbind listener
    eventComponent:unbind(tag2)
    eventComponent:trigger({name = "RUN", step = step3})

    -- check
    check.equals(results, {
        {"RUN", step1},
        {"RUN", step1},
        {"WALK", step2},
        {"RUN", step3},
    })

    -- remove component by class
    cc.removeComponent(sheep, Event)
    check.isNil(cc.getComponent(sheep, Event))

    -- remove component by class name
    cc.addComponent(sheep, Event)
    cc.removeComponent(sheep, Event.__cname)
    check.isNil(cc.getComponent(sheep, Event))

    -- remove component by component object
    local eventComponent = cc.addComponent(sheep, Event)
    cc.removeComponent(sheep, eventComponent)
    check.isNil(cc.getComponent(sheep, Event))

    return true
end

return ComponentsTestCase


crumbs{border:0;background-color:#e7f2f8;margin:8px 8px 0;border-radius:4px}@media only screen and (max-width:979px){.skin-2 .sidebar{border:0;box-shadow:none}.skin-2 .nav-list li.active>a:after{display:none}.skin-2 .breadcrumbs{margin:0;border-radius:0}.skin-2 .menu-min .nav-list>li.active>a:after{display:none}.skin-2 .menu-min .nav-list>li.active:hover>a:after{display:block}}.skin-2 .nav-list>li .submenu a{background-color:transparent!important}.skin-2 .nav-list>li>.submenu>li>.submenu a{border-top-color:#CCC}.skin-2 .nav-list>li.active>.submenu>li>.submenu a{border-top-color:#999}.skin-2 .nav-list>li>.submenu li>.submenu>li a{color:#d5d5d5}.skin-2 .nav-list>li>.submenu li>.submenu>li a>[class*="fa-"]:first-child{color:#d5d5d5}.skin-2 .nav-list>li>.submenu li>.submenu li.active>a>[class*="fa-"]:first-child{color:inherit}.skin-2 .nav-list>li .submenu a>.arrow{color:#CCC}.skin-2 .nav-list>li>.submenu>li>a:hover>.arrow,.skin-2 .nav-list>li>.submenu>li>.submenu>li>a:hover>.arrow{color:#EEE}.skin-2 .nav-list>li>.submenu>li>.submenu>li>a{margin-left:0;padding-left:38px}.skin-2 .nav-list>li>.submenu>li>.submenu>li>.submenu>li>a{margin-left:0;padding-left:54px}.skin-2 .nav-list>li ul.submenu li.open>a{color:#c6487e}.skin-2 .nav-list>li:nth-child(1) ul.submenu li.open>a{color:#00be67}.skin-2 .nav-list>li:nth-child(2) ul.submenu li.open>a{color:#5ed02b}.skin-2 .nav-list>li:nth-child(3) ul.submenu li.open>a{color:#a7d700}.skin-2 .nav-list>li:nth-child(4) ul.submenu li.open>a{color:#cee100}.skin-2 .nav-list>li:nth-child(5) ul.submenu li.open>a{color:#f8c600}.skin-2 .nav-list>li:nth-child(6) ul.submenu li.open>a{color:#ffab00}.skin-2 .nav-list>li:nth-child(7) ul.submenu li.open>a{color:#ff6e00}.skin-2 .nav-list>li:nth-child(8) ul.submenu li.open>a{color:#f21c30}.skin-2 .nav-list>li:nth-child(9) ul.submenu li.open>a{color:#ee218b}.skin-2 .nav-list>li:nth-child(10) ul.submenu li.open>a{color:#c55ee7}.skin-2 .nav-list>li:nth-child(11) ul.submenu li.open>a{color:#218bee}.skin-2 .nav-list>li:nth-child(12) ul.submenu li.open>a{color:#2ecee7}.skin-2 .nav-list>li ul.submenu li>a:hover{color:#FFF}.skin-2 .nav-list>li>.submenu>li.open>a>[class*="fa-"]:first-child,.skin-2 .nav-list>li>.submenu>li>.submenu>li.open>a>[class*="fa-"]:first-child{color:inherit}.skin-2 .nav-list>li>.submenu>li.open>a>.arrow,.skin-2 .nav-list>li>.submenu>li>.submenu>li.open>a>.arro


(QToolBox* self, int index) {
    auto* vqtoolbox = dynamic_cast<VirtualQToolBox*>(self);
    if (vqtoolbox && vqtoolbox->isVirtualQToolBox) {
        vqtoolbox->itemInserted(static_cast<int>(index));
    }
}

void QToolBox_ItemRemoved(QToolBox* self, int index) {
    auto* vqtoolbox = dynamic_cast<VirtualQToolBox*>(self);
    if (vqtoolbox && vqtoolbox->isVirtualQToolBox) {
        vqtoolbox->itemRemoved(static_cast<int>(index));
    }
}

void QToolBox_ShowEvent(QToolBox* self, QShowEvent* e) {
    auto* vqtoolbox = dynamic_cast<VirtualQToolBox*>(self);
    if (vqtoolbox && vqtoolbox->isVirtualQToolBox) {
        vqtoolbox->showEvent(e);
    }
}

void QToolBox_ChangeEvent(QToolBox* self, QEvent* param1) {
    auto* vqtoolbox = dynamic_cast<VirtualQToolBox*>(self);
    if (vqtoolbox && vqtoolbox->isVirtualQToolBox) {
        vqtoolbox->changeEvent(param1);
    }
}

libqt_string QToolBox_Tr2(const char* s, const char* c) {
    QString _ret = QToolBox::tr(s, c);
    // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
    QByteArray _b = _ret.toUtf8();
    libqt_string _str;
    _str.len = _b.length();
    _str.data = static_cast<const char*>(malloc(_str.len + 1));
    memcpy((void*)_str.data, _b.data(), _str.len);
    ((char*)_str.data)[_str.len] = '\0';
    return _str;
}

libqt_string QToolBox_Tr3(const char* s, const char* c, int n) {
    QString _ret = QToolBox::tr(s, c, static_cast<int>(n));
    // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
    QByteArray _b = _ret.toUtf8();
    libqt_string _str;
    _str.len = _b.length();
    _str.data = static_cast<const char*>(malloc(_str.len + 1));
    memcpy((void*)_str.data, _b.data(), _str.len);
    ((char*)_str.data)[_str.len] = '\0';
    return _str;
}

// Base class handler implementation
int QToolBox_QBaseMetacall(QToolBox* self, int param1, int param2, void** param3) {
    auto* vqtoolbox = dynamic_cast<VirtualQToolBox*>(self);
    if (vqtoolbox && vqtoolbox->isVirtualQToolBox) {
        vqtoolbox->setQToolBox_Metacall_IsBase(true);
        return vqtoolbox->qt_metacall(static_cast<QMetaObject::Call>(param1), static_cast<int>(param2), param3);
    } else {
        return self->QToolBox::qt_metacall(static_cast<QMetaObject::Call>(param1), static_cast<int>(param2), param3);
    }
}

// Auxiliary method to allow providing re-implementation
void QToolBox_OnMetacall(QToolBox* self, intptr_t slot) {
    auto* vqtoolbox = dynamic_cast<VirtualQToolBox*>(self);
    if (vqtoolbox && vqtoolbox->isVirtualQToolBox) {
        vqtoolbox->setQToolBox_Metacall_Callback(reinterpret_cast<VirtualQToolBox::QToolBox_Metacall_Callback>(slot));
    }
}

// Base class handler implementation
bool QToolBox_QBaseEvent(QToolBox* self, QEvent* e) {
    auto* vqtoolbox = dynamic_cast<Virt


ntext.Items.FirstOrDefault();
            if (itemUri == null)
            {
                return;
            }

            var d = new AddInsertOptionDialog();

            d.NewItemName.Text = string.Format(Resources.InsertOptions_CreateItem_New__0_, TemplateHeader.Name);

            if (AppHost.Shell.ShowDialog(d) != true)
            {
                return;
            }

            var newItemUri = AppHost.Server.AddFromTemplate(itemUri.ItemUri, TemplateHeader.TemplateUri, d.ItemName);
            if (newItemUri == ItemUri.Empty)
            {
                return;
            }

            var itemVersionUri = new ItemVersionUri(newItemUri, LanguageManager.CurrentLanguage, Version.Latest);

            Notifications.RaiseItemAdded(this, itemVersionUri, itemUri.ItemUri);

            if (AppHost.CurrentContentTree != null)
            {
                AppHost.CurrentContentTree.Locate(newItemUri);
            }

            DefaultActionPipeline.Run().WithParameters(new ItemSelectionContext(new TemplatedItemDescriptor(itemVersionUri.ItemUri, d.ItemName, TemplateHeader.TemplateUri.ItemId, TemplateHeader.Name)));
        }
    }
}


ds.w 1
search_string_flag:	ds.b 1
search_instruction_flag:	ds.b 1
 IFNE sourcedebug
search_source_flag:	ds.b 1
 ENDC ;de sourcedebug
 even

;  #] Search stuff:
;  #[ Menu stuff:
menu_legal:	ds.b	16
;  #] Menu stuff:
;  #[ Cursor stuff:
ex_cursor:	ds.w 1
ey_cursor:	ds.w 1
old_ex_cursor:	ds.w 1
old_ey_cursor:	ds.w 1
linex_cursor:	ds.w 1
liney_cursor:	ds.w 1
old_linex_cursor:
 ds.w 1
edit_ascii_undo_cursor:
 ds.l 2
 ds.w 2
edit_ascii_undo2_cursor:
 ds.l 2
 ds.w 2

minimum_ex_cursor:	ds.w 1
tab_cursor:	ds.b 1
alt_e_flag:	ds.b 1

;  #] Cursor stuff:
;  #[ Acia stuff:

keys_byte:	ds.b 1
caps_lock_flag:	ds.b 1
 even
ikbd_buffer:	ds.l 1
keys_table1:	ds.l 1
keys_table2:	ds.l 1
keys_table3:	ds.l 1
acia_ikbd:	ds.b 1
 even

;  #] Acia stuff:
;  #[ Watch subroutine stuff:

watch_subroutine_old_value:
 ds.l 1

watch_subroutine_window:
 ds.w 1

watch_subroutine_flag:
 ds.b 1

 even

;  #] Watch subroutine stuff:
;  #[ Buffer de comparaison pour le redraw:

wind_save:
	IFNE ATARIST
	ds.b	58*32
	ENDC
	IFNE AMIGA
	ds.b	31*16
	ENDC
buffer_lock_pointers:
 ds.l 6

;  #] Buffer de comparaison pour le redraw:
;  #[ ro_struct:
	even
;si modif alors modif:
;execute_ro
;"rostruct.s
;toutes les ro
ro_struct:
;	int	v_number d'Adebug
	ds.w	1
*****************************
;	int	tos_number
	ds.w	1
*****************************
;	window 1
	ds.l	1
;	window 2
	ds.l	1
;	window 3
	ds.l	1
;	window 4
	ds.l	1
;	window 5
	ds.l	1
***************************************
;	long	TEXT
	ds.l	1
;	long	DATA
	ds.l	1
;	long	BSS
	ds.l	1
;	long	END
	ds.l	1
***************************************
;	long	registers[17]
	ds.l	17
;	int	sr
	ds.w	1
;	long	pc
	ds.l	1
********************


d_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark

part of 'method_twin_sync_sse.dart';

// **************************************************************************
// FreezedGenerator
// **************************************************************************

T _$identity<T>(T value) => value;

final _privateConstructorUsedError = UnsupportedError(
    'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');

/// @nodoc
mixin _$SimpleEnumTwinSyncSse {
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() first,
    required TResult Function(String field0) second,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function()? first,
    TResult? Function(String field0)? second,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? first,
    TResult Function(String field0)? second,
    required TResult orElse(),
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(SimpleEnumTwinSyncSse_First value) first,
    required TResult Function(SimpleEnumTwinSyncSse_Second value) second,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(SimpleEnumTwinSyncSse_First value)? first,
    TResult? Function(SimpleEnumTwinSyncSse_Second value)? second,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(SimpleEnumTwinSyncSse_First value)? first,
    TResult Function(SimpleEnumTwinSyncSse_Second value)? second,
    required TResult orElse(),
  }) =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $SimpleEnumTwinSyncSseCopyWith<$Res> {
  factory $SimpleEnumTwinSyncSseCopyWith(SimpleEnumTwinSyncSse value,
          $Res Function(SimpleEnumTwinSyncSse) then) =
      _$SimpleEnumTwinSyncSseCopyWithImpl<$Res, SimpleEnumTwinSyncSse>;
}

/// @nodoc
class _$SimpleEnumTwinSyncSseCopyWithImpl<$Res,
        $Val extends SimpleEnumTwinSyncSse>
    implements $SimpleEnumTwinSyncSseCopyWith<$Res> {
  _$SimpleEnumTwinSyncSseCopyWithImpl(this._value, this._then);

  // ignore: unused_field
  final $Val _value;
  // ignore: unused_field
  final $Res Function($Val) _then;

  /// Create a copy of SimpleEnumTwinSyncSse
  /// with the given fields replaced by the non-null parameter values.
}

/// @nodoc
abstract class _$$SimpleEnumTwinSyncSse_FirstImplCopyWith<$Res> {
  factory _$$SimpleEnumTwinSyncSse_FirstImplCopyWith(
          _$SimpleEnumTwinSyncSse_FirstImpl value,
          $Res Function(_$SimpleEnumTwinSyncSse_FirstImpl) then) =
      __$$Simple


="//en.wikipedia.org/wiki/GMA_Network" title="GMA Network">GMA and hosted by Pilita Corales and Bert "Tawa" Marcelo.[5] Two other Filipina singers, Kyla and Faith Cuneta, started their career on the singing competition television show.[6][7] Gonzaga did not win the competition.

Gonzaga's biggest break in the entertainment industry was her soft drink TV ad with Piolo Pascual in 2001.[8] In the same year, she released her eponymous debut album under Prime Music and "Paano", a cover of Gary Valenciano's, was released as its carrier single. And in 2002 she became one of the main hosts in the long time afternoon variety show Eat Bulaga,.[9][10] She also sung "Doon", the theme song of TAPE, Inc.'s afternoon TV drama, "Ikaw Sa Puso Ko" which stars Star Struck finalist, Nadine Samonte and Oyo Sotto which aired on GMA Network. In 2002, she was cast in the primetime television series Habang Kapiling Ka starring Angelika dela Cruz. In March 2004, she joined Studio 23's Wazzup Wazzup with Archie Alemania and Vhong Navarro.

2005-2008

<


ki",
			"Zaza",
			"Zazaki"
		]
	}
}
""".trimIndent()
package com.mayabot.nlp.common

import java.util.*

class LongArrayList (
        expectedElements: Int = 4,
        private val resizer: ArraySizingStrategy = BoundedProportionalArraySizingStrategy()
) {

    /**
     * Internal array for storing the list. The array may be larger than the current size
     * ([.size]).
     */
    var buffer: LongArray = EMPTY_ARRAY

    /**
     * Current number of elements stored in [.buffer].
     */
    private var elementsCount = 0

    /**
     * New instance with sane defaults.
     */
    init {
        ensureCapacity(expectedElements)
    }

    inline fun forEach(action: (num: Long) -> Unit) {
        val buffer = this.buffer
        var i = 0
        val size = this.size()
        while (i < size) {
            action(buffer[i])
            i++
        }
    }

    fun add(e1: Long) {
        ensureBufferSpace(1)
        buffer[elementsCount++] = e1
    }

    operator fun get(index: Int): Long {

        assert(index >= 0 && index < size()){
            "Index " + index + " out of bounds [" + 0 + ", " + size() + ")."
        }

        return buffer[index]
    }

    operator fun set(index: Int, e1: Long): Long {
        assert(index >= 0 && index < size()) {
            "Index " + index + " out of bounds [" + 0 + ", " + size() + ")."
        }

        val v = buffer[index]
        buffer[index] = e1
        return v
    }

    operator fun contains(e1: Long): Boolean {
        return indexOf(e1) >= 0
    }

    fun indexOf(e1: Long): Int {
        for (i in 0 until elementsCount) {
            if (buffer[i] == e1) {
                return i
            }
        }
        return -1
    }

    val isEmpty: Boolean get() = elementsCount == 0

    /**
     * Ensure this container can hold at least the given number of elements
     * without resizing its buffers.
     *
     * @param expectedElements The total number of elements, inclusive.
     */
    fun ensureCapacity(expectedElements: Int) {
        val bufferLen = buffer.size
        if (expectedElements > bufferLen) {
            ensureBufferSpace(expectedElements - size())
        }
    }

    /**
     * Ensures the internal buffer has enough free slots to store
     * `expectedAdditions`. Increases internal buffer size if needed.
     */
    private fun ensureBufferSpace(expectedAdditions: Int) {
        val bufferLen =  buffer.size

        if (elementsCount + expectedAdditions > bufferLen) {

            val newSize = resizer.grow(bufferLen, elementsCount, expectedAdditions)

            assert(newSize >= elementsCount + expectedAdditions) {
                ("Resizer failed to" + " return sensible new size: " + newSize + " <= " + (elementsCount + expectedAdditions))
            }

            buffer = buffer.copyOf(newSize)
        }
    }

    /**
     * Truncate or expand the list to the new size. If the list is truncated, the
     * buffer will not be reallocated (use [.trimToSize] if you need a
     * truncated buffer), but the truncated values will be reset to the default
     * value (zero). If the list is expanded, the elements beyond the current size
     * are initialized with JVM-defaults (zero or `null` values).
     */
    fun resize(newSize: Int) {
        if (newSize <= buffer.size) {
            if (newSize < elementsCount) {
                Arrays.fill(buffer, newSize, elementsCount, 0)
            } else {