C", value: 0.1},
		{mtype: gauge, scope: "test", name: "B", value: 21, labels: labels{{"a", "1"}, {"b", "2"}}},
		{mtype: histogram, scope: "test", name: "C", value: 0.5},
		{mtype: histogram, scope: "test", name: "C", value: 10},
	}

	store := metricStore{}

	for _, m := range input {
		store.update(m, []stats.Value{
			stats.ValueOf(0.25),
			stats.ValueOf(0.5),
			stats.ValueOf(0.75),
			stats.ValueOf(1.0),
		})
	}

	metrics := store.collect(nil)
	sort.Sort(byNameAndLabels(metrics))

	expects := []metric{
		{mtype: counter, scope: "test", name: "A", value: 3, labels: labels{}},
		{mtype: counter, scope: "test", name: "A", value: 4, labels: labels{{"id", "123"}}},
		{mtype: gauge, scope: "test", name: "B", value: 42, labels: labels{{"a", "1"}}},
		{mtype: gauge, scope: "test", name: "B", value: 21, labels: labels{{"a", "1"}, {"b", "2"}}},
		{mtype: histogram, scope: "test", name: "C_bucket", value: 2, labels: labels{{"le", "0.25"}}},
		{mtype: histogram, scope: "test", name: "C_bucket", value: 3, labels: labels{{"le", "0.5"}}},
		{mtype: histogram, scope: "test", name: "C_bucket", value: 3, labels: labels{{"le", "0.75"}}},
		{mtype: histogram, scope: "test", name: "C_bucket", value: 3, labels: labels{{"le", "1"}}},
		{mtype: histogram, scope: "test", name: "C_count", value: 4, labels: labels{}},
		{mtype: histogram, scope: "test", name: "C_sum", value: 10.7, labels: labels{}},
	}

	if !reflect.DeepEqual(metrics, expects) {
		t.Error("bad metrics:")
		t.Logf("expected: %v", expects)
		t.Logf("found:    %v", metrics)
	}
}

func TestMetricEntryCleanup(t *testing.T) {
	now := time.Now()

	empty := false
	entry := metricEntry{
		mtype: counter,
		name:  "A",
		states: metricStateMap{
			0: []*metricState{
				{value: 42, time: now},
				{value: 1, time: now.Add(-time.Minute)},
				{value: 2, time: now.Add(-(500 * time.Millisecond))},
			},
			1: []*metricState{
				{value: 123, time: now.Add(10 * time.Millisecond)},
			},
			2: []*metricState{},
		},
	}

	callback := func() { empty = true }

	// Cleanup all states older than 1 second.
	entry.cleanup(now.Add(-time.Second), callback)

	if empty {
		t.Error("unexpected call to notify that the entry is empty")
	}

	if !reflect.DeepEqual(entry.states, metricStateMap{
		0: []*metricState{
			{value: 42, time: now},
			{value: 2, time: now.Add(-(500 * time.Millisecond))},
		},
		1: []*metricState{
			{value: 123, time: now.Add(10 * time.Millisecond)},
		},
	}) {
		t.Errorf("bad entry states: %#v", entry.states)
	}

	// Cleanup all states older than now to check that the comparison is
	// inclusive.
	entry.cleanup(now, callback


 val view: View, scope: CoroutineScope) {

    private var isAvailable by mutableStateOf(true)

    init {
        scope.launch {
            allowVibrations(view.context).collectLatest {
                isAvailable = it
            }
        }
    }

    fun vibrate() {
        if (isAvailable) {
            view.reallyPerformHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY)
        }
    }

    fun vibrateStrong() {
        if (isAvailable) {
            view.reallyPerformHapticFeedback(HapticFeedbackConstants.LONG_PRESS)
        }
    }
}

@Composable
fun rememberFeedbackManager(): FeedbackManager {
    val view = LocalView.current
    val scope = rememberCoroutineScope()
    return remember(view, scope) {
        FeedbackManager(view, scope)
    }
}

@Suppress("DEPRECATION")
private fun View.reallyPerformHapticFeedback(feedbackConstant: Int) {
    if (context.isTouchExplorationEnabled()) {
        // Don't mess with a blind person's vibrations
        return
    }
    // Either this needs to be set to true, or android:hapticFeedbackEnabled="true" needs to be set in XML
    isHapticFeedbackEnabled = true

    /**
     * [HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING]
     * is deprecated in Android 13+
     */
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
        performHapticFeedback(feedbackConstant)
    } else {
        // Most of the constants are off by default: for example, clicking on a button doesn't cause the phone to vibrate anymore
        // if we still want to access this vibration, we'll have to ignore the global settings on that.
        performHapticFeedback(feedbackConstant, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING)
    }
}

private fun Context.isTouchExplorationEnabled(): Boolean {
    // can be null during unit tests
    val accessibilityManager =
        getSystemService(Context.ACCESSIBILITY_SERVICE) as AccessibilityManager?
    return accessibilityManager?.isTouchExplorationEnabled ?: false
}

fun Activity.toggleOrientation() {
    requestedOrientation =
        if (requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED ||
            requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
        ) {
            ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
        } else ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
}

@RequiresApi(Build.VERSION_CODES.S)
fun Context.launchManageMedia() {
    val intent = Intent().apply {
        action = Settings.ACTION_REQUEST_MANAGE_MEDIA
        data = Uri.fromParts("package", packageName, null)
    }
    startActivity(intent)
}

val isManageFilesAllowed: Boolean
    get() = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && BuildConfig.ALLOW_ALL_FILES_ACCESS

@RequiresApi(Build.VERSION_CODES.S)
fun Context.launchManageFiles() {
    val intent = Intent().apply {
        action = Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION
        data = Uri.fromParts("package", packageName, null)
    }
    startActivity(intent)
}

fun Context.getEditImageCapableApps(): List<ResolveInfo> {
    val intent = Intent(Intent.ACTION_EDIT).apply {
        setType("image/*")
    }
    val resolveInfoList = packageManager.queryIntentActivities(intent, 0)
    return resolveInfoList.filterNot { it.activityInfo.packageName == BuildConfig.APPLICATION_ID }
}

fun Context.launchEditImageIntent(packageName: String, uri: Uri) {
    val intent = Intent(Intent.ACTION_EDIT).apply {
        addCategory(Intent.CATEGORY_DEFAULT)
        setDataAndType(uri.authorizedUri(this@launchEditImageIntent), "image/*")


ef="https://www.addtoany.com/add_to/facebook_messenger?linkurl=https%3A%2F%2Fdubisthalle.de%2Fintendanten-wechsel-beim-mdr&linkname=Intendanten-Wechsel%20beim%20MDR" title="Messenger" rel="nofollow noopener" target="_blank">

	Share


write {
    height: fit-content;
    text-align: center;
    width: 100%;
}.main {
    grid-column-start: 1;
    grid-column-end: 9;
    background: #F8F8FA;
}
.main-text {
    text-align: center;
    font-weight: bold;
}
.main-text h2 {
    font-family: 'cafe24_djh';
}
.main-text p {
    font-family: 'cafe24_sph';
    font-size: 18px;
}
.nail {
    display: grid;
    grid-template-columns: repeat(2, 515px);
    grid-template-rows: 510px;
    grid-gap: 0px 40px;
    justify-content: center;
}
.slider {
    grid-column-start: 1;
    grid-column-end: 2;
    min-width: 515px;
    justify-self: center;
}
.slider .imgs{
    padding: 0;
    margin: 0;
}
.slider .imgs img{
    width: 515px;
    height: 510px;
    border-radius: 20px;
    border: 1px solid #e7e7e7;
}
.content_info {
    grid-column-start: 2;
    grid-column-end: 3;
    min-width: 515px;
    border-radius: 20px;
    background: white;
    justify-self: center;
    text-align: center;
    border: 1px solid #e7e7e7;
    box-shadow: 1px 1px 4px 2px #e0e0e0;
    display: flex;
    flex-direction: column;
}
.content_info h4 {
    font-weight: bold;
}
.content_info .name {
    display: flex;
    justify-content: space-around;
    border-bottom: 1px solid #e0e0e0;
}
.content_info .name h6 i {
    font-weight: bold;
}
.content_info .content {
    height: 70%;
    border: solid;
    text-align: start;
    margin: 5% 5% 0 5%;
    padding: 3%;
}
.content_info .find_btn {
    margin: 0 5% 5% 5%;
}
.content_info .find_btn > button {
    float: right;
}

.trip_text {
    width: 1080px;
    height: 700px;
    margin: 0 auto;
}
.line {
    width: 100%;
    margin: 10px auto;
}
.main-second{
    width: 1080px;
    height: 600px;
    background: rgb(255, 255, 255);
    margin: 0 auto;
    border: 1px solid #d4d4d4;
    box-shadow: 1px 1px 4px 2px #e0e0e0;
}
.bottom-btn-group2{
    color: black;
    text-align: center;
}
#btn1{
    font-size: 15px;
    width: 70px;
    margin-left: 25px;
}
#btn2{
    font-size: 15px;
    width: 70px;
    margin-left: 25px;
}
#btn3{
    font-size: 15px;
    width: 70px;
    margin-left: 25px;
}
#pText:hover{
	cursor: pointer;
}.fc-icon,.fc-unselectable{-moz-user-select:none;-ms-user-select:none}.fc .fc-button,.fc-icon{text-transform:none;font-weight:400}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc .fc-button:not(:disabled),.fc a[data-navlink],.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-unselectable{-webkit-user-select:none;user-


.ADVControl.BlockCount != 2 {
		t.Error("BlockCount on 11 records is not equal to 2")
	}
}

// TestFileADVControlValidate validates ADV File Control
func TestFileADVControlValidate(t *testing.T) {
	file := mockFileADV(t)

	file.ADVControl.TotalDebitEntryDollarAmountInFile = -100
	err := file.Validate()
	if !base.Match(err, NewErrFileCalculatedControlEquality("TotalDebitEntryDollarAmountInFile", 0, 0)) {
		t.Errorf("%T: %s", err, err)
	}
}

// TestFileControlValidate validates PPD File Control
func TestFileControlValidate(t *testing.T) {
	file := mockFilePPD(t)

	file.Control.TotalDebitEntryDollarAmountInFile = 22
	err := file.Validate()
	if !base.Match(err, NewErrFileCalculatedControlEquality("TotalDebitEntryDollarAmountInFile", 0, 22)) {
		t.Errorf("%T: %s", err, err)
	}
}

// TestBatchHeaderNil Batch Header Nil
func TestBatchHeaderNil(t *testing.T) {
	fh := mockFileHeader()
	bh := mockBatchPPDHeader()

	entryOne := mockPPDEntryDetail()

	// build the batch
	batch := NewBatchPPD(bh)
	batch.AddEntry(entryOne)

	if err := batch.Create(); err != nil {
		t.Fatalf("Unexpected error building batch: %s\n", err)
	}

	batch.Header = nil

	// build the file
	file := NewFile()
	file.SetHeader(fh)
	file.AddBatch(batch)
	if err := file.Create(); err != nil {
		t.Fatalf("Unexpected error building file: %s\n", err)
	}

}

// TestBatchControlNil Batch Control Nil
func TestBatchControlNil(t *testing.T) {
	fh := mockFileHeader()
	bh := mockBatchPPDHeader()

	entryOne := mockPPDEntryDetail()

	// build the batch
	batch := NewBatchPPD(bh)
	batch.AddEntry(entryOne)

	if err := batch.Create(); err != nil {
		t.Fatalf("Unexpected error building batch: %s\n", err)
	}

	batch.Control = nil

	// build the file
	file := NewFile()
	file.SetHeader(fh)
	file.AddBatch(batch)
	if err := file.Create(); err != nil {
		t.Fatalf("Unexpected error building file: %s\n", err)
	}

}

func TestFileADV__readFromJson(t *testing.T) {
	path := filepath.Join("test", "testdata", "adv-valid.json")
	bs, err := os.ReadFile(path)
	if err != nil {
		t.Fatal(err)
	}

	file, err := FileFromJSON(bs)
	if err != nil {
		t.Fatal(err)
	}

	// Ensure the file is valid
	if err := file.Create(); err != nil {
		t.Error(err)
	}
	if err := file.Validate(); err != nil {
		t.Error(err)
	}

	if file.ID != "adv-01" {
		t.Errorf("file.ID: %s", file.ID)
	}

	// Header
	if file.Header.ImmediateOrigin != "121042882" || file.Header.ImmediateOriginName != "Wells Fargo" {
		t.Errorf("origin=%s name=%s", file.Header.ImmediateOrigin, file.Header.ImmediateOriginName)
	}
	if file.Header.ImmediateDestination != "231380104" || file.Header.ImmediateDestinationName != "Citadel" {
		t.Errorf("destination=%s name=%s", file.Header.ImmediateDestinatio


Float R0 = mBorderWidths[sideH] / 2.0f;
  Float Rn = mBorderWidths[sideV] / 2.0f;
  if (R0 == 0.0f && Rn == 0.0f) {
    return;
  }

  nscolor borderColor = mBorderColors[aSide];
  Bezier outerBezier;
  Bezier innerBezier;
  GetOuterAndInnerBezier(&outerBezier, &innerBezier, aCorner);

  bool ignored;
  Point C0 = GetStraightBorderPoint(sideH, aCorner, &ignored);
  Point Cn = GetStraightBorderPoint(sideV, aCorner, &ignored);
  DottedCornerFinder finder(outerBezier, innerBezier, aCorner,
                            mBorderRadii[aCorner].width,
                            mBorderRadii[aCorner].height, C0, R0, Cn, Rn,
                            mBorderCornerDimensions[aCorner]);

  RefPtr<PathBuilder> builder = mDrawTarget->CreatePathBuilder();
  size_t segmentCount = 0;
  const Float AA_MARGIN = 2.0f;
  Rect marginedDirtyRect = mDirtyRect;
  marginedDirtyRect.Inflate(std::max(R0, Rn) + AA_MARGIN);
  bool entered = false;
  while (finder.HasMore()) {
    if (segmentCount > BORDER_SEGMENT_COUNT_MAX) {
      RefPtr<Path> path = builder->Finish();
      mDrawTarget->Fill(path, ColorPattern(ToDeviceColor(borderColor)));
      builder = mDrawTarget->CreatePathBuilder();
      segmentCount = 0;
    }

    DottedCornerFinder::Result result = finder.Next();

    if (marginedDirtyRect.Contains(result.C) && result.r > 0) {
      entered = true;
      builder->MoveTo(Point(result.C.x + result.r, result.C.y));
      builder->Arc(result.C, result.r, 0, Float(2.0 * M_PI));
      segmentCount++;
    } else if (entered) {
      break;
    }
  }
  RefPtr<Path> path = builder->Finish();
  mDrawTarget->Fill(path, ColorPattern(ToDeviceColor(borderColor)));
}

static inline bool DashedPathOverlapsRect(Rect& pathRect,
                                          const Rect& marginedDirtyRect,
                                          DashedCornerFinder::Result& result) {
  // Calculate a rect that contains all control points of the |result| path,
  // and check if it intersects with |marginedDirtyRect|.
  pathRect.SetRect(result.outerSectionBezier.mPoints[0].x,
                   result.outerSectionBezier.mPoints[0].y, 0, 0);
  pathRect.ExpandToEnclose(result.outerSectionBezier.mPoints[1]);
  pathRect.ExpandToEnclose(result.outerSectionBezier.mPoints[2]);
  pathRect.ExpandToEnclose(result.outerSectionBezier.mPoints[3]);
  pathRect.ExpandToEnclose(result.innerSectionBezier.mPoints[0]);
  pathRect.ExpandToEnclose(result.innerSectionBezier.mPoints[1]);
  pathRect.ExpandToEnclose(result.innerSectionBezier.mPoints[2]);
  pathRect.ExpandToEnclose(result.innerSectionBezier.mPoints[3]);

  return pathRect.Intersects(marginedDirtyRect);
}

void nsCSSBorderRenderer::DrawDashedCornerSlow(mozilla::Side aSide,
                                               Corner aCorner) {
  NS_ASSERTION(mBorderStyles[aSide] == StyleBorderStyle::Dashed,
               "Style should be dashed.");

  mozilla::Side sideH(GetHorizontalSide(aCorner));
  mozilla::Side sideV(GetVerticalSide(aCorner));
  Float borderWidthH = mBorderWidths[sideH];
  Float borderWidthV = mBorder


ceGun,1},{amPortalGun,2}},
{sndSineGun,sndOops},75},

{loc("Kerguelen"),
loc("The continent of cowards"),
"| |"..loc("Special weapons:").." |"..
GetAmmoName(amHammer)..": "..CS.HAMMER_ROAR_INFO.."|"..
GetAmmoName(amHammer)..": "..CS.HAMMER_SWAP_INFO.."|"..
GetAmmoName(amHammer)..": "..CS.HAMMER_LONELY_INFO.."|"..
GetAmmoName(amHammer)..": "..CS.HAMMER_SABOTAGE_INFO,
{amHammer,8},
{{amHammer,100},{amMineStrike,1},{amBallgun,1},{amTeleport,1}},
{sndPiano5,sndStupid},75},

{loc("Zealandia"),
loc("The forgotten continent"),
loc("Surprise supplies: Get 1-3 random weapons each turn.") .. "|" ..
loc("Treasure: Massive weapon bonus in first turn.").."|"..
loc("Forgetfulness: You will lose all your weapons each turn."),
{amInvulnerable,9},
{{amBazooka,1},{amGrenade,1},{amBlowTorch,1},{amSwitch,1},{amRope,1},{amDrill,1},{amDEagle,1},{amPickHammer,1},{amFirePunch,1},{amWhip,1},{amMortar,1},{amSnowball,1},{amExtraTime,1},{amInvulnerable,1},{amVampiric,1},{amFlamethrower,1},{amBee,1},{amClusterBomb,1},{amTeleport,1},{amLowGravity,1},{amJetpack,1},{amGirder,1},{amLandGun,1},{amBirdy,1},{amAirMine,1},{amTardis,1},{amLaserSight,1},{amAirMine,1}},
{sndSplash,sndFirstBlood},100},

{loc("Sundaland"),
loc("The continent of greed"),
loc("Bounty: Get 6 weapons for each kill (even on own hogs)."),
{amTardis,10},
{{amClusterBomb,5},{amTardis,100},{amWhip,100},{amKamikaze,100},{amAirMine,2}},
{sndWarp,sndSameTeam},100}

}

--weapontype,ammo,?,duration,*times your choice,affect on random team (should be placed with 1,0,1,0,1 on the 6th option for better randomness)
CS.WEAPONS_DAMAGE = {
	{amKamikaze,    0, 1, 0, 1, 0},
	{amSineGun,     0, 1, 0, 1, 0},
	{amMineStrike,  0, 1, 6, 1, 1},
	{amGrenade,     0, 1, 0, 1, 0},
	{amPiano,       0, 1, 7, 1, 0},
	{amClusterBomb, 0, 1, 0, 1, 0},
	{amBee,         0, 1, 0, 1, 0},
	{amShotgun,     0, 1, 0, 1, 0},
	{amSniperRifle, 0, 1, 0, 1, 0},
	{amDynamite,    0, 1, 6, 1, 1},
	{amFirePunch,   0, 1, 0, 1, 0},
	{amHellishBomb, 0, 1, 6, 1, 2},
	{amWhip,        0, 1, 0, 1, 0},
	{amNapalm,      0, 1, 6, 1, 1},
	{amPickHammer,  0, 1, 0, 1, 0},
	{amBaseballBat, 0, 1, 0, 1, 1},
	{amMortar,      0, 1, 0, 1, 0},
	{amCake,        0, 1, 5, 1, 2},
	{amSeduction,   0, 1, 0, 1, 0},
	{amWatermelon,  0, 1, 6, 1, 2},
	{amDrill,       0, 1, 0,


Stream .uiStreamStory .storyOnlyMeWithoutPhoto .storyInnerContent{margin-left:0}.uiStream .storyOnlyMe .highlightSelector{margin-top:-13px}.uiStreamHomepage .uiStreamStory:first-child .storyOnlyMe .highlightSelector{margin-top:-17px}.uiStreamStory .storyOnlyMe .uiMediaThumb,.uiStreamStory .storyOnlyMe .uiPhotoThumb{overflow:hidden;position:relative}.uiStreamStory .storyOnlyMe .photoWrap:before,.uiStreamStory .storyOnlyMe .uiMediaThumb:before,.uiStreamStory .storyOnlyMe .uiPhotoThumb:before{background:url(/rsrc.php/v2/yZ/r/2HWgDBAzA-9.png);bottom:0;content:'';display:block;height:34px;margin:3px;position:absolute;right:0;width:34px;z-index:1}.uiStreamStory .storyOnlyMe .photoWrap:before,.uiStreamStory .storyOnlyMe .photoRedesign .uiMediaThumb:before,.uiStreamStory .storyOnlyMe .photoRedesign .uiPhotoThumb:before{margin:0}.uiStreamStory .storyOnlyMe .uiMediaThumb:before{margin:4px}.uiStreamStory .storyOnlyMe .uiAttachmentPhotoBox .uiMediaThumb:before{margin:2px}.permalinkBody .permalink_stream .uiStream .storyOnlyMe{padding-bottom:3px;padding-top:0}.permalink_stream .uiStream .storyOnlyMe .onlyMeBorder{margin:-10px 15px 0 0;position:absolute;top:-2px;width:100%}.permalink_stream .uiStream .storyOnlyMe .onlyMeBorderBottom{bottom:-1px;margin-top:0;position:relative;top:auto;width:100%}.uiStream .storyOnlyMe .onlyMeDesignSelector .uiSelectorButton span.uiButtonText{color:#3b5998;display:inline-block;line-height:1;margin-left:3px;margin-right:2px}.uiStream .storyOnlyMe .onlyMeDesignSelector .openToggler span.uiButtonText{color:#fff}.onlyMeDesignSelector .uiSelectorButton span.uiButtonText{display:none}.uiStream .uiStreamStory .storyOnlyMe .onlyMeDesignSelector .openToggler .customimg{background-image:url(/rsrc.php/v2/yW/r/mEuB3VDlQ1f.png);background-repeat:no-repeat;background-size:auto;background-position:left -9px;height:12px;margin-left:-1px;margin-top:1px;width:12px}.uiStream .uiStreamStory .storyOnlyMe .onlyMeDesignSelector .customimg{background-image:url(/rsrc.php/v2/yW/r/mEuB3VDlQ1f.png);background-repeat:no-repeat;background-size:auto;background-position:-151px -32px;height:12px;margin-left:-1px;margin-top:1px;width:12px}.uiStream .uiStreamStory .storyOnlyMe .onlyMeDesignSelector .uiSelectorButton{padding:2px 18px 2px 6px}.uiStream .uiStreamStory .storyOnlyMe .onlyMeDesignSelector .wrap .uiSelectorButton:hover{background-image:url(/rsrc.php/v2/yy/r/OMALZqiGpeq.png);background-repeat:no-repeat;background-size:auto;background-position:right -1px;border:1px solid #999}.uiStream .uiStreamStory .storyOnlyMe:hover .onlyMeDesignSelector .openToggler a.uiSelectorButton,.uiStream .uiStreamStory .storyOnlyMe .onlyMeDesignSelector .openToggler a.uiSelectorButton:hover,.uiStream .uiStreamStory .storyOnlyMe .onlyMeDesignSelector .openToggler a.uiSelectorButton{background-image:url(/rsrc.php/v2/yy/r/OMALZqiGpeq.png);background-repeat:no-repeat;background-size:auto;background-position:right -246px;background-color:#6d84b4;border:1px solid #3b5998;border-bottom-color:#6d84b4;-webkit-box-shadow:n


#include <efi.h>
#include <efilib.h>

EFI_STATUS
GetVariableAttr(CHAR16 *var, UINT8 **data, UINTN *len, EFI_GUID owner,
		  UINT32 *attributes)
{
	EFI_STATUS efi_status;

	*len = 0;

	efi_status = uefi_call_wrapper(RT->GetVariable, 5, var, &owner,
				       NULL, len, NULL);
	if (efi_status != EFI_BUFFER_TOO_SMALL)
		return efi_status;

	*data = AllocateZeroPool(*len);
	if (!*data)
		return EFI_OUT_OF_RESOURCES;

	efi_status = uefi_call_wrapper(RT->GetVariable, 5, var, &owner,
				       attributes, len, *data);

	if (efi_status != EFI_SUCCESS) {
		FreePool(*data);
		*data = NULL;
	}
	return efi_status;
}

EFI_STATUS
GetVariable(CHAR16 *var, UINT8 **data, UINTN *len, EFI_GUID owner)
{
	return GetVariableAttr(var, data, len, owner, NULL);
}

EFI_GUID DUMMY_GUID =
{0x55aad538, 0x8f82, 0x4e2a, {0xa4,0xf0,0xbe, 0x59, 0x13, 0xb6, 0x5f, 0x1e}};

static EFI_OPTNONE void
DebugHook(void)
{
	EFI_GUID guid = DUMMY_GUID;
	UINT8 *data = NULL;
	UINTN dataSize = 0;
	EFI_STATUS efi_status;
	register volatile unsigned long long x = 0;
	extern char _text, _data;

	if (x)
		return;

	efi_status = GetVariable(L"DUMMY_DEBUG", &data, &dataSize, guid);
	if (EFI_ERROR(efi_status)) {
		return;
	}

	Print(L"add-symbol-file /usr/lib/debug/boot/efi/debughook.debug "
	      L"0x%08x -s .data 0x%08x\n", &_text, &_data);

	Print(L"Pausing for debugger attachment.\n");
	Print(L"To disable this, remove the EFI variable DUMMY_DEBUG-%g .\n",
	      &guid);
	x = 1;
	while (x++) {
		/* Make this so it can't /totally/ DoS us. */
#if defined(__x86_64__) || defined(__i386__) || defined(__i686__)
		if (x > 4294967294ULL)
			break;
		__asm__ __volatile__("pause");
#elif defined(__aarch64__)
		if (x > 1000)
			break;
		__asm__ __volatile__("wfi");
#else
		if (x > 12000)
			break;
		uefi_call_wrapper(BS->Stall, 1, 5000);
#endif
	}
	x = 1;
}

EFI_STATUS
efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
{
	InitializeLib(image, systab);
	DebugHook();
	return EFI_SUCCESS;
}


 obsah patří někomu jinému a není sdílen stejným způsobem jako váš příběh.",
          "othersUnsharedAuthorized": "Tento obsah patří někomu jinému, ale máte oprávnění ho sdílet.",
          "inaccessible": "Tento obsah není přístupný.",
          "deleted": "Tento obsah byl odstraněn.",
          "unauthorized": "Nejste oprávněni zobrazit tento obsah.",
          "popupFeatureLayer": "Vyskakovací okna dlaždicové vrstvy pochází z vrstvy prvků, která není sdílena stejným způsobem jako váš příběh.",
          "subscriptionContent": "Předplatitelský obsah musíte autorizovat pro veřejné použití.",
          "premiumContent": "Prémiový obsah musíte autorizovat pro veřejné použití.",
          "secureService": "Zabezpečený obsah není přístupný vašim uživatelům.",
          "missingItemWarning": "Položka spojená s touto vrstvou byla odstraněna."
        },
        "tooltips": {
          "unshared": "Kliknutím zobrazíte další informace o sdílení.",
          "othersUnshared": "Nemáte oprávnění sdílet obsah vlastněný jinými uživateli. Požádejte jeho vlastníka, aby ho sdílel, odstraňte mapu ze svého příběhu nebo mapu upravte odstraněním vrstev, které nejsou vaše. Kliknutím zobrazíte další informace o úpravách map.",
          "inaccessible": "Odstraňte tuto mapu ze svého příběhu nebo ji upravte odstraněním nepřístupných vrstev. Kliknutím zobrazíte další informace o úpravách map.",
          "deleted": "Odstraňte tuto mapu ze svého příběhu nebo ji upravte odstraněním chybějících vrstev. Kliknutím zobrazíte další informace o úpravách map.",
          "unauthorized": "Odstraňte tuto mapu ze svého příběhu nebo ji upravte odstraněním neautorizovaných vrstev. Kliknutím zobrazíte další informace o úpravách map.",
          "popupFeatureLayer": "Vyskakovací okna dlaždicové vrstvy pochází z vrstvy prvků, která není sdílena stejným způsobem jako váš příběh.",
          "subscriptionContent": "Předplatitelský obsah nespotřebovává kredity. Kliknutím zobrazíte další informace.",
          "premiumContent": "Vaší organizaci budou účtovány kredity vždy, když někdo ve vašem příběhu zobrazí prémiovou vrstvu. Kliknutím zobrazíte další informace.",
          "secureService": "Odstraňte zabezpečený obsah ze svého příběhu nebo kliknutím zobrazte informace o tom, jak autorizovat zabezpečený obsah pro použití jinými osobami.",
          "missingItemWarning": "Tato vrstva stále fung


地抬起昏花的眼，望着那年青的正义维护者。

   ………………

   软坐在地上的武训，耳听着满厅里嗟叹赞许的声音，眼望着四下捐地捐钱的景象，兴奋、感激、惊讶，使他说不出话来。他被扶起，两行热泪象泉水般从脸上淌了下来……（电影小说《武训传》一六一——一六二页）

   好一首对地主阶级的颂歌！既然作者是把武训当作“站稳了阶级的立场”“和封建统治者作了一生一世的斗争”的农民英雄来描写的，那末，可怜可怜，这位农民英雄在这群地主们面前竟是如此渺小、如此卑微，对于地主们的仁慈，如此地感激涕零呵！在这里，作者不是暴露地主而是歌颂地主，不是宣传农民对地主的阶级斗争，而是宣传农民与地主的阶级合作，这难道还不十分明显吗？

   电影中的主题歌《武训赞》，一方面歌颂武训个人：“大哉武训，至勇至仁”；另一方面诅咒时代：“世风何薄，大陆日沉”。即使作者诅咒的是过去的时代，这种诅咒也是错误的。所谓“世风”并不是统一的，有维护封建社会秩序的“世风”，也有破坏封建社会秩序的“世风”。武训受到了封建统治者从满清皇帝到当地官僚地主的一致的宠爱，他所办的“义学”又得到了他们的那样表扬和支持，那末，就封建统治阶级对武训个人的关系来说，这个“世风”不算薄了。但是广大农民是不拥护武训的事业的，他们唾弃武训那种在封建统治者面前卑躬屈膝的无耻的、下贱的叛变行为，而以自己坚苦卓绝的英勇斗争，有力地冲击着封建社会秩序的基础。武训时代的农民革命的大风暴，就是破坏封建社会秩序的大“世风”、代表几千年来封建制度的满清反动统治正面临最后死亡的命运。只有不从农民的立场而从封建地主的立场，不从人民的立场而从人民压迫者的立场来观察问题的人，才能有“世


---------- */
/* ==social module               */
/* ----------------------------- */

.contact_link {
  &:hover {
    text-decoration: none;
  }

  &> .fa {
    display: inline;
  }
}
/* ----------------------------- */
/* == soft reset                 */
/* ----------------------------- */

/* switching to border-box model for all elements */
html {
  box-sizing: border-box;
}

* {
  box-sizing: inherit;
}

ul,
ol {
  padding-left: 2em;
}

ul.@{kna-namespace}unstyled {
  list-style: none;
}

img {
  vertical-align: middle;
}

/* height auto only for non SVG images */
img:not([src$=".svg"]) {
  height: auto;
}

blockquote,
figure {
  margin-left: 0;
  margin-right: 0;
}

/* ----------------------------- */
/* == typography                 */
/* ----------------------------- */

html {

  /* set base font-size to equiv "10px", which is adapted to rem unit */
  font-size: 62.5%;

  /* IE9-IE11 math fixing. See http://bit.ly/1g4X0bX */
  /* thanks to @guardian, @victorbritopro and @eQRoeil */
  font-size: ~'calc(1em * .625)';

  /* disallow text zooming on orientation change (non standard property) */
  -webkit-text-size-adjust: 100%;
      -ms-text-size-adjust: 100%;
}

body {

  /* set body font-size in em (1.4em equiv "14px") */
  font-size: unit((@base-font-size / 10), em);

  background-color: @base-background;
  color: @base-color;
  font-family: @font-stack-common;
  line-height: @line-height;
}

a {
  color: @base-color-link;
  &:hover, &:focus, &:active {
    color: @base-color-link-hover;
  }
}

/* font-sizing for content */
p,
.@{kna-namespace}p-like,
ul,
ol,
dl,
blockquote,
pre,
td,
th,
label,
textarea,
caption,
details,
figure {
  margin-top: 0.75em;
  margin-bottom: 0;
  line-height: @line-height;
}

h1,
.@{kna-namespace}h1-like {
  font-size: @h1-size;
  font-family: @font-stack-headings;
}

h2,
.@{kna-namespace}h2-like {
  font-size: @h2-size;
  font-family: @font-stack-headings;
}

h3,
.@{kna-namespace}h3-like {
  font-size: @h3-size;
}

h4,
.@{kna-namespace}h4-like {
  font-size: @h4-size;
}

h5,
.@{kna-namespace}h5-like {
  font-size: @h5-size;
}

h6,
.@{kna-namespace}h6-like {
  font-size: @h6-size;
}

/* alternate font-sizing */
.@{kna-namespace}smaller {
  font-size: 0.6em;
}

.@{kna-namespace}small {
  font-size: 0.8em;
}

.@{kna-namespace}big {
  font-size: 1.2em;
}

.@{kna-namespace}bigger {
  font-size: 1.5em;
}

.@{kna-namespace}biggest {
  font-size: 2em;
}

code,
pre,
samp,
kbd {
  /* IE fix */
  white-space: pre-line;
  white-space: pre-wrap;
  font-family: @font-stack-monospace;
  line-height: normal;
}

em,
.@{kna-namespace}italic,
address,
cite


TANK+".in."+i);
		mTanksOutput = new FluidTankGT[mRecipes.mOutputFluidCount];
		for (int i = 0; i < mTanksOutput.length; i++) mTanksOutput[i] = new FluidTankGT(tCapacity).readFromNBT(aNBT, NBT_TANK+".out."+i);
	}

	@Override
	public void writeToNBT2(NBTTagCompound aNBT) {
		super.writeToNBT2(aNBT);
		for (int i = 0; i < mTanksInput .length; i++) mTanksInput [i].writeToNBT(aNBT, NBT_TANK+".in." +i);
		for (int i = 0; i < mTanksOutput.length; i++) mTanksOutput[i].writeToNBT(aNBT, NBT_TANK+".out."+i);
	}

	@Override
	public void addToolTips(List<String> aList, ItemStack aStack, boolean aF3_H) {
		aList.add(Chat.CYAN     + LH.get(LH.RECIPES) + ": " + Chat.WHITE + LH.get(mRecipes.mNameInternal));
		aList.add(Chat.CYAN     + LH.get(LH.RECIPES_BATHINGPOT_USAGE));
		aList.add(Chat.ORANGE   + LH.get(LH.NO_GUI_CLICK_TO_INTERACT)   + " (" + LH.get(LH.FACE_TOP) + ")");
		aList.add(Chat.DGRAY    + LH.get(LH.TOOL_TO_DETAIL_MAGNIFYINGGLASS));
	}

	@Override
	public long onToolClick2(String aTool, long aRemainingDurability, long aQuality, Entity aPlayer, List<String> aChatReturn, IInventory aPlayerInventory, boolean aSneaking, ItemStack aStack, byte aSide, float aHitX, float aHitY, float aHitZ) {
		long rReturn = super.onToolClick2(aTool, aRemainingDurability, aQuality, aPlayer, aChatReturn, aPlayerInventory, aSneaking, aStack, aSide, aHitX, aHitY, aHitZ);
		if (rReturn > 0 || isClientSide()) return rReturn;
		if (aTool.equals(TOOL_plunger)) {
			updateInventory();
			for (FluidTankGT tTank : mTanksOutput) {long rAmount = GarbageGT.trash(tTank, 1000); if (rAmount > 0) return rAmount;}
			for (FluidTankGT tTank : mTanksInput ) {long rAmount = GarbageGT.trash(tTank, 1000); if (rAmount > 0) return rAmount;}
			updateAdjacentInventories();
		}
		if (aTool.equals(TOOL_magnifyingglass)) {
			if (aChatReturn != null) {
				boolean temp = T;
				for (FluidTankGT tTank : mTanksInput) if (!tTank.isEmpty()) {
					temp = F;
					aChatReturn.add("Input: " + tTank.content());
				}
				for (FluidTankGT tTank : mTanksOutput) if (!tTank.isEmpty()) {
					temp = F;
					aChatReturn.add("Output: " + tTank.content());
				}
				if (temp) aChatReturn.add("Contains no Fluids");
			}
			return mTanksInput.length + mTanksOutput.length;
		}
		return 0;
	}

	@Override
	public void onTick2(long aTimer, boolean aIsServerSide) {
		if (aIsServerSide) {
			if (SERVER_TIME % 600 == 10 && worldObj.isRaining() && getRainOffset(0, 1, 0)) {
				BiomeGenBase tBiome = getBiome();
				if (tBiome.rainfall >


   public int getDhr() {
        System.err.println("DHR register of DMA controller has no effect for now");
        return dhr;
    }

    public void setDhr(int dhr) {
        this.dhr = dhr;
    }

    public boolean isRsrReqS0() {
        return (rsr & RSR_REQS0_MASK) != 0;
    }
    public void setRsrReqS0() {
        rsr |= RSR_REQS0_MASK;
    }
    public void clearRsrReqS0() {
        rsr &= ~RSR_REQS0_MASK;
    }

    public boolean isRsrReqS4() {
        return (rsr & RSR_REQS4_MASK) != 0;
    }
    public void setRsrReqS4() {
        rsr |= RSR_REQS4_MASK;
    }
    public void clearRsrReqS4() {
        rsr &= ~RSR_REQS4_MASK;
    }

    public TxDmaChannel getChannel(int channelNumber) {
        return channels[channelNumber];
    }
}
package com.nikonhacker.emu.peripherials.serialInterface.util;

import com.nikonhacker.Format;
import com.nikonhacker.emu.peripherials.serialInterface.SerialDevice;
import com.nikonhacker.emu.peripherials.serialInterface.SpiSlaveDevice;

import java.util.ArrayList;
import java.util.List;

/**
 * This is a special version of SerialBus to simulate a SPI bus with one master and several slaves
 * The change is that it uses a special master partner that checks that exactly one slave device is selected and only
 * sends bytes to that device
 */
public class SpiBus extends SerialBus {
    public SpiBus(String teeName, SerialDevice masterDevice) {
        super(teeName, masterDevice);
    }

    protected InternalMasterPartner getInternalMasterPartner() {
        return new InternalMasterSpiSlavePartner();
    }

    /**
     * This is a special version of InternalMasterSpiPartner
     * The change is it checks that exactly one slave device is selected
     */
    private class InternalMasterSpiSlavePartner extends InternalMasterPartner {
        @Override
        public void write(Integer value) {
            // List selected devices
            List<InternalSlavePartner> partnersOfSelectedSlaves = new ArrayList<>();
            for (InternalSlavePartner internalSlavePartner : internalSlavePartners) {
                if (((SpiSlaveDevice) internalSlavePartner.getTargetDevice()).isSelected()) {
                    partnersOfSelectedSlaves.add(internalSlavePartner);
                }
            }
            // Write if exactly one, otherwise warn
            switch (partnersOfSelectedSlaves.size()) {
                case 0:
                    throw new RuntimeException("Tring to write serial value 0x" + Format.asHex(value, 2) + " while no slave device is selected !");
                case 1:
                    partnersOfSelectedSlaves.get(0).reverseWrite(value);
                    break;
                default:
                    String msg="";
                    for (InternalSlavePartner partnerOfSelectedSlaves : partnersOfSelectedSlaves) {
                        msg += partnerOfSelectedSlaves.getTargetDevice() + " ";
                    }
                    throw new RuntimeException("Tring to write serial value 0x" + Format.asHex(value, 2) + " while more than slave device is selected (" + msg.trim() + ")!");
            }
        }

        @Override
        public String toString() {
            return "SpiBus SlavePartner";
        }
    }
}
package com.nikonhacker.emu.peripherials.serialInterface.util;

import com.nikonhacker.emu.peripherials.serialInterface.SerialDevice;

/**
 * This class is just a "useless" wire between


SecTwoResTemporalQualityScalability;
	__u16 wMaxMBperSecThreeResTemporalQualityScalability;
	__u16 wMaxMBperSecFourResTemporalQualityScalability;
	__u16 wMaxMBperSecOneResTemporalSpatialScalability;
	__u16 wMaxMBperSecTwoResTemporalSpatialScalability;
	__u16 wMaxMBperSecThreeResTemporalSpatialScalability;
	__u16 wMaxMBperSecFourResTemporalSpatialScalability;
	__u16 wMaxMBperSecOneResFullScalability;
	__u16 wMaxMBperSecTwoResFullScalability;
	__u16 wMaxMBperSecThreeResFullScalability;
	__u16 wMaxMBperSecFourResFullScalability;
} __attribute__((__packed__));

#define UVC_DT_FORMAT_H264_SIZE		52

/* H264 Payload - 3.1.2. H264 Video Frame Descriptor */
struct uvc_frame_h264 {
	__u8  bLength;
	__u8  bDescriptorType;
	__u8  bDescriptorSubType;
	__u8  bFrameIndex;
	__u16 wWidth;
	__u16 wHeight;
	__u16 wSARwidth;
	__u16 wSARheight;
	__u16 wProfile;
	__u8  bLevelIDC;
	__u16 wConstrainedToolset;
	__u32 bmSupportedUsages;
	__u16 bmCapabilities;
	__u32 bmSVCCapabilities;
	__u32 bmMVCCapabilities;
	__u32 dwMinBitRate;
	__u32 dwMaxBitRate;
	__u32 dwDefaultFrameInterval;
	__u8  bNumFrameIntervals;
	__u32 dwFrameInterval[];
} __attribute__((__packed__));

#define UVC_DT_FRAME_H264_SIZE(n)			(44+4*(n))

#define UVC_FRAME_H264(n) \
	uvc_frame_h264_##n

#define DECLARE_UVC_FRAME_H264(n)			\
struct UVC_FRAME_H264(n) {				\
	__u8  bLength;					\
	__u8  bDescriptorType;				\
	__u8  bDescriptorSubType;			\
	__u8  bFrameIndex;				\
	__u16 wWidth;					\
	__u16 wHeight;					\
	__u16 wSARwidth;				\
	__u16 wSARheight;				\
	__u16 wProfile;					\
	__u8  bLevelIDC;				\
	__u16 wConstrainedToolset;			\
	__u32 bmSupportedUsages;			\
	__u16 bmCapabilities;				\
	__u32 bmSVCCapabilities;			\
	__u32 bmMVCCapabilities;			\
	__u32 dwMinBitRate;				\
	__u32 dwMaxBitRate;				\
	__u32 dwDefaultFrameInterval;			\
	__u8  bNumFrameIntervals;			\
	__u32 dwFrameInterval[n];			\
} __attribute__ ((packed))

#endif /* __LINUX_USB_VIDEO_H */


);
        // If the file exists at all, assume it was written by API Extractor
        aedocSupported = true;
      }

      packageMetadata = new PackageMetadata(packageJsonFilePath, packageJson, aedocSupported);
      this._packageMetadataByPackageJsonPath.set(packageJsonFilePath, packageMetadata);
    }

    return packageMetadata;
  }

  /**
   * Returns true if the source file is part of a package whose .d.ts files support AEDoc annotations.
   */
  public isAedocSupportedFor(sourceFilePath: string): boolean {
    const packageMetadata: PackageMetadata | undefined = this.tryFetchPackageMetadata(sourceFilePath);
    if (!packageMetadata) {
      return false;
    }
    return packageMetadata.aedocSupported;
  }
}
import { LogFilter } from './log-filter';
import { LogLevel } from '../log-level.model';

export class MultiLevelLogFilter extends LogFilter {
    constructor(
        source: string,
        private levels: Array<LogLevel>
    ) {
        super(source);
    }

    IsLevelMatch(level: LogLevel): boolean {
        return this.levels.indexOf(level) >= 0;
    }
}
/*!
 * Copyright (c) Microsoft. All rights reserved.
 * Licensed under the MIT license. See LICENSE file in the project.
 */
import { existsSync } from 'fs'
import { join } from 'path'
import * as gulp from 'gulp'
import * as debug from 'gulp-debug'
import * as plumber from 'gulp-plumber'
import * as ts from 'gulp-typescript'
import { FileWatcher } from 'typescript'
import { noopStep } from '@essex/build-utils'
import { subtaskSuccess, subtaskFail } from '@essex/tasklogger'

const TYPESCRIPT_GLOBS = ['src/**/*.ts*', '!**/__tests__/**']

function createTsProject(overrides?: ts.Settings | undefined) {
	const cwd = process.cwd()
	const tsConfigPath = join(cwd, 'tsconfig.json')
	if (!existsSync(tsConfigPath)) {
		throw new Error('tsconfig.json file must exist')
	}

	return ts.createProject(tsConfigPath, overrides)
}

function executeCompile(logFiles: boolean, listen: boolean): gulp.TaskFunction {
	const project = createTsProject()
	const title = 'tsc'
	return function execute(): NodeJS.ReadWriteStream {
		const task = gulp
			.src(TYPESCRIPT_GLOBS, { since: gulp.lastRun(execute) })
			.pipe(
				plumber({
					errorHandler: !listen,
				}),
			)
			.pipe(project())
			.pipe(logFiles ? debug({ title }) : noopStep())
			.pipe(gulp.dest('lib'))

		if (listen) {
			task.on('end', () => subtaskSuccess(title))
			task.on('error', () => subtaskFail(title))
		}
		return task
	}
}

function executeTypeEmit(
	stripInternal: boolean,
	logFiles: boolean,
	listen: boolean,
): gulp.TaskFunction {
	const project = createTsProject({
		declaration: true,
		emitDeclarationOnly: true,
		stripInternal,
	})
	const title = 'typings'
	return function execute(): NodeJS.ReadWriteStream {
		const task = gulp
			.src(TYPESCRIPT_GLOBS, { since: gulp.lastRun(execute) })
			.pipe(
				plumber({
					errorHandler: !listen,
				}),
			)
			.pipe(project())
			.pipe(logFiles ? debug({ title }) : noopStep())
			.pipe(gulp.dest('dist/types'))

		if (listen) {
			task
				.on('end', () => subtaskSuccess(title))
				.on('error', () => subtaskFail(title))
		}
		return task
	}
}

/**
 * Compiles typescript from src/ to the lib/ folder
 */
export function compileTypescript(): gulp.TaskFunction {
	return executeCompile(false


 ease;
    transition: 0.3s ease;
}

.panel-pricing:hover {
    box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.05);
}

.panel-pricing .list-group-item {
    background: transparent;
    border: none;
    border-radius: 0;
}

.panel-pricing .panel-body hr {
    border-color: #f5f5f5;
    border-width: 2px;
}

.panel-pricing .panel-body .list-group hr {
    border-width: 1px;
}

.panel-pricing .panel-body .list-group .list-group-item i {
    color: #ed8739;
    padding-right: 15px;
}

.panel-pricing .panel-heading i {
    display: block;
    font-size: 50px;
    margin-bottom: 25px;
    margin-top: 50px;
    color: #212121;
}

.panel-pricing .panel-heading .panel-price {
    font-size: 60px;
    color: #212121;
    font-weight: 700;
    display: block;
    margin-top: 20px;
    text-transform: capitalize;
}

.panel-pricing .panel-heading .panel-price .pricing-dolor {
    display: inline-block;
    font-size: 18px;
    padding-top: 10px;
    vertical-align: top;
}

.panel-pricing .panel-footer {
    border: none;
}

.panel-pricing .panel-footer .btn,
.panel-pricing .panel-footer .wizard>.actions a,
.wizard>.actions .panel-pricing .panel-footer a,
.panel-pricing .panel-footer .dt-buttons .dt-button,
.dt-buttons .panel-pricing .panel-footer .dt-button,
.panel-pricing .panel-footer .tablesaw-sortable th.tablesaw-sortable-head button,
.tablesaw-sortable th.tablesaw-sortable-head .panel-pricing .panel-footer button,
.panel-pricing .panel-footer .sweet-alert button,
.sweet-alert .panel-pricing .panel-footer button,
.panel-pricing .panel-footer .owl-theme .owl-nav [class*="owl-"],
.owl-theme .owl-nav .panel-pricing .panel-footer [class*="owl-"],
.panel-pricing .panel-footer button.fc-agendaDay-button.fc-state-default.fc-corner-right,
.panel-pricing .panel-footer button.fc-month-button.fc-state-default.fc-corner-left,
.panel-pricing .panel-footer button.fc-agendaWeek-button,
.panel-pricing .panel-footer .fc-prev-button,
.panel-pricing .panel-footer .fc-next-button,
.panel-pricing .panel-footer .fc-today-button {
    font-size: 14px;
}

/*Dropdown*/
.show-on-hover:hover>ul.dropdown-menu {
    display: block;
}

.dropdown-menu {
    border-radius: 2px;
    border: none;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.175);
}

.dropdown-menu>li>a {
    color: #212121;
}

.dropdown-menu>li>a:hover {
    color: #212121;
    background: rgba(33, 33, 33, 0.05);
}

.dropdown-menu>li>a i {
    color: #878787;
    font-size: 18px;
    margin-right: 10px;
    width: 18px;
}

.dropdown-menu>li.sub-menu {
    position: relative;
}

.dropdown-menu>li.sub-menu .dropdown-me


_Ndis'*"]
pub const NDIS_NIC_SWITCH_VF_PARAMETERS_REVISION_1: u32 = 1u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"]
pub const NDIS_NIC_SWITCH_VPORT_INFO_ARRAY_ENUM_ON_SPECIFIC_FUNCTION: u32 = 1u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"]
pub const NDIS_NIC_SWITCH_VPORT_INFO_ARRAY_ENUM_ON_SPECIFIC_SWITCH: u32 = 2u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"]
pub const NDIS_NIC_SWITCH_VPORT_INFO_ARRAY_REVISION_1: u32 = 1u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"]
pub const NDIS_NIC_SWITCH_VPORT_INFO_GFT_ENABLED: u32 = 4u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"]
pub const NDIS_NIC_SWITCH_VPORT_INFO_LOOKAHEAD_SPLIT_ENABLED: u32 = 1u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"]
pub const NDIS_NIC_SWITCH_VPORT_INFO_PACKET_DIRECT_RX_ONLY: u32 = 2u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"]
pub const NDIS_NIC_SWITCH_VPORT_INFO_REVISION_1: u32 = 1u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"]
pub const NDIS_NIC_SWITCH_VPORT_PARAMETERS_REVISION_1: u32 = 1u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"]
pub const NDIS_NIC_SWITCH_VPORT_PARAMETERS_REVISION_2: u32 = 2u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"]
pub const NDIS_NIC_SWITCH_VPORT_PARAMS_CHANGE_MASK: u32 = 4294901760u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"]
pub const NDIS_NIC_SWITCH_VPORT_PARAMS_ENFORCE_MAX_SG_LIST: u32 = 32768u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"]
pub const NDIS_NIC_SWITCH_VPORT_PARAMS_FLAGS_CHANGED: u32 = 65536u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"]
pub const NDIS_NIC_SWITCH_VPORT_PARAMS_INT_MOD_CHANGED: u32 = 262144u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"]
pub const NDIS_NIC_SWITCH_VPORT_PARAMS_LOOKAHEAD_SPLIT_ENABLED: u32 = 1u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"]
pub const NDIS_NIC_SWITCH_VPORT_PARAMS_NAME_CHANGED: u32 = 131072u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"]
pub const NDIS_NIC_SWITCH_VPORT_PARAMS_NDK_PARAMS_CHANGED: u32 = 2097152u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"]
pub const NDIS_NIC_SWITCH_VPORT_PARAMS_NUM_QUEUE_PAIRS_CHANGED: u32 = 8388608u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"]
pub const NDIS_NIC_SWITCH_VPORT


magePath = @"/DevelopmentInProgress.TradeView.Wpf.Dashboard;component/Images/Dashboard.png"
            };

            var moduleGroup = new ModuleGroup
            {
                ModuleGroupName = "Dashboard"
            };

            var serverMonitor = new ModuleGroupItem
            {
                ModuleGroupItemName = "Servers",
                TargetView = typeof(ServerMonitorView).Name,
                TargetViewTitle = "Servers",
                ModuleGroupItemImagePath = @"/DevelopmentInProgress.TradeView.Wpf.Dashboard;component/Images/ServerMonitor.png"
            };

            moduleGroup.ModuleGroupItems.Add(serverMonitor);

            var accountsMonitor = new ModuleGroupItem
            {
                ModuleGroupItemName = "Accounts",
                TargetView = typeof(AccountsView).Name,
                TargetViewTitle = "Accounts",
                ModuleGroupItemImagePath = @"/DevelopmentInProgress.TradeView.Wpf.Dashboard;component/Images/Accounts.png"
            };

            moduleGroup.ModuleGroupItems.Add(accountsMonitor);

            moduleSettings.ModuleGroups.Add(moduleGroup);
            ModuleNavigator.AddModuleNavigation(moduleSettings);

            Logger.Log($"Initialized {this.GetType().FullName}", Category.Info, Priority.None);
        }
    }
}


ont)
    if xlabel:
        ax.set_xlabel(xlabel, fontproperties=font)
    if ylabel:
        ax.set_ylabel(ylabel, fontproperties=font)
    # 设置刻度标签字体
    for label in ax.get_xticklabels():
        label.set_fontproperties(font)
    for label in ax.get_yticklabels():
        label.set_fontproperties(font)

# 保存图表的函数
def save_fig(fig, filename, dpi=100):
    # 在保存前修复中文显示问题
    fix_seaborn_chinese(fig)
    fig.savefig(os.path.join(output_dir, filename), dpi=dpi, bbox_inches='tight')
    plt.close(fig)

# 打印基本信息
print("数据集形状:", df.shape)
print("\n处理后的数据集前5行:")
print(df.head())

# 1. 交叉表分析：教育水平与收入
education_income = pd.crosstab(df['education_simplified'], df['income'])
education_income_pct = pd.crosstab(df['education_simplified'], df['income'], normalize='index') * 100

print("\n教育水平与收入交叉表:")
print(education_income)
print("\n教育水平与高收入比例:")
print(education_income_pct['>50K'].sort_values(ascending=False))

# 绘制教育水平与收入热力图
fig, ax = plt.subplots(figsize=(10, 8))
# 设置热力图中的注释字体
sns.heatmap(education_income_pct, annot=True, fmt='.1f', cmap='YlGnBu', ax=ax,
           annot_kws={'fontsize':10, 'fontfamily':plt.rcParams['font.sans-serif'][0]})
# 使用辅助函数设置标题和标签
set_plot_labels(ax,
               title='教育水平与收入比例热力图 (%)',
               xlabel='收入',
               ylabel='教育水平')
plt.tight_layout()
save_fig(fig, 'education_income_heatmap.png')

# 2. 交叉表分析：性别、婚姻状况与收入
sex_marital_income = pd.crosstab([df['sex'], df['marital_status']], df['income'])
sex_marital_income_pct = pd.crosstab([df['sex'], df['marital_status']], df['income'], normalize='index') * 100

print("\n性别、婚姻状况与收入交叉表:")
print(sex_marital_income)

# 绘制性别、婚姻状况与收入热力图
fig, ax = plt.subplots(figsize=(14, 10))
# 修复形状不一致错误，使用更简单的数据重塑方式
sex_marital_pivot = sex_marital_income_pct['>50K'].unstack(level=0)
sns.heatmap(sex_marital_pivot, annot=True, fmt='.1f', cmap='YlGnBu', ax=ax)
ax.set_title('性别、婚姻状况与高收入比例热力图 (%)')
plt.tight_layout()
save_fig(fig, 'sex_marital_income_heatmap.png')

# 3. 交叉表分析：年龄组、工作时间与收入
age_hours_income = pd.crosstab([df['age_group'], df['work_hours_group']], df['income'])
age_hours_income_pct = pd.crosstab([df['age_group'], df['work_hours_group']], df['income'], normalize='index') * 100

print("\n年龄组、工作时间与收入交叉表:")
print(age_hours_income)

# 绘制年龄组、工作时间与收入热力图
fig, ax = plt.subplots(figsize=(12, 10))
# 修复形状不一致错误，使用更简单的数据重塑方式
age_hours_pivot = age_hours_income_pct['>50K'].unstack(level=0)
sns.heatmap(age_hours_pivot, annot=True, fmt='.1f', cmap='YlGnBu', ax=ax)
ax.set_title('年龄组、工作时间与高收入比例热力图 (%)')
plt.tight_layout()
save_fig(fig, 'age_hours_income_heatmap.png')

# 4. 交叉表分析：职业、种族与收入
# 获取前6个最频繁的职业
top_occupations = df['occupation'].value_counts().head(6).index
# 筛选数据
subset = df[df['occupation'].isin(top_occupations)]

occupation_race_income = pd.crosstab([subset['occupation'], subset['race']], subset['income'])
occupation_race_income_pct = pd.crosstab([subset['occupation'], subset['race']], subset['income'], normalize='index') * 100

print("\n职业、种族与收入交叉表 (前6个职业):")
print(occupation_race_income)

# 绘制职业、种族与收入热力图
fig, ax = plt.subplots(figsize=(16, 12))
# 修复形状不一致错误，使用更简单的数据重塑方式
occupation_race_pivot = occupation_race_income_pct['>50K'].unstack(level=0)
sns.heatmap(occupation_race_pivot, annot=True, fmt='.1f', cmap='YlGnBu', ax=ax)
ax.set_title('职业、种族与高收入比例热力图 (%) - 前6个职业')
plt.tight_layout()
save_fig(fig, 'occupation_race_income_heatmap.png')

# 5. 使用clustermap进行聚类分析
# 准备数据：不同特征组合的高收入比例
# 教育与工作类型
edu_work_income = pd.crosstab([df['education_simplified'], df['workclass']], df['income'], normalize='index')['>50K'] * 100
edu_work_pivot = edu_work_income.unstack().fillna(0)  # 填充缺失值，避免聚类问题

# 绘制聚类热力图
fig = plt.figure(figsize=(14, 12))
try:
    cluster_grid = sns.clustermap(edu_work_pivot, cmap='YlGnBu', annot=True, fmt='.1f',
                                figsize=(14, 12))
    cluster_grid.fig.suptitle('教育水平与工作类型的高收入比例聚类分析 (%)', fontsize=16)
    cluster_grid.fig.subplots_adjust(top=0.9)
    save_fig(cluster_grid.fig, 'education_workclass_clustermap.png')
    use_clustermap = True
except Exception as e:
    print(f"聚类图生成失败: {e}")
    # 使用普通热力图作为备选
    fig, ax = plt.subplots(figsize=(14, 10))
    sns.heatmap(edu_work_pivot, cmap='YlGnBu', annot=True, fmt='.1f', ax=ax)
    ax.set_title('教育水平与工作类型的高收入比例热力图 (%)')
    plt.tight_layout()
    save_fig(fig, 'education_workclass_heatmap.png')
    use_clustermap = False

# 6. 多变量交叉分析：教育、性别、年龄组与收入
# 创建多层交叉表 - 简化版本，只使用教育和性别

try:
    # 尝试完整的三维交叉分析
    multi_cross = pd.crosstab(
        [df['education_simplified'], df['sex'], df[


switch (r.unit) {
        case "day":
            return new WeightForPeriodRule(r.period, WeightForPeriodRule.PeriodUnit.DAY, r.weight);
        case "hour":
            return new WeightForPeriodRule(r.period, WeightForPeriodRule.PeriodUnit.HOUR, r.weight);
        case "minute":
            return new WeightForPeriodRule(r.period, WeightForPeriodRule.PeriodUnit.MINUTE, r.weight);
        case "second":
            return new WeightForPeriodRule(r.period, WeightForPeriodRule.PeriodUnit.SECOND, r.weight);
        default:
            throw new ValidationException("V2 wise_rule_weight_for_period: Unknown period unit " + r.unit);
    }
}
import invariant from 'invariant';
import {
  IActivities,
  IActivitiesModels,
  IActivity,
  IActivityItem,
  IActivityWaitTime,
  ILogger
} from '../../types';
import { Error, Success, syncTransaction } from '../utils';
import { RAW_ACTIVITY_ATTRIBUTES } from './Activity';

/**
 * Validates a single location.  The following fields are considered
 * required: type and extId.
 * @param item
 */
const validateActivity = (item: IActivityItem) => {
  if (!item.type) {
    return 'Type is required for an activity.';
  }

  if (!item.extId) {
    return 'ExtId is required for activity.';
  }

  return true;
};

/**
 * Validates all activities.
 * @param items
 */
const validateActivities = (items: IActivityItem[]) => {
  if (!items || !items.length) {
    return 'Activities are required to add or update.';
  }
  const errors = items
    .map(validateActivity)
    .filter(error => typeof error === 'string');

  return errors.length ? errors : true;
};

class Activities implements IActivities {
  private sequelize: any;
  private dao: any;
  private logger: ILogger;
  private models: IActivitiesModels;

  constructor(sequelize, access, logger, models: IActivitiesModels) {
    this.sequelize = sequelize;
    this.dao = access;
    this.logger = logger;
    this.models = models;
  }

  /**
   * Bulk upsert activities.
   * @param items
   */
  public async bulkAddUpdate(items: IActivityItem[] = []) {
    // if there are no items, just return an empty array
    const valid = validateActivities(items);
    if (valid !== true) {
      // if it not valid, return the known errors
      return { [Error]: valid };
    }

    this.logger('debug', `Adding and updating ${items.length} activities.`);

    const activities = await syncTransaction(this.sequelize, items, async (item, transaction) => {
      const activity = this.createActivity(item.id || item.extId);
      const id = await activity.upsert(item, transaction);
      return id;
    });

    this.logger('debug', `Finished adding and updating ${activities.length} of ${items.length}.`);

    return { [Success]: activities };
  }

  public async bulkAddWaitTimes(timestamp: string, items: IActivityWaitTime[] = []) {
    const { Activity } = this.dao;

    return syncTransaction(this.sequelize, items, async (item, transaction) => {
      const { extId, waitTime } = item;
      const activityInstance = await Activity.findOne(
        { where: { extId } }, { transaction }
      );

      if (!activityInstance) {
        return Promise.resolve(false); // TODO log
      }

      const activity = await this.createActivity(activityInstance);

      return activity.addWaitTimes(timestamp, waitTime, transaction);
    });
  }

  /**
   * Factory for creating a activity


}: RGBA(#{to-rgb($-color)}, var(--#{$-css-opacity-var}, 1));
    #{$-rule}: var(--#{$-rule}) !important;
}
// Hack for Bootstrap 5
// In Bootstrap 4 these variables was used with map-merge()
// In Bootstrap 5 these variables has set only if they don't exist before
// PS: Another fix will be to reorder all bundle to follow Bootstrap documentation and do another
// logic that wasn't use before
// Ref:
// https://getbootstrap.com/docs/5.1/customize/sass/#colors
// Need to be include before web/static/lib/bootstrap/scss/_variables.scss

$white:    #fff !default;
$gray-100: #f8f9fa !default;
$gray-200: #e9ecef !default;
$gray-300: #dee2e6 !default;
$gray-400: #ced4da !default;
$gray-500: #adb5bd !default;
$gray-600: #6c757d !default;
$gray-700: #495057 !default;
$gray-800: #343a40 !default;
$gray-900: #212529 !default;
$black:    #000 !default;

$grays: () !default;
$grays: map-merge((
        "100": $gray-100,
        "200": $gray-200,
        "300": $gray-300,
        "400": $gray-400,
        "500": $gray-500,
        "600": $gray-600,
        "700": $gray-700,
        "800": $gray-800,
        "900": $gray-900
), $grays);

$blue:    #0d6efd !default;
$indigo:  #6610f2 !default;
$purple:  #6f42c1 !default;
$pink:    #d63384 !default;
$red:     #dc3545 !default;
$orange:  #fd7e14 !default;
$yellow:  #ffc107 !default;
$green:   #198754 !default;
$teal:    #20c997 !default;
$cyan:    #0dcaf0 !default;

$colors: () !default;
$colors: map-merge((
        "blue":       $blue,
        "indigo":     $indigo,
        "purple":     $purple,
        "pink":       $pink,
        "red":        $red,
        "orange":     $orange,
        "yellow":     $yellow,
        "green":      $green,
        "teal":       $teal,
        "cyan":       $cyan,
        "white":      $white,
        "gray":       $gray-600,
        "gray-dark":  $gray-800
), $colors);

$primary:       $blue !default;
$secondary:     $gray-600 !default;
$success:       $green !default;
$info:          $cyan !default;
$warning:       $yellow !default;
$danger:        $red !default;
$light:         $gray-100 !default;
$dark:          $gray-900 !default;

$theme-colors: () !default;
$theme-colors: map-merge((
        "primary":    $primary,
        "secondary":  $secondary,
        "success":    $success,
        "info":       $info,
        "warning":    $warning,
        "danger":     $danger,
        "light":      $light,
        "dark":       $dark
), $theme-colors);
///
/// This file regroups the variables that style odoo components.
/// They are available in every asset bundle.
///

// Contrast ratio
$o-frontend-min-contrast-ratio: 2.9 !default;

// Color-scheme
$o-webclient-color-scheme: bright !default;

// Font sizes
$o-root-font-size: 1rem !default;
$o-fo


gior parte delle monete più piccole di Bitcoin è quanto sia teoricamente facile attaccarle al 51%. In effetti, diverse piccole monete, come Vertcoin, sono state attaccate con successo il 51% più volte.
\n
La maggior parte di questi problemi deriva dal sito Web https://www.crypto51.app/ che mostra quanto costerebbe noleggiare l\'hashrate da NiceHash, una piattaforma che noleggia hardware di mining per il cloud mining. Ad un certo punto, questo sito web ha elencato un attacco a Monero al costo di circa \$ 6.300 per un\'ora. Sebbene questo prezzo possa far sì che molti di noi rimangano a bocca aperta, non è al di fuori del regno delle possibilità che un\'azienda o un individuo ricco sia in grado di condurre un attacco prolungato alla rete.
\n
Questo, per fortuna, non è più il caso. Un lettore attento vedrà che il sito Web ha effettivamente rimosso Monero dalla sua applicazione, a causa dell\'inclusione di RandomX. Ancora una volta, il lettore è incoraggiato a leggere il nostro articolo su RandomX per i dettagli, ma a causa della natura dell\'algoritmo CPU-friendly, le aziende come NiceHash non possono più acquistare ASIC per Monero da affittare a chiunque è disposto ad affittarli. Ora devono competere con le CPU, che sono molto più diffuse e più facili da ottenere.
\n
Il costo esatto dell\'hardware per attaccare il 51% della rete Monero non è stato calcolato e, in effetti, non è così facilmente calcolato come altre monete con periodo ASIC.
';

  @override
  String get knowledge250Sbmyths250Sb10250Sbtitle => 'Monero non è facilmente attaccato al 51%?';

  @override
  String get knowledge250Sbmyths250Sb11250Sbtext => '
I due uomini nero dello spazio minerario sono ASIC e botnet, e allontanarsi da uno significa necessariamente avvicinarsi all\'altro. Se uno ha bisogno di una CPU per estrarre Monero, allora gli hacker possono teoricamente prendere il controllo di molte centinaia se non migliaia di computer vulnerabili e costringerli a estrarre Monero per loro, non costando nulla e superando quelli con solo un paio di computer nelle loro famiglie .
\n
La prima confutazione a questo argomento riguarda i proprietari delle stesse botnet. Anche se non perdoniamo di hackerare i computer di altri, la barriera all\'accesso alla proprietà e al funzionamento di una botnet è di gran lunga inferiore a quella del possesso di ASIC. Uno richiede software - spesso abbastanza liberamente disponibile e open source - e il tempo e un acume per annusare i computer vulnerabili. L\'altro richiede un\'incredibile quantità di capitale e l\'accesso alla produzione. Uno può essere fatto da un bambino in un seminterrato e l\'altro solo da persone estremamente ricche. Questo ci porta a concludere che, se le peggiori paure dei minatori dovessero avverarsi, le stesse botnet sarebbero più decentralizzate di quanto non lo sarebbero gli ASIC.
\n
Detto questo, la comunità Monero è fiduciosa che questo problema sia esagerato. Gli ingegneri di RandomX hanno progettato deliberatamente il protocollo per richiedere 2 GB di memoria RAM per funzionare. In altre parole, molti server privati virtuali (VPS) di piccole dimensi


  /// Handles sticky note icon selection.
  void _handleStickyNoteIconSelection(PdfStickyNoteIcon icon) {
    if (_selectedAnnotation != null &&
        _selectedAnnotation is StickyNoteAnnotation) {
      final StickyNoteAnnotation stickyNoteAnnotation =
          _selectedAnnotation! as StickyNoteAnnotation;
      stickyNoteAnnotation.icon = icon;
    } else {
      _pdfViewerController.annotationSettings.stickyNote.icon = icon;
    }
    _handleStickyNoteIconOverlayClose();
  }

  /// Close sticky note icon overlay.
  void _handleStickyNoteIconOverlayClose() {
    _toolbarKey.currentState?._changeToolbarItemFillColor(
      'Sticky note icons',
      false,
    );
    if (_stickyNoteIconMenuOverlayEntry != null) {
      _stickyNoteIconMenuOverlayEntry?.remove();
      _stickyNoteIconMenuOverlayEntry = null;
    }
  }

  /// Close all the overlays.
  void _closeOverlays() {
    if (_isDesktopWeb) {
      _handleColorPaletteOverlayClose();
      _handleStickyNoteIconOverlayClose();
    }
  }
}

/// Toolbar widget
class AnnotationToolbar extends StatefulWidget {
  /// Constructor for [AnnotationToolbar]
  const AnnotationToolbar({
    required this.pdfViewerController,
    this.undoHistoryController,
    this.onTap,
    this.showTooltip = true,
    this.model,
    Key? key,
  }) : super(key: key);

  /// Indicates whether tooltip for the toolbar items need to be shown or not.
  final bool showTooltip;

  /// An object that is used to control the [SfPdfViewer].
  final PdfViewerController pdfViewerController;

  /// An object that is used to control the Undo History of the SfPdfViewer.
  final UndoHistoryController? undoHistoryController;

  /// Called when the toolbar item is selected.
  final TapCallback? onTap;

  /// Sample model of the entire SB.
  final SampleModel? model;

  @override
  AnnotationToolbarState createState() => AnnotationToolbarState();
}

/// State for the Toolbar widget.
class AnnotationToolbarState extends State<AnnotationToolbar> {
  Color? _color;
  Color? _fillColor;
  Color? _disabledColor;
  Color? _colorPaletteFillColor;
  Color? _stickyNoteIconFillColor;
  late bool _isLight;
  final GlobalKey _colorPaletteKey = GlobalKey();
  final GlobalKey _stickyNoteKey = GlobalKey();
  bool _isWeb = false;
  bool _canShowColorPaletteIcon = false;
  bool _canshowStickyNoteIconMenu = false;
  bool _canShowDeleteIcon = false;
  bool _canShowLockIcon = false;
  bool _isAnnotationLocked = false;
  late bool _useMaterial3;
  Color? _annotationIconColor;

  @override
  void didChangeDependencies() {
    _isLight = Theme.of(context).brightness == Brightness.light;
    _useMaterial3 = Theme.of(context).useMaterial3;
    _annotationIconColor = _useMaterial3
        ? widget.model?.themeData.colorScheme.onSurfaceVariant
        : (widget.model?.themeData.brightness == Brightness.light)
        ? Colors.black.withValues(alpha: 0.87)
        : Colors.white;
    _color = _useMaterial3
        ? _isLight
              ? const Color.fromRGBO(73, 69, 79, 1)
              : const Color.fromRGBO(202, 196, 208, 1)
        : _isLight
        ? Colors.black.withValues(alpha: 0.54)
        : Colors.white.withValues(alpha: 0.65);
    _disabledColor = _useMaterial3
        ? _isLight
              ? const Color.fromRGBO(28, 27, 31, 1).withValues(alpha: 0.38)
              : const Color.fromR


/**
 * Copyright (c) 2020 LG Electronics, Inc.
 *
 * This software contains code licensed as described in LICENSE.
 *
 */

namespace Simulator.ScenarioEditor.UI.EditElement.Effectors
{
    using System;
    using Elements;
    using Elements.Triggers;
    using UnityEngine;

    /// <summary>
    /// Component indicating that this object will edit selected effector type
    /// </summary>
    public abstract class EffectorEditPanel : MonoBehaviour
    {
        /// <summary>
        /// Type of the effector that this object edits
        /// </summary>
        public abstract Type EditedEffectorType { get; }

        /// <summary>
        /// Should multiple instances of this effector be allowed in one trigger
        /// </summary>
        public virtual bool AllowMany { get; } = false;

        /// <summary>
        /// Initializes panel for editing the selected effector
        /// </summary>
        /// <param name="triggerPanel">Parent trigger panel</param>
        /// <param name="trigger">Trigger being edited</param>
        /// <param name="effector">Trigger effector being edited</param>
        public abstract void StartEditing(TriggerEditPanel triggerPanel, ScenarioTrigger trigger, TriggerEffector effector);

        /// <summary>
        /// Deinitializes panel after edit


*

     *

     *
The five markup-significant characters: <tt><</tt>, <tt>></tt>, <tt>&</tt>,
     *       <tt>"</tt> and <tt>'</tt>

     *
All non ASCII characters.

     *

     *

     *   This escape will be performed by replacing those chars by the corresponding HTML5 Named Character References
     *   (e.g. <tt>'&acute;'</tt>) when such NCR exists for the replaced character, and replacing by a decimal
     *   character reference (e.g. <tt>'&#8345;'</tt>) when there there is no NCR for the replaced character.
     *

     *

     *   This method calls {@link #escapeHtml(String, HtmlEscapeType, HtmlEscapeLevel)} with the following
     *   preconfigured values:
     *

     *

     *
<tt>type</tt>:
     *       {@link org.unbescape.html.HtmlEscapeType#HTML5_NAMED_REFERENCES_DEFAULT_TO_DECIMAL}

     *
<tt>level</tt>:
     *       {@link org.unbescape.html.HtmlEscapeLevel#LEVEL_2_ALL_NON_ASCII_PLUS_MARKUP_SIGNIFICANT}

     *

     *

     *   This method is thread-safe.
     *

     *
     * @param text the <tt>String</tt> to be escaped.
     * @return The escaped result <tt>String</tt>. As a memory-performance improvement, will return the exact
     *         same object as the <tt>text</tt> input argument if no escaping modifications were required (and
     *         no additional <tt>String</tt> objects will be created during processing). Will
     *         return <tt>null</tt> if input is <tt>null</tt>.
     */
    public static String escapeHtml5(final String text) {
        return escapeHtml(text, HtmlEscapeType.HTML5_NAMED_REFERENCES_DEFAULT_TO_DECIMAL,
                HtmlEscapeLevel.LEVEL_2_ALL_NON_ASCII_PLUS_MARKUP_SIGNIFICANT);
    }

    /**
     *

     *   Perform an HTML5 level 1 (XML-style) escape operation on a <tt>String</tt> input.
     *

     *

     *   Level 1 means this method will only escape the five markup-significant characters:
     *   <tt><</tt>, <tt>></tt>, <tt>&</tt>, <tt>"</tt> and <tt>'</tt>. It is called
     *   XML-style in order to link it with JSP's <tt>escapeXml</tt> attribute in JSTL's
     *   <tt><c:out ... /></tt> tags.
     *

     *

     *  Note this method may not produce the same results as {@link #escapeHtml4Xml(String)} because
     *  it will escape the apostrophe as <tt>&apos;</tt>, whereas in HTML 4 such NCR does not exist
     *  (the decimal numeric reference <tt>&#39;</tt> is used instead).
     *

     *

     *   This method calls {@link #escapeHtml(String, HtmlEscapeType, HtmlEscapeLevel)} with the following
     *   preconfigured values:
     *

     *

     *
<tt>type</tt>:
     *       {@link org.unbescape.html.HtmlEscapeType#HTML5_NAMED_REFERENCES_DEFAULT_TO_DECIMAL}

     *
<tt>level</tt>:
     *       {@link org.unbescape.html


import 'package:haka_comic/utils/extension.dart';
import 'package:haka_comic/widgets/base_image.dart';

class SimpleSearchListItem extends StatelessWidget {
  const SimpleSearchListItem({
    super.key,
    required this.comic,
    required this.blockedWords,
  });

  final SearchComic comic;

  final String? blockedWords;

  @override
  Widget build(BuildContext context) {
    final item = comic;

    if (blockedWords != null) {
      final words = blockedWords!.split('');
      final displayWords =
          words.length > 4 ? [...words.sublist(0, 4), '...'] : words;
      return Padding(
        padding: const EdgeInsets.all(2),
        child: SingleChildScrollView(
          child: Column(
            spacing: 3,
            children: [
              AspectRatio(
                aspectRatio: 1 / 1.4,
                child: Card(
                  clipBehavior: Clip.hardEdge,
                  elevation: 0,
                  child: Center(
                    child: Column(
                      mainAxisSize: MainAxisSize.min,
                      children:
                          displayWords
                              .map(
                                (e) => Text(
                                  e,
                                  style: context.textTheme.labelLarge,
                                ),
                              )
                              .toList(),
                    ),
                  ),
                ),
              ),
              Text(
                '已屏蔽',
                style: context.textTheme.titleSmall,
                maxLines: 1,
                overflow: TextOverflow.ellipsis,
                textAlign: TextAlign.center,
              ),
            ],
          ),
        ),
      );
    }

    return Stack(
      children: [
        Positioned.fill(
          child: InkWell(
            borderRadius: const BorderRadius.all(Radius.circular(12)),
            onTap: () {
              context.push('/details/${item.id}');
            },
            child: Padding(
              padding: const EdgeInsets.all(2),
              child: SingleChildScrollView(
                child: Column(
                  spacing: 3,
                  children: [
                    BaseImage(url: item.thumb.url, aspectRatio: 1 / 1.4),
                    Text(
                      item.title,
                      style: context.textTheme.titleSmall,
                      maxLines: 1,
                      overflow: TextOverflow.ellipsis,
                      textAlign: TextAlign.center,
                    ),
                  ],
                ),
              ),
            ),
          ),
        ),

        if (item.finished)
          Positioned(
            top: 4,
            right: 4,
            child: Container(
              padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
              decoration: BoxDecoration(
                color: Colors.green.withValues(alpha: 0.8),
                borderRadius: const BorderRadius.only(
                  topRight: Radius.circular(12),
                  bottomLeft: Radius.circular(12),
                ),
              ),
              child: Text(
                '完结',
                style: context.textTheme.labelSmall?.copyWith(
                  color: Colors.white,
                ),
              ),
            ),
          ),
      ],
    );
  }
}
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:haka_comic/widgets/toast.dart';

class PageSelector extends StatelessWidget {
  const PageSelector({
    super.key,
    required this.currentPage,
    required this.pages,
    required this.onPageChange,
    this


Link>

<Link style={{color:"#212121", fontFamily:'Yekan, sans-serif'}} to={'/classes'}>کلاس‌ها <MdOutlineClass style={{position : "absolute" , right : 10 , top : 7 }} /> </Link>

<Link style={{color:"#212121", fontFamily:'Yekan, sans-serif'}} to={'/blog'}>بلاگ <GoDiscussionClosed style={{position : "absolute" , right : 32 , top : 7 }} /></Link>

<Link style={{color:"#212121", fontFamily:'Yekan, sans-serif'}} to={'/success'}>موفقیت دانشجویان <MdEmojiEvents style={{position : "absolute" , right : -18 , top : 7 , color : "gold" }} /></Link>

<Link style={{color:"#212121", fontFamily:'Yekan, sans-serif'}} to={'/employment'}> همکاری با ما <BiUserPlus style={{position : "absolute" , right : 5 , top : 7 }} /> </Link>

<Link style={{color:"#212121", fontFamily:'Yekan, sans-serif'}} to={'/contact'}> تماس با ما <IoCall style={{position : "absolute" , right : 10 , top : 7 }} /></Link>

                {
                  userId ?

<Link style={{color:"#212121", fontFamily:'Yekan, sans-serif'}} to={'/dashboard'}>داشبورد</Link>

                    :

<Link style={{color:"#212121", fontFamily:'Yekan, sans-serif'}} to={'/auth/login'}><IoMdLogIn style={{position : "absolute" , right : -5 , top : 8}} /> ثبت نام و ورود</Link>

                }

            </Typography>
          </Box>
    </Drawer>
  )
}

export default SideBar
import React, { useEffect, useState } from 'react'
import axios from 'axios';
// Styles
import './Header.css';

// Components
import SideBar from './Drawer';

// Logo
import {Logo} from './svg/Logo';
import Logo2 from './svg/Logo2';
import { RxHamburgerMenu } from "react-icons/rx";
import { useNavigate } from 'react-router-dom';
import { NavLink } from 'react-router-dom';
import sadraLogo from '/public/sadraLogo.svg'

const Header = () => {

  const [userId, setUserId] = useState(null);

  useEffect(() => {
      axios.get('http://localhost:3001/dashboard/token', {withCredentials: true})
          .then(response => {
          const { id } = response.data;
          setUserId(id);
      })
      .catch(error => {
          console.error('Error:', error.response ? error.response.data : error.message);
      });
  }, []);

  const navigate = useNavigate()
  const clickHandler = () => {
    navigate('/auth/register');
  }
  const dashboardHandler = () => {
    navigate('/dashboard');
  }

  const [isOpen , setIsopen] = useState(false)

  return (

        {
          userId ?
            <button className='login_Btn' style={{cursor:"pointer"}} onClick={() => dashboardHandler()}>داشب


eeItem(IOutliner &tree_interface, OutlinerTreeItem &tree_item)
  {
    OutlinerTreeItem *parentTreeItem = tree_item.getParent();
    G_ASSERT(parentTreeItem);
    parentTreeItem->removeFromFilteredChildren(tree_item);

    if (parentTreeItem != &rootTreeItem && parentTreeItem->isRegisteredToFilteredTree() &&
        parentTreeItem->getFilteredChildCount() == 0 && !parentTreeItem->doesItemMatchSearch(tree_interface))
      removeFilteredTreeItem(tree_interface, *parentTreeItem);
  }

  bool updateSearchMatch(IOutliner &tree_interface, OutlinerTreeItem &tree_item)
  {
    bool foundMatch = false;

    const int childCount = tree_item.getUnfilteredChildCount();
    for (int i = 0; i < childCount; ++i)
      if (updateSearchMatch(tree_interface, *tree_item.getUnfilteredChild(i)))
        foundMatch = true;

    if (foundMatch || tree_item.doesItemMatchSearch(tree_interface))
    {
      if (!tree_item.isRegisteredToFilteredTree())
        addTreeItemToFilteredItemsTillRootIfNeeded(tree_item);

      return true;
    }
    else
    {
      if (tree_item.isRegisteredToFilteredTree())
        removeFilteredTreeItem(tree_interface, tree_item);

      return false;
    }
  }

  static void loadTreeExpansionState(const DataBlock &state, OutlinerTreeItem &tree_item)
  {
    const int childCount = tree_item.getUnfilteredChildCount();
    for (int childIndex = 0; childIndex < childCount; ++childIndex)
    {
      OutlinerTreeItem *childTreeItem = tree_item.getUnfilteredChild(childIndex);
      if (childTreeItem->getUnfilteredChildCount() > 0)
      {
        const DataBlock *childState = state.getBlockByName(childTreeItem->getLabel());
        if (childState)
        {
          childTreeItem->setExpanded(childState->getBool("expanded", childTreeItem->isExpanded()));
          loadTreeExpansionState(*childState, *childTreeItem);
        }
      }
    }
  }

  static void saveTreeExpansionState(DataBlock &state, const OutlinerTreeItem &tree_item)
  {
    const int childCount = tree_item.getUnfilteredChildCount();
    for (int childIndex = 0; childIndex < childCount; ++childIndex)
    {
      const OutlinerTreeItem *childTreeItem = tree_item.getUnfilteredChild(childIndex);
      if (childTreeItem->getUnfilteredChildCount() > 0)
      {
        DataBlock *childState = state.addBlock(childTreeItem->getLabel());
        childState->addBool("expanded", childTreeItem->isExpanded());

        saveTreeExpansionState(*childState, *childTreeItem);
      }
    }
  }

  ska::flat_hash_map<RenderableEditableObject *, ObjectTreeItem *> objectToTreeItemMap;
  RootTreeItem rootTreeItem;
  OutlinerTreeItem *focusedTreeItem = nullptr; // Use getSelectionHead() instead!
  int selectionCountPerItemType[(int)OutlinerTreeItem::ItemType::Count];
  bool showAssetNameUnderObjects = true;
};

} // namespace Outliner


arn add netlify-cli -g

# Rebuild api after any changes to /functions
yarn rw build api

# Invoke your function with the CLI, pointing it to the rw dev port
netlify functions:invoke 8910 < function-name > --port
```

`<function-name>` should be replaced by `identity-validate`, `identity-signup`, `identity-login` or your own function.

Note that the netlify-cli does not generate fake user data for each invocation of an identity function. It always provides the same `Test Person` data.

## Additional Resources

- [RBAC Example & Demo Site](https://redwoodblog-with-identity.netlify.app/)
- [RBAC Example & Demo Site GitHub Repo](https://github.com/dthyresson/redwoodblog-rbac)
- [Netlify Identity](https://docs.netlify.com/visitor-access/identity/)
- [Netlify Identity Triggers](https://docs.netlify.com/functions/trigger-on-events/)
- [JSON Web Tokens (JWT)](https://jwt.io/)
- [5 Massive Benefits Of Identity As A Service](https://auth0.com/blog/5-massive-benefits-of-identity-as-a-service-for-developers/)
---
title: TypeScript in Redwood
description: Getting started & Core Concepts
---

Redwood comes with full TypeScript support, and you don't have to give up any of the conveniences that Redwood offers to enjoy all the benefits of a type-safe codebase.

## Getting Started

### Starting a Redwood Project in TypeScript

You can use the `--typescript` option on `yarn create redwood-app` to use TypeScript from the start:

```shell
yarn create redwood-app my-redwood-app --typescript
```

### Converting a JavaScript Project to TypeScript

Started your project in JavaScript but want to switch to TypeScript?
Start by using the `tsconfig` setup command:

```shell
yarn rw setup tsconfig
```

This adds `tsconfig.json` files to both the web and the api side, telling VSCode that this's a TypeScript project.
(You can go ahead and remove the `jsconfig.json` files from both sides now.)

You don't need to convert all your JavaScript files to TypeScript right away.
In fact, you probably shouldn't.
Do it incrementally.
Start by renaming your files from `.js` to `.ts`. (Or, if they have a React component, `.tsx`.)

## Core Concepts

### 1. Automatic types

When you're developing in TypeScript, the Redwood CLI is your trusted companion—focus on writing code and it'll generate as many of the types as it can.
When you run `yarn rw dev`, the CLI watches files for changes so that it can generate types.
(More on this in the [Generated Types](/typescript/generated-types.md) doc.)

But let's say that you don't have the dev server running, and are just coding and notice missing types.
You can always run `yarn rw g types` to make sure you have all the types you need.

### 2. Use generators to learn about available utility types

Let's say you generate a Cell using the command `yarn rw g cell Post`. If your project is in TypeScript, the generated files will contain a bunch of utility types (imported from `@cedarjs/web`), as well as types specific to your project (imported from `types/graphql`).
You don't need to learn all the utility types up front, but they're documented in detail in the [Utility Types](/typescript/utility-types.md) doc when you're ready.

### 3. Redwood won't force you to type everything

The Redwood philosophy is to keep things as simple as possible at first. Redwood generates as much as possible, avoids forcing you to type every little detail, and doesn't have [strict mode](https://www.typescriptlang.org/tsconfig#strict) on by default.
Where needed (e.g. the [`DbAuthHandler`](/typescript/utility-types.md#dbauthhandleroptions)) you can make use of generics to


//
//     Generated by class-dump 3.5 (64 bit).
//
//     class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//

#import "NSObject.h"

#import "DATokenRegistrationDelegate.h"

@class NSDate, NSMutableSet, NSTimer, PCConnectionManager;

@interface DARefreshWrapper : NSObject <DATokenRegistrationDelegate>
{
    int _pushState;
    int _curStyle;
    id <DARefreshManagerDelegate> _delegate;
    NSDate *_pushRegistrationTime;
    PCConnectionManager *_manager;
    NSMutableSet *_tokenRegistrations;
    NSTimer *_retryTimer;
    NSTimer *_dailyRefreshTimer;
}

@property(retain, nonatomic) NSTimer *dailyRefreshTimer; // @synthesize dailyRefreshTimer=_dailyRefreshTimer;
@property(retain, nonatomic) NSTimer *retryTimer; // @synthesize retryTimer=_retryTimer;
@property(retain, nonatomic) NSMutableSet *tokenRegistrations; // @synthesize tokenRegistrations=_tokenRegistrations;
@property(nonatomic) int curStyle; // @synthesize curStyle=_curStyle;
@property(retain, nonatomic) PCConnectionManager *manager; // @synthesize manager=_manager;
@property(retain, nonatomic) NSDate *pushRegistrationTime; // @synthesize pushRegistrationTime=_pushRegistrationTime;
@property(nonatomic) int pushState; // @synthesize pushState=_pushState;
@property(nonatomic) __weak id <DARefreshManagerDelegate> delegate; // @synthesize delegate=_delegate;
- (void).cxx_destruct;
- (void)retryCollections:(id)arg1 after:(double)arg2 reason:(int)arg3;
- (void)_dailyRefreshTimerFired:(id)arg1;
- (void)_retryTimerFired:(id)arg1;
- (void)refreshCollections:(id)arg1 withReason:(int)arg2;
- (void)performTokenRegistrationRequestsWithToken:(id)arg1 onBehalfOf:(id)arg2;
- (void)tokenRegistrationRequest:(id)arg1 finishedWithError:(id)arg2;
- (void)cancelAllTokenRegistrations;
- (id)description;
- (id)_stringForStyle:(int)arg1;
- (void)shutdown;
- (void)startDailyRefreshTimer;
- (void)cancelDailyRefreshTimer;
- (void)cancelRetryTimer;
- (id)init;

@end


 .waypoint 63,71.921,70.364,30,0
    .waypoint 63,72.913,70.286,30,0
    .waypoint 63,73.638,70.814,30,0
    .waypoint 63,74.243,69.532,30,0
    .waypoint 63,75.577,70.316,30,0
    .waypoint 63,74.493,72.447,30,0
    >>Finish killing |cRXP_ENEMY_Ashenvale Outrunners|r
    >>|cRXP_WARN_They are stealthed near the trees|r
    .complete 6503,1 --9/9 Ashenvale Outrunners Killed
    .unitscan Ashenvale Outrunner
    .isQuestTurnedIn 13712
step
    #loop
    .goto 1440/1,-2557.50000,1751.50000,0
    .waypoint 1440/1,-2525.19995,1684.30005,40,0
    .waypoint 1440/1,-2557.50000,1751.50000,40,0
    .waypoint 1440/1,-2578.90015,1805.80005,40,0
    .waypoint 1440/1,-2494.19995,1868.70007,40,0
    .waypoint 1440/1,-2416.10010,1835.40002,40,0
    .waypoint 1440/1,-2387.90015,1787.09998,40,0
    .waypoint 1440/1,-2480.90015,1737.70007,40,0
    >>Kill |cRXP_ENEMY_Sharptalon|r. Loot him for |T136063:0|t[|cRXP_LOOT_Sharptalon's Claw|r] and use it to start the quest
    .collect 16305,1,2 --Sharptalon's Claw (1)
    .accept 2 >> Accept Sharptalon's Claw
    .unitscan Sharptalon
    .use 16305
    .isQuestTurnedIn 13712
    .maxlevel 24
step << skip
    #completewith next
    .hs >> Hearth to Splintertree Post
    .use 6948
    .subzoneskip 431
    --Need hearth cd for zoram strand
step
    .goto 63,73.87,62.48
    >>|Tinterface/worldmap/chatbubble_64grey.blp:20|tTalk to |cRXP_FRIENDLY_Pixel|r
    .turnin 13801 >>Turn in Dead Elves Walking
    .target Pixel
    .isQuestTurnedIn 13712
step
    .goto 63,73.61,62.12
    >>|Tinterface/worldmap/chatbubble_64grey.blp:20|tTalk to |cRXP_FRIENDLY_Kadrak|r
    .turnin 13805 >>Turn in Pierce Their Heart!
    --.accept 13808 >>Accept Mission Improbable
    .accept 13848 >>Accept Bad News Bear-er
    .target Kadrak
    .isQuestTurnedIn 13712
step
    #questguide
    .goto 63,73.61,62.12
    >>|Tinterface/worldmap/chatbubble_64grey.blp:20|tTalk to |cRXP_FRIENDLY_Kadrak|r
    .turnin 13805 >>Turn in Pierce Their Heart!
    .accept 13808 >>Accept Mission Improbable
    .accept 13848 >>Accept Bad News Bear-er
    .target Kadrak
    .isQuestTurnedIn 13712
step
    .goto 63,73.32,62.17
    >>|Tinterface/worldmap/chatbubble_64grey.blp:20|tTalk to |cRXP_FRIENDLY_Splintertree Demolisher|r
    .turnin 13730 >>Turn in Playing With Felfire
    --.accept 13751 >>Accept Tell No One! -- Optional skip
    .target Splintertree Demolisher


0.s, z0.s
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix)
// CHECK-NEXT: bmops za0.s, p15/m, p0/m, z0.s, z0.s
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:

// --------------------------------------------------------------------------//
// Invalid suffixes

bmops za0.d, p0/z, p0/m, z0.d, z0.d
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid matrix operand, expected za[0-3].s
// CHECK-NEXT: bmops za0.d, p0/z, p0/m, z0.d, z0.d
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:

bmops za0.s, p0/m, p0/m, z0.s, z0.d
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
// CHECK-NEXT: za0.s, p0/m, p0/m, z0.s, z0.d
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:


ET UNIVERSE to 0 */
/* Thes are used by old code not yet converted to use multiple FIBS */
struct rtentry *rtalloc1(struct sockaddr *, int, u_long);
int	 rtinit(struct ifaddr *, int, int);

/* XXX MRT NEW VERSIONS THAT USE FIBs
 * For now the protocol indepedent versions are the same as the AF_INET ones
 * but this will change..
 */
int	 rt_getifa_fib(struct rt_addrinfo *, u_int fibnum);
void	 rtalloc_ign_fib(struct route *ro, u_long ignflags, u_int fibnum);
struct rtentry *rtalloc1_fib(struct sockaddr *, int, u_long, u_int);
int	 rtioctl_fib(u_long, caddr_t, u_int);
void	 rtredirect_fib(struct sockaddr *, struct sockaddr *,
	    struct sockaddr *, int, struct sockaddr *, u_int);
int	 rtrequest_fib(int, struct sockaddr *,
	    struct sockaddr *, struct sockaddr *, int, struct rtentry **, u_int);
int	 rtrequest1_fib(int, struct rt_addrinfo *, struct rtentry **, u_int);
int	rib_lookup_info(uint32_t, const struct sockaddr *, uint32_t, uint32_t,
	    struct rt_addrinfo *);
void	rib_free_info(struct rt_addrinfo *info);

#endif

#endif


byteArray = specialText.toByteArray(Charsets.UTF_8)

    val result = byteArray.utf8String

    log.info("特殊字符原文: {}", specialText)
    log.info("UTF-8字节数组长度: {}", byteArray.size)
    log.info("转换后文本: {}", result)

    assertEquals(specialText, result, "特殊字符和表情符号应该正确转换")
  }

  @Test
  fun `测试 utf8String 扩展属性 - 多行文本`() {
    val multilineText =
      """
        第一行文本
        第二行文本
        第三行包含特殊字符: !@#$%
        第四行包含表情: 😊🎈
      """
        .trimIndent()

    val byteArray = multilineText.toByteArray(Charsets.UTF_8)

    val result = byteArray.utf8String

    log.info("多行文本原文:\n{}", multilineText)
    log.info("UTF-8字节数组长度: {}", byteArray.size)
    log.info("转换后文本:\n{}", result)

    assertEquals(multilineText, result, "多行文本应该正确转换")
  }

  @Test
  fun `测试 utf8String 扩展属性 - 数字和英文混合`() {
    val mixedText = "ABC123abc测试Test456混合MixedContent789"
    val byteArray = mixedText.toByteArray(Charsets.UTF_8)

    val result = byteArray.utf8String

    log.info("混合文本原文: {}", mixedText)
    log.info("UTF-8字节数组长度: {}", byteArray.size)
    log.info("转换后文本: {}", result)

    assertEquals(mixedText, result, "数字和英文混合文本应该正确转换")
  }

  @Test
  fun `测试 utf8String 扩展属性 - 与其他编码对比`() {
    val testText = "编码测试 Encoding Test"

    val utf8Bytes = testText.toByteArray(Charsets.UTF_8)
    val iso8859Bytes = testText.toByteArray(Charsets.ISO_8859_1)

    val utf8Result = utf8Bytes.utf8String
    // 注意：ISO-8859-1字节用UTF-8解码可能会产生不同的结果
    val iso8859AsUtf8Result = iso8859Bytes.utf8String

    log.info("原始文本: {}", testText)
    log.info("UTF-8编码后再解码: {}", utf8Result)
    log.info("ISO-8859-1编码后用UTF-8解码: {}", iso8859AsUtf8Result)
    log.info("UTF-8字节数组长度: {}", utf8Bytes.size)
    log.info("ISO-8859-1字节数组长度: {}", iso8859Bytes.size)

    assertEquals(testText, utf8Result, "UTF-8编码解码应该保持一致")
    // ISO-8859-1编码的中文字符用UTF-8解码通常会出现乱码，这是预期的
  }

  @Test
  fun `测试 utf8String 扩展属性 - 长文本性能`() {
    val longText = "这是一个很长的文本，用于测试性能。".repeat(1000)
    val byteArray = longText.toByteArray(Charsets.UTF_8)

    val startTime = System.currentTimeMillis()
    val result = byteArray.utf8String
    val endTime = System.currentTimeMillis()

    log.info("长文本长度: {} 字符", longText.length)
    log.info("字节数组长度: {} 字节", byteArray.size)
    log.info("转换耗时: {} 毫秒", end


using System;
using System.Threading.Tasks;
using System.Windows.Media.Animation;
using Niconicome.Models.Domain.Local.Cookies;
using Niconicome.Models.Domain.Local.Store.V2;
using Niconicome.Models.Domain.Niconico;
using Niconicome.Models.Domain.Utils;

namespace Niconicome.Models.Auth
{
    interface IWebview2SharedLogin
    {
        bool CanLogin();
        Task<bool> TryLogin();
    }

    class Webview2SharedLogin : SharedLoginBase, IWebview2SharedLogin
    {
        public Webview2SharedLogin(INiconicoContext context,IWebview2LocalCookieManager webview2LocalCookieManager) : base(context)
        {
            this._webview2LocalCookieManager = webview2LocalCookieManager;
        }

        private readonly IWebview2LocalCookieManager _webview2LocalCookieManager;

        /// <summary>
        /// ログインを試行する
        ///


ly if not already in set
            Int->Successors.push_back(NodeHeader);
          return;                        // See you later
        }
      }

      // If we get here, then all of the predecessors of BB are in the interval
      // already.  In this case, we must add BB to the interval!
      addNodeToInterval(Int, Node);
      Visited.insert(NodeHeader);     // The node has now been visited!

      if (Int->isSuccessor(NodeHeader)) {
        // If we were in the successor list from before... remove from succ list
        Int->Successors.erase(std::remove(Int->Successors.begin(),
                                          Int->Successors.end(), NodeHeader),
                              Int->Successors.end());
      }

      // Now that we have discovered that Node is in the interval, perhaps some
      // of its successors are as well?
      for (typename GT::ChildIteratorType It = GT::child_begin(Node),
             End = GT::child_end(Node); It != End; ++It)
        ProcessNode(Int, getSourceGraphNode(OrigContainer, *It));
    }
  }
};

using function_interval_iterator = IntervalIterator<BasicBlock, Function>;
using interval_part_interval_iterator =
    IntervalIterator<Interval, IntervalPartition>;

inline function_interval_iterator intervals_begin(Function *F,
                                                  bool DeleteInts = true) {
  return function_interval_iterator(F, DeleteInts);
}
inline function_interval_iterator intervals_end(Function *) {
  return function_interval_iterator();
}

inline interval_part_interval_iterator
   intervals_begin(IntervalPartition &IP, bool DeleteIntervals = true) {
  return interval_part_interval_iterator(IP, DeleteIntervals);
}

inline interval_part_interval_iterator intervals_end(IntervalPartition &IP) {
  return interval_part_interval_iterator();
}

} // end namespace llvm

#endif // LLVM_ANALYSIS_INTERVALITERATOR_H


w new DubboError(
      "invalid envelope, already compressed",
      Code.Internal
    );
  }
  if (compression && data.byteLength >= compressMinBytes) {
    data = await compression.compress(data);
    flags = flags | compressedFlag;
  }
  return { data, flags };
}

/**
 * Decompress an EnvelopedMessage.
 *
 * Raises InvalidArgument if an envelope is compressed, but compression is null.
 *
 * Relies on the provided Compression to raise ResourceExhausted if the
 * *decompressed* message size is larger than readMaxBytes. If the envelope is
 * not compressed, readMaxBytes is not honored.
 *
 * @private Internal code, does not follow semantic versioning.
 */
export async function envelopeDecompress(
  envelope: EnvelopedMessage,
  compression: Compression | null,
  readMaxBytes: number
): Promise<EnvelopedMessage> {
  let { flags, data } = envelope;
  if ((flags & compressedFlag) === compressedFlag) {
    if (!compression) {
      throw new DubboError(
        "received compressed envelope, but do not know how to decompress",
        Code.InvalidArgument
      );
    }
    data = await compression.decompress(data, readMaxBytes);
    flags = flags ^ compressedFlag;
  }
  return { data, flags };
}

/**
 * Encode a single enveloped message.
 *
 * @private Internal code, does not follow semantic versioning.
 */
export function encodeEnvelope(flags: number, data: Uint8Array): Uint8Array {
  const bytes = new Uint8Array(data.length + 5);
  bytes.set(data, 5);
  const v = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
  v.setUint8(0, flags); // first byte is flags
  v.setUint32(1, data.length); // 4 bytes message length
  return bytes;
}

/**
 * Encode a set of enveloped messages.
 *
 * @private Internal code, does not follow semantic versioning.
 */
export function encodeEnvelopes(...envelopes: EnvelopedMessage[]): Uint8Array {
  const len = envelopes.reduce(
    (previousValue, currentValue) =>
      previousValue + currentValue.data.length + 5,
    0
  );
  const bytes = new Uint8Array(len);
  const v = new DataView(bytes.buffer);
  let offset = 0;
  for (const e of envelopes) {
    v.setUint8(offset, e.flags); // first byte is flags
    v.setUint32(offset + 1, e.data.length); // 4 bytes message length
    bytes.set(e.data, offset + 5);
    offset += e.data.length + 5;
  }
  return bytes;
}
/**
 * These methods provide a slight abstraction for localStorage, which is saved between sessions.
 * Currently they are only used for storing the values of settings. For storing library data (i.e.
 * series, chapters, etc) check the DB-related functions.
 */
export default {
  write(entryName: string, data: any) {
    window.localStorage.setItem(entryName, `${data}`);
  },

  read(entryName: string): string | null {
    return window.localStorage.getItem(entryName);
  },
};
import { Injectable } from "@angular/core";
import { Observable, Subject } from "rxjs/Rx";

interface IMessagesOperation extends Function {
  (messages: string[]): string[];
}

@Injectable()
export class ChatService {
  newMessages: Subject<string> = new Subject<string>();

  messages: Observable<string[]>;

  updates: Subject<any> = new Subject<any>();

  create: Subject<string> = new Subject<string>();
  markThreadAsRead: Subject<any> = new Subject<any>();

  constructor() {
    // this.messages = this.updates
    //   .scan((messages: string[],
    //     operation: IMessagesOperation) => {
    //       return operation(messages);
    //     });

    // this.create
    //


，明年再搞一年，苦战三年，我们的经验就多了，不适合，我们就改。让全世界骂一顿，我们总路线也不能改，“降低干劲，力争下游，少慢差费”建设社会主义总不行，永远要鼓足干劲，力争上游，多快好省。什么叫多，什么叫快，要从实践中去看。现在我们提出十五年建成具有现代工业、现代农业、现代科学文化的伟大的社会主义国家，不行，就更多一点时间嘛！究竟什么叫有计划按比例发展，这个问题才开始接触，请同志们研究。

   来源：

   根据文件的翻印件打印

    [返回索引页面]

   Copyright (C)  2024  Marxist-Leninist-Maoist.

   Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

  <title>
   毛泽东为转发华东协作区会议纪要给周恩来、彭真的信 - 1959-11-16 - CCRD 中国当代政治运动史数据库
  </title>
  <link href="../../../../Emblem_of_the_PCP-Shining_Path.svg.ico" rel="icon" type="image/x-icon"/>

  <


x: 0.0,
            y: 1.0,
            z: 0.0,
        },
        vz: Vec3 {
            x: 0.0,
            y: 0.0,
            z: 1.0,
        },
    };

    fn close_enough(a: f64, b: f64) -> bool {
        (b - a).abs() < (1.0 / 65535.0)
    }

    fn as_array(self) -> [[f64; 3]; 3] {
        [self.vx.as_array(), self.vy.as_array(), self.vz.as_array()]
    }

    pub fn is_identity(self) -> bool {
        let value = self.as_array();
        let identity = Self::IDENTITY.as_array();

        for i in 0..3 {
            for j in 0..3 {
                if !Self::close_enough(value[i][j], identity[i][j]) {
                    return false;
                }
            }
        }
        return true;
    }

    /// Multiply two matrices
    pub fn per(self, b: Self) -> Self {
        let a = self.as_array();
        let b = b.as_array();

        let row_col =
            |i: usize, j: usize| a[i][0] * b[0][j] + a[i][1] * b[1][j] + a[i][2] * b[2][j];

        Self {
            vx: Vec3::new(row_col(0, 0), row_col(0, 1), row_col(0, 2)),
            vy: Vec3::new(row_col(1, 0), row_col(1, 1), row_col(1, 2)),
            vz: Vec3::new(row_col(2, 0), row_col(2, 1), row_col(2, 2)),
        }
    }

    /// Inverse of a matrix
    pub fn inverse(self) -> Option<Self> {
        let a = self;
        let c0 = a.vy.y * a.vz.z - a.vy.z * a.vz.y;
        let c1 = -a.vy.x * a.vz.z + a.vy.z * a.vz.x;
        let c2 = a.vy.x * a.vz.y - a.vy.y * a.vz.x;

        let det = a.vx.x * c0 + a.vx.y * c1 + a.vx.z * c2;

        if det.abs() < MATRIX_DET_TOLERANCE {
            return None;
        }

        let result = Self {
            vx: Vec3 {
                x: c0 / det,
                y: (a.vx.z * a.vz.y - a.vx.y * a.vz.z) / det,
                z: (a.vx.y * a.vy.z - a.vx.z * a.vy.y) / det,
            },
            vy: Vec3 {
                x: c1 / det,
                y: (a.vx.x * a.vz.z - a.vx.z * a.vz.x) / det,
                z: (a.vx.z * a.vy.x - a.vx.x * a.vy.z) / det,
            },
            vz: Vec3 {
                x: c2 / det,
                y: (a.vx.y * a.vz.x - a.vx.x * a.vz.y) / det,
                z: (a.vx.x * a.vy.y - a.vx.y * a.vy.x) / det,
            },
        };
        return Some(result);
    }

    /// Solve a system in the form Ax = b
    pub fn solve(self, x: Vec3) -> Option<Vec3> {
        let a_1 = self.inverse();
        if a_1.is_none() {
            None
        } else {
            Some(a_1.un


g GC ...\n");

		// power down gc slot
		int res = ksceSysconCtrlSdPower(0);
		PRINT_STR("ksceSysconCtrlSdPower(0) 0x%04X\n", res);
		if(res < 0) return res;

		// trigger gc remove interupt
		res = ksceKernelSetEventFlag(interupt_info[1].request_id, 0x100);
		PRINT_STR("ksceKernelSetEventFlag(0x%02X, 0x100) 0x%04X\n", interupt_info[1].request_id, res);
		if(res < 0) return res;

		// wait for event to finish.
		res = ksceKernelWaitEventFlag(interupt_info[1].op_sync_id, 0x100,5,0,0);
		PRINT_STR("ksceKernelWaitEventFlag(0x%02X, 0x100,5,0,0) 0x%04X\n", interupt_info[1].op_sync_id, res);
		if(res < 0) return res;

		ksceKernelDelayThread(1000 * 5); // 5ms

		// power up gc slot
		res = ksceSysconCtrlSdPower(1);
		PRINT_STR("ksceSysconCtrlSdPower(1) 0x%04X\n", res);
		if(res < 0) return res;

		// trigger gc insert interupt
		res = ksceKernelSetEventFlag(interupt_info[1].request_id, 0x1000);
		PRINT_STR("ksceKernelSetEventFlag(0x%02X, 0x1000) 0x%04X\n", interupt_info[1].request_id, res);
		if(res < 0) return res;

		// wait for event to finish
		res = ksceKernelWaitEventFlag(interupt_info[1].op_sync_id,0x1000,5,0,0);
		PRINT_STR("ksceKernelWaitEventFlag(0x%02X, 0x1000,5,0,0) 0x%04X\n", interupt_info[1].op_sync_id, res);
		return res;
	}
	return POINTER_WAS_NULL;
}


local utf8 = require("init")
utf8.config = {
  debug = nil, --utf8:require("util").debug
}
utf8:init()

local cl = utf8:require("charclass.runtime.init")

local equals = require('test.util').equals
local assert = require('test.util').assert
local assert_equals = require('test.util').assert_equals

assert_equals(true, cl.new()
  :with_codes(utf8.byte' ')
  :invert()
  :in_codes(utf8.byte' '))

assert_equals(false, cl.new()
  :with_codes(utf8.byte' ')
  :invert()
  :test(utf8.byte' '))

assert_equals(false, cl.new()
  :with_codes()
  :with_ranges()
  :with_classes('space')
  :without_classes()
  :with_subs()
  :invert()
  :test(utf8.byte(' ')))

assert_equals(true, cl.new()
  :with_codes()
  :with_ranges()
  :with_classes()
  :without_classes('space')
  :with_subs()
  :invert()
  :test(utf8.byte(' ')))

assert_equals(false, cl.new()
  :with_codes()
  :with_ranges()
  :with_classes()
  :without_classes()
  :with_subs(cl.new():with_classes('space'))
  :invert()
  :test(utf8.byte(' ')))

assert_equals(true, cl.new()
  :with_codes()
  :with_ranges()
  :with_classes()
  :w