/* Compute the control points and knot sequence a univariate B-Spline
 derivative.

 MATLAB SYNTAX:

        [dc,dk] = bspderiv(d,c,k)

 INPUT:

   d - degree of the B-Spline
   c - control points          double  matrix(mc,nc)
   k - knot sequence           double  vector(nk)

 OUTPUT:

   dc - control points of the derivative     double  matrix(mc,nc)
   dk - knot sequence of the derivative      double  vector(nk)

 Modified version of Algorithm A3.3 from 'The NURBS BOOK' pg98.

    Copyright (C) 2000 Mark Spink

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */

#include "mexmat.h"

int bspderiv(int d, double *c, int mc, int nc, double *k, int nk, double *dc,
             double *dk)
{
  int ierr = 0;
  int i, j;
  double tmp;

  /* control points */
  double **ctrl = vec2mat(c,mc,nc);

  /* control points of the derivative */
  double **dctrl = vec2mat(dc,mc,nc-1);

  for (i = 0; i < nc-1; i++) {
    tmp = (double)d / (k[i+d+1] - k[i+1]);
    for (j = 0; j < mc; j++) {
      dctrl[i][j] = tmp * (ctrl[i+1][j] - ctrl[i][j]);
    }
  }

  j = 0;
  for (i = 1; i < nk-1; i++)
    dk[j++] = k[i];

  freevec2mat(dctrl);
  freevec2mat(ctrl);

  return ierr;
}

/* Matlab gateway function */
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
  int mc, nc;
  int mk, nk;
  int mu, nu;

  int d;
  double *c, *p, *k, *dc, *dk;

  if (nrhs != 3)
    mexErrMsgTxt("Three inputs required\n");

  if (nlhs > 2)
    mexErrMsgTxt("Two output required maximum\n");

  /* spline degree */
  d = (int) mxGetScalar(prhs[0]);

  /* control points */
  c = mxGetPr(prhs[1]);
  mc = mxGetM(prhs[1]);
  nc = mxGetN(prhs[1]);

  /* knot sequence */
  k = mxGetPr(prhs[2]);
  mk = mxGetM(prhs[2]);
  nk = mxGetN(prhs[2]);

  /* control points of the derivative */
  plhs[0] = mxCreateDoubleMatrix(mc, nc-1, mxREAL);
  dc = mxGetPr(plhs[0]);

  /* knot sequence of the derivative */
  plhs[1] = mxCreateDoubleMatrix(mk, nk-2, mxREAL);
  dk = mxGetPr(plhs[1]);

  bspderiv(d, c, mc, nc, k, nk, dc, dk);
}


cument>().Should().NotBeEmpty();
    }

    [SkipOnKeyNotFoundFact]
    public async Task can_load_pdf_file_by_page_and_include_table()
    {
        var configuration = new Configuration { ApiKey = Environment.GetEnvironmentVariable("LLAMA_CLOUD_API_KEY") ?? string.Empty, ItemsToExtract = ItemType.Table };
        var llamaParseClient = new LlamaParseClient(new HttpClient(new LoggingHandler(new HttpClientHandler())), configuration);

        var fileInfo = new FileInfo("./data/polyglot_tool.pdf");

        var documents = new List<Document>();
        await foreach (var document in llamaParseClient.LoadDataAsync(fileInfo, splitByPage: true))
        {
            documents.Add(document);
        }

        documents.Should().NotBeEmpty();

        documents.OfType<Document>().Where(d => d.MimeType == "application/json" && d.ParentNode is not null).Should().NotBeEmpty();
    }

    [SkipOnKeyNotFoundFact]
    public async Task can_load_pdf_powerpoint_file()
    {
        var llamaParseClient = new LlamaParseClient(new HttpClient(new LoggingHandler(new HttpClientHandler())), new() { ApiKey = Environment.GetEnvironmentVariable("LLAMA_CLOUD_API_KEY") ?? string.Empty });

        var fileInfo = new FileInfo("./data/working_memory_update.pptx");

        var documents = new List<Document>();
        await foreach (var document in llamaParseClient.LoadDataAsync(fileInfo))
        {
            documents.Add(document);
        }

        documents.Should().NotBeEmpty();
    }

    [SkipOnKeyNotFoundFact]
    public async Task can_load_excel_file()
    {
        var llamaParseClient = new LlamaParseClient(new HttpClient(new LoggingHandler(new HttpClientHandler())), new() { ApiKey = Environment.GetEnvironmentVariable("LLAMA_CLOUD_API_KEY") ?? string.Empty });

        var fileInfo = new FileInfo("./data/customers_100.xlsx");

        var documents = new List<Document>();
        await foreach (var document in llamaParseClient.LoadDataAsync(fileInfo))
        {
            documents.Add(document);
        }

        documents.Should().NotBeEmpty();
    }
}


{
			name:           "prefix() within cache prefix",
			key:            "/foo",
			opts:           []clientv3.OpOption{clientv3.WithPrefix()},
			expectCanceled: false,
		},
		{
			name:           "prefix() outside cache prefix returns error",
			key:            "/bar",
			opts:           []clientv3.OpOption{clientv3.WithPrefix()},
			expectCanceled: true,
		},
		{
			name:           "range within prefix",
			key:            "/foo/a",
			opts:           []clientv3.OpOption{clientv3.WithRange("/foo/b")},
			expectCanceled: false,
		},
		{
			name:           "range crosses cache prefix boundary returns error",
			key:            "/foo/a",
			opts:           []clientv3.OpOption{clientv3.WithRange("/zzz")},
			expectCanceled: true,
		},
		{
			name:           "fromKey not allowed when cache has prefix returns error",
			key:            "/foo/a",
			opts:           []clientv3.OpOption{clientv3.WithFromKey()},
			expectCanceled: true,
		},
	}

	const testPutKey = "/foo/a"

	for _, tc := range tests {
		tc := tc
		t.Run(tc.name, func(t *testing.T) {
			c, err := cache.New(client, "/foo")
			if err != nil {
				t.Fatalf("New(...): %v", err)
			}
			defer c.Close()
			if err := c.WaitReady(ctx); err != nil {
				t.Fatal(err)
			}

			watchCtx, cancel := context.WithTimeout(ctx, time.Second)
			defer cancel()

			ch := c.Watch(watchCtx, tc.key, tc.opts...)

			if !tc.expectCanceled {
				if _, err := client.Put(ctx, testPutKey, "val"); err != nil {
					t.Fatalf("Put(%q): %v", testPutKey, err)
				}
			}

			select {
			case resp, ok := <-ch:
				if tc.expectCanceled {
					if !ok || !resp.Canceled {
						t.Fatalf("expected canceled watch, got %+v (closed=%v)", resp, !ok)
					}
					return
				}

				if !ok || resp.Canceled {
					t.Fatalf("expected active watch (not canceled), got %+v (closed=%v)", resp, !ok)
				}
				if len(resp.Events) == 0 {
					t.Fatalf("watch returned no events, expected at least the test event")
				}
				if string(resp.Events[0].Kv.Key) != testPutKey {
					t.Fatalf("got event for key %q, want %q", resp.Events[0].Kv.Key, testPutKey)
				}
			case <-watchCtx.Done():
				if tc.expectCanceled {
					t.Fatalf("watch did not cancel within timeout")
				} else {
					t.Fatalf("active watch did not deliver event within timeout")
				}
			}
		})
	}
}

func TestCacheWatchPrefixProgressNotify(t *testing.T) {
	if integration.ThroughProxy {
		t.Skip("grpc proxy currently does not support requesting progress notifications")
	}
	integration.BeforeTest(t)
	clus := integration.NewCluster(t, &integration.ClusterConfig{Size: 1})
	t.Cleanup(func() { clus.Terminate(t) })
	client := clus.Client(0)

	ctx


float t1 = (sr->y        ) / h;
    float s2 = (sr->x + sr->w) / w;
    float t2 = (sr->y + sr->h) / h;

    int cmdB = HC_ACMD_HCmdB | HC_HVPMSK_X | HC_HVPMSK_Y | HC_HVPMSK_W |
               HC_HVPMSK_Cd  | HC_HVPMSK_S | HC_HVPMSK_T;

    int cmdA = HC_ACMD_HCmdA | HC_HPMType_Tri | HC_HShading_FlatC |
               HC_HVCycle_AFP | HC_HVCycle_AA | HC_HVCycle_BB | HC_HVCycle_NewC;

    int cmdA_End = cmdA | HC_HPLEND_MASK | HC_HPMValidN_MASK | HC_HE3Fire_MASK;

    if (ucdev->bflags & DSBLIT_DEINTERLACE) {
         t1 *= 0.5f;
         t2 *= 0.5f;

         if (ucdev->field)
             dy += 0.5f;
         else
             dy -= 0.5f;
    }

    UC_FIFO_PREPARE(fifo, 30);

    UC_FIFO_ADD_HDR(fifo, HC_ParaType_CmdVdata << 16);
    UC_FIFO_ADD(fifo, cmdB);
    UC_FIFO_ADD(fifo, cmdA);

    UC_FIFO_ADD_XYWCST(fifo, dr->x+dr->w, dy,       1, 0,              s2, t1);
    UC_FIFO_ADD_XYWCST(fifo, dr->x,       dy+dr->h, 1, 0,              s1, t2);
    UC_FIFO_ADD_XYWCST(fifo, dr->x,       dy,       1, ucdev->color3d, s1, t1);
    UC_FIFO_ADD_XYWCST(fifo, dr->x+dr->w, dy+dr->h, 1, ucdev->color3d, s2, t2);

    UC_FIFO_ADD(fifo, cmdA_End);

    UC_FIFO_PAD_EVEN(fifo);

    UC_ACCEL_END();

    return true;
}

#define DFBCOLOR_TO_ARGB(c)   PIXEL_ARGB( (c).a, (c).r, (c).g, (c).b )

bool uc_texture_triangles( void *drv, void *dev,
                           DFBVertex *vertices, int num,
                           DFBTriangleFormation formation )
{
     UC_ACCEL_BEGIN()

     int i;

     int cmdB = HC_ACMD_HCmdB |
                HC_HVPMSK_X   | HC_HVPMSK_Y | HC_HVPMSK_Z | HC_HVPMSK_W |
                HC_HVPMSK_Cd  | HC_HVPMSK_S | HC_HVPMSK_T;

     int cmdA = HC_ACMD_HCmdA | HC_HPMType_Tri | HC_HShading_Gouraud |
                HC_HVCycle_Full;

     int cmdA_End = cmdA | HC_HPLEND_MASK | HC_HPMValidN_MASK | HC_HE3Fire_MASK;

     switch (formation) {
          case DTTF_LIST:
               cmdA |= HC_HVCycle_NewA | HC_HVCycle_NewB | HC_HVCycle_NewC;
               break;
          case DTTF_STRIP:
               cmdA |= HC_HVCycle_AB | HC_HVCycle_BC | HC_HVCycle_NewC;
               break;
          case DTTF_FAN:
               cmdA |= HC_HVCycle_AA | HC_HVCycle_BC | HC_HVCycle_NewC;
               break;
          default:
               D_ONCE( "unknown triangle formation" );
               return false;
     }

     UC_FIFO_PREPARE(fifo, 6 + num * 7);

     UC_FIFO_ADD_HDR(fifo, HC_ParaType_CmdVdata << 16);
     UC_FIFO_ADD(fifo, cmdB);
     UC_FIFO_ADD(fifo, cmdA);

     for (i=0; i<num; i++) {
          UC_FIFO_ADD_XYZWCST(fifo,
                              vertices[i].x, vertices[i].y,
                              vertices[i].z, vertices[i].w, ucdev->color3d,
                              vertices[i].s, vertices[i].t);
     }

     UC_FIFO_ADD(fifo, cmdA_End);

     UC_FIFO_PAD_EVEN(fifo);

     UC_ACCEL_END();

     return true;
}

    // Blit profiling

    //struct timeval tv_start, tv_stop;
    //gettimeofday(&tv_start, NULL);

    // Run test here

    //gettimeofday(&tv_stop, NULL);

    //tv_stop.tv_sec -= tv_start.tv_sec;
    //tv_stop.tv_usec -= tv_start.tv_usec;
    //if (tv_stop.tv_usec < 0) {
    //  tv_stop.tv_sec--;
    //  tv_stop.tv_usec += 1000000;
    //}

    //printf("elapsed time: %d us\n", tv_stop.tv_usec);


.2-4.1-26.6-4.1-38.3 0-69.4 27.1-69.4 65.4 0 38.3 31.1 65.1 69.4 65.1 38.3 0 69.6-28.2 69.6-69.1V64H160zm245 96H203v-53h202v53z"}}]})(t)}.displayName="IoMdMusicalNotes",function(t){return Object(c.a)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 64L96 433.062 110.938 448 256 384l145.062 64L416 433.062z"}}]})(t)}.displayName="IoMdNavigate",function(t){return Object(c.a)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 463.656c22.814 0 41.475-18.656 41.475-41.656h-82.95c0 23 18.661 41.656 41.475 41.656z"}},{tag:"path",attr:{d:"M131.083 107.172l.053.074L98.09 74.277 74.004 98.383l63.042 63.153C126.888 180.521 121 202.196 121 225.07v114.555l-41 41.656V402h297.743l36.182 36.33 24.079-24.301L425.9 402h.316L131.083 107.172zM391 225.07c0-63.526-45-117.677-104-131.218V79.274c0-17.706-13.371-31.243-31-31.243-17.628 0-31 13.537-31 31.243v14.578c-15 3.438-29.048 9.501-41.75 17.663L391 319.355V225.07z"}}]})(t)}.displayName="IoMdNotificationsOff",function(t){return Object(c.a)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M257 120.471c7.083 0 23.911 4.479 23.911 4.479 45.589 10.447 77.678 52.439 77.678 99.85V352.412l9.321 9.364 7.788 7.823H136.302l7.788-7.823 9.321-9.364V224.8c0-47.41 32.089-89.403 77.678-99.85 0 0 18.043-4.479 23.911-4.479M256 48c-17.602 0-31.059 13.518-31.059 31.2v14.559c-59.015 13.523-103.53 67.601-103.53 131.041v114.4L80 380.8v20.8h352v-20.8l-41.411-41.6V224.8c0-63.44-44.516-117.518-103.53-131.041V79.2c0-17.682-13.457-31.2-31.059-31.2zm41.411 374.4h-82.823c0 22.881 18.633 41.6 41.412 41.6s41.411-18.719 41.411-41.6z"}}]})(t)}.displayName="IoMdNotificationsOutline",function(t){return Object(c.a)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 464c22.779 0 41.411-18.719 41.411-41.6h-82.823c0 22.881 18.633 41.6 41.412 41.6zm134.589-124.8V224.8c0-63.44-44.516-117.518-103.53-131.041V79.2c0-17.682-13.457-31.2-31.059-31.2s-31.059 13.518-31.


00000000 */   nop
/* 246374 80225C64 0C0897ED */  jal   func_80225FB4_ovl19
/* 246378 80225C68 00000000 */   nop
/* 24637C 80225C6C 3C078013 */  lui   $a3, %hi(gKirbyState) # $a3, 0x8013
/* 246380 80225C70 24E7E7C0 */  addiu $a3, %lo(gKirbyState) # addiu $a3, $a3, -0x1840
.L80225C74_ovl19:
/* 246384 80225C74 3C088005 */  lui   $t0, %hi(D_8004A7C4) # $t0, 0x8005
/* 246388 80225C78 2508A7C4 */  addiu $t0, %lo(D_8004A7C4) # addiu $t0, $t0, -0x583c
glabel L80225C7C_ovl19
/* 24638C 80225C7C 8CE3004C */  lw    $v1, 0x4c($a3)
/* 246390 80225C80 5060005A */  beql  $v1, $zero, .L80225DEC_ovl19
/* 246394 80225C84 8FBF0014 */   lw    $ra, 0x14($sp)
/* 246398 80225C88 8D090000 */  lw    $t1, ($t0)
/* 24639C 80225C8C 3C0C800E */ lui $t4, %hi(D_800DFBD0)
/* 2463A0 80225C90 27A40034 */  addiu $a0, $sp, 0x34
/* 2463A4 80225C94 8D2A0000 */  lw    $t2, ($t1)
/* 2463A8 80225C98 3406FFFF */  li    $a2, 65535
/* 2463AC 80225C9C 000A5880 */  sll   $t3, $t2, 2
/* 2463B0 80225CA0 018B6021 */  addu  $t4, $t4, $t3
/* 2463B4 80225CA4 8D8CFBD0 */ lw $t4, %lo(D_800DFBD0)($t4)
/* 2463B8 80225CA8 8D85000C */  lw    $a1, 0xc($t4)
/* 2463BC 80225CAC 0C02C8D0 */  jal   func_800B2340
/* 2463C0 80225CB0 AFA30030 */   sw    $v1, 0x30($sp)
/* 2463C4 80225CB4 8FA20030 */  lw    $v0, 0x30($sp)
/* 2463C8 80225CB8 C7AA0034 */  lwc1  $f10, 0x34($sp)
/* 2463CC 80225CBC 3C188005 */  lui   $t8, %hi(D_8004A7C4) # $t8, 0x8005
/* 2463D0 80225CC0 8C4D004C */  lw    $t5, 0x4c($v0)
/* 2463D4 80225CC4 3C0A800E */ lui $t2, %hi(D_800DFBD0)
/* 2463D8 80225CC8 27A40034 */  addiu $a0, $sp, 0x34
/* 2463DC 80225CCC E5AA0004 */  swc1  $f10, 4($t5)
/* 2463E0 80225CD0 C7B00038 */  lwc1  $f16, 0x38($sp)
/* 2463E4 80225CD4 8C4E004C */  lw    $t6, 0x4c($v0)
/* 2463E8 80225CD8 3406FFFF */  li    $a2, 65535
/* 2463EC 80225CDC E5D00008 */  swc1  $f16, 8($t6)
/* 2463F0 80225CE0 C7


from pathlib import Path

from lambdapdk import LambdaLibrary

from lambdapdk.interposer import Interposer_3ML_0400, \
    Interposer_3ML_0800, \
    Interposer_3ML_2000, \
    Interposer_3ML_0400_2000, \
    Interposer_4ML_0400, \
    Interposer_4ML_0800, \
    Interposer_4ML_2000, \
    Interposer_4ML_0400_2000, \
    Interposer_5ML_0400, \
    Interposer_5ML_0800, \
    Interposer_5ML_2000, \
    Interposer_5ML_0400_2000

class BumpLibrary(LambdaLibrary):
    '''
    Interposer bump library
    '''
    def __init__(self):
        super().__init__()
        self.set_name("interposer_bumps")

        path_base = Path("lambdapdk", "interposer", "libs", 'bumps')

        self.add_asic_pdk(Interposer_3ML_0400(), default=False)
        self.add_asic_pdk(Interposer_3ML_0800(), default=False)
        self.add_asic_pdk(Interposer_3ML_2000(), default=False)
        self.add_asic_pdk(Interposer_3ML_0400_2000(), default=False)
        self.add_asic_pdk(Interposer_4ML_0400(), default=False)
        self.add_asic_pdk(Interposer_4ML_0800(), default=False)
        self.add_asic_pdk(Interposer_4ML_2000(), default=False)
        self.add_asic_pdk(Interposer_4ML_0400_2000(), default=False)
        self.add_asic_pdk(Interposer_5ML_0400(), default=False)
        self.add_asic_pdk(Interposer_5ML_0800(), default=False)
        self.add_asic_pdk(Interposer_5ML_2000(), default=False)
        self.add_asic_pdk(Interposer_5ML_0400_2000(), default=False)

        with self.active_dataroot("lambdapdk"):
            with self.active_fileset("models.physical"):
                self.add_file(path_base / "lef" / "bumps.lef")
                self.add_file(path_base / "gds" / "bumps.gds")
                self.add_asic_aprfileset()


)
		notificationManager.addNotification(notification)
		eventBus.post(PostRemovedEvent(remotePost))
		assertThat(notification.elements, contains(remotePost))
	}

	@Test
	fun `handler removes post from notification when post is marked as known`() {
		notification.add(localPost)
		notificationManager.addNotification(notification)
		eventBus.post(MarkPostKnownEvent(localPost))
		assertThat(notification.elements, emptyIterable())
	}

	@Test
	fun `handler does not remove remote post from notification when post is marked as known`() {
		notification.add(remotePost)
		notificationManager.addNotification(notification)
		eventBus.post(MarkPostKnownEvent(remotePost))
		assertThat(notification.elements, contains(remotePost))
	}

}

private val localSone: Sone = object : IdOnlySone("local-sone") {
	override fun isLocal() = true
}
private val localPost: Post = object : Post.EmptyPost("local-post") {
	override fun getSone() = localSone
}
private val remoteSone: Sone = IdOnlySone("remote-sone")
private val remotePost: Post = object : Post.EmptyPost("remote-post") {
	override fun getSone() = remoteSone
}
/*
 * Sone - Preferences.kt - Copyright © 2013–2020 David Roden
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package net.pterodactylus.sone.core

import com.google.common.eventbus.EventBus
import net.pterodactylus.sone.core.event.InsertionDelayChangedEvent
import net.pterodactylus.sone.core.event.StrictFilteringActivatedEvent
import net.pterodactylus.sone.core.event.StrictFilteringDeactivatedEvent
import net.pterodactylus.sone.fcp.FcpInterface.FullAccessRequired
import net.pterodactylus.sone.fcp.FcpInterface.FullAccessRequired.ALWAYS
import net.pterodactylus.sone.fcp.event.FcpInterfaceActivatedEvent
import net.pterodactylus.sone.fcp.event.FcpInterfaceDeactivatedEvent
import net.pterodactylus.sone.fcp.event.FullAccessRequiredChanged
import net.pterodactylus.sone.utils.DefaultOption
import net.pterodactylus.util.config.Configuration
import net.pterodactylus.util.config.ConfigurationException
import java.lang.Integer.MAX_VALUE

/**
 * Convenience interface for external classes that want to access the core’s
 * configuration.
 */
class Preferences(private val eventBus: EventBus) {

	private val _insertionDelay = DefaultOption(60) { it in 0..MAX_VALUE }
	val insertionDelay: Int get() = _insertionDelay.get()
	var newInsertionDelay: Int?
		get() = unsupported
		set(value) {
			_insertionDelay.set(value)
			eventBus.post(InsertionDelayChangedEvent(insertionDelay))
			eventBus.post(PreferenceChangedEvent("InsertionDelay", insertionDelay))
		}

	private val _postsPerPage = DefaultOption(10) { it in 1..MAX_VALUE }
	val postsPerPage: Int get() = _postsPerPage.get()
	var newPostsPerPage: Int?
		get() = unsupported
		set(val


*/	bl func_80253DB0
/* 8006091C 0005C57C  48 00 02 00 */	b lbl_80060B1C
lbl_80060920:
/* 80060920 0005C580  3C 60 80 41 */	lis r3, lbl_8040B768@ha
/* 80060924 0005C584  38 80 00 01 */	li r4, 1
/* 80060928 0005C588  38 63 B7 68 */	addi r3, r3, lbl_8040B768@l
/* 8006092C 0005C58C  38 A0 00 00 */	li r5, 0
/* 80060930 0005C590  A8 63 00 04 */	lha r3, 4(r3)
/* 80060934 0005C594  48 1F 34 7D */	bl func_80253DB0
/* 80060938 0005C598  48 00 01 E4 */	b lbl_80060B1C
lbl_8006093C:
/* 8006093C 0005C59C  3C 60 80 41 */	lis r3, lbl_8040B768@ha
/* 80060940 0005C5A0  38 80 00 0D */	li r4, 0xd
/* 80060944 0005C5A4  38 63 B7 68 */	addi r3, r3, lbl_8040B768@l
/* 80060948 0005C5A8  38 A0 00 00 */	li r5, 0
/* 8006094C 0005C5AC  A8 63 00 04 */	lha r3, 4(r3)
/* 80060950 0005C5B0  48 1F 34 61 */	bl func_80253DB0
/* 80060954 0005C5B4  48 00 01 C8 */	b lbl_80060B1C
lbl_80060958:
/* 80060958 0005C5B8  3C 60 80 41 */	lis r3, lbl_8040B768@ha
/* 8006095C 0005C5BC  38 80 00 02 */	li r4, 2
/* 80060960 0005C5C0  38 63 B7 68 */	addi r3, r3, lbl_8040B768@l
/* 80060964 0005C5C4  38 A0 00 00 */	li r5, 0
/* 80060968 0005C5C8  A8 63 00 04 */	lha r3, 4(r3)
/* 8006096C 0005C5CC  48 1F 34 45 */	bl func_80253DB0
/* 80060970 0005C5D0  48 00 01 AC */	b lbl_80060B1C
lbl_80060974:
/* 80060974 0005C5D4  3C 60 80 41 */	lis r3, lbl_8040B768@ha
/* 80060978 0005C5D8  38 80 00 03 */	li r4, 3
/* 8006097C 0005C5DC  38 63 B7 68 */	addi r3, r3, lbl_8040B768@l
/* 80060980 0005C5E0  38 A0 00 00 */	li r5, 0
/* 80060984 0005C5E4  A8 63 00 04 */	lha r3, 4(r3)
/* 80060988 0005C5E8  48 1F 34 29 */	bl func_80253DB0
/* 8006098C 0005C5EC  48 00 01 90 */	b lbl_80060B1C
lbl_80060990:
/* 80060990 0005C5F0  3F E0 80 41 */	lis r31, lbl_8040B768@ha
/* 80060994 0005C5F4  3B FF B7 68 */	addi r31, r31, lbl_8040B768@l
/* 80060998 0005C5F8  A8 7F 00 04 */	lha r3, 4(r31)
/* 8006099C 0005C5FC  48 1F 34 35 */	bl func_80253DD0
/* 800609A0 0005C600  54 60 04 3E */	clrlwi r0, r3, 0x10


ass JsonEncoder : ITextEncoder
        {
            public void Encode(StringBuilder text, TextWriter target)
            {
                target.Write(JsonConvert.ToString(text.ToString(), '"').Trim('"'));
            }

            public void Encode(string text, TextWriter target)
            {
                target.Write(JsonConvert.ToString(text, '"').Trim('"'));
            }

            public void Encode<T>(T text, TextWriter target) where T : IEnumerator<char>
            {
                Encode(new string(new Adapter<T, char>(text).ToArray()), target);
            }

            public IFormatProvider FormatProvider { get; } = CultureInfo.InvariantCulture;

            private class Adapter<T, TV> : IEnumerable<TV>
                where T: IEnumerator<TV>
            {
                private readonly T _enumerator;

                public Adapter(T enumerator) => _enumerator = enumerator;

                public IEnumerator<TV> GetEnumerator() => _enumerator;

                IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
            }
        }

        [Fact]
        public void NoOutputEncoding()
        {
            var template =
                "Hello {{person.name}} {{person.surname}} from {{person.address.homeCountry}}. You're {{description}}.";

            var configuration = new HandlebarsConfiguration
                                    {
                                        TextEncoder = null
                                    };

            var handlebarsInstance = Handlebars.Create(configuration);

            var output = handlebarsInstance.Compile(template).Invoke(Value);

            Assert.Equal(ExpectedOutput, output);
        }

        [Fact]
        public void JsonEncoding()
        {
            var template = "No html entities, {{Username}}.";

            var configuration = new HandlebarsConfiguration
                                    {
                                        TextEncoder = new JsonEncoder()
                                    };

            var handlebarsInstance = Handlebars.Create(configuration);

            var value = new {Username = "\"<Eric>\"\n<Sharp>"};
            var output = handlebarsInstance.Compile(template).Invoke(value);

            Assert.Equal(@"No html entities, \""<Eric>\""\n<Sharp>.", output);
        }

        #endregion
    }
}


    var scrollCoord = goog.dom.getDomHelper(doc).getDocumentScroll();
    pos.x = box.left + scrollCoord.x;
    pos.y = box.top + scrollCoord.y;

  // Gecko prior to 1.9.
  } else if (doc.getBoxObjectFor && !BUGGY_GECKO_BOX_OBJECT) {
    // Gecko ignores the scroll values for ancestors, up to 1.9.  See:
    // https://bugzilla.mozilla.org/show_bug.cgi?id=328881 and
    // https://bugzilla.mozilla.org/show_bug.cgi?id=330619

    box = doc.getBoxObjectFor(el);
    // TODO(user): Fix the off-by-one error when window is scrolled down
    // or right more than 1 pixel. The viewport offset does not move in lock
    // step with the window scroll; it moves in increments of 2px and at
    // somewhat random intervals.
    var vpBox = doc.getBoxObjectFor(viewportElement);
    pos.x = box.screenX - vpBox.screenX;
    pos.y = box.screenY - vpBox.screenY;

  // Safari, Opera and Camino up to 1.0.4.
  } else {
    var parent = el;
    do {
      pos.x += parent.offsetLeft;
      pos.y += parent.offsetTop;
      // For safari/chrome, we need to add parent's clientLeft/Top as well.
      if (parent != el) {
        pos.x += parent.clientLeft || 0;
        pos.y += parent.clientTop || 0;
      }
      // In Safari when hit a position fixed element the rest of the offsets
      // are not correct.
      if (goog.userAgent.WEBKIT &&
          goog.style.getComputedPosition(parent) == 'fixed') {
        pos.x += doc.body.scrollLeft;
        pos.y += doc.body.scrollTop;
        break;
      }
      parent = parent.offsetParent;
    } while (parent && parent != el);

    // Opera & (safari absolute) incorrectly account for body offsetTop.
    if (goog.userAgent.OPERA || (goog.userAgent.WEBKIT &&
        positionStyle == 'absolute')) {
      pos.y -= doc.body.offsetTop;
    }

    for (parent = el; (parent = goog.style.getOffsetParent(parent)) &&
        parent != doc.body && parent != viewportElement; ) {
      pos.x -= parent.scrollLeft;
      // Workaround for a bug in Opera 9.2 (and earlier) where table rows may
      // report an invalid scroll top value. The bug was fixed in Opera 9.5
      // however as that version supports getBoundingClientRect it won't
      // trigger this code path. https://bugs.opera.com/show_bug.cgi?id=249965
      if (!goog.userAgent.OPERA || parent.tagName != 'TR') {
        pos.y -= parent.scrollTop;
      }
    }
  }

  return pos;
};

/**
 * Returns the left coordinate of an element relative to the HTML document
 * @param {Element} el Elements.
 * @return {number} The left coordinate.
 */
goog.style.getPageOffsetLeft = function(el) {
  return goog.style.getPageOffset(el).x;
};

/**
 * Returns the top coordinate of an element relative to the HTML document
 * @param {Element} el Elements.
 * @return {number} The top coordinate.
 */
goog.style.getPageOffsetTop = function(el) {
  return goog.style.getPageOffset(el).y;
};

/**
 * Returns a Coordinate object relative to the top-left of an HTML document
 * in an ancestor frame of this element. Used for measuring the position of
 * an element inside a frame relative to a containing frame.
 *
 * @param {Element} el Element to get the page offset for.
 * @param {Window} relativeWin The window to measure relative to. If relativeWin
 *     is not in the ancestor frame chain of the element, we measure rela


("expected the closure to take a pattern as an argument")
    };
    ($opt:expr, $function:path $(,)?) => {
        match $opt {
            $crate::__::Some(x) => $function(x),
            $crate::__::None => $crate::__::None,
        }
    };
}

#[macro_export]
macro_rules! opt_flatten {
    ($opt:expr $(,)? ) => {
        match $opt {
            $crate::__::Some(x) => x,
            $crate::__::None => $crate::__::None,
        }
    };
}

#[macro_export]
macro_rules! opt_or_else {
    ($opt:expr, || $mapper:expr $(,)? ) => {
        match $opt {
            $crate::__::Some(x) => $crate::__::Some(x),
            $crate::__::None => $mapper,
        }
    };
    ($opt:expr, | $($anything:tt)* ) => {
        compile_error!("expected the closure to take no arguments")
    };
    ($opt:expr, $function:path $(,)?) => {
        match $opt {
            $crate::__::Some(x) => $crate::__::Some(x),
            $crate::__::None => $function(),
        }
    };
}

#[macro_export]
macro_rules! opt_filter {
    ($e:expr, |$param:pat| $v:expr $(,)?) => {
        match $e {
            $crate::__::Some(x)
                if {
                    let $param = &x;
                    $v
                } =>
            {
                $crate::__::Some(x)
            }
            _ => $crate::__::None,
        }
    };
    ($opt:expr, | $($anything:tt)* ) => {
        compile_error!("expected the closure to take a pattern as an argument")
    };
    ($e:expr, $function:path $(,)?) => {
        match $e {
            $crate::__::Some(x) if $function(&x) => $crate::__::Some(x),
            _ => $crate::__::None,
        }
    };
}
use std::io;

mod algorithms;
mod data_structures;
mod common;

fn main() {
    // let mut buf = String::new();
    // println!("Enter numbers: ");
    // io::stdin().read_line(&mut buf);
}
// Hello World from Rust

fn main() {
    println!("Hello World!");
}use crate::config::{Config, ConfigAndPath};
use crate::parse::{transform, Command, Parser, ParserConfig};
use crate::{transform_files_with_args, Args};
use std::path::Path;

#[test]
fn with_language() {
    let original = r#"
start
<!--{ code_snippet.rs | code: rust }-->
<!--{ end }-->
end"#;
    let expected = r#"
start
<!--{ code_snippet.rs | code: rust }-->
```rust
fn main() {
    println!("Hello World!");
}
```
<!--{ end }-->
end"#;
    let parsed = Parser {
        config: ParserConfig {
            base_dir: "test_helpers".into(),
            ..Default::default()
        },
        content: original.to_string(),
    }
    .parse()
    .unwrap();
    assert_eq!(parsed, expected);
}
#[test]
fn code() {
    let original = r#"
start
<!--{ code_snippet.rs | code }-->
<!--{ end }-->
end"#;
    let expected = r#"
start
<!--{ code_snippet.rs | code }-->
```
fn main() {


bd.key, key)
            ? bd.value
            : undefined
        : lookupWorker(key, hash, shift + SHIFT, bd, dict);
}

function insertWorker<K, V>(key: K, value: V, hash: number, shift: number, trie: Trie<K, V>, dict: HashEqDict<K>): Trie<K, V> {
    if (trie.kind === 'chain') {
        if (trie.hash === hash) {
            const insertValue = mkValue(key, value, hash);
            for (let i = 0; i < trie.data.length; ++i) {
                const kvh = trie.data[i];

                if (dict.eq(kvh.key, key)) {
                    return mkChain(hash, update(insertValue, i, trie.data));
                }
            }
        }

        return merge(key, value, hash, shift, trie);
    }

    const hashIdx = (hash >>> shift) & MASK;
    const bitIndex = popCount(trie.bitmap & ((1 << hashIdx) - 1));

    let newData;
    if (trie.bitmap & (1 << hashIdx)) {
        const bd = trie.data[bitIndex];

        const newbd = bd.kind === 'value'
            ? (bd.hash === hash && dict.eq(bd.key, key))
                ? mkValue(key, value, hash)
                : merge(key, value, hash, shift + SHIFT, bd)
            : insertWorker(key, value, hash, shift + SHIFT, bd, dict);

        newData = update(newbd, bitIndex, trie.data);
    }
    else {
        newData = arrInsert(mkValue(key, value, hash), bitIndex, trie.data);
    }

    return mkBitmap(trie.bitmap | (1 << hashIdx), newData);
}

function merge<K, V>(key: K, value: V, hash: number, shift: number, kvh: Value<K, V> | Chain<K, V>): Trie<K, V> {
    if (shift >= HASH_SZ || hash === kvh.hash) {
        const insertValue = mkValue(key, value, hash);

        return kvh.kind === 'chain'
            ? mkChain(hash, prepend(insertValue, kvh.data))
            : mkChain(hash, [insertValue, kvh]);
    }

    const h1 = (hash >>> shift) & MASK;
    const h2 = (kvh.hash >>> shift) & MASK;

    if (h1 === h2) {
        return mkBitmap(1 << h1, [ merge(key, value, hash, shift + SHIFT, kvh) ]);
    }

    const insertValue = mkValue(key, value, hash);
    return mkBitmap(
        (1 << h1) | (1 << h2),
        h1 > h2 ? [kvh, insertValue]
                : [insertValue, kvh]
    );
}

function removeWorker<K, V>(
    key: K,
    hash: number,
    shift: number,
    trie: Trie<K, V>,
    dict: HashEqDict<K>
): Trie<K, V> | Value<K, V> | undefined {
    if (trie.kind === 'chain') {
        if (trie.hash === hash) {
            for (let i = 0; i < trie.data.length; ++i) {
                const kvh = trie.data[i];

                if (dict.eq(kvh.key, key)) {
                    // a valid Chain always has >= 2 children
                    if (trie.data.length === 2) {
                        return trie.data[i ^ 1];
                    }

                    return mkChain(hash, arrRemove(i, trie.


viewWidth
     * @param viewHeight
     */
    public void beginDrawing(GL10 gl, float viewWidth, float viewHeight) {
        checkState(STATE_INITIALIZED, STATE_DRAWING);
        gl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureID);
        gl.glShadeModel(GL10.GL_FLAT);
        gl.glEnable(GL10.GL_BLEND);
        gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);
        gl.glColor4x(0x10000, 0x10000, 0x10000, 0x10000);
        gl.glMatrixMode(GL10.GL_PROJECTION);
        gl.glPushMatrix();
        gl.glLoadIdentity();
        gl.glOrthof(0.0f, viewWidth, 0.0f, viewHeight, 0.0f, 1.0f);
        gl.glMatrixMode(GL10.GL_MODELVIEW);
        gl.glPushMatrix();
        gl.glLoadIdentity();
        // Magic offsets to promote consistent rasterization.
        gl.glTranslatef(0.375f, 0.375f, 0.0f);
    }

    /**
     * Draw a given label at a given x,y position, expressed in pixels, with the
     * lower-left-hand-corner of the view being (0,0).
     *
     * @param gl
     * @param x
     * @param y
     * @param labelID
     */
    public void draw(GL10 gl, float x, float y, int labelID) {
        checkState(STATE_DRAWING, STATE_DRAWING);
        Label label = mLabels.get(labelID);
        gl.glEnable(GL10.GL_TEXTURE_2D);
        ((GL11)gl).glTexParameteriv(GL10.GL_TEXTURE_2D,
                GL11Ext.GL_TEXTURE_CROP_RECT_OES, label.mCrop, 0);
        ((GL11Ext)gl).glDrawTexiOES((int) x, (int) y, 0,
                (int) label.width, (int) label.height);
    }

    /**
     * Ends the drawing and restores the OpenGL state.
     *
     * @param gl
     */
    public void endDrawing(GL10 gl) {
        checkState(STATE_DRAWING, STATE_INITIALIZED);
        gl.glDisable(GL10.GL_BLEND);
        gl.glMatrixMode(GL10.GL_PROJECTION);
        gl.glPopMatrix();
        gl.glMatrixMode(GL10.GL_MODELVIEW);
        gl.glPopMatrix();
    }

    private void checkState(int oldState, int newState) {
        if (mState != oldState) {
            throw new IllegalArgumentException("Can't call this method now.");
        }
        mState = newState;
    }

    private static class Label {
        public Label(float width, float height, float baseLine,
                int cropU, int cropV, int cropW, int cropH) {
            this.width = width;
            this.height = height;
            this.baseline = baseLine;
            int[] crop = new int[4];
            crop[0] = cropU;
            crop[1] = cropV;
            crop[2] = cropW;
            crop[3] = cropH;
            mCrop = crop;
        }

        public float width;
        public float height;
        public float baseline;
        public int[] mCrop;
    }

    private int mStrikeWidth;
    private int mStrikeHeight;
    private boolean mFullColor;
    private Bitmap mBitmap;
    private Canvas mCanvas;
    private Paint mClearPaint;

    private int mTextureID;

    private float mTexelWidth;  // Convert texel to U
    private float mTexelHeight; // Convert texel to V
    private int mU;
    private int mV;
    private int mLineHeight;
    private ArrayList<Label> mLabels = new ArrayList<Label>();

    private static final int STATE_NEW = 0;
    private static final int STATE_INITIALIZED = 1;
    private static final int STATE_ADDING = 2;
    private static final int STATE_DRAWING = 3;
    private int mState;
}
/*


			yyLOCAL = tree.QuerySpecOptionSqlBigResult
		}
		yyVAL.union = yyLOCAL
	case 881:
		yyDollar = yyS[yypt-1 : yypt+1]
		var yyLOCAL uint64
//line mysql_sql.y:5817
		{
			yyLOCAL = tree.QuerySpecOptionSqlBufferResult
		}
		yyVAL.union = yyLOCAL
	case 882:
		yyDollar = yyS[yypt-1 : yypt+1]
		var yyLOCAL uint64
//line mysql_sql.y:5821
		{
			yyLOCAL = tree.QuerySpecOptionStraightJoin
		}
		yyVAL.union = yyLOCAL
	case 883:
		yyDollar = yyS[yypt-1 : yypt+1]
		var yyLOCAL uint64
//line mysql_sql.y:5825
		{
			yyLOCAL = tree.QuerySpecOptionHighPriority
		}
		yyVAL.union = yyLOCAL
	case 884:
		yyDollar = yyS[yypt-1 : yypt+1]
		var yyLOCAL uint64
//line mysql_sql.y:5829
		{
			yyLOCAL = tree.QuerySpecOptionSqlCalcFoundRows
		}
		yyVAL.union = yyLOCAL
	case 885:
		yyDollar = yyS[yypt-1 : yypt+1]
		var yyLOCAL uint64
//line mysql_sql.y:5833
		{
			yyLOCAL = tree.QuerySpecOptionSqlNoCache
		}
		yyVAL.union = yyLOCAL
	case 886:
		yyDollar = yyS[yypt-1 : yypt+1]
		var yyLOCAL uint64
//line mysql_sql.y:5837
		{
			yyLOCAL = tree.QuerySpecOptionAll
		}
		yyVAL.union = yyLOCAL
	case 887:
		yyDollar = yyS[yypt-1 : yypt+1]
		var yyLOCAL uint64
//line mysql_sql.y:5841
		{
			yyLOCAL = tree.QuerySpecOptionDistinct
		}
		yyVAL.union = yyLOCAL
	case 888:
		yyDollar = yyS[yypt-1 : yypt+1]
		var yyLOCAL uint64
//line mysql_sql.y:5845
		{
			yyLOCAL = tree.QuerySpecOptionDistinctRow
		}
		yyVAL.union = yyLOCAL
	case 889:
		yyDollar = yyS[yypt-0 : yypt+1]
		var yyLOCAL *tree.Where
//line mysql_sql.y:5867
		{
			yyLOCAL = nil
		}
		yyVAL.union = yyLOCAL
	case 890:
		yyDollar = yyS[yypt-2 : yypt+1]
		var yyLOCAL *tree.Where
//line mysql_sql.y:5871
		{
			yyLOCAL = &tree.Where{Type: tree.AstHaving, Expr: yyDollar[2].exprUnion()}
		}
		yyVAL.union = yyLOCAL
	case 891:
		yyDollar = yyS[yypt-0 : yypt+1]
		var yyLOCAL *tree.GroupByClause
//line mysql_sql.y:5876
		{
			yyLOCAL = nil
		}
		yyVAL.union = yyLOCAL
	case 892:
		yyDollar = yyS[yypt-4 : yypt+1]
		var yyLOCAL *tree.GroupByClause
//line mysql_sql.y:5880
		{
			exprsList := []tree.Exprs{yyDollar[3].exprsUnion()}
			yyLOCAL = &tree.GroupByClause{
				GroupByExprsList: exprsList,
				Apart:            false,
				Cube:             false,
				Rollup:           yyDollar[4].boolValUnion(),
			}


-size: 0.8571429em;
  }

  .lg\:prose-sm h2 code {
    font-size: 0.9em;
  }

  .lg\:prose-sm h3 code {
    font-size: 0.8888889em;
  }

  .lg\:prose-sm pre {
    font-size: 0.8571429em;
    line-height: 1.6666667;
    margin-top: 1.6666667em;
    margin-bottom: 1.6666667em;
    border-radius: 0.25rem;
    padding-top: 0.6666667em;
    padding-right: 1em;
    padding-bottom: 0.6666667em;
    padding-left: 1em;
  }

  .lg\:prose-sm ol {
    margin-top: 1.1428571em;
    margin-bottom: 1.1428571em;
  }

  .lg\:prose-sm ul {
    margin-top: 1.1428571em;
    margin-bottom: 1.1428571em;
  }

  .lg\:prose-sm li {
    margin-top: 0.2857143em;
    margin-bottom: 0.2857143em;
  }

  .lg\:prose-sm ol > li {
    padding-left: 1.5714286em;
  }

  .lg\:prose-sm ol > li::before {
    left: 0;
  }

  .lg\:prose-sm ul > li {
    padding-left: 1.5714286em;
  }

  .lg\:prose-sm ul > li::before {
    height: 0.3571429em;
    width: 0.3571429em;
    top: calc(0.8571429em - 0.1785714em);
    left: 0.2142857em;
  }

  .lg\:prose-sm > ul > li p {
    margin-top: 0.5714286em;
    margin-bottom: 0.5714286em;
  }

  .lg\:prose-sm > ul > li > *:first-child {
    margin-top: 1.1428571em;
  }

  .lg\:prose-sm > ul > li > *:last-child {
    margin-bottom: 1.1428571em;
  }

  .lg\:prose-sm > ol > li > *:first-child {
    margin-top: 1.1428571em;
  }

  .lg\:prose-sm > ol > li > *:last-child {
    margin-bottom: 1.1428571em;
  }

  .lg\:prose-sm ul ul, .lg\:prose-sm ul ol, .lg\:prose-sm ol ul, .lg\:prose-sm ol ol {
    margin-top: 0.5714286em;
    margin-bottom: 0.5714286em;
  }

  .lg\:prose-sm hr {
    margin-top: 2.8571429em;
    margin-bottom: 2.8571429em;
  }

  .lg\:prose-sm hr + * {
    margin-top: 0;
  }

  .lg\:prose-sm h2 + * {
    margin-top: 0;
  }

  .lg\:prose-sm h3 + * {
    margin-top: 0;
  }

  .lg\:prose-sm h4 + * {
    margin-top: 0;
  }

  .lg\:prose-sm table {
    font-size: 0.8571429em;
    line-height: 1.5;
  }

  .lg\:prose-sm thead th {
    padding-right: 1em;
    padding-bottom: 0.6666667em;
    padding-left: 1em;
  }

  .lg\:prose-sm thead th:first-child {
    padding-left: 0;
  }

  .lg\:prose-sm thead th


24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zM248 8C111 8 0 119 0 256c0 106.3 67 196.7 161 232-5.6-12.2-9-25.7-9-40v-45.5c-24.7-16.2-43.5-38.1-47.8-63.8-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-4.3 25.7-23.1 47.6-47.8 63.8V448c0 14.3-3.4 27.8-9 40 94-35.3 161-125.7 161-232C496 119 385 8 248 8zm-56 225l-9.5-8.5c-14.8-13.2-46.2-13.2-61 0L112 233c-8.5 7.4-21.6.3-19.8-10.8 4-25.2 34.2-42.1 59.9-42.1S208 197 212 222.2c1.6 11.1-11.6 18.2-20 10.8zm152 39c-35.3 0-64-28.7-64-64s28.7-64 64-64 64 28.7 64 64-28.7 64-64 64zm-50.9 102.6c-14.4-6.5-31.1 2.2-34.6 17.6l-1.8 7.8c-2.1 9.2-15.2 9.2-17.3 0l-1.8-7.8c-3.5-15.4-20.2-24.1-34.6-17.6-.9.4.3-.2-18.9 9.4v63c0 35.2 28 64.5 63.1 64.9 35.7.5 64.9-28.4 64.9-64v-64c-19.5-9.6-18.2-8.9-19-9.3z"],
  "grin-wink": [496, 512, [], "f58c", "M0 256c0 137 111 248 248 248s248-111 248-248S385 8 248 8 0 119 0 256zm200-48c0 17.7-14.3 32-32 32s-32-14.3-32-32 14.3-32 32-32 32 14.3 32 32zm168 25l-9.5-8.5c-14.8-13.2-46.2-13.2-61 0L288 233c-8.3 7.4-21.6.4-19.8-10.8 4-25.2 34.2-42.1 59.9-42.1S384 197 388 222.2c1.6 11-11.5 18.2-20 10.8zm-243.1 87.8C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.3-3.7 22.6 6 20.7 17.9-9.2 55-83.2 93.3-143.8 93.3s-134.5-38.3-143.8-93.3c-2-11.9 9.3-21.6 20.7-17.9z"],
  "grip-horizontal": [448, 512, [], "f58d", "M96 288H32c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zm160 0h-64c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.


─┐     ┌────────────┐ 2.send UserEventCheckUser
// │  SplashScreen  │──────────▶│SplashBloc│────▶│ISplashUser │─────┐
// └────────────────┘           └──────────┘     └────────────┘     │
//                                                                  │
//                                                                  ▼
//    ┌───────────┐            ┌─────────────┐                 ┌────────┐
//    │HomeScreen │◀───────────│BlocListener │◀────────────────│RustSDK │
//    └───────────┘            └─────────────┘                 └────────┘
//           4. Show HomeScreen or SignIn      3.return AuthState
class SplashScreen extends StatelessWidget {
  const SplashScreen({
    Key? key,
    required this.autoRegister,
  }) : super(key: key);

  final bool autoRegister;

  @override
  Widget build(BuildContext context) {
    if (!autoRegister) {
      return _buildChild(context);
    } else {
      return FutureBuilder<void>(
        future: _registerIfNeeded(),
        builder: (context, snapshot) {
          if (snapshot.connectionState != ConnectionState.done) {
            return Container();
          }
          return _buildChild(context);
        },
      );
    }
  }

  BlocProvider<SplashBloc> _buildChild(BuildContext context) {
    return BlocProvider(
      create: (context) {
        return getIt<SplashBloc>()..add(const SplashEvent.getUser());
      },
      child: Scaffold(
        body: BlocListener<SplashBloc, SplashState>(
          listener: (context, state) {
            state.auth.map(
              authenticated: (r) => _handleAuthenticated(context, r),
              unauthenticated: (r) => _handleUnauthenticated(context, r),
              initial: (r) => {},
            );
          },
          child: const Body(),
        ),
      ),
    );
  }

  void _handleAuthenticated(BuildContext context, Authenticated result) {
    final userProfile = result.userProfile;
    FolderEventReadCurrentWorkspace().send().then(
      (result) {
        return result.fold(
          (workspaceSetting) {
            getIt<SplashRoute>()
                .pushHomeScreen(context, userProfile, workspaceSetting);
          },
          (error) async {
            Log.error(error);
            getIt<SplashRoute>().pushWelcomeScreen(context, userProfile);
          },
        );
      },
    );
  }

  void _handleUnauthenticated(BuildContext context, Unauthenticated result) {
    // getIt<SplashRoute>().pushSignInScreen(context);
    getIt<SplashRoute>().pushSkipLoginScreen(context);
  }

  Future<void> _registerIfNeeded() async {
    final result = await UserEventCheckUser().send();
    if (!result.isLeft()) {
      await getIt<AuthService>().autoSignUp();
    }
  }
}

class Body extends StatelessWidget {
  const Body({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    var size = MediaQuery.of(context).size;

    return Container(
      alignment: Alignment.center,
      child: SingleChildScrollView(
        child: Stack(
          alignment: Alignment.center,
          children: [
            Image(
              fit: BoxFit.cover,
              width: size.width,
              height: size.height,
              image:
                  const AssetImage('assets/images/appflowy_launch_splash.jpg'),
            ),
            const CircularProgressIndicator.adaptive(),
          ],
        ),
      ),
    );
  }
}
import 'package:appflowy/plugins/database_view/calendar/calendar.d


namespace reflection
	{
		namespace description
		{
			using namespace presentation;
			using namespace presentation::templates;
			using namespace presentation::controls;
			using namespace presentation::controls::list;
			using namespace presentation::controls::tree;
			using namespace presentation::elements::text;
			using namespace presentation::theme;

#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA

#define _ ,

#define CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE_INHERITANCE(CONTROL)\
	CLASS_MEMBER_CONSTRUCTOR(CONTROL*(ThemeName), {L"themeName"})\

#define CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE(CONTROL)\
	CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE_INHERITANCE(CONTROL)\
	CLASS_MEMBER_METHOD(TypedControlTemplateObject, {L"ensureExists"})\

#define CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE_INHERITANCE_2(CONTROL, TYPE2, PARAM2)\
	CLASS_MEMBER_CONSTRUCTOR(CONTROL*(ThemeName, TYPE2), {L"themeName" _ L ## #PARAM2 })\

#define CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE_2(CONTROL, TYPE2, PARAM2)\
	CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE_INHERITANCE_2(CONTROL, TYPE2, PARAM2)\
	CLASS_MEMBER_METHOD(TypedControlTemplateObject, {L"ensureExists"})\

#define CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE_INHERITANCE_3(CONTROL, TYPE2, PARAM2, TYPE3, PARAM3)\
	CLASS_MEMBER_CONSTRUCTOR(CONTROL*(ThemeName, TYPE2, TYPE3), {L"themeName" _ L ## #PARAM2 _ L ## #PARAM3})\

#define CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE_3(CONTROL, TYPE2, PARAM2, TYPE3, PARAM3)\
	CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE_INHERITANCE_3(CONTROL, TYPE2, PARAM2, TYPE3, PARAM3)\
	CLASS_MEMBER_METHOD(TypedControlTemplateObject, {L"ensureExists"})\

#define INTERFACE_IDENTIFIER(INTERFACE)\
	CLASS_MEMBER_STATIC_EXTERNALMETHOD(GetIdentifier, NO_PARAMETER, WString(*)(), vl::presentation::controls::QueryServiceHelper<::INTERFACE>::GetIdentifier)

/***********************************************************************
Type Declaration (Extra)
***********************************************************************/

			BEGIN_CLASS_MEMBER(GuiApplication)
				CLASS_MEMBER_STATIC_EXTERNALMETHOD(GetApplication, NO_PARAMETER, GuiApplication*(*)(), vl::presentation::controls::GetApplication)

				CLASS_MEMBER_EVENT(LocaleChanged)
				CLASS_MEMBER_PROPERTY_EVENT_FAST(Locale, LocaleChanged)
				CLASS_MEMBER_PROPERTY_READONLY_FAST(MainWindow)
				CLASS_MEMBER_PROPERTY_READONLY_FAST(TooltipOwner)
				CLASS_MEMBER_PROPERTY_READONLY_FAST(ExecutablePath)
				CLASS_MEMBER_PROPERTY_READONLY_FAST(ExecutableFolder)
				CLASS_MEMBER_PROPERTY_READONLY_FAST(Windows)
				CLASS_MEMBER_PROPERTY_READONLY_FAST(GlobalShortcutKeyManager)

				CLASS_MEMBER_METHOD(Run, {L"mainWindow"})
				CLASS_MEMBER_METHOD(RunOneCycle, NO_PARAMETER)
				CLASS_MEMBER_METHOD(GetWindowFromNative, {L"nativeWindow"});
				CLASS_MEMBER_METHOD(ShowTooltip, {L"owner" _ L"tooltip" _ L"preferredContentWidth" _ L"location"})
				CLASS_MEMBER_METHOD(CloseTooltip, NO_PARAMETER)
				CLASS_MEMBER_METHOD(IsInMainThread, NO_PARAMETER)
				CLASS_MEMBER


https://twitter.com/AlamofireSF) for project updates and releases.

### Security Disclosure

If you believe you have identified a security vulnerability with Alamofire, you should report it as soon as possible via email to security@alamofire.org. Please do not post it to a public issue tracker.

## License

Alamofire is released under the MIT license. See LICENSE for details.
## SML
### 测试一下SML
SML中间含有list类型，基本原理是链表，而C++的STL库文件含有一个stack
的数据结构，实现的基础也是的链表， 但是二叉树的实现两者就大相径庭，
SML的实现的基础是， 通过类型的定义， 比如
` datatype tree = Lf | Node of tree * int * tree; `,
但是C++是通过的定义结构体或者类， 然后让类中间持有指针来实现树的构建，
现在分别测试两种数据结果在传统的面向过程和函数式编程的效率

首先测试的SML类型的插入，对应的SML代码如下:
```
  val l = [];
  fun f(0:int) = [0]
    | f(x) = x::f(x  - 1);

  fun insertList([], t) = t
    | insertList(l::X, t) = insertList(X, insertElements(t, l));

  val timer = Timer.startCPUTimer();

  val l = f(1000000);
  val a =   Timer.checkCPUTimes(timer);
```

结果如下:
>   val a =
>   {gc={sys=TIME {usec=0},usr=TIME {usec=464620}},
>   nongc={sys=TIME {usec=15103},usr=TIME {usec=499494}}}
>   : {gc:{sys:Time.time, usr:Time.time}, nongc:{sys:Time.time, usr:Time.time}}
可以发现， 即使添加是1000000的数据量的插入，依旧是只需要499ms的时间

使用C++的stack的push 操作重复上述过程，对应的代码如下
```cpp
#include <ctime>
#include <cstdio>
#include <stack>
#include <iostream>
#include <cstddef>

using namespace std;

int main(){
    clock_t begin = clock();
    stack<int> s;
    for (int i = 0; i < 1000000; ++i) {
        s.push(i);
    }
    clock_t end = clock();
    double elapsed_secs = double(end - begin) / CLOCKS_PER_SEC * 1000;
    printf("%lf ms", elapsed_secs);
    return 0;
}
```
结果如下：
> 23.639000 ms

其实两者直接已经含有较大的差距了。

下面来看二叉树插入，而且采用特殊数据插入， 查看对应结果
SML对应的源代码
```
  val l = [];
  fun f(0:int) = [0]
    | f(x) = x::f(x  - 1);

  datatype tree = Lf | Node of tree * int * tree;
  val t: tree = Lf;

  fun reT Lf = Lf
    | reT(Node(L, a, R)) = Node(reT(R), a, reT(L));

  fun insertElements(Lf, x)= Node(Lf, x, Lf)
     | insertElements(Node(l, n, r), x) =
                      case Int.compare(x , n) of
                        EQUAL => Node(l, x, r)
                      | LESS => Node(insertElements(l, x), n, r)
                      | GREATER => Node(l, n, insertElements(r, x))

  fun insertList([], t) = t
    | insertList(l::X, t) = insertList(X, insertElements(t, l));

  val timer = Timer.startCPUTimer();

  val l = f(10000);
  (* val t = insertList(l, Lf); *)

  val a =   Timer.checkCPUTimes(timer);

```

测试结果:
> val a =
>  {gc={sys=TIME {usec=0},usr=TIME {usec=44839}},
>   nongc={sys=TIME {usec=49878},usr=TIME {usec=1247284}}}
>  : {gc:{sys:Time.time, usr:Time.time}, nongc:{sys:Time.time, usr:Time.time}}
>  消耗时间大约2000ms

CPP对应的源代码
```cpp
#include <ctime>
#include <cstdio>
#include <stack>
#include <iostream>
#include <cstddef>

using


 resource: 'uranium',
    resourcePerSecond: {
      energy: -436,
      uranium: 235,
    },
    cost: {
      lunarite: 93100,
      methane: 47000,
      meteorite: 830,
    },
  },

  uraniumT5: {
    id: 'uraniumT5',
    tier: 5,
    name: 'Planetary Nuclear Plant',
    desc:
      'This huge factory is as large as a planet, fusing together Uranium from common elements.',
    resource: 'uranium',
    resourcePerSecond: {
      energy: -2719,
      uranium: 2412,
    },
    cost: {
      titanium: 486000,
      silicon: 266000,
      ice: 364000,
    },
  },

  //////////
  // Lava //
  //////////
  lavaT1: {
    id: 'lavaT1',
    tier: 1,
    name: 'Heat Resistant Crucible',
    desc:
      'You can use a modified crucible to pick up lava and to store it for later use.',
    resource: 'lava',
    resourcePerSecond: {
      lava: 1,
    },
    cost: {
      lunarite: 4000,
      gem: 7000,
    },
  },

  lavaT2: {
    id: 'lavaT2',
    tier: 2,
    name: 'Lava Extractor',
    desc: 'This extracts lava from volcanoes automatically and quickly.',
    resource: 'lava',
    resourcePerSecond: {
      energy: -58,
      lava: 7,
    },
    cost: {
      lunarite: 16000,
      titanium: 14000,
      silicon: 6000,
    },
  },

  lavaT3: {
    id: 'lavaT3',
    tier: 3,
    name: 'Igneous Extruder',
    desc:
      'Instead of going out and finding lava, it can be more convenient to make it yourself with heat and pressure.',
    resource: 'lava',
    resourcePerSecond: {
      energy: -237,
      lava: 43,
    },
    cost: {
      lunarite: 69000,
      titanium: 57000,
      silicon: 39000,
    },
  },

  lavaT4: {
    id: 'lavaT4',
    tier: 4,
    name: 'Volcanic Veluptuator',
    desc: 'A melting pot of misery, pouring lava out from mined rock.',
    resource: 'lava',
    resourcePerSecond: {
      energy: -689,
      lava: 187,
    },
    cost: {
      lunarite: 298000,
      gold: 121000,
      meteorite: 750,
    },
  },

  lavaT5: {
    id: 'lavaT5',
    tier: 5,
    name: 'Jupitonian Condensator',
    desc: 'Condenses gases from the heart of Jupiter into liquid magma.',
    resource: 'lava',
    resourcePerSecond: {
      energy: -4142,
      lava: 2103,
    },
    cost: {
      lunarite: 288000,
      gem: 210000,
      ice: 238000,
    },
  },

  /********************
   * Earth Resources  *
   ********************/

  /////////
  // Oil //
  /////////
  oilT1: {
    id: 'oilT1',
    tier: 1,
    name: 'Small Pump',
    desc: 'Build a small pump to extract Oil from the ground.',
    resource: 'oil',
    resourcePerSecond: {
      oil: 1,
    },
    cost: {
      metal: 60,
      gem: 20,
    },
  },

  oilT2: {
    id: 'oilT2',
    tier: 2,
    name: 'Pumpjack',
    desc:
      'Pumpjacks are much bigger than small pumps and produce Oil on an industrial scale but they require a lot of Energy.',
    resource:


()
        }
    }
}

impl Default for BoxHeader {
    fn default() -> Self {
        BoxHeader::new(None)
    }
}
<gh_stars>0
use crate::data::SharedDataBridge;
use crate::types::{ApplicationModel, Data};
use drogue_client::registry::v1::{Application, Device};
use patternfly_yew::*;
use yew::prelude::*;

pub struct ApplicationOverview {
    apps: Vec<(Application, Vec<Device>)>,
    _bridge: SharedDataBridge<Data>,
}

pub enum Msg {
    DataUpdated(Vec<(Application, Vec<Device>)>),
}

impl Component for ApplicationOverview {
    type Message = Msg;
    type Properties = ();
    fn create(ctx: &Context<Self>) -> Self {
        let bridge = SharedDataBridge::from(ctx.link(), Msg::DataUpdated);
        Self {
            apps: Vec::new(),
            _bridge: bridge,
        }
    }

    fn update(&mut self, _ctx: &Context<Self>, msg: Self::Message) -> bool {
        match msg {
            Msg::DataUpdated(apps) => {
                self.apps = apps;
                true
            }
        }
    }

    fn view(&self, _: &Context<Self>) -> Html {
        let header = html_nested! {
            <TableHeader>
                <TableColumn label="Application" />
                <TableColumn label="Update Type" />
                <TableColumn label="Synced" />
                <TableColumn label="Updating" />
                <TableColumn label="Unknown" />
            </TableHeader>
        };
        let models: Vec<ApplicationModel> = self.apps.iter().map(|app| app.into()).collect();
        let model: SharedTableModel<ApplicationModel> = models.into();
        html! {
            <>
                <PageSection variant={PageSectionVariant::Light} limit_width=true>
                    <Title level={Level::H1} size={Size::XXXXLarge}>{ "Applications" }</Title>
                </PageSection>
                <PageSection>
                    <Table<SharedTableModel<ApplicationModel>>
                        header={header}
                        entries={model}
                    >

                    </Table<SharedTableModel<ApplicationModel>>>
                </PageSection>
            </>
        }
    }
}
use super::node::Cherry;
use std::cmp::Ordering;
use std::fmt::Debug;

///
/// impl PartialOrd for Cherry<T>
///
/// Implementation of `lhs.partial_cmp(&rhs)` (`lhs: &Cherry<T>, rhs: &Cherry<T>`), where `T: PartialOrd`.
/// Provides comparison operators for `Cherry<T>`.
///
/// # Examples
///
/// ```
/// extern crate cherries;
/// extern crate uom;
/// use cherries::node::{Leaf, Node};
/// use uom::si::f32::*;
/// use uom::si::length::meter;
/// use std::cmp::Ordering;
///
/// let x = Leaf::new().value(Length::new::<meter>(2.0)).name("x").build();
/// let y = Leaf::new().value(Length::new::<meter>(2.1)).name("y").build();
/// assert_eq!(x.partial_cmp(&y), Some(Ordering::Less));
/// assert_eq!(y.partial_cmp(&x), Some(Ordering::Greater));
/// assert_eq!(x.partial_cmp(&x), Some(Ordering::Equal));
/// assert_eq!(x < y, true);
/// assert_eq!(y < x, false);
/// assert_eq!(x > y, false)


2H, WarA01/B02Silver (1H, Special - High Blue Glow)",
[39662] = "Monster - Sword, Long Silver - Green Pommel (Low Blue Glow)",
[39663] = "Monster - Mace, Draenei A01 Blue (Low Blue Glow)",
[39664] = "Cetro de Dominación",
[39665] = "Fardo de pellejos",
[39666] = "Elixir de agilidad poderosa",
[39667] = "Cabeza de Vigía de tormenta",
[39668] = "Tripas de abominación",
[39669] = "Baba de necrófago",
[39670] = "Cristal de añublo",
[39671] = "Poción de sanación resurgente",
[39672] = "Mantón de la rama ofrecida",
[39673] = "Manteo de alfazaque de relámpagos",
[39674] = "Capa de enjambre zumbador",
[39675] = "Capa de la tortuga dura",
[39676] = "Envoltura de los San'layn",
[39677] = "Scaling Stat Test Plate Shoulders",
[39678] = "Ataduras de vendetta",
[39679] = "Brazales de taumaturgo",
[39680] = "Avambrazos del liberador de Venganza",
[39681] = "Puñado de tornillos de cobalto",
[39682] = "Condensador sobrecargado",
[39683] = "Tubo de acero gélido reforzado",
[39684] = "Gatillo de pelo",
[39685] = "Marco indestructible",
[39686] = "Montaje de equipo neodinámico",
[39687] = "Granada de saronita",
[39688] = "Bocarda de marca \"S\"",
[39689] = "Cristal de puño congelado",
[39690] = "Activador de explosivo volátil",
[39691] = "Estofado de orca suculento",
[39692] = "Receta: estofado de orca suculento",
[39693] = "Cristal de energía inestable",
[39694] = "Cristal de la tormenta violenta",
[39695] = "Trampa enredadora",
[39696] = "Trampa volátil",
[39697] = "Bomba de pinchos",
[39698] = "Artefacto de luz imbuida",
[39699] = "Monster - Staff, Northrend C01 Black",
[39700] = "Cuerno de Razaescarcha",
[39701] = "Caminalbas",
[39702] = "Braciles de oro aracnoides",
[39703] = "Mandiletes de anulación",
[39704] = "Espaldares de muerte no natural",
[39705] = "Scaling Stat Test Mail Shoulders",
[39706] = "Escarpes de Represalia súbita",
[39707] = "Almete de la tundra verdeante",
[39708] = "Hombreras de la tundra verdeante",
[39709] = "Botas de la tundra verdeante",
[39710] = "Cinturón de la tundra verdeante",
[39711] = "Brazales de la tundra verdeante",
[39712] = "Varita con gemas de los nerubianos",
[39713] = "Vale regalo de El Bastión de Ébano",
[39714] = "Muerte palmeada",
[39715] = "ObsoleteSigilo del caído recordado DO NOT USE",
[39716] = "Escudo de asimilación",
[39717] = "Escarpes inexorables",
[39718] = "Manoplas de escarabajo de cadáver",
[


userdata dom_domconfiguration_get_parameter(string name);","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-getParameter Since:"],dom_domconfiguration_set_parameter:["dom_void dom_domconfiguration_set_parameter(string name, domuserdata value);","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-property Since:"],dom_domerrorhandler_handle_error:["dom_boolean dom_domerrorhandler_handle_error(domerror error);","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-ERRORS-DOMErrorHandler-handleError Since:"],dom_domimplementation_create_document:["DOMDocument dom_domimplementation_create_document(string namespaceURI, string qualifiedName, DOMDocumentType doctype);","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Level-2-Core-DOM-createDocument Since: DOM Level 2"],dom_domimplementation_create_document_type:["DOMDocumentType dom_domimplementation_create_document_type(string qualifiedName, string publicId, string systemId);","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Level-2-Core-DOM-createDocType Since: DOM Level 2"],dom_domimplementation_get_feature:["DOMNode dom_domimplementation_get_feature(string feature, string version);","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMImplementation3-getFeature Since: DOM Level 3"],dom_domimplementation_has_feature:["boolean dom_domimplementation_has_feature(string feature, string version);","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-5CED94D7 Since:"],dom_domimplementationlist_item:["domdomimplementation dom_domimplementationlist_item(int index);","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMImplementationList-item Since:"],dom_domimplementationsource_get_domimplementation:["domdomimplementation dom_domimplementationsource_get_domimplementation(string features);","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-getDOMImpl Since:"],dom_domimplementationsource_get_domimplementations:["domimplementationlist dom_domimplementationsource_get_domimplementations(string features);","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-getDOMImpls Since:"],dom_domstringlist_item:["domstring dom_domstringlist_item(int index);","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMStringList-item Since:"],dom_element_get_attribute:["string dom_element_get_attribute(string name);","URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-666EE0F9 Since:"],dom_element_get_attribute_node:["DOMAttr dom_element_get_attribute_node(string name);","URL: http://ww


asSetTopLeft() bool {
	return p_.RespondsToSelector(objc.Sel("setTopLeft:"))
}

// The top-left coordinate of a tile. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/ciperspectivetile/3228656-topleft?language=objc
func (p_ PerspectiveTileObject) SetTopLeft(value coregraphics.Point) {
	objc.Call[objc.Void](p_, objc.Sel("setTopLeft:"), value)
}

func (p_ PerspectiveTileObject) HasTopLeft() bool {
	return p_.RespondsToSelector(objc.Sel("topLeft"))
}

// The top-left coordinate of a tile. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/ciperspectivetile/3228656-topleft?language=objc
func (p_ PerspectiveTileObject) TopLeft() coregraphics.Point {
	rv := objc.Call[coregraphics.Point](p_, objc.Sel("topLeft"))
	return rv
}

func (p_ PerspectiveTileObject) HasSetInputImage() bool {
	return p_.RespondsToSelector(objc.Sel("setInputImage:"))
}

// The image to use as an input image. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/ciperspectivetile/3228655-inputimage?language=objc
func (p_ PerspectiveTileObject) SetInputImage(value Image) {
	objc.Call[objc.Void](p_, objc.Sel("setInputImage:"), value)
}

func (p_ PerspectiveTileObject) HasInputImage() bool {
	return p_.RespondsToSelector(objc.Sel("inputImage"))
}

// The image to use as an input image. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/ciperspectivetile/3228655-inputimage?language=objc
func (p_ PerspectiveTileObject) InputImage() Image {
	rv := objc.Call[Image](p_, objc.Sel("inputImage"))
	return rv
}

func (p_ PerspectiveTileObject) HasSetBottomLeft() bool {
	return p_.RespondsToSelector(objc.Sel("setBottomLeft:"))
}

// The bottom-left coordinate of a tile. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/ciperspectivetile/3228653-bottomleft?language=objc
func (p_ PerspectiveTileObject) SetBottomLeft(value coregraphics.Point) {
	objc.Call[objc.Void](p_, objc.Sel("setBottomLeft:"), value)
}

func (p_ PerspectiveTileObject) HasBottomLeft() bool {
	return p_.RespondsToSelector(objc.Sel("bottomLeft"))
}

// The bottom-left coordinate of a tile. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/ciperspectivetile/3228653-bottomleft?language=objc
func (p_ PerspectiveTileObject) BottomLeft() coregraphics.Point {
	rv := objc.Call[coregraphics.Point](p_, objc.Sel("bottomLeft"))
	return rv
}
// Code generated by DarwinKit. DO NOT EDIT.

package coreimage

import (
	"github.com/progrium/darwinkit/macos/coregraphics"
	"github.com/progrium/darwinkit/objc"
)

// The properties you use to configure a color curves filter. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicolorcurves?language=objc
type PColorCurves interface {
	// optional
	SetColorSpace(value coregraphics.ColorSpaceRef)
	HasSetColorSpace() bool

	// optional
	ColorSpace() coregraphics.ColorSpaceRef
	HasColorSpace() bool

	// optional


from pathlib import Path
import re

base = Path(__file__).parent

readme = ""
for folder in sorted(base.iterdir(), key=lambda x: x.name):
    if folder.is_dir() and not folder.name.startswith("."):
        readme += f"\n # {folder.stem.capitalize()} \n"
        for script_path in sorted(folder.glob("*.py"), key=lambda x: x.name):
            if script_path.stem.startswith("__"):
                continue
            title = re.match(r"#\ ?MenuTitle: (.*)", script_path.read_text())
            doc_pattern = r'__doc__\s*=\s*"""(.*?)"""'
            doc = re.search(doc_pattern, script_path.read_text(), re.DOTALL)
            doc_replaced = doc.group(1).strip().replace("\n", " ") if doc else ""
            readme += f'- *{title.group(1)}{":" if doc_replaced else ""}* {doc_replaced}\n'

with open(base / "README.md", "w+") as readme_file:
    readme_file.write(readme)

with open(base / "GLYPHS_README.md", "w+") as glyphs_readme_file:
    lines = list(filter(lambda x:len(x), readme.splitlines()))
    for l, line in enumerate(lines):
        match = re.match(r".*#\ ?(.*)", line)
        if match:
            lines[l] = f"\\n**{match.group(1).strip()}**\\n"
    glyphs_readme_file.write("Scripts by Jan Šindler\\n" + "\\n".join(lines))


nvas.countdown()
	openvg.End()
	canvas.clock(*smartcolor)
	canvas.weather(*location)
	canvas.headlines(*section, *thumb)

	// update on specific intervals, shutdown on interrupt
	dateticker := time.NewTicker(1 * time.Minute)
	weatherticker := time.NewTicker(5 * time.Minute)
	headticker := time.NewTicker(10 * time.Minute)
	sigint := make(chan os.Signal, 1)
	signal.Notify(sigint, os.Interrupt)

	for {
		select {
		case <-dateticker.C:
			canvas.clock(*smartcolor)
		case <-weatherticker.C:
			canvas.weather(*location)
		case <-headticker.C:
			canvas.headlines(*section, *thumb)
		case <-sigint:
			openvg.End()
			openvg.Finish()
			os.Exit(0)
		}
	}
}

// clock displays the current time
func (d *display) clock(smartcolor bool) {
	if smartcolor {
		d.bgcolor = daycolor()
	}
	cdim := dimen{x: d.width / 2, y: d.height / 2, width: d.width / 2, height: d.height / 2}
	cdim.regionFill(d.bgcolor, d.textcolor)
	clocksize := d.width / 20
	cs := int(clocksize)
	x := d.width * 0.95
	y := d.height * 0.70

	now := time.Now()
	openvg.TextEnd(x, y, now.Format("3:04 pm"), "sans", cs)
	openvg.TextEnd(x, y+(clocksize*2), now.Format("Monday January _2"), "sans", cs/2)
	openvg.End()
}

// weather retrieves data from the forecast.io API, decodes and displays it.
func (d *display) weather(latlong string) {
	wdim := dimen{x: 0, y: d.height / 2, width: d.width / 2, height: d.height / 2}
	r, err := netread(fmt.Sprintf(weatherfmt, weatherAPIkey, latlong))
	if err != nil {
		fmt.Fprintf(os.Stderr, "Weather read error: %v\n", err)
		wdim.gerror(d.bgcolor, d.textcolor, "no weather")
		return
	}
	defer r.Close()
	var data Forecast
	err = json.NewDecoder(r).Decode(&data)
	if err != nil {
		fmt.Fprintf(os.Stderr, "%v\n", err)
		wdim.gerror(d.bgcolor, d.textcolor, "no weather")
		return
	}
	x := d.width * 0.05
	y := d.height * 0.70
	wsize := d.width / 20
	spacing := wsize * 2.0
	w1 := int(wsize)
	w2 := w1 / 2
	w3 := w1 / 4
	c := data.Currently
	temp := fmt.Sprintf("%0.f°", c.Temperature)
	tw := openvg.TextWidth(temp, "sans", w1)
	wdim.regionFill(d.bgcolor, d.textcolor)
	openvg.Text(x, y, temp, "sans", w1)
	if c.Temperature-c.FeelsLike > 1 {
		openvg.Text(x, y-(spacing/3),
			fmt.Sprintf("(feels like %0.f°)", c.FeelsLike), "sans", w3)
	}
	openvg.Text(x, y+spacing, c.Summary, "sans", w2)
	if c.PrecipProb > 0 {
		openvg.Text(x, y-(spacing*.6),
			fmt.Sprintf("%0.f%% Chance of precipitation", c.PrecipProb*100), "sans", w3)
	}

	ic := dimen{
		x:      x + tw + d.width*0.01,
		y:      d.height * 0.67,
		width:  d.width / 10,
		height: d.width / 10,
	}


          if (instance && instance._isDestroyed) {
            return;
          }
          if (cleanup) {
            cleanup();
          }
          return call(source, WATCHER, [onCleanup]);
        };
      }
    }
    else {
      getter = noop;
      warnInvalidSource(source);
    }
    if (cb && deep) {
      var baseGetter_1 = getter;
      getter = function () { return traverse(baseGetter_1()); };
    }
    var cleanup;
    var onCleanup = function (fn) {
      cleanup = watcher.onStop = function () {
        call(fn, WATCHER_CLEANUP);
      };
    };
    // in SSR there is no need to setup an actual effect, and it should be noop
    // unless it's eager
    if (isServerRendering()) {
      // we will also not call the invalidate callback (+ runner is not set up)
      onCleanup = noop;
      if (!cb) {
        getter();
      }
      else if (immediate) {
        call(cb, WATCHER_CB, [
          getter(),
          isMultiSource ? [] : undefined,
          onCleanup
        ]);
      }
      return noop;
    }
    var watcher = new Watcher(currentInstance, getter, noop, {
      lazy: true
    });
    watcher.noRecurse = !cb;
    var oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;
    // overwrite default run
    watcher.run = function () {
      if (!watcher.active) {
        return;
      }
      if (cb) {
        // watch(source, cb)
        var newValue = watcher.get();
        if (deep ||
          forceTrigger ||
          (isMultiSource
            ? newValue.some(function (v, i) {
              return hasChanged(v, oldValue[i]);
            })
            : hasChanged(newValue, oldValue))) {
          // cleanup before running cb again
          if (cleanup) {
            cleanup();
          }
          call(cb, WATCHER_CB, [
            newValue,
            // pass undefined as the old value when it's changed for the first time
            oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue,
            onCleanup
          ]);
          oldValue = newValue;
        }
      }
      else {
        // watchEffect
        watcher.get();
      }
    };
    if (flush === 'sync') {
      watcher.update = watcher.run;
    }
    else if (flush === 'post') {
      watcher.post = true;
      watcher.update = function () { return queueWatcher(watcher); };
    }
    else {
      // pre
      watcher.update = function () {
        if (instance && instance === currentInstance && !instance._isMounted) {
          // pre-watcher triggered before
          var buffer = instance._preWatchers || (instance._preWatchers = []);
          if (buffer.indexOf(watcher) < 0)
            buffer.push(watcher);
        }
        else {
          queueWatcher(watcher);
        }
      };
    }
    {
      watcher.onTrack = onTrack;
      watcher.onTrigger = onTrigger;
    }
    // initial run
    if (cb) {
      if (immediate) {
        watcher.run();
      }
      else {
        oldValue = watcher.get();
      }
    }
    else if (flush === 'post' && instance) {
      instance.$once('hook:mounted', function () { return watcher.get(); });
    }
    else {
      watcher.get();
    }
    return function () {
      watcher.teardown();
    };
  }

  function provide(key, value) {
    if (!currentInstance) {
      {
        warn$2("provide() can only be used inside setup().");
      }
    }
    else {
      // TS doesn't allow symbol as index type
      resolveProvided(currentInstance)[key] = value;
    }
  }
  function resolveProvided(vm


J)
                        grid[nextI][nextJ] = 1
                    }
                }
            }
        }

        return -1
    }

    companion object {
        val cells = arrayOf(
            intArrayOf(0,1),
            intArrayOf(1,1),
            intArrayOf(0,-1),
            intArrayOf(1,-1),
            intArrayOf(1,0),
            intArrayOf(-1,-1),
            intArrayOf(-1,0),
            intArrayOf(-1, 1)
        )
    }
}
package kotlin

// Runtime: 356 ms, faster than 72.97% of Kotlin online submissions for Surrounded Regions.
// Memory Usage: 48.5 MB, less than 75.68% of Kotlin online submissions for Surrounded Regions.
// https://leetcode.com/submissions/detail/776042031/
class Solution {
    fun solve(board: Array<CharArray>): Unit {
        val n = board.size
        val m = board[0].size

        for (y in 0 until n) {
            for (x in 0 until m) {
                if (x==0||x==m-1||y==0||y==n-1){
                    if (board[y][x] == 'O') {
                        markI(board, y, x)
                    }
                }
            }
        }

        for (y in 0 until n) {
            for (x in 0 until m) {
                board[y][x] = when(board[y][x]){
                    'O' -> 'X'
                    'I' -> 'O'
                    else -> board[y][x] // could've just 'continue'd only if leetcode uses newer version of Kotlin
                }
            }
        }
    }
    fun inBound(board: Array<CharArray>, r: Int, c: Int) : Boolean {
        val n = board.size
        val m = board[0].size
        return !(r < 0 || r >= n || c < 0 || c >= m)
    }
    fun markI(board: Array<CharArray>, y: Int, x: Int) {
        if (!inBound(board, y, x)) return
        if (board[y][x] != 'O') return
        board[y][x] = 'I'
        markI(board, y+1, x)
        markI(board, y-1, x)
        markI(board, y, x+1)
        markI(board, y, x-1)
    }
}
class Solution {
    fun minStickers(stickers: Array<String>, target: String): Int {
        val stickCount = HashMap<String, MutableMap<Char, Int>>().apply {
            stickers.forEach { s ->
                this[s] = s.groupingBy { it }
                    .eachCount()
                    .toMutableMap()
            }
        }

        val dp = HashMap<String, Int>()

        fun dfs(t: String, stick: MutableMap<Char, Int>): Int {
            dp[t]?.let {
                return it
            }

            var res = if (stick.isEmpty()) 0 else 1
            val remainT = StringBuilder()
            for (c in t) {
                if (c in stick && stick[c]!! > 0) {
                    stick[c] = stick[c]!! - 1
                } else {
                    remainT.append(c)
                }
            }

            if (remainT.length > 0) {
                val remainTS = remainT.toString()
                var used = Integer.MAX_VALUE
                for (s in stickCount.values) {
                    if (remainTS[0]!! !in s)
                        continue
                    used = minOf(used, dfs(remainTS, s.toMutableMap()))
                }

                dp[remainTS] = used
                res = if (used == Integer.MAX_VALUE ) Integer.MAX_VALUE else res + used
            }

            return res
        }

        val res = dfs(target, mutableMapOf<Char, Int>())
        return if (res == Integer.MAX_VALUE) -1 else res
    }
}
class MyLinkedList() {
    val head = LN(0)
    val


.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif";

	var envmap_physical_pars_fragment = "#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI *


fter, remove from importantLineIndex to end
			if !hasContentAfter {
				result := strings.Join(lines[:importantLineIndex], "\n")
				return strings.TrimRight(result, " \t\n")
			}
			break
		}
	}

	return input
}
package dtores

import (
	"github.com/ladmakhi81/learnup/shared/db/entities"
	"time"
)

type getForumByCourseIDCourse struct {
	ID          uint   `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type getForumByCourseIDTeacher struct {
	ID       uint   `json:"id"`
	FullName string `json:"name"`
	Phone    string `json:"phone"`
}

type getForumByCourseIDMembers struct {
	ID       uint   `json:"id"`
	FullName string `json:"name"`
}

type GetForumByCourseIDDto struct {
	ID              uint                           `json:"id"`
	CreatedAt       time.Time                      `json:"createdAt"`
	UpdatedAt       time.Time                      `json:"updatedAt"`
	Status          entities.CourseForumStatus     `json:"status"`
	StatusChangedAt *time.Time                     `json:"statusChangedAt"`
	IsPublic        bool                           `json:"isPublic"`
	AccessMode      entities.CourseForumAccessMode `json:"accessMode"`
	Course          getForumByCourseIDCourse       `json:"course"`
	Teacher         getForumByCourseIDTeacher      `json:"teacher"`
	Members         []getForumByCourseIDMembers    `json:"members"`
}

func MapGetForumByCourseIDDto(forum *entities.CourseForum) GetForumByCourseIDDto {
	res := GetForumByCourseIDDto{
		ID:         forum.ID,
		CreatedAt:  forum.CreatedAt,
		UpdatedAt:  forum.UpdatedAt,
		Status:     forum.Status,
		IsPublic:   forum.IsPublic,
		AccessMode: forum.AccessMode,
		Course: getForumByCourseIDCourse{
			ID:          forum.Course.ID,
			Name:        forum.Course.Name,
			Description: forum.Course.Description,
		},
		Teacher: getForumByCourseIDTeacher{
			ID:       forum.Teacher.ID,
			FullName: forum.Teacher.FullName(),
			Phone:    forum.Teacher.Phone,
		},
		Members: make([]getForumByCourseIDMembers, len(forum.Course.Participants)),
	}
	for pIndex, pItem := range forum.Course.Participants {
		res.Members[pIndex] = getForumByCourseIDMembers{
			ID:       pItem.Student.ID,
			FullName: pItem.Student.FullName(),
		}
	}
	return res
}
package service

import (
	courseError "github.com/ladmakhi81/learnup/internals/course/error"
	"github.com/ladmakhi81/learnup/shared/db"
	"github.com/ladmakhi81/learnup/shared/db/entities"
	"github.com/ladmakhi81/learnup/shared/db/repositories"
	"github.com/ladmakhi81/learnup/shared/types"
)

type TeacherCommentService interface {
	GetPageableCommentByCourseId(teacher *entities.User, courseId uint, page, pageSize int) ([]*entities.Comment, int, error)
}

type teacherCommentService struct {
	unitOfWork db.UnitOfWork
}

func NewTeacherCommentSvc(unitOfWork db.UnitOfWork) TeacherCommentService {
	return &teacherCommentService{unitOfWork: unitOfWork}
}

func (svc teacherCommentService) GetPageableCommentByCourseId(teacher *entities.User, courseId uint, page, pageSize int) ([]*entities.Comment, int, error) {
	const operationName = "teacherCommentService.GetPageableCommentByCourseId"
	course, err := svc.unitOfWork.CourseRepo().GetByID(courseId, nil)


.begin+2s" dur="0.4s" values="4;0"/><animate fill="freeze" attributeName="stroke-dashoffset" begin="svgIDc.begin+1.2s;loop3.begin+3.2s" dur="0.4s" values="0;4"/><set attributeName="d" begin="svgIDc.begin+1.8s" to="M20 5h1.5M20 5h-1.5M20 5v1.5M20 5v-1.5"/><set attributeName="d" begin="svgIDc.begin+5.8s" to="M19 4h1.5M19 4h-1.5M19 4v1.5M19 4v-1.5"/></path></g><path fill="currentColor" stroke="currentColor" stroke-dasharray="56" stroke-dashoffset="56" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 6 C7 12.08 11.92 17 18 17 C18.53 17 19.05 16.96 19.56 16.89 C17.95 19.36 15.17 21 12 21 C7.03 21 3 16.97 3 12 C3 8.83 4.64 6.05 7.11 4.44 C7.04 4.95 7 5.47 7 6 Z"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.6s" values="56;0"/></path></svg>';
  static const String moon_alt_to_sunny_outline_loop_transition =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><g fill="currentColor" stroke="currentColor" stroke-dasharray="2" stroke-dashoffset="2" stroke-linecap="round" stroke-width="2"><path d="M0 0"><animate fill="freeze" attributeName="d" begin="0.6s" dur="0.2s" values="M12 19v1M19 12h1M12 5v-1M5 12h-1;M12 21v1M21 12h1M12 3v-1M3 12h-1"/><animate fill="freeze" attributeName="stroke-dashoffset" begin="0.6s" dur="0.2s" values="2;0"/></path><path d="M0 0"><animate fill="freeze" attributeName="d" begin="0.9s" dur="0.2s" values="M17 17l0.5 0.5M17 7l0.5 -0.5M7 7l-0.5 -0.5M7 17l-0.5 0.5;M18.5 18.5l0.5 0.5M18.5 5.5l0.5 -0.5M5.5 5.5l-0.5 -0.5M5.5 18.5l-0.5 0.5"/><animate fill="freeze" attributeName="stroke-dashoffset" begin="0.9s" dur="1.2s" values="2;0"/></path><animateTransform attributeName="transform" dur="30s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></g><mask id="svgIDa"><circle cx="12" cy="12" r="12" fill="#fff"/><circle cx="12" cy="12" r="8"><animate fill="freeze" attributeName="r" dur="0.4s" values="8;4"/></circle><circle cx="18" cy="6" r="12" fill="#fff"><animate fill="freeze" attributeName="cx" dur="0.4s" values="18;22"/><animate fill="freeze" attributeName="cy" dur="0.4s" values="6;2"/><animate fill="freeze" attributeName="r" dur="0.4s" values="12;3"/></circle><circle cx="18" cy="6" r="10"><animate fill="freeze" attributeName="cx" dur="0.4s" values="18;22"/><animate fill="freeze" attrib


framer-motion/dist/es/easing/modifiers/reverse.mjs\");\n\n\n\n\nconst backOut = /*@__PURE__*/ (0,_cubic_bezier_mjs__WEBPACK_IMPORTED_MODULE_0__.cubicBezier)(0.33, 1.53, 0.69, 0.99);\nconst backIn = /*@__PURE__*/ (0,_modifiers_reverse_mjs__WEBPACK_IMPORTED_MODULE_1__.reverseEasing)(backOut);\nconst backInOut = /*@__PURE__*/ (0,_modifiers_mirror_mjs__WEBPACK_IMPORTED_MODULE_2__.mirrorEasing)(backIn);\n\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1wYWdlcy1icm93c2VyKS8uL25vZGVfbW9kdWxlcy9mcmFtZXItbW90aW9uL2Rpc3QvZXMvZWFzaW5nL2JhY2subWpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFpRDtBQUNLO0FBQ0U7O0FBRXhELDhCQUE4Qiw4REFBVztBQUN6Qyw2QkFBNkIscUVBQWE7QUFDMUMsZ0NBQWdDLG1FQUFZOztBQUVOIiwic291cmNlcyI6WyJEOlxcY29kaW5nXFxvcGVuLXNvdXJjZVxcdGhvdWdodC1wb2xpY2VcXG5vZGVfbW9kdWxlc1xcZnJhbWVyLW1vdGlvblxcZGlzdFxcZXNcXGVhc2luZ1xcYmFjay5tanMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3ViaWNCZXppZXIgfSBmcm9tICcuL2N1YmljLWJlemllci5tanMnO1xuaW1wb3J0IHsgbWlycm9yRWFzaW5nIH0gZnJvbSAnLi9tb2RpZmllcnMvbWlycm9yLm1qcyc7XG5pbXBvcnQgeyByZXZlcnNlRWFzaW5nIH0gZnJvbSAnLi9tb2RpZmllcnMvcmV2ZXJzZS5tanMnO1xuXG5jb25zdCBiYWNrT3V0ID0gLypAX19QVVJFX18qLyBjdWJpY0JlemllcigwLjMzLCAxLjUzLCAwLjY5LCAwLjk5KTtcbmNvbnN0IGJhY2tJbiA9IC8qQF9fUFVSRV9fKi8gcmV2ZXJzZUVhc2luZyhiYWNrT3V0KTtcbmNvbnN0IGJhY2tJbk91dCA9IC8qQF9fUFVSRV9fKi8gbWlycm9yRWFzaW5nKGJhY2tJbik7XG5cbmV4cG9ydCB7IGJhY2tJbiwgYmFja0luT3V0LCBiYWNrT3V0IH07XG4iXSwibmFtZXMiOltdLCJpZ25vcmVMaXN0IjpbMF0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-pages-browser)/./node_modules/framer-motion/dist/es/easing/back.mjs\n"));

/***/ }),

/***/ "(app-pages-browser)/./node_modules/framer-motion/dist/es/easing/circ.mjs":
/*!************************************************************!*\
  !*** ./node_modules/framer-motion/dist/es/easing/circ.mjs ***!
  \************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval(__webpack_require__.ts("__webpack_require__.


it iris_remove(struct platform_device *pdev)
{
	int i;
	struct iris_device *radio = platform_get_drvdata(pdev);

	video_unregister_device(radio->videodev);

	for (i = 0; i < IRIS_BUF_MAX; i++)
		kfifo_free(&radio->data_buf[i]);

	kfree(radio);

	platform_set_drvdata(pdev, NULL);

	return 0;
}

static struct platform_driver iris_driver = {
	.driver = {
		.owner  = THIS_MODULE,
		.name   = "iris_fm",
	},
	.remove = __devexit_p(iris_remove),
};

static int __init iris_radio_init(void)
{
	return platform_driver_probe(&iris_driver, iris_probe);
}
module_init(iris_radio_init);

static void __exit iris_radio_exit(void)
{
	platform_driver_unregister(&iris_driver);
}
module_exit(iris_radio_exit);

MODULE_LICENSE("GPL v2");
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);


g.T) {
	var testcases = []struct {
		vulnerabilityDetails *utils.VulnerabilityDetails
	}{
		// Basic check
		{
			vulnerabilityDetails: &utils.VulnerabilityDetails{
				SuggestedFixedVersion:       "1.1.1",
				IsDirectDependency:          true,
				VulnerabilityOrViolationRow: formats.VulnerabilityOrViolationRow{Technology: techutils.Nuget, ImpactedDependencyDetails: formats.ImpactedDependencyDetails{ImpactedDependencyName: "snappier", ImpactedDependencyVersion: "1.1.0"}}},
		},
		// This testcase checks a fix with a vulnerability that has '.' in the dependency's group and name + more complex version, including letters, to check that the regexp captures them correctly
		{
			vulnerabilityDetails: &utils.VulnerabilityDetails{
				SuggestedFixedVersion:       "7.0.11",
				IsDirectDependency:          true,
				VulnerabilityOrViolationRow: formats.VulnerabilityOrViolationRow{Technology: techutils.Nuget, ImpactedDependencyDetails: formats.ImpactedDependencyDetails{ImpactedDependencyName: "Microsoft.Bcl.AsyncInterfaces", ImpactedDependencyVersion: "8.0.0-rc.1.23419.4"}}},
		},
	}
	testRootDir, err := os.Getwd()
	assert.NoError(t, err)

	tmpDir, err := os.MkdirTemp("", "")
	defer func() {
		assert.NoError(t, fileutils.RemoveTempDir(tmpDir))
	}()
	assert.NoError(t, err)
	assert.NoError(t, biutils.CopyDir(filepath.Join("..", "testdata", "projects", "dotnet"), tmpDir, true, nil))
	assert.NoError(t, os.Chdir(tmpDir))
	defer func() {
		assert.NoError(t, os.Chdir(testRootDir))
	}()

	nph := &NugetPackageHandler{}

	descriptorFiles, err := nph.GetAllDescriptorFilesFullPaths([]string{dotnetAssetsFilesSuffix})
	assert.NoError(t, err)
	testedDescriptorFile := descriptorFiles[0]

	for _, testcase := range testcases {
		vulnRegexpCompiler := GetVulnerabilityRegexCompiler(testcase.vulnerabilityDetails.ImpactedDependencyName, testcase.vulnerabilityDetails.ImpactedDependencyVersion, dotnetDependencyRegexpPattern)
		var isFileChanged bool
		isFileChanged, err = nph.fixVulnerabilityIfExists(testcase.vulnerabilityDetails, testedDescriptorFile, tmpDir, vulnRegexpCompiler)
		assert.NoError(t, err)
		assert.True(t, isFileChanged)
	}

	var fixedFileContent []byte
	fixedFileContent, err = os.ReadFile(testedDescriptorFile)
	fixedFileContentString := string(fixedFileContent)

	assert.NoError(t, err)
	assert.NotContains(t, fixedFileContentString, "<PackageReference Include=\"snappier\" Version=\"1.1.0\" />")
	assert.Contains(t, fixedFileContentString, "<PackageReference Include=\"snappier\" Version=\"1.1.1\" />")
	assert.NotContains(t, fixedFileContentString, "<PackageReference Include=\"Microsoft.Bcl.AsyncInterfaces\" Version=\"8.0.0-rc.1.23419.4\" />")
	assert.Contains(t, fixedFileContentString, "<PackageReference Include=\"Microsoft.Bcl.AsyncInterfaces\" Version=\"7.0.11\" />")
}

func TestGetFixedPackage(t *testing.T) {
	var testcases = []struct {
		impactedPackage       string
		versionOperator       string
		suggestedFixedVersion string
		expectedOutput        []string
	}{
		{
			impactedPackage:       "snappier",
			versionOperator:       " -v ",
			suggestedFixedVersion: "1.1.1",
			expectedOutput:        []string{"snapp


0, 0, 0, -3);
    this.Dq = new a.ob;
    this.Dq.parent = this;
    this.Dq.setTransform(-280, -27, 1, 1, 0, 0, 0, 0, -3);
    this.Eq = new a.ob;
    this.Eq.parent = this;
    this.Eq.setTransform(-328, -27, 1, 1, 0, 0, 0, 0, -3);
    this.Fq = new a.ob;
    this.Fq.parent = this;
    this.Fq.setTransform(-312, -27, 1, 1, 0, 0, 0, 0, -3);
    this.Gq = new a.ob;
    this.Gq.parent = this;
    this.Gq.setTransform(-360, -27, 1, 1, 0, 0, 0, 0, -3);
    this.Hq = new a.ob;
    this.Hq.parent = this;
    this.Hq.setTransform(-344, -27, 1, 1, 0, 0, 0, 0, -3);
    this.Iq = new a.ob;
    this.Iq.parent = this;
    this.Iq.setTransform(-392, -27,
      1, 1, 0, 0, 0, 0, -3);
    this.Jq = new a.ob;
    this.Jq.parent = this;
    this.Jq.setTransform(-376, -27, 1, 1, 0, 0, 0, 0, -3);
    this.Kq = new a.ob;
    this.Kq.parent = this;
    this.Kq.setTransform(-424, -27, 1, 1, 0, 0, 0, 0, -3);
    this.Lq = new a.ob;
    this.Lq.parent = this;
    this.Lq.setTransform(-408, -27, 1, 1, 0, 0, 0, 0, -3);
    this.Mq = new a.ob;
    this.Mq.parent = this;
    this.Mq.setTransform(-456, -27, 1, 1, 0, 0, 0, 0, -3);
    this.Nq = new a.ob;
    this.Nq.parent = this;
    this.Nq.setTransform(-440, -27, 1, 1, 0, 0, 0, 0, -3);
    this.Oq = new a.ob;
    this.Oq.parent = this;
    this.Oq.setTransform(-488, -27, 1, 1,
      0, 0, 0, 0, -3);
    this.Pq = new a.ob;
    this.Pq.parent = this;
    this.Pq.setTransform(-472, -27, 1, 1, 0, 0, 0, 0, -3);
    this.Qq = new a.ob;
    this.Qq.parent = this;
    this.Qq.setTransform(-520, -27, 1, 1, 0, 0, 0, 0, -3);
    this.Rq = new a.ob;
    this.Rq.parent = this;
    this.Rq.setTransform(-504, -27, 1, 1, 0, 0, 0, 0, -3);
    this.Sq = new a.ob;
    this.Sq.parent = this;
    this.Sq.setTransform(-552, -27, 1, 1, 0, 0, 0, 0, -3);
    this.Tq = new a.ob;
    this.Tq.parent = this;
    this.Tq.setTransform(-536, -27, 1, 1, 0, 0, 0, 0, -3);
    this.Uq = new a.ob;
    this.Uq.parent = this;
    this.Uq.setTransform(-584, -27, 1, 1, 0, 0,
      0, 0, -3);
    this.Vq = new a.ob;
    this.Vq.parent = this;
    this.Vq.setTransform(-568, -


witch (mState) {
    case nsIPresentationSessionListener::STATE_CONNECTING: {
      if (mIsReconnecting) {
        return ContinueReconnect();
      }

      nsresult rv = mControlChannel->Launch(GetSessionId(), GetUrl());
      if (NS_WARN_IF(NS_FAILED(rv))) {
        return rv;
      }
      Unused << NS_WARN_IF(NS_FAILED(BuildTransport()));
      break;
    }
    case nsIPresentationSessionListener::STATE_TERMINATED: {
      ContinueTermination();
      break;
    }
    default:
      break;
  }

  return NS_OK;
}

NS_IMETHODIMP
PresentationControllingInfo::NotifyReconnected() {
  PRES_DEBUG("%s:id[%s], role[%d]\n", __func__,
             NS_ConvertUTF16toUTF8(mSessionId).get(), mRole);

  MOZ_ASSERT(NS_IsMainThread());

  if (NS_WARN_IF(mState != nsIPresentationSessionListener::STATE_CONNECTING)) {
    return NS_ERROR_FAILURE;
  }

  return NotifyReconnectResult(NS_OK);
}

nsresult PresentationControllingInfo::BuildTransport() {
  MOZ_ASSERT(NS_IsMainThread());

  if (mState != nsIPresentationSessionListener::STATE_CONNECTING) {
    return NS_OK;
  }

  if (NS_WARN_IF(!mBuilderConstructor)) {
    return NS_ERROR_NOT_AVAILABLE;
  }

  if (!Preferences::GetBool(
          "dom.presentation.session_transport.data_channel.enable")) {
    // Build TCP session transport
    return GetAddress();
  }
  /**
   * Generally transport is maintained by the chrome process. However, data
   * channel should be live with the DOM , which implies RTCDataChannel in an
   * OOP page should be establish in the content process.
   *
   * |mBuilderConstructor| is responsible for creating a builder, which is for
   * building a data channel transport.
   *
   * In the OOP case, |mBuilderConstructor| would create a builder which is
   * an object of |PresentationBuilderParent|. So, |BuildDataChannelTransport|
   * triggers an IPC call to make content process establish a RTCDataChannel
   * transport.
   */

  mTransportType = nsIPresentationChannelDescription::TYPE_DATACHANNEL;
  if (NS_WARN_IF(NS_FAILED(mBuilderConstructor->CreateTransportBuilder(
          mTransportType, getter_AddRefs(mBuilder))))) {
    return NS_ERROR_NOT_AVAILABLE;
  }

  nsCOMPtr<nsIPresentationDataChannelSessionTransportBuilder>
      dataChannelBuilder(do_QueryInterface(mBuilder));
  if (NS_WARN_IF(!dataChannelBuilder)) {
    return NS_ERROR_NOT_AVAILABLE;
  }

  // OOP window would be set from content process
  nsPIDOMWindowInner* window = GetWindow();

  nsresult rv = dataChannelBuilder->BuildDataChannelTransport(
      nsIPresentationService::ROLE_CONTROLLER, window, this);
  if (NS_WARN_IF(NS_FAILED(rv))) {
    return rv;
  }

  return NS_OK;
}

NS_IMETHODIMP
PresentationControllingInfo::NotifyDisconnected(nsresult aReason) {
  PRES_DEBUG("%s:id[%s], reason[%" PRIx32 "], role[%d]\n", __func__,
             NS_ConvertUTF16toUTF8(mSessionId).get(),
             static_cast<uint32_t>(aReason), mRole);

  MOZ_ASSERT(NS_IsMainThread());

  if (mTransportType == nsIPresentationChannelDescription::TYPE_DATACHANNEL) {
    nsCOMPtr<nsIPresentationDataChannelSessionTransportBuilder> builder =
        do_QueryInterface(mBuilder);
    if (builder) {
      Unused << NS_WARN_IF(NS_FAILED


	@Override
	public Object visit(ConstructorDef funcDef) {
		return visit((FuncDef)funcDef);
	}

	@Override
	public Object visit(ContinueStatement continueStatement) {
		//visitList.add("ContinueStatement");

		this.addItem("continue");

		if(null != continueStatement.returns){
			continueStatement.returns.accept(this);
		}

		return null;
	}

	private void processCopyItems(List<CopyExprItem> copyItems, List<String> modifiers) {
		if(null != copyItems ) {
			this.addItem("(");
			for(CopyExprItem exprItem : copyItems) {
				if(exprItem instanceof CopyExprAssign) {
					CopyExprAssign ascea = (CopyExprAssign)exprItem;
					this.addItem(ascea.field);
					this.addItem("=");
					ascea.assignment.accept(this);
				}else if(exprItem instanceof CopyExprIncOnly) {
					this.addItem(((CopyExprIncOnly)exprItem).incOnly);
				}else if(exprItem instanceof CopyExprExclOnly) {
					CopyExprExclOnly asexcl = (CopyExprExclOnly)exprItem;
					this.addItem("<" + String.join(", ", asexcl.excludeOnly) + ">");
				}else if(exprItem instanceof CopyExprNested) {
					CopyExprNested cen = (CopyExprNested)exprItem;
					this.addItem(cen.fname);
					this.addItem("@");
					processCopyItems(cen.copyItems, cen.modifiers);
				}else if(exprItem instanceof CopyExprSuper) {
					CopyExprSuper cen = (CopyExprSuper)exprItem;
					this.addItem("super");
					this.addItem("@");
					processCopyItems(cen.copyItems, cen.modifiers);
				}
				this.addItem(", ");
			}
			this.popLastItem();

			if(null != modifiers && !modifiers.isEmpty()) {
				this.addItem("; " + String.format(", ", modifiers));
			}

			this.addItem(")");
		}
	}

	@Override
	public Object visit(CopyExpression copyExpression) {
		//visitList.add("CopyExpression");
		copyExpression.expr.accept(this);
		this.addItem("@");
		processCopyItems(copyExpression.copyItems, copyExpression.modifiers);
		return null;
	}

	@Override
	public Object visit(DeleteStatement deleteStatement){
		this.addItem("delete");
		int sz= deleteStatement.exprs.size();
		for(int n = 0; n < sz; n++)
		{
			deleteStatement.exprs.get(n).accept(this);
			if(n !=  sz-1)
			{
				this.addItemNoPreString(", ");
			}
		}

		return null;
	}

	@Override
	public Object visit(DMANewFromExpression dmaNewFromExpression){
		dmaNewFromExpression.e.accept(this);
		this.addItem("#");
		return null;
	}

	@Override
	public Object visit(DotOperator dotOperator) {
		//visitList.add("DotOperator");
		//dotOperator.head.accept(this);
		//this.addItem(".");
		//boolean a = false;
		ArrayList<Expression> elements = dotOperator.getElements(this);
		ArrayList<Boolean> isDirectAccess = dotOperator.getIsDirectAccess(this);

		//assert elements.size() == isDirectAccess.size()-1;

		for(int n=0; n<elements.size(); n++)
		{
			Expression e = elements.get(n);
			e.accept(this);

			if(n != elements.size()-1)
			{
				boolean isDirect = isDirectAccess.get(n


_version.domain.twilio.request("GET", target_url)
        return SimPage(self._version, response)

    async def get_page_async(self, target_url: str) -> SimPage:
        """
        Asynchronously retrieve a specific page of SimInstance records from the API.
        Request is executed immediately

        :param target_url: API-generated URL for the requested results page

        :returns: Page of SimInstance
        """
        response = await self._version.domain.twilio.request_async("GET", target_url)
        return SimPage(self._version, response)

    def get(self, sid: str) -> SimContext:
        """
        Constructs a SimContext

        :param sid: The SID or the `unique_name` of the Sim resource to update.
        """
        return SimContext(self._version, sid=sid)

    def __call__(self, sid: str) -> SimContext:
        """
        Constructs a SimContext

        :param sid: The SID or the `unique_name` of the Sim resource to update.
        """
        return SimContext(self._version, sid=sid)

    def __repr__(self) -> str:
        """
        Provide a friendly representation

        :returns: Machine friendly representation
        """
        return "<Twilio.Wireless.V1.SimList>"