.bank = p;
			this.memBanks.push(memBank);
			index += MemBank16k.BANK16K_SIZE;
		}

	}
}

import { partition } from "../../partition/partition";

export function quicksort(arr: number[], lo = 0, hi = arr.length - 1) {
    if (lo < hi) {
        const p = partition(arr, (e) => e < arr[hi], lo, hi);
        quicksort(arr, lo, p - 1);
        quicksort(arr, p + 1, hi);
    }
}
import * as ActionTypes from '../constants/ActionTypes'
import {
  AvatarImageSelect,
  CreateNewHumanAvatar,
  CreateNewRobotAvatar,
  SelectHumanAvatar,
  SelectRobotAvatar
} from '../actions'
import {AvatarImageList} from '../constants/AvatarImageList'

type Scope =
  | ActionTypes.Scope.SelectHumanAvatar
  | ActionTypes.Scope.SelectRobotAvatar
  | ActionTypes.Scope.CreateNewHumanAvatar
  | ActionTypes.Scope.CreateNewRobotAvatar

export interface State {
  readonly imageList: string[]
  readonly scope: Scope
  readonly selectedImage: string
  readonly token: string
}
type Action =
  | AvatarImageSelect.SelectAvatar
  | CreateNewHumanAvatar.ShowAvatarImageSelect
  | CreateNewRobotAvatar.ShowAvatarImageSelect
  | SelectHumanAvatar.ShowAvatarImageSelect
  | SelectRobotAvatar.ShowAvatarImageSelect

export const initialState: State = {
  imageList: AvatarImageList,
  scope: ActionTypes.Scope.SelectHumanAvatar,
  selectedImage: '',
  token: ''
}
const avatarImageSelect = (state: State = initialState, action: Action): State => {
  switch (action.type) {
    case ActionTypes.AvatarImageSelect.SELECT_AVATAR:
      return {
        ... state,
        selectedImage: action.image
      }
    case ActionTypes.CreateNewHumanAvatar.SHOW_AVATAR_IMAGE_SELECT:
      return {
        ... state,
        scope: ActionTypes.Scope.CreateNewHumanAvatar,
        selectedImage: action.image,
        token: ''
      }
    case ActionTypes.CreateNewRobotAvatar.SHOW_AVATAR_IMAGE_SELECT:
      return {
        ... state,
        scope: ActionTypes.Scope.CreateNewRobotAvatar,
        selectedImage: action.image,
        token: ''
      }
    case ActionTypes.SelectHumanAvatar.SHOW_AVATAR_IMAGE_SELECT:
      return {
        ... state,
        scope: ActionTypes.Scope.SelectHumanAvatar,
        selectedImage: action.image,
        token: action.token
      }
    case ActionTypes.SelectRobotAvatar.SHOW_AVATAR_IMAGE_SELECT:
      return {
        ... state,
        scope: ActionTypes.Scope.SelectRobotAvatar,
        selectedImage: action.image,
        token: action.token
      }
    default:
      return state
  }
}

export default avatarImageSelect
import { Mesh, MeshBuilder, Scene, StandardMaterial, Texture, Vector3 } from "babylonjs";
import { Auxiliar } from "./auxiliar";

export class Dog {
	private mesh: Mesh;
	private isActive: boolean = false;
	private isUp: boolean;

	constructor(scene : Scene) {
		this.mesh = MeshBuilder.CreatePlane("dog", {size: 1}, scene);
		this.mesh.material = new StandardMaterial("dogSprite", scene);
		this.mesh.material.backFaceCulling = false;
		this.mesh.position.z = -1;
		this.mesh.position.y = -3;
	}

	public get active() : boolean {
		return this.isActive;
	}

	public start(ducks: number): void {
		this.isActive = true;
		this.isUp = true;
        //this.mesh.setEnabled(true);
        (<StandardMaterial>this.mesh.material).diffuseTexture = new Texture(`textures/dog${d


2011
Dan Castellaneta
Primetime Emmy Award
Outstanding Voice-over Performance
Homer Simpson, Barney Gumble, Krusty, Louie
"Donnie Fatso"
Nominated
[64]

Week
Date
Opponent
Result
Attendance

1
September 8, 2002
St. Louis Rams
W 23–16

75,710

2
September 15, 2002
at San Francisco 49ers
W 24–14

67,685

3
September 22, 2002
Buffalo Bills
W 28–23

75,359

4
September 30, 2002
at Baltimore Ravens
L 34–23

69,538

5
October 6, 2002
San Diego Chargers
W 26–9

75,065

6
October 13, 2002
Miami Dolphins
L 24–22

75,941

7
October 20, 2002
at Kansas City Chiefs
W 37–34

78,446

8


1, otherwise
*     it will increase the jobcounter of the job owner and return 0.
*     In some situations it may be necessary to force the incrementating
*     of the jobcounter (reading jobs from spool area). This may be done
*     with "force_registration".
*
*  INPUTS
*     const lListElem *job   - JB_Type element
*     u_long32 max_u_jobs    - maximum number of allowed jobs per user
*     int force_registration - force job registration
*
*  RESULT
*     int - 1 => limit would be exceeded
*           0 => otherwise
*
*  SEE ALSO
*     sgeobj/suser/SU_Type
*     sgeobj/suser/Master_SUser_List
*     qmaster/job/job_list_register_new_job()
******************************************************************************/
int suser_register_new_job(const lListElem *job, u_long32 max_u_jobs,
                           int force_registration)
{
   const char *submit_user = NULL;
   lListElem *suser = NULL;
   int ret = 0;

   DENTER(TOP_LAYER, "suser_register_new_job");

   if(!force_registration){
      ret = suser_check_new_job(job, max_u_jobs);
   }
   if( ret == 0){
      submit_user = lGetString(job, JB_owner);
      suser = suser_list_add(object_type_get_master_list(SGE_TYPE_SUSER), NULL, submit_user);
      suser_increase_job_counter(suser);
   }

   DEXIT;
   return ret;
}

/****** sgeobj/suser/suser_get_job_count() ************************************
*  NAME
*     suser_job_count() - number of jobs for a given user
*
*  SYNOPSIS
*     void suser_job_count(const lListElem *job)
*
*  FUNCTION
*     number of jobs for a given user
*
*  INPUTS
*     const lListElem *job - JB_Type element
*
*  RESULT
*     number of jobs in the system
******************************************************************************/
int suser_job_count(const lListElem *job)
{
   const char *submit_user = NULL;
   lListElem *suser = NULL;
   int ret = 0;

   DENTER(TOP_LAYER, "suser_job_job");
   submit_user = lGetString(job, JB_owner);
   suser = suser_list_find(*object_type_get_master_list(SGE_TYPE_SUSER), submit_user);
   if (suser != NULL) {
      ret = suser_get_job_counter(suser);
   }
   DEXIT;
   return ret;
}

/****** sgeobj/suser/suser_unregister_job() ***********************************
*  NAME
*     suser_unregister_job() -- unregister a job
*
*  SYNOPSIS
*     void suser_unregister_job(const lListElem *job)
*
*  FUNCTION
*     Decrease the jobcounter for the job owner of "job".
*
*  INPUTS
*     const lListElem *job - JB_Type element
*
*  RESULT
*     void - NONE
*
*  SEE ALSO
*     sgeobj/suser/SU_Type
*     sgeobj/suser/Master_SUser_List
******************************************************************************/
void suser_unregister_job(const lListElem *job)
{
   const char *submit_user = NULL;
   lListElem *suser = NULL;

   DENTER(TOP_LAYER, "suser_unregister_job");
   submit_user = lGetString(job, JB_owner);
   suser = suser_list_find(*object_type_get_master_list(SGE_TYPE_SUSER), submit_user);
   if (suser != NULL) {
      suser_decrease_job_counter(suser);
   }
   DEXIT;
}


efore,
.cm-contentContainer .cm-content .HyperMD-header.HyperMD-header-4.cm-line:hover:before,
.cm-contentContainer .cm-content .HyperMD-header.HyperMD-header-5.cm-line:hover:before,
.cm-contentContainer .cm-content .HyperMD-header.HyperMD-header-6.cm-line:hover:before {
  --title-height-title-id: 12px;
  position: absolute;
  top: calc(var(--title-height-title-id)/1.5);
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: var(--title-height-title-id);
  opacity: .3;
  font-size: .6rem;
  display: inline-block;
  vertical-align: middle;
}

.HyperMD-header-1:hover:before {content: "H1";}
.HyperMD-header-2:hover:before {content: "H2";}
.HyperMD-header-3:hover:before {content: "H3";}
.HyperMD-header-4:hover:before {content: "H4";}
.HyperMD-header-5:hover:before {content: "H5";}
.HyperMD-header-6:hover:before {content: "H6";}

/***
  PARAGRAPHS
***/
.cm-contentContainer .cm-content .cm-line,
.markdown-rendered p {
  font-size: var(--font-paragraph);
  font-family: var(--font-default);
  line-height: 1.6;
  color: var(--color-base-80)
}

.markdown-rendered p {
  margin: 20px 0 0;
}

.markdown-rendered div:has(h1) + div:has(p) p,
.markdown-rendered div:has(h2) + div:has(p) p,
.markdown-rendered div:has(h3) + div:has(p) p,
.markdown-rendered div:has(h4) + div:has(p) p,
.markdown-rendered div:has(h5) + div:has(p) p,
.markdown-rendered div:has(h6) + div:has(p) p {margin-top: 5px;}

.is-focused .workspace-leaf.mod-active .view-header-title {
  color: var(--color-base-60);
}

body.theme-dark .cm-strong {color: white;}

body.theme-dark .cm-contentContainer .cm-content .cm-line {
  color: var(--color-base-70)
}

.hr.cm-line hr {
  background: none;
  outline: none;
}

/** LINK **/
.cm-s-obsidian span.cm-link:hover .cm-underline,
.cm-link:hover .cm-underline,
.cm-underline:hover {text-decoration: none;}

/***
  LISTS
***/
.HyperMD-list-line.cm-line {
  line-height: 1.3 !important;
  /* padding-bottom: 7px !important; */
}

.markdown-source-view.mod-cm6 .cm-indent::before {
  left: 12px;
}

.list-bullet:after,
.list-bullet:before {background-color: var(--color-accent)}

.cm-active .list-bullet,
.cm-s-obsidian .cm-formatting-list {color: var(--color-accent)}

/***
  BLOCKQUOTE
***/
.markdown-source-view.mod-cm6.is-live-preview .HyperMD-quote,
.markdown-rendered blockquote {
  padding: var(--size-4-6);
  padding-inline-start: 30px !important;
  border-radius: var(--default-border-radius);
}

.markdown-rendered blockquote {
  margin: 30px 0;
}

.cm-line.HyperMD-quote {
  padding: 10px 0 !important;
  text-indent: -15px !important;
}


json' in content_type and request_body:
                try:
                    request_body_json = json.loads(request_body)
                    request_body = json.dumps(request_body_json)
                except json.JSONDecodeError:
                    flag = False
                    response = JSONResponse(
                        status_code=status.HTTP_400_BAD_REQUEST,
                        content={
                            "detail": "Invalid JSON format"
                        }
                    )
        # Catch HTTP exceptions
        except HTTPException as http_exception:
            response = JSONResponse(
                status_code=http_exception.status_code,
                content={"detail": http_exception.detail}
            )
            error_message = None
            flag = False
        # Catch other exception types
        except Exception as e:
            response = JSONResponse(
                status_code= status.HTTP_500_INTERNAL_SERVER_ERROR,
                content={"detail": error_message}
            )
            error_message = str(e)
            flag = False
        finally:
            if flag:
                # retrieves an async body iterator of the response
                body_iterator = response.body_iterator
                response_body = [chunk async for chunk in body_iterator]
                body_str = b"".join(response_body).decode('utf-8', errors='replace')
                response = Response(
                    content = body_str,
                    status_code=response.status_code,
                    headers = dict(response.headers)
                )
            if response.status_code == status.HTTP_500_INTERNAL_SERVER_ERROR:
                error_message = body_str
                body_str = str({
                    "detail": "Internal Server Error"
                })
                response = JSONResponse(
                    status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
                    #content={"detail": "Internal Server Error"}
                    content={"detail": str(response.body)}
                )
            # run background task to write log
            background_tasks = BackgroundTasks()
            background_tasks.add_task(
                self.handle_log,
                request,
                request_body,
                response,
                error_message,
                original_path,
                start_time,
                response_time,
                body_str
            )
            response.background = background_tasks
            return response


de is not in progress, this holds one value. When canary upgrade is in progress, this can only hold two consecutive values. For more information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade

## KubeletConfig
### Properties
* **allowedUnsafeSysctls**: string[]: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`).
* **containerLogMaxFiles**: int {minValue: 2}: The maximum number of container log files that can be present for a container. The number must be ≥ 2.
* **containerLogMaxSizeMB**: int: The maximum size (e.g. 10Mi) of container log file before it is rotated.
* **cpuCfsQuota**: bool: The default is true.
* **cpuCfsQuotaPeriod**: string: The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'.
* **cpuManagerPolicy**: string: The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) for more information. Allowed values are 'none' and 'static'.
* **failSwapOn**: bool: If set to true it will make the Kubelet fail to start if swap is enabled on the node.
* **imageGcHighThreshold**: int: To disable image garbage collection, set to 100. The default is 85%
* **imageGcLowThreshold**: int: This cannot be set higher than imageGcHighThreshold. The default is 80%
* **podMaxPids**: int: The maximum number of processes per pod.
* **topologyManagerPolicy**: string: For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). The default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'.

## LinuxOSConfig
### Properties
* **swapFileSizeMB**: int: The size in MB of a swap file that will be created on each node.
* **sysctls**: [SysctlConfig](#sysctlconfig): Sysctl settings for Linux agent nodes.
* **transparentHugePageDefrag**: string: Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge).
* **transparentHugePageEnabled**: string: Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge).

## MaintenanceConfigurationProperties
### Properties
* **maintenanceWindow**: [MaintenanceWindow](#maintenancewindow): Maintenance window for the maintenance configuration.
* **notAllowedTime**: [TimeSpan](#timespan)[]: Time slots on which upgrade is not allowed.
* **timeInWeek**: [TimeInWeek](#timeinweek)[]: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries.

## MaintenanceWindow
### Properties
* **durationHours**: int {minValue: 4, maxValue: 24} (Required): Length of maintenance window range from 4 to 24 hours.
* **notAllowedDates**: [DateSpan](#datespan)[]: Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time.
* **schedule**: [Schedule](#schedule) (Required): Recurrence schedule for the maintenance window.
* **startDate**: string: The date the maintenance window activates. If the current date is before this date, the maintenance window


r-black.buttons-row .button:active,
.theme-black .button:not(.button-fill):active {
  background-color: rgba(0, 0, 0, 0.15);
}
.color-black.button:not(.button-fill).active,
.color-black.buttons-row .button.active,
.theme-black .button:not(.button-fill).active {
  background-color: #000000;
  color: #fff;
}
.theme-black .button.button-fill,
.button.button-fill.color-black {
  background: #000000;
  color: #fff;
}
.color-black i.icon,
.theme-black i.icon,
i.icon.color-black,
i.icon.theme-black {
  color: #000000;
}
i.icon-next.color-black,
i.icon-next.theme-black,
.theme-black i.icon-next {
  background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15'><g><path fill='%23000000' d='M1,1.6l11.8,5.8L1,13.4V1.6 M0,0v15l15-7.6L0,0L0,0z'/></g></svg>");
}
i.icon-prev.color-black,
i.icon-prev.theme-black,
.theme-black i.icon-prev {
  background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15'><g><path fill='%23000000' d='M14,1.6v11.8L2.2,7.6L14,1.6 M15,0L0,7.6L15,15V0L15,0z'/></g></svg>");
}
i.icon-back.color-black,
i.icon-back.theme-black,
.theme-black i.icon-back {
  background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 20'><path d='M10,0l2,2l-8,8l8,8l-2,2L0,10L10,0z' fill='%23000000'/></svg>");
}
i.icon-bars.color-black,
i.icon-bars.theme-black,
.theme-black i.icon-bars {
  background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 26'><path fill='%23000000' d='M0,0h4v4H0V0z M8,1h34v2H8V1z M0,11h4v4H0V11z M8,12h34v2H8V12z M0,22h4v4H0V22z M8,23h34v2H8V23z'/></svg>");
}
.theme-black a,
.theme-black .item-link.list-button {
  color: #000000;
}
.theme-black .tabbar a,
.tabbar.theme-black a {
  color: inherit;
}
.theme-black .tabbar a.active,
.tabbar.theme-black a.active {
  color: #000000;
}
.theme-black .range-slider input[type="range"]::-webkit-slider-thumb:before,
.range-slider.theme-black input[type="range"]::-webkit-slider-thumb:before {
  background-color: #000000;
}
.theme-black label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox,
.theme-black label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox {
  background-color: #000000;
}
.theme-black label.label-radio input


LessThan());
  ExpectInt(0, taken->InputAt(0));
  EXPECT_TRUE(taken->InputAt(1)->IsParameterValue());

  // Replacement.
  range_.Replace(loop_header_->GetLastInstruction(), x_, y_);
  range_.GetInductionRange(increment_, increment_, x_, &v1, &v2, &needs_finite_test);
  EXPECT_FALSE(needs_finite_test);
  ExpectEqual(Value(1), v1);
  ExpectEqual(Value(y_, 1, 0), v2);

  // Loop logic.
  int64_t tc = 0;
  EXPECT_TRUE(range_.IsFinite(loop_header_->GetLoopInformation(), &tc));
  EXPECT_EQ(0, tc);  // unknown
  HInstruction* offset = nullptr;
  EXPECT_TRUE(range_.IsUnitStride(phi, phi, graph_, &offset));
  ExpectInt(0, offset);
  HInstruction* tce = range_.GenerateTripCount(
      loop_header_->GetLoopInformation(), graph_, loop_preheader_);
  ASSERT_TRUE(tce != nullptr);
  EXPECT_TRUE(tce->IsSelect());  // guarded by taken-test
  ExpectInt(0, tce->InputAt(0));
  EXPECT_TRUE(tce->InputAt(1)->IsParameterValue());
  EXPECT_TRUE(tce->InputAt(2)->IsLessThan());
}

TEST_F(InductionVarRangeTest, SymbolicTripCountDown) {
  BuildLoop(1000, x_, -1);
  PerformInductionVarAnalysis();

  Value v1, v2;
  bool needs_finite_test = true;
  bool needs_taken_test = true;

  HInstruction* phi = condition_->InputAt(0);

  // In context of header: lower unknown.
  range_.GetInductionRange(condition_, phi, x_, &v1, &v2, &needs_finite_test);
  EXPECT_FALSE(needs_finite_test);
  ExpectEqual(Value(), v1);
  ExpectEqual(Value(1000), v2);

  // In context of loop-body: known.
  range_.GetInductionRange(increment_, phi, x_, &v1, &v2, &needs_finite_test);
  EXPECT_FALSE(needs_finite_test);
  ExpectEqual(Value(x_, 1, 1), v1);
  ExpectEqual(Value(1000), v2);
  range_.GetInductionRange(increment_, increment_, x_, &v1, &v2, &needs_finite_test);
  EXPECT_FALSE(needs_finite_test);
  ExpectEqual(Value(x_, 1, 0), v1);
  ExpectEqual(Value(999), v2);

  HInstruction* lower = nullptr;
  HInstruction* upper = nullptr;

  // Can generate code in context of loop-body only.
  EXPECT_FALSE(range_.CanGenerateRange(condition_, phi, &needs_finite_test, &needs_taken_test));
  ASSERT_TRUE(range_.CanGenerateRange(increment_, phi, &needs_finite_test, &needs_taken_test));
  EXPECT_FALSE(needs_finite_test);
  EXPECT_TRUE(needs_taken_test);

  // Generates code (unsimplified).
  range_.GenerateRange(increment_, phi, graph_, loop_preheader_, &lower, &upper);

  // Verify lower is 1000-((1000-V)-1).
  ASSERT_TRUE(lower != nullptr);
  ASSERT_TRUE(lower->IsSub());
  ExpectInt(1000, lower->InputAt(0));
  lower = lower->InputAt(1);
  ASSERT_TRUE(lower->IsSub());
  ExpectInt(1, lower->InputAt(1));
  lower = lower->InputAt(0);
  ASSERT_TRUE(lower->IsSub());
  ExpectInt(1000, lower->InputAt(0));
  EXPECT_TRUE(lower->InputAt(1)->IsParameterValue());

  // Verify upper is 1000-0.
  ASSERT_TRUE(upper != nullptr);
  ASSERT_TRUE(upper->IsSub());
  ExpectInt(1000, upper->InputAt(0));
  ExpectInt(0, upper->InputAt(1));

  // Verify taken-test is 1000>V.
  HInstruction* taken = range_.GenerateTakenTest(increment_, graph_, loop_preheader_);
  ASSERT_TRUE(tak


信而创建的laddrUnixSocket文件，
	////但是，你可以查看ListenUnix.go文件中的unixListener.Close()方法不但是close连接，还会先remove为socket通信而创建的raddrUnixSocket文件
	////这就是他们之间的不同，所以我们可以手动删除！
	//defer unixConn.Close()
	//
	//write_i, e := unixConn.Write([]byte("这是客户端发送过去给服务器的数据1111"))
	//check_err_net(e)
	//fmt.Println("客户端发送了的字节数为：",write_i)
	//fmt.Println("客户端发送了的字节数据为：","这是客户端发送过去给服务器的数据1111")
	//
	//resv_data_Client:=make([]byte,100)
	//read_i, e := unixConn.Read(resv_data_Client)
	//
	//fmt.Println("客户端接收到服务器响应回来的字节数为：",read_i)
	//fmt.Println("客户端接收到服务器响应回来的字节数据为：",resv_data_Client)
	//fmt.Println("客户端接收到服务器响应回来的字节转字符串数据为：",string(resv_data_Client))
	////上面的代码是作为客户端代码来运行的，在你看完这里后请去看文件ListenUnix.go中的服务端的代码，他们是相互配合的！代表2个不同的程序之间的socket的通信
	////然后现在控制要命令行中输入go run ListenUnix.go,接着再开一个命令行窗口，这时候才是运行上面的代码的时候，在新打开的命令行窗口中输入命令
	////go run compress_zlib.go(当前文件的文件名)，注意务必使用控制台命令行的方式单独运行，不可使用其他的编辑器！否则会出错！
	////需要注意的是，当你go run ListenUnix.go后，你会发现在当前的目录下多了一个raddrUnixSocket文件，然后当你go run compress_zlib.go时候raddrUnixSocket被删除，但是
	////又新创建了一个laddrUnixSocket文件，原因在上面已经说了，跟各个对象的close()处理方式有关！
	//
	////输出：
	////	----------
	////	lUnixAddr: ./laddrUnixSocket
	////	lUnixAddr.Name: ./laddrUnixSocket
	////	lUnixAddr.Net: localnet
	////	lUnixAddr.String(): ./laddrUnixSocket
	////	lUnixAddr.Network(): localnet
	////
	////	rUnixAddr: ./raddrUnixSocket
	////	rUnixAddr.Name: ./raddrUnixSocket
	////	rUnixAddr.Net: remotenet
	////	rUnixAddr.String(): ./raddrUnixSocket
	////	rUnixAddr.Network(): remotenet
	////	----------
	////	----------
	////	lUnixAddr: ./laddrUnixSocket
	////	lUnixAddr.Name: ./laddrUnixSocket
	////	lUnixAddr.Net: localnet
	////	lUnixAddr.String(): ./laddrUnixSocket
	////	lUnixAddr.Network(): localnet
	////
	////	rUnixAddr: ./raddrUnixSocket
	////	rUnixAddr.Name: ./raddrUnixSocket
	////	rUnixAddr.Net: remotenet
	////	rUnixAddr.String(): ./raddrUnixSocket
	////	rUnixAddr.Network(): remotenet
	////	----------
	////	unixConn.LocalAddr() ./laddrUnixSocket
	////	unixConn.LocalAddr().String(): ./laddrUn


ession != null) 'filterExpression': filterExpression!,
  };
}

/// A specific filter expression
class GoogleAnalyticsAdminV1alphaSubpropertyEventFilterCondition {
  /// The field that is being filtered.
  ///
  /// Required.
  core.String? fieldName;

  /// A filter for null values.
  core.bool? nullFilter;

  /// A filter for a string-type dimension that matches a particular pattern.
  GoogleAnalyticsAdminV1alphaSubpropertyEventFilterConditionStringFilter?
  stringFilter;

  GoogleAnalyticsAdminV1alphaSubpropertyEventFilterCondition({
    this.fieldName,
    this.nullFilter,
    this.stringFilter,
  });

  GoogleAnalyticsAdminV1alphaSubpropertyEventFilterCondition.fromJson(
    core.Map json_,
  ) : this(
        fieldName: json_['fieldName'] as core.String?,
        nullFilter: json_['nullFilter'] as core.bool?,
        stringFilter:
            json_.containsKey('stringFilter')
                ? GoogleAnalyticsAdminV1alphaSubpropertyEventFilterConditionStringFilter.fromJson(
                  json_['stringFilter'] as core.Map<core.String, core.dynamic>,
                )
                : null,
      );

  core.Map<core.String, core.dynamic> toJson() => {
    if (fieldName != null) 'fieldName': fieldName!,
    if (nullFilter != null) 'nullFilter': nullFilter!,
    if (stringFilter != null) 'stringFilter': stringFilter!,
  };
}

/// A filter for a string-type dimension that matches a particular pattern.
class GoogleAnalyticsAdminV1alphaSubpropertyEventFilterConditionStringFilter {
  /// If true, the string value is case sensitive.
  ///
  /// If false, the match is case-insensitive.
  ///
  /// Optional.
  core.bool? caseSensitive;

  /// The match type for the string filter.
  ///
  /// Required.
  /// Possible string values are:
  /// - "MATCH_TYPE_UNSPECIFIED" : Match type unknown or not specified.
  /// - "EXACT" : Exact match of the string value.
  /// - "BEGINS_WITH" : Begins with the string value.
  /// - "ENDS_WITH" : Ends with the string value.
  /// - "CONTAINS" : Contains the string value.
  /// - "FULL_REGEXP" : Full regular expression matches with the string value.
  /// - "PARTIAL_REGEXP" : Partial regular expression matches with the string
  /// value.
  core.String? matchType;

  /// The string value used for the matching.
  ///
  /// Required.
  core.String? value;

  GoogleAnalyticsAdminV1alphaSubpropertyEventFilterConditionStringFilter({
    this.caseSensitive,
    this.matchType,
    this.value,
  });

  GoogleAnalyticsAdminV1alphaSubpropertyEventFilterConditionStringFilter.fromJson(
    core.Map json_,
  ) : this(
        caseSensitive: json_['caseSensitive'] as core.bool?,
        matchType: json_['matchType'] as core.String?,
        value: json_['value'] as core.String?,
      );

  core.Map<core.String, core.dynamic> toJson() => {
    if (caseSensitive != null) 'caseSensitive': caseSensitive!,
    if (matchType != null) 'matchType': matchType!,
    if (value != null) 'value': value!,
  };
}

/// A logical expression of Subproperty event filters.
class GoogleAnalyticsAdminV1alphaSubpropertyEventFilterExpression {
  /// Creates a filter that matches a specific event.
  ///
  /// This cannot be set on the top level SubpropertyEventFilterExpression.
  GoogleAnalyticsAdminV1alphaSubpropertyEventFilterCondition? filterCondition;

  /// A filter expression to be NOT'ed (inverted, complemented).
  ///
  /// It can only include a filter. This cannot be set on the top level
  /// SubpropertyEventFilterExpression.
  GoogleAnalyticsAdminV1alphaSubpropertyEventFilterExpression? notExpression;

  /// A list of expressions to OR’ed together.
  ///
  /// Must only contain not_expression


14e,u+f150-f152,u+f185-f186,u+f18e,u+f190-f192,u+f196,u+f1c1-f1c9,u+f1d9,u+f1db,u+f1e3,u+f1ea,u+f1f7,u+f1f9,u+f20a,u+f247-f248,u+f24a,u+f24d,u+f255-f25b,u+f25d,u+f271-f274,u+f278,u+f27b,u+f28c,u+f28e,u+f29c,u+f2b5,u+f2b7,u+f2ba,u+f2bc,u+f2be,u+f2c0-f2c1,u+f2c3,u+f2d0,u+f2d2,u+f2d4,u+f2dc}@font-face{font-family:"FontAwesome";font-display:block;src:url(../webfonts/fa-v4compatibility.woff2) format("woff2"),url(../webfonts/fa-v4compatibility.ttf) format("truetype");unicode-range:u+f041,u+f047,u+f065-f066,u+f07d-f07e,u+f080,u+f08b,u+f08e,u+f090,u+f09a,u+f0ac,u+f0ae,u+f0b2,u+f0d0,u+f0d6,u+f0e4,u+f0ec,u+f10a-f10b,u+f123,u+f13e,u+f148-f149,u+f14c,u+f156,u+f15e,u+f160-f161,u+f163,u+f175-f178,u+f195,u+f1f8,u+f219,u+f27a}/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/icon_only_context_menu_text_controls.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */

/* Makes text-controls in context menus appear horizontally at the top of the menu.
 * You will need iconized_textbox_context_menu.css and iconized_content_context_menu.css
 * to actually show the icons.
*/

.textbox-contextmenu,
#contentAreaContextMenu{
  --uc-scrollbox-display: grid;
  --uc-scrollbox-slot: contents;
}
:where(#contentAreaContextMenu,.textbox-contextmenu) > :is(menu,menuitem,menuseparator,menugroup){
  grid-column: 1/7
}
scrollbox[orient="vertical"][smoothscroll="false"]{
  flex-direction: var(--uc-flex-direction,initial) !important;
  flex-wrap: var(--uc-flex-wrap,nowrap) !important;
  display: var(--uc-scrollbox-display,flex);
  grid-auto-columns: min-content;
  grid-template-columns: 1fr 1fr 1fr min-content 1fr 1fr;
}
scrollbox[orient="vertical"][smoothscroll="false"] > slot{
  display: var(--uc-scrollbox-slot,initial) !important;
}
#context-cut:not([hidden]) + #context-copy,
#context-pdfjs-cut:not([hidden]) + #context-pdfjs-copy,
#context-cut,
#context-pdfjs-cut,
#context-paste,
#context-paste-no-formatting,
#context-pdfjs-paste,
#context-delete,
#context-pdfjs-delete,
#context-delete:not([hidden]) + #context-selectall,
#context-pdfjs-delete:not([hidden]) + #context-pdfjs-selectall,
.textbox-contextmenu > [data-l10n-id="text-action-copy"],
.textbox-contextmenu > [data-l10n-id="text-action-cut"],
.textbox-contextmenu > [data-l10n-id="text-action-paste"],
.textbox-contextmenu > [data-l10n-id="text-action-delete"],
.textbox-contextmenu > [data-l10


>

Users

Max

Edgar

John

FAQ

Download

Github

FAQ:

Who is this intended for?

For everyone who wants a responsive navigation bar that looks good on every screensize, lightweight and easy to implement.

Why should I use this instead of existing solutions (e.g. Bootstrap's navbar)?

Existing "premade" navbars are usually packed with a full blown CSS framework and rely heavily on JS. If you are already using Bootstrap for your site maybe it's not worth it but I would still recommend giving it a try for the fancy colors and animations.

How light it is actually?

The origial CSS file is about 9KB, the minified is about 7KB and the minified version gzipped is about only 1KB.

What are the future plans/TODO?

Add more themes and animations

Add options to use the hamburger menu on every screensize

Add alignment options

Add dropdown menus

Add support for opening sideways

How can I contribute to this project?

Pick a bug from here or a feature from the TODO list and let me know that you want to work on that at balazs.saros@gmail.com

I found a bug, what should I do?

Please report it here

Can I use it in a closed source project?

It is licensed under the MIT license, you can use it anywhere you want.

Have these questions really been asked frequently

No, I just found this format a good way to give general information :)

<!DOCTYPE html>

<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />

<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />

<title>Extended-Kalman-Filter-CTRV slides</title>


ToKW(W.FromBTUpS(SteamHeatPSItoBTUpLB[BoilerPressurePSI]));
                FlueTempK = (BoilerStartkW / (W.ToKW(BoilerHeatTransferCoeffWpM2K) * EvaporationAreaM2 * HeatMaterialThicknessFactor)) + baseStartTempK;
                BoilerMassLB = WaterFraction * BoilerVolumeFT3 * WaterDensityPSItoLBpFT3[BoilerPressurePSI] + (1 - WaterFraction) * BoilerVolumeFT3 * SteamDensityPSItoLBpFT3[BoilerPressurePSI];
                BoilerHeatBTU = WaterFraction * BoilerVolumeFT3 * WaterDensityPSItoLBpFT3[BoilerPressurePSI] * WaterHeatPSItoBTUpLB[BoilerPressurePSI] + (1 - WaterFraction) * BoilerVolumeFT3 * SteamDensityPSItoLBpFT3[BoilerPressurePSI] * SteamHeatPSItoBTUpLB[BoilerPressurePSI];
            }

            WaterTempNewK = C.ToK(C.FromF(PressureToTemperaturePSItoF[BoilerPressurePSI])); // Initialise new boiler pressure
            FireMassKG = IdealFireMassKG;

            BoilerSteamHeatBTUpLB = SteamHeatPSItoBTUpLB[BoilerPressurePSI];
            BoilerWaterHeatBTUpLB = WaterHeatPSItoBTUpLB[BoilerPressurePSI];
            BoilerSteamDensityLBpFT3 = SteamDensityPSItoLBpFT3[BoilerPressurePSI];
            BoilerWaterDensityLBpFT3 = WaterDensityPSItoLBpFT3[BoilerPressurePSI];

            DamperFactorManual = TheoreticalMaxSteamOutputLBpS / SpeedEquivMpS; // Calculate a factor for damper control that will vary with speed.
            BlowerSteamUsageFactor = 0.04f * MaxBoilerOutputLBpH / 3600 / MaxBoilerPressurePSI;

            if (ORTSMaxFiringRateKGpS != 0)
                MaxFiringRateKGpS = ORTSMaxFiringRateKGpS; // If OR value present then use it

            if (MaxFiringRateKGpS == 0)  // If no value for Firing rate then estimate a rate.
            {
                if (Stoker == 1.0f)
                {
                    MaxFiringRateKGpS = pS.FrompH(Kg.FromLb(14400.0f)); // Assume mecxhanical stocker can feed at a rate of 14,400 lb/hr

                }
                else
                {
                    MaxFiringRateKGpS = 180 * MaxBoilerOutputLBpH / 775 / 3600 / 2.2046f;
                }

            }

            // Initialise Mechanical Stoker if present
            if (Stoker == 1.0f)
            {
                StokerIsMechanical = true;
            }
            else // AI fireman
            {
                MaxTheoreticalFiringRateKgpS = MaxFiringRateKGpS * 1.33f; // allow the fireman to overfuel for short periods of time
            }

            ApplyBoilerPressure();

            if (Simulator.Settings.DataLogExclusiveSteamPerformance)
            {
                Trace.TraceInformation("============================================= Steam Locomotive Performance - Locomotive Details =========================================================");
                Trace.TraceInformation("Version - {0}", VersionInfo.VersionOrBuild);
                Trace.TraceInformation("Locomotive Name - {0}", LocomotiveName);
                Trace.TraceInformation("Steam Locomotive Type - {0}", SteamLocoType);

                Trace.TraceInformation("**************** General ****************");
                Trace.TraceInformation("WheelRadius {0:N2} ft, NumWheels {1}, DriveWheelWeight {2:N1} t-uk", Me.ToFt(DriverWheelRadiusM), LocoNumDrvAxles, Kg.ToTUK(DrvWheelWeightKg));

                Trace.TraceInformation("**************** Boiler ****************


import (
	"fmt"
	"net"
	"reflect"
	"testing"

	"github.com/google/gopacket"
)

// testPacketGRE is the packet:
//   15:08:08.003196 IP 192.168.1.1 > 192.168.1.2: GREv0, length 88: IP 172.16.1.1 > 172.16.2.1: ICMP echo request, id 4724, seq 1, length 64
//      0x0000:  3a56 6b69 595e 8e7a 12c3 a971 0800 4500  :VkiY^.z...q..E.
//      0x0010:  006c 843c 4000 402f 32d3 c0a8 0101 c0a8  .l.<@.@/2.......
//      0x0020:  0102 0000 0800 4500 0054 0488 4000 4001  ......E..T..@.@.
//      0x0030:  dafe ac10 0101 ac10 0201 0800 82c4 1274  ...............t
//      0x0040:  0001 c892 a354 0000 0000 380c 0000 0000  .....T....8.....
//      0x0050:  0000 1011 1213 1415 1617 1819 1a1b 1c1d  ................
//      0x0060:  1e1f 2021 2223 2425 2627 2829 2a2b 2c2d  ...!"#$%&'()*+,-
//      0x0070:  2e2f 3031 3233 3435 3637                 ./01234567
var testPacketGRE = []byte{
	0x3a, 0x56, 0x6b, 0x69, 0x59, 0x5e, 0x8e, 0x7a, 0x12, 0xc3, 0xa9, 0x71, 0x08, 0x00, 0x45, 0x00,
	0x00, 0x6c, 0x84, 0x3c, 0x40, 0x00, 0x40, 0x2f, 0x32, 0xd3, 0xc0, 0xa8, 0x01, 0x01, 0xc0, 0xa8,
	0x01, 0x02, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00, 0x00, 0x54, 0x04, 0x88, 0x40, 0x00, 0x40, 0x01,
	0xda, 0xfe, 0xac, 0x10, 0x01, 0x01, 0xac, 0x10, 0x02, 0x01, 0x08, 0x00, 0x82, 0xc4, 0x12, 0x74,
	0x00, 0x01, 0xc8, 0x92, 0xa3, 0x54, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0c, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d,
	0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
	0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
}

func TestPacketGRE(t *testing.T) {
	p := gopacket.NewPacket(testPacketGRE, LinkTypeEthernet, gopacket.Default)
	if p.ErrorLayer() != nil {
		t.Error("Failed to decode packet:", p.ErrorLayer().Error())
	}
	checkLayers(p, []gopacket.LayerType{LayerTypeEthernet, LayerTypeIPv4, LayerTypeGRE, LayerTypeIPv4, LayerTypeICMPv4, gopacket.LayerTypePayload}, t)
	if got, ok := p.Layer(L


, ulSize );

                //  close the cursor before checking the error

                DIRClose( pfucbLVRoot );
                pfucbLVRoot = pfucbNil;

                Call( err );

                if ( !fDone )
                {
                    Call( ErrDIRGet( pfucb ) );
                }
            }

            //  we are already on the next LV

            Assert( lidCurr > lidOld );
            if ( !fDone )
            {
                Call( ErrDIRRelease( pfucb ) );
                Call( pttmapLVTree->ErrInsertKeyValue( lidCurr, ulRefcount ) );
                Call( ErrDIRGet( pfucb ) );
            }
            else
            {
                DIRUp( pfucb );
                Call( pttmapLVTree->ErrInsertKeyValue( lidCurr, ulRefcount ) );
            }
        }
    }

HandleError:
    if ( pfucbNil != pfucb )
    {
        DIRClose( pfucb );
    }

    return err;
}

//  ================================================================
LOCAL ERR ErrREPAIRCheckUpdateLVsFromColumn(
    FUCB * const pfucb,
    const PGNO pgnoLV,
    TAGFLD_ITERATOR& tagfldIterator,
    const TTMAP * const pttmapLVTree,
    const REPAIROPTS * const popts )
//  ================================================================
{
    ERR err = JET_errSuccess;

    while ( JET_errSuccess == ( err = tagfldIterator.ErrMoveNext() ) )
    {
        const LvId lid = LidOfSeparatedLV( tagfldIterator.PbData(), tagfldIterator.CbData() );

        if ( tagfldIterator.FSeparated() )
        {
            if ( pgnoNull == pgnoLV )
            {
                (*popts->pcprintfError)( "record (%d:%d) references non-existant LID (%I64u), the table has no LV tree. deleting\r\n",
                                            Pcsr( pfucb )->Pgno(), Pcsr( pfucb )->ILine(), (_LID64)lid );
                Call( ErrERRCheck( JET_errDatabaseCorrupted ) );
            }

            ULONG ulUnused;
            err = pttmapLVTree->ErrGetValue( lid, &ulUnused );
            if ( JET_errRecordNotFound == err )
            {
                (*popts->pcprintfError)( "record (%d:%d) references non-existant LID (%I64u). deleting\r\n",
                                            Pcsr( pfucb )->Pgno(), Pcsr( pfucb )->ILine(), (_LID64)lid );
                Call( ErrERRCheck( JET_errDatabaseCorrupted ) );
            }
            else
            {
                Call( err );
            }
        }
    }

    if ( JET_errNoCurrentRecord == err )
    {
        err = JET_errSuccess;
    }

HandleError:
    return err;
}

//  ================================================================
LOCAL ERR ErrREPAIRUpdateLVsFromColumn(
    FUCB * const pfucb,
    TAGFLD_ITERATOR& tagfldIterator,
    TTMAP * const pttmapRecords,
    const REPAIROPTS * const popts )
//  ================================================================
{
    ERR err = JET_errSuccess;

    while ( JET_errSuccess == ( err = tagfldIterator.ErrMoveNext() ) )
    {
        if ( tagfldIterator.FSeparated() )
        {
            const LvId lid = LidOfSeparatedLV( tagfldIterator.PbData(), tagfldIterator.CbData() );

            Call( pttmapRecords->ErrIncrementValue( lid ) );
        }
    }

    if ( JET_errNoCurrentRecord == err )
    {
        err = JET_errSuccess;
    }

HandleError:
    return err;
}

//  =====


MovementMethod
import im.vector.util.openUrlInExternalBrowser
import im.vector.util.vectorCustomLinkify
import org.matrix.androidsdk.crypto.data.MXDeviceInfo
import org.matrix.androidsdk.rest.model.Event

class TestLinkifyActivity : AppCompatActivity() {

    @BindView(R.id.test_linkify_content_view)
    lateinit var scrollContent: LinearLayout

    @BindView(R.id.test_linkify_coordinator)
    lateinit var coordinatorLayout: CoordinatorLayout

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_test_linkify)
        ButterKnife.bind(this)

        scrollContent.removeAllViews()

        listOf(
                "https://www.html5rocks.com/en/tutorials/webrtc/basics/ |",
                "https://www.html5rocks.com/en/tutorials/webrtc/basics/",
                "mailto mailto:test@toto.com  test@toto.com",
                "Here is the link.www.test.com/foo/?23=35 you got it?",
                "www.lemonde.fr",
                " /www.lemonde.fr",
                "://www.lemonde.fr",
                "file:///dev/null ",
                " ansible/xoxys.matrix#2c0b65eb",
                "foo.ansible/xoxys.matrix#2c0b65eb",
                "foo.ansible.fpo/xoxys.matrix#2c0b65eb",
                "https://foo.ansible.fpo/xoxys.matrix#2c0b65eb",
                "@vf:matrix.org",
                "+44 207 123 1234",
                "+33141437940",
                "1234",
                "3456.34,089",
                "ksks9808",
                "For example: geo:48.85828,2.29449?z=16 should be clickable",
                "geo:37.786971,-122.399677;u=35",
                "37.786971,-122.399677;u=35",
                "48.107864,-1.712153",
                "synchrone peut tenir la route la",
                "that.is.some.sexy.link",
                "test overlap 48.107864,0673728392 geo + pn?",
                "test overlap 0673728392,48.107864 geo + pn?",
                "If I add a link in brackets like (help for Riot: https://about.riot.im/help), the link is usable on Riot for Desktop",
                "(help for Riot: https://about.riot.im/help)",
                "http://example.com/test(1).html",
                "http://example.com/test(1)",
                "https://about.riot.im/help)",
                "(http://example.com/test(1))",
                "http://example.com/test1)",
                "http://example.com/test1/, et ca",
                "www.example.com/, et ca",
                "foo.ansible.toplevel/xoxys.matrix#2c0b65eb",
                "foo.ansible.ninja/xoxys.matrix#2c0b65eb",
                "in brackets like (help for Riot: https://www.exemple/com/find(1)) , the link is usable ",
                """
                    In brackets like (help for Riot: https://about.riot.im/help) , the link is usable,
                    But you can call +44 207 123 1234 and come to 37.786971,-122.399677;u=35 then
                    see if this mail jhon@riot.im is active but this should not 12345
                """.trimIndent()
        )
                .forEach { textContent ->
                    val item = LayoutInflater.from(this)
                            .inflate(R.layout.item_test_linkify, scrollContent, false)

                    item.findViewById<TextView>(R.id.test_linkify_auto_text)
                            ?.apply {
                                text = textContent
                                movementMethod = MatrixLinkMovementMethod(object : MockMessageAdapterActionListener() {
                                    override fun onURLClick(uri: Uri?) {
                                        Snackbar.make(coordinatorLayout, "URI Clicked: $uri", Snackbar.LENGTH_LONG)


88(r3), r22
  l.sw      92(r3), r23
  l.sw      96(r3), r24
  l.sw     100(r3), r25
  l.sw     104(r3), r26
  l.sw     108(r3), r27
  l.sw     112(r3), r28
  l.sw     116(r3), r29
  l.sw     120(r3), r30
  l.sw     124(r3), r31
  # store ra to pc
  l.sw     128(r3), r9
  # zero epcr
  l.sw     132(r3), r0

#elif defined(__hexagon__)
#
# extern int unw_getcontext(unw_context_t* thread_state)
#
# On entry:
#  thread_state pointer is in r0
#
#define OFFSET(offset) (offset/4)
DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext)
  memw(r0+#32) = r8
  memw(r0+#36) = r9
  memw(r0+#40) = r10
  memw(r0+#44) = r11

  memw(r0+#48) = r12
  memw(r0+#52) = r13
  memw(r0+#56) = r14
  memw(r0+#60) = r15

  memw(r0+#64) = r16
  memw(r0+#68) = r17
  memw(r0+#72) = r18
  memw(r0+#76) = r19

  memw(r0+#80) = r20
  memw(r0+#84) = r21
  memw(r0+#88) = r22
  memw(r0+#92) = r23

  memw(r0+#96) = r24
  memw(r0+#100) = r25
  memw(r0+#104) = r26
  memw(r0+#108) = r27

  memw(r0+#112) = r28
  memw(r0+#116) = r29
  memw(r0+#120) = r30
  memw(r0+#124) = r31
  r1 = c4   // Predicate register
  memw(r0+#128) = r1
  r1 = memw(r30)           // *FP == Saved FP
  r1 = r31
  memw(r0+#132) = r1

  jumpr r31

#elif defined(__sparc__) && defined(__arch64__)

#
# extern int __unw_getcontext(unw_context_t* thread_state)
#
# On entry:
#  thread_state pointer is in %o0
#
DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext)
  .register %g2, #scratch
  .register %g3, #scratch
  .register %g6, #scratch
  .register %g7, #scratch
  stx  %g1, [%o0 + 0x08]
  stx  %g2, [%o0 + 0x10]
  stx  %g3, [%o0 + 0x18]
  stx  %g4, [%o0 + 0x20]
  stx  %g5, [%o0 + 0x28]
  stx  %g6, [%o0 + 0x30]
  stx  %g7, [%o0 + 0x38]
  stx  %o0, [%o0 + 0x40]
  stx  %o1, [%o0 + 0x48]
  stx  %o2, [%o0 + 0x50]
  stx  %o3, [%o0 + 0x58]
  stx  %o4, [%o0 +


(clientData->fileDescriptor->descriptor, clientData->buffer.data(), clientData->buffer.size());
    if (bytesRead <= 0) //read returns 0, when connection is disrupted.
    {
      _out.printInfo("Info: Connection to IPC server's client number " + std::to_string(clientData->id) + " closed.");
      closeClientConnection(clientData);
      return;
    }

    if (bytesRead > (signed)clientData->buffer.size()) bytesRead = clientData->buffer.size();

    try {
      processedBytes = 0;
      while (processedBytes < bytesRead) {
        processedBytes += clientData->binaryRpc->process(clientData->buffer.data() + processedBytes, bytesRead - processedBytes);
        if (clientData->binaryRpc->isFinished()) {
          if (GD::ipcLogger->enabled()) {
            if (clientData->binaryRpc->getType() == BaseLib::Rpc::BinaryRpc::Type::request) {
              std::string methodName;
              BaseLib::PArray request = _rpcDecoder->decodeRequest(clientData->binaryRpc->getData(), methodName);
              GD::ipcLogger->log(IpcModule::ipc, request->at(1)->integerValue, clientData->id, IpcLoggerPacketDirection::toServer, clientData->binaryRpc->getData());
            } else {
              BaseLib::PVariable response = _rpcDecoder->decodeResponse(clientData->binaryRpc->getData());
              GD::ipcLogger->log(IpcModule::ipc, response->arrayValue->at(0)->integerValue, clientData->id, IpcLoggerPacketDirection::toServer, clientData->binaryRpc->getData());
            }
          }

          std::shared_ptr<BaseLib::IQueueEntry> queueEntry = std::make_shared<QueueEntry>(clientData, clientData->binaryRpc->getData());
          if (!enqueue(clientData->binaryRpc->getType() == BaseLib::Rpc::BinaryRpc::Type::request ? 0 : 1, queueEntry)) printQueueFullError(_out, "Error: Could not queue incoming RPC packet. Queue is full.");
          clientData->binaryRpc->reset();
        }
      }
    }
    catch (BaseLib::Rpc::BinaryRpcException &ex) {
      _out.printError(std::string("Error processing packet: ") + ex.what());
      clientData->binaryRpc->reset();
    }
  }
  catch (const std::exception &ex) {
    _out.printEx(__FILE__, __LINE__, __PRETTY_FUNCTION__, ex.what());
  }
  catch (...) {
    _out.printEx(__FILE__, __LINE__, __PRETTY_FUNCTION__);
  }
}

bool IpcServer::getFileDescriptor(bool deleteOldSocket) {
  try {
    if (!BaseLib::Io::directoryExists(GD::bl->settings.socketPath().c_str())) {
      if (errno == ENOENT) _out.printCritical("Critical: Directory " + GD::bl->settings.socketPath() + " does not exist. Please create it before starting Homegear otherwise IPC won't work.");
      else _out.printCritical("Critical: Error reading information of directory " + GD::bl->settings.socketPath() + ". The script engine won't work: " + strerror(errno));
      _stopServer = true;
      return false;
    }
    bool isDirectory = false;
    int32_t result = BaseLib::Io::isDirectory(GD::bl->settings.socketPath(), isDirectory);
    if (result != 0 || !isDirectory) {
      _out.printCritical("Critical: Directory " + GD::bl->settings.socketPath() + " does not exist. Please create it before starting Homegear otherwise IPC won't work.");
      _stopServer = true;
      return false;
    }
    if (deleteOldSocket) {
      if (unlink(_socketPath.c_str()) == -1 && er


.peek());
    }
  }
  if(labelCol >= hData->cols()){
    throw Ex("Label column index is too large");
  }
  if(som.outputDimensions() > 2){
    throw Ex("Semantic map can only plot one or two dimensional "
	       "self-organizing maps.");
  }
  if(som.inputDimensions() > hData->cols()){
    throw Ex("The input dataset does not have enough attributes for input "
	       "to the semantic map");
  }

  //Write the svg output file
  std::ofstream out(outFilename.c_str());
  if(!out){
    throw Ex("Could not open the file named \"",outFilename,"\"");
  }
  //First, write the header
  vector<double> axes = som.outputAxes();
  double maxDim = *(max_element(axes.begin(), axes.end()));
  double scale = ((100*maxDim) > 800)?100:800/maxDim;
  const double shift = scale/2;
  double ax0 = axes[0];
  double ax1 = (axes.size() == 1)?1:axes[1];
  out << "<?xml version=\"1.0\" standalone=\"no\"?>\n"
      << "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n"
      << "\"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n"
      << "<svg viewbox=\"0 0 "
      << ax0*scale+shift << " " << ax1*scale+shift
      << "\" preserveAspectRatio=\"xMinYMin\"\n"
      << "     width=\""<< ax0*scale+shift << "px\" height=\""
      << ax1*scale+shift << "px\"\n"
      << "     xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n"
      << "<desc>Semantic map of the self-organizing map stored in \n"
      << "      \"" << somFile << "\"\n"
      << "      using data from \"" << dataFile << "\"\n"
      << "      Original filename: \"" << outFilename << "\"\n";
  if(som.outputDimensions() == 2){
    out << "      Plotting output dimensions " << 0 << " and "
	<< 1 << " as (x,y) coordinates.\n";
  }else{
    assert(som.outputDimensions() == 1);
    out << "      Plotting output dimension " << 0 << "as x coordinate.\n";
  };
  out << "</desc>\n";

  std::vector<double> labels; labels.reserve(som.nodes().size());
  if(useVarianceAsLabel){
    //winlist[i] holds the pointers to the rows of the dataset where
    //nodes()[i] is the winner
    std::vector<std::list<const GVec*> > winLists(som.nodes().size());
    for(size_t row = 0; row < hData->rows(); ++row){
      const GVec& rowVec = hData->row(row);
      size_t bestNode = som.bestMatch(rowVec);
      winLists.at(bestNode).push_back(&rowVec);
    }
    //Calculate the variance of the labelCol column for each node
    std::vector<std::list<const GVec*> >::const_iterator list;
    for(list=winLists.begin(); list != winLists.end(); ++list){
      if(list->size() == 0){
	//No elements in the list, no variance
	labels.push_back(0);
      }else{
	//Copy the appropriate column into a 1-column matrix
	GMatrix m(0,1);
	std::list<const GVec*>::const_iterator l;
	for(l = list->begin(); l != list->end(); ++l){
	  m.newRow();
	  double& val = (m


ouble>(low,high));
}, __doc_igl_colon,
py::arg("low"), py::arg("high"));

m.def("coloni", []
(
  const int low,
  const int step,
  const int high,
  Eigen::MatrixXi& I
)
{
  Eigen::Matrix<int,Eigen::Dynamic,1> temp;
  igl::colon<int>(low,step,high,temp);
  I = temp;
}, __doc_igl_colon,
py::arg("low"), py::arg("step"), py::arg("high"), py::arg("I"));

m.def("coloni", []
(
  const int low,
  const int high,
  Eigen::MatrixXi& I
)
{
  Eigen::Matrix<int,Eigen::Dynamic,1> temp;
  igl::colon<int>(low,high,temp);
  I = temp;
}, __doc_igl_colon,
py::arg("low"), py::arg("high"), py::arg("I"));

m.def("coloni", []
(
  const int& low,
  const int& high
)
{
  return Eigen::MatrixXi(igl::colon<int>(low,high));
}, __doc_igl_colon,
py::arg("low"), py::arg("high"));
// This file is part of libigl, a simple c++ geometry processing library.
//
// Copyright (C) 2017 Sebastian Koch <s.koch@tu-berlin.de> and Daniele Panozzo <daniele.panozzo@gmail.com>
//
// This Source Code Form is subject to the terms of the Mozilla Public License
// v. 2.0. If a copy of the MPL was not distributed with this file, You can
// obtain one at http://mozilla.org/MPL/2.0/.

m.def("reorient_facets_raycast", []
(
  const Eigen::MatrixXd& V,
  const Eigen::MatrixXi& F,
  int rays_total,
  int rays_minimum,
  bool facet_wise,
  bool use_parity,
  bool is_verbose,
  Eigen::MatrixXi& I,
  Eigen::MatrixXi& C
)
{
  Eigen::VectorXi Iv;
  Eigen::VectorXi Cv;
  igl::embree::reorient_facets_raycast(V, F, rays_total, rays_minimum, facet_wise, use_parity, is_verbose, Iv, Cv);
  I = Iv;
  C = Cv;
}, __doc_igl_embree_reorient_facets_raycast,
py::arg("V"), py::arg("F"), py::arg("rays_total"), py::arg("rays_minimum"), py::arg("facet_wise"), py::arg("use_parity"), py::arg("is_verbose"), py::arg("I"), py::arg("C"));

m.def("reorient_facets_raycast", []
(
  const Eigen::MatrixXd& V,
  const Eigen::MatrixXi& F,
  Eigen::MatrixXi& FF,
  Eigen::MatrixXi& I
)
{
  Eigen::VectorXi Iv;
  igl::embree::reorient_facets_raycast(V, F, FF, Iv);
  I = Iv;
}, __doc_igl_embree_reorient_facets_raycast,
py::arg("V"), py::arg("F"), py::arg("FF"), py::arg("I"));

// This file is part of libigl, a simple c++ geometry processing library.
//
// Copyright (C) 2017 Sebastian Koch <s.koch@tu-berlin.de> and Daniele Panozzo <daniele.panozzo@gmail.com>
//
// This Source Code Form is subject to the terms of the Mozilla Public License
// v. 2.0. If a copy of the MPL was not distributed with this file, You can
// obtain one at http://mozilla.org/MPL/2.0/.
m.def("remesh_self_intersections", []
(
	const Eigen::Matrix


public of", () => {
    expect(countryToAlpha2("Korea, Republic of")).toBe("KR")
  });

  it("Korea (Republic of)", () => {
    expect(countryToAlpha2("Korea (Republic of)")).toBe("KR")
  });

  it("Republic of Korea", () => {
    expect(countryToAlpha2("Republic of Korea")).toBe("KR")
  });

  it("South Korea", () => {
    expect(countryToAlpha2("South Korea")).toBe("KR")
  });
});

describe("Hong Kong variants", () => {
  it("HKSAR", () => {
    expect(countryToAlpha2("HKSAR")).toBe("HK")
  });

  it("Hong Kong", () => {
    expect(countryToAlpha2("Hong Kong")).toBe("HK")
  });

  it("Hong Kong SAR China", () => {
    expect(countryToAlpha2("Hong Kong SAR China")).toBe("HK")
  });
});
import { ItemsService } from './../services/items.service';
import { Item } from './../model/item.model';
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { NgForm } from '@angular/forms';

@Component({
  selector: 'app-edit',
  templateUrl: './edit.component.html',
  styleUrls: ['./edit.component.css']
})
export class EditComponent implements OnInit {

  id: number;
  header: string;
  item: Item = {
    id: 0,
    name: "",
    unit: 0,
    price: 0,
    total: 0,
    grandtotal: 0

  }
  constructor(private router: Router, private route: ActivatedRoute, private itemservice: ItemsService) {
    this.id = 1;
    this.header = 'dasjs'
  }

  ngOnInit(): void {
    this.id = +String(this.route.snapshot.paramMap.get("id"))
    this.header = this.id === 0 ? 'Add item' : 'Edit item';
    if (this.id != 0) {
      this.item = this.itemservice.onGetitem(this.id)!
    }
  }
  onSubmit(form: NgForm) {
    let item: Item = {
      id: form.value.id,
      name: form.value.name,
      unit: form.value.unit,
      price: form.value.price,
      total: form.value.price * form.value.unit,
      grandtotal: 0
    }

    if (this.id == 0) {
      this.itemservice.onAdd(item);
    }
    else {
      this.itemservice.onUpdate(item)
    }
    this.router.navigateByUrl("");
  }
}
import type Quill from '../core';
import type { Bounds } from '../core/selection';

const isScrollable = (el: Element) => {
  const { overflowY } = getComputedStyle(el, null);
  return overflowY !== 'visible' && overflowY !== 'clip';
};

class Tooltip {
  quill: Quill;
  boundsContainer: HTMLElement;
  root: HTMLDivElement;

  constructor(quill: Quill, boundsContainer?: HTMLElement) {
    this.quill = quill;
    this.boundsContainer = boundsContainer || document.body;
    this.root = quill.addContainer('ql-tooltip');
    // @ts-expect-error
    this.root.innerHTML = this.constructor.TEMPLATE;
    if (isScrollable(this.quill.root)) {
      this.quill.root.addEventListener('scroll', () => {
        this.root.style.marginTop = `${-1 * this.quill.root.scrollTop}px`;
      });
    }
    this.hide();
  }

  hide() {
    this.root.classList.add('ql-hidden');
  }

  position(reference: Bounds) {


unt = tonumber(rbx.Text)
		print("skipAmount:", skipAmount)
		if skipAmount then
			self:setState({
				skipAmount = skipAmount,
			})
		else
			rbx.Text = self.state.skipAmount
		end
	end
end

return Story


connecting to the SAP system.'
        module.fail_json(**result)

    # build parameter dict of dict
    company_params = build_company_params(name, name_2, country, time_zone, city, post_code, street, street_no, e_mail)

    if state == "absent":
        raw = call_rfc_method(conn, 'BAPI_COMPANY_DELETE', {'COMPANY': company_id})

    if state == "present":
        raw = call_rfc_method(conn, 'BAPI_COMPANY_CLONE',
                              {'METHOD': {'USMETHOD': 'COMPANY_CLONE'}, 'COMPANY': company_id, 'COMP_DATA': company_params})

    analysed = return_analysis(raw)

    result['out'] = raw

    result['changed'] = analysed[0]['change']
    result['msg'] = analysed[2]['msg']

    if analysed[1]['failed']:
        module.fail_json(**result)

    module.exit_json(**result)

def main():
    run_module()

if __name__ == '__main__':
    main()


} else {
                // Legacy fallback: The actual element doesn't matter here, Shader only cares about the names
                buildVertexFormat(transformer.attributes.associateWith {
                    //#if MC>=12100
                    //$$ VertexFormatElement.POSITION
                    //#else
                    VertexFormats.POSITION_ELEMENT
                    //#endif
                })
            }

            //#if MC>=12102
            //$$ val shaderProgram = ShaderProgram.create(
            //$$     CompiledShader.compile(
            //$$         Identifier.of("universalcraft", DigestUtils.sha1Hex(transformedVertSource).lowercase()),
            //$$         CompiledShader.Type.VERTEX, transformedVertSource
            //$$     ),
            //$$     CompiledShader.compile(
            //$$         Identifier.of("universalcraft", DigestUtils.sha1Hex(transformedFragSource).lowercase()),
            //$$         CompiledShader.Type.FRAGMENT, transformedFragSource
            //$$     ),
            //$$     shaderVertexFormat,
            //$$ )
            //$$ shaderProgram.set(transformer.uniforms.map { (name, type) ->
            //$$     ShaderProgramDefinition.Uniform(name, type.typeName, type.default.size, type.default.map { it.toFloat() })
            //$$ }, transformer.samplers.map { name -> ShaderProgramDefinition.Sampler(name) })
            //$$ return MCShader(shaderProgram, blendState)
            //#else
            val name = DigestUtils.sha1Hex(json).lowercase()
            //#if FORGELIKE
            //$$ @Suppress("DEPRECATION") // Forge wants us to use its overload, but we don't care
            //#endif
            return MCShader(Shader(factory, name, shaderVertexFormat), blendState)
            //#endif
        }
    }
}

internal class MCShaderUniform(val mc: GlUniform) : ShaderUniform, IntUniform, FloatUniform, Float2Uniform, Float3Uniform, Float4Uniform, FloatMatrixUniform {
    override val location: Int
        get() = mc.location

    override fun setValue(value: Int) = mc.set(value)

    override fun setValue(value: Float) = mc.set(value)

    override fun setValue(v1: Float, v2: Float) = mc.set(v1, v2)

    override fun setValue(v1: Float, v2: Float, v3: Float) = mc.set(v1, v2, v3)

    override fun setValue(v1: Float, v2: Float, v3: Float, v4: Float) = mc.set(v1, v2, v3, v4)

    override fun setValue(array: FloatArray) = mc.set(array)
}

internal class MCSamplerUniform(val mc: Shader, val name: String) : SamplerUniform {
    override val location: Int = 0

    override fun setValue(textureId: Int) {
        //#if MC>=12102
        //$$ mc.addSamplerTexture(name, textureId)
        //#else
        mc.addSampler(name, textureId)
        //#endif
    }
}
package gg.essential.universal.standalone.render

internal object IndexBufferBuilder {
    private var quadsBuffer: ShortArray = ShortArray(0)
    private var triangleFanBuffer: ShortArray = ShortArray(0)

    /** Returns an index buffer for drawing [count] quads as triangles with glDrawElements. */
    fun forQuads(count: Int): ShortArray {
        val bufSize = count * 6
        if (quadsBuffer.size < bufSize) {
            val buf = ShortArray(bufSize)
            var index = 0
            for (i in 0 until bufSize step 6) {
                //  First triangle
                buf[i + 0] = (index + 0).toShort()
                buf[i + 1] = (index + 1).toShort()
                buf[i + 2] = (index + 2).toShort()
                // Second


tion range({
  starting,
  ending,
  prefix,
}: RangeParams): string[] {
  const finalRange: number[] = generateRange(starting, ending);
  const stringRange = finalRange.map((value) =>
    prefix ? `${prefix}${value}` : value + '',
  );
  return stringRange;
}
import {Pipe, PipeTransform} from '@angular/core';
import {ListElement} from '../interfaces/list-element.interface';
import {ElementType} from '../enums/element-type.enum';

@Pipe({
    name: 'elementFilter'
})
export class ElementFilterPipe implements PipeTransform {

    transform(elementsList: ListElement[], elementType: ElementType): any {
        if (!elementType) {
            return elementsList;
        }

        return elementsList.filter((element: ListElement) => element.type === elementType);
    }

}
import { CompiledCard } from '@cardstack/core/src/interfaces';
import { encodeCardURL } from '@cardstack/core/src/utils';
import { Environment, NODE, ENVIRONMENTS } from './interfaces';
import { writeFileSync, readJSONSync, existsSync, mkdirpSync, ensureSymlinkSync, removeSync } from 'fs-extra';
import { join, dirname } from 'path';

export class CardCache {
  constructor(private dir: string, private pkgName: string) {}

  private getCardLocation(env: Environment | 'assets', cardURL: string): string {
    return join(this.dir, env, encodeCardURL(cardURL));
  }

  private getFileLocation(env: Environment | 'assets', cardURL: string, localFile: string): string {
    return join(this.getCardLocation(env, cardURL), localFile);
  }

  private moduleURL(cardURL: string, localFile: string): string {
    let encodedCardURL = encodeCardURL(cardURL);

    return join(this.pkgName, encodedCardURL, localFile);
  }

  setModule(env: Environment, cardURL: string, localFile: string, source: string) {
    let fsLocation = this.getFileLocation(env, cardURL, localFile);
    this.writeFile(fsLocation, source);
    return this.moduleURL(cardURL, localFile);
  }

  writeAsset(cardURL: string, filename: string, source: string): string {
    let assetPath = this.getFileLocation('assets', cardURL, filename);
    this.writeFile(assetPath, source);

    for (const env of ENVIRONMENTS) {
      ensureSymlinkSync(assetPath, this.getFileLocation(env, cardURL, filename));
    }
    return assetPath;
  }

  private writeFile(fsLocation: string, source: string): void {
    mkdirpSync(dirname(fsLocation));
    writeFileSync(fsLocation, source);
  }

  setCard(cardURL: string, source: CompiledCard) {
    this.setModule(NODE, cardURL, 'compiled.json', JSON.stringify(source, null, 2));
  }

  getCard(cardURL: string, env: Environment = NODE): CompiledCard | undefined {
    let loc = this.getFileLocation(env, encodeCardURL(cardURL), 'compiled.json');

    if (existsSync(loc)) {
      return readJSONSync(loc);
    }

    return;
  }

  deleteCard(cardURL: string): void {
    for (const env of ENVIRONMENTS) {
      let loc = this.getCardLocation(env, cardURL);

      if (!existsSync(loc)) {
        continue;
      }

      removeSync(loc);
    }
  }
}


))
}

func TestSyncAfterAddingAFile(t *testing.T) {
	ctx := context.Background()
	r := fstest.NewRun(t)
	file1 := r.WriteBoth(ctx, "empty space", "-", t2)
	file2 := r.WriteFile("potato", "------------------------------------------------------------", t3)

	r.CheckLocalItems(t, file1, file2)
	r.CheckRemoteItems(t, file1)

	accounting.GlobalStats().ResetCounters()
	ctx = predictDstFromLogger(ctx)
	err := Sync(ctx, r.Fremote, r.Flocal, false)
	require.NoError(t, err)
	testLoggerVsLsf(ctx, r.Fremote, r.Flocal, operations.GetLoggerOpt(ctx).JSON, t)
	r.CheckLocalItems(t, file1, file2)
	r.CheckRemoteItems(t, file1, file2)
}

func TestSyncAfterChangingFilesSizeOnly(t *testing.T) {
	ctx := context.Background()
	r := fstest.NewRun(t)
	file1 := r.WriteObject(ctx, "potato", "------------------------------------------------------------", t3)
	file2 := r.WriteFile("potato", "smaller but same date", t3)
	r.CheckRemoteItems(t, file1)
	r.CheckLocalItems(t, file2)

	accounting.GlobalStats().ResetCounters()
	ctx = predictDstFromLogger(ctx)
	err := Sync(ctx, r.Fremote, r.Flocal, false)
	require.NoError(t, err)
	testLoggerVsLsf(ctx, r.Fremote, r.Flocal, operations.GetLoggerOpt(ctx).JSON, t)
	r.CheckLocalItems(t, file2)
	r.CheckRemoteItems(t, file2)
}

// Sync after changing a file's contents, changing modtime but length
// remaining the same
func TestSyncAfterChangingContentsOnly(t *testing.T) {
	ctx := context.Background()
	r := fstest.NewRun(t)
	var file1 fstest.Item
	if r.Fremote.Precision() == fs.ModTimeNotSupported {
		t.Logf("ModTimeNotSupported so forcing file to be a different size")
		file1 = r.WriteObject(ctx, "potato", "different size to make sure it syncs", t3)
	} else {
		file1 = r.WriteObject(ctx, "potato", "smaller but same date", t3)
	}
	file2 := r.WriteFile("potato", "SMALLER BUT SAME DATE", t2)
	r.CheckRemoteItems(t, file1)
	r.CheckLocalItems(t, file2)

	accounting.GlobalStats().ResetCounters()
	ctx = predictDstFromLogger(ctx)
	err := Sync(ctx, r.Fremote, r.Flocal, false)
	require.NoError(t, err)
	testLoggerVsLsf(ctx, r.Fremote, r.Flocal, operations.GetLoggerOpt(ctx).JSON, t)
	r.CheckLocalItems(t, file2)
	r.CheckRemoteItems(t, file2)
}

// Sync after removing a file and adding a file --dry-run
func TestSyncAfterRemovingAFileAndAddingAFileDryRun(t *testing.T) {
	ctx := context.Background()
	ctx, ci := fs.AddConfig(ctx)
	r := fstest.NewRun(t)
	file1 := r.WriteFile("potato2", "------------------------------------------------------------", t1)
	file2 := r.WriteObject(ctx, "potato", "SMALLER BUT SAME DATE", t2)
	file3 := r.WriteBoth(ctx, "empty space", "-", t2)

	ci.DryRun = true
	accounting


          enableMapType = false
            enableMinimalAnnotation = false
            parenClassTemplate = ""
        }

       json.generateKotlinClassCode().should.equal(expectResult)
    }
}package wu.seal.jsontokotlin.regression

import com.winterbe.expekt.should
import org.junit.Before
import org.junit.Test
import wu.seal.jsontokotlin.model.DefaultValueStrategy
import wu.seal.jsontokotlin.utils.KotlinClassCodeMaker
import wu.seal.jsontokotlin.utils.KotlinClassMaker
import wu.seal.jsontokotlin.model.PropertyTypeStrategy
import wu.seal.jsontokotlin.test.TestConfig

class Issue170Test {

    private val testJson = "{\n" +
            "  \"employees\": [\n" +
            "    {\n" +
            "      \"firstName\": \"Bill\",\n" +
            "      \"lastName\": \"Gates\"\n" +
            "    },\n" +
            "    {\n" +
            "      \"firstName\": null,\n" +
            "      \"lastName\": \"Bush\"\n" +
            "    },\n" +
            "    {\n" +
            "      \"firstName\": \"Thomas\",\n" +
            "      \"lastName\": \"Carter\"\n" +
            "    }\n" +
            "  ]\n" +
            "}"

    private val expected = """data class A(
    @SerializedName("employees")
    val employees: List<Employee>
) {
    data class Employee(
        @SerializedName("firstName")
        val firstName: String?, // Bill
        @SerializedName("lastName")
        val lastName: String // Gates
    )
}"""

    /**
     * init test environment before test
     */
    @Before
    fun setUp() {
        TestConfig.setToTestInitState()
        TestConfig.defaultValueStrategy = DefaultValueStrategy.None
        TestConfig.propertyTypeStrategy = PropertyTypeStrategy.AutoDeterMineNullableOrNot
    }

    /**
     * test issue #700 of Github Project issue
     */
    @Test
    fun testIssue130() {
        val generated = KotlinClassCodeMaker(
                KotlinClassMaker("A", testJson).makeKotlinClass()).makeKotlinClassCode()
        generated.trim().should.be.equal(expected)
    }
}package wu.seal.jsontokotlin.regression

import com.winterbe.expekt.should
import org.junit.Before
import org.junit.Test
import wu.seal.jsontokotlin.utils.KotlinClassCodeMaker
import wu.seal.jsontokotlin.utils.KotlinClassMaker
import wu.seal.jsontokotlin.test.TestConfig

class Issue089Test {

    private val json = """{
  "mime_type": "image/jpeg",
  "file_name": "136149.jpg",
  "source_type": "chk",
  "source_id": 3000193,
  "year_month": "201810",
  "day": "31",
  "type_document_id": 11,
  "usr_id": 55572,
  "file_desc": "текст примечания",
  "bytes": "/9j/4AAQSkZ...Nd/VJ/Ef",
  "description": {
    "cmis:objectTypeId": "D:esp:act",
    "esp:doc_name": "текст примечания",
    "esp:iin_bin": "101040011256",
    "esp:create_date": "2018.09.31",
    "esp:reg_num": "181000000103012/00022",
    "esp:reg_date": "2018.10.01",
    "esp:author": "Уалиева Асель Мухаметбековна"
  }
}"""

    private val expected = """data class Test(
    @SerializedName("bytes")
    val bytes: String = "", // /9j/4AAQSkZ...Nd/VJ/Ef
    @SerializedName("day")
    val day: String = "", // 31
    @SerializedName("description")
    val description: Description = Description(),
    @SerializedName("file_desc")
    val


a, beta = ab[0] + ab[1]*np.complex64(1j), ab[2]
    elif typ == 'd':
        alpha, beta = ab[0] + ab[1]*1.j, ab[2]
    else:
        alpha, beta = ab

    if info < 0:
        raise ValueError(f"Illegal value in argument {-info} of tgsen")
    elif info == 1:
        raise ValueError("Reordering of (A, B) failed because the transformed"
                         " matrix pair (A, B) would be too far from "
                         "generalized Schur form; the problem is very "
                         "ill-conditioned. (A, B) may have been partially "
                         "reordered.")

    return AAA, BBB, alpha, beta, QQ, ZZ


local Config = require("kulala.config")
local bug_report = require("kulala.logger.bug_report")
local h = require("test_helper")

describe("send bug report", function()
  local system, result

  before_each(function()
    Config.setup { default_view = "body", debug = true }
    system = h.System.stub({ "gh" }, {})
  end)

  after_each(function()
    system:reset()
  end)

  it("creates GH issue", function()
    system = h.System.stub({ "gh" }, {
      on_call = function(sys)
        sys.code = 0
        sys.stderr = ""
        sys.stdout = '{"status": "201",   "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347"}'

        result = system.args.cmd
      end,
    })

    bug_report.create_issue("Test issue", "This is a test issue body", { "report", "aut


 <ui.storagePath>/
//    install/
//      <version>/
//        clangd_<version>/            (outer director from zip file)
//          bin/clangd
//          lib/clang/...
//    download/
//      clangd-platform-<version>.zip  (deleted after extraction)
namespace Install {
// Download the binary archive `asset` from a github `release` and extract it
// to the extension's global storage location.
// The `abort` controller is signaled if the user cancels the installation.
// Returns the absolute path to the installed clangd executable.
export async function install(release: Github.Release, asset: Github.Asset,
                              abort: AbortController, ui: UI): Promise<string> {
  const dirs = await createDirs(ui);
  const extractRoot = path.join(dirs.install, release.tag_name);
  if (await promisify(fs.exists)(extractRoot)) {
    const reuse = await ui.shouldReuse(release.name);
    if (reuse === undefined) {
      // User dismissed prompt, bail out.
      abort.abort();
      throw new Error(`clangd ${release.name} already installed!`);
    }
    if (reuse) {
      // Find clangd within the existing directory.
      let files = (await readdirp.promise(extractRoot)).map(e => e.fullPath);
      return findExecutable(files);
    } else {
      // Delete the old version.
      await promisify(rimraf)(extractRoot);
      // continue with installation.
    }
  }
  const zipFile = path.join(dirs.download, asset.name);
  await download(asset.browser_download_url, zipFile, abort, ui);
  const archive = await unzipper.Open.file(zipFile);
  const executable = findExecutable(archive.files.map(f => f.path));
  await ui.slow(`Extracting ${asset.name}`,
                archive.extract({path: extractRoot}));
  const clangdPath = path.join(extractRoot, executable);
  await fs.promises.chmod(clangdPath, 0o755);
  await fs.promises.unlink(zipFile);
  return clangdPath;
}

// Create the 'install' and 'download' directories, and return absolute paths.
async function createDirs(ui: UI) {
  const install = path.join(ui.storagePath, 'install');
  const download = path.join(ui.storagePath, 'download');
  for (const dir of [install, download])
    await fs.promises.mkdir(dir, {'recursive': true});
  return {install: install, download: download};
}

// Find the clangd executable within a set of files.
function findExecutable(paths: string[]): string {
  const filename = os.platform() == 'win32' ? 'clangd.exe' : 'clangd';
  const entry = paths.find(f => path.posix.basename(f) == filename ||
                                path.win32.basename(f) == filename);
  if (entry == null)
    throw new Error('Didn\'t find a clangd executable!');
  return entry;
}

// Downloads `url` to a local file `dest` (whose parent should exist).
// A progress dialog is shown, if it is cancelled then `abort` is signaled.
async function download(url: string, dest: string, abort: AbortController,
                        ui: UI): Promise<void> {
  console.log('Downloading ', url, ' to ', dest);
  return ui.progress(
      `Downloading ${path.basename(dest)}`, abort, async (progress) => {
        const response = await fetch(url, {signal: abort.signal});
        if (!response.ok)
          throw new Error(`Failed to download $url`);
        const size = Number(response.headers.get('content-length'));
        let read = 0;
        response.body.on('data', (chunk: Buffer) => {
          read += chunk


aste", function(_, index)
    local component = CopyTable(clipboard)
    cb:TriggerEvent("Insert", component, index)
  end)

  return frame
end

-- holder enforces the bounds of the search widget, should have height 30px
function Syndicator.Search.GetSearchBuilderScrollable(holder, skinner)
  local scrollBox = CreateFrame("Frame", nil, holder, "WowScrollBox")
  local view = CreateScrollBoxLinearView()
  view:SetHorizontal(true)
  local SearchBox = Syndicator.Search.GetSearchBuilder(scrollBox)
  SearchBox:RegisterCallback("OnResize", function()
    scrollBox:FullUpdate(ScrollBoxConstants.UpdateImmediately)
  end)
  SearchBox:RegisterCallback("OnSkin", function(_, ...)
    skinner(...)
  end)
  SearchBox.scrollable = true
  SearchBox:SetPoint("TOPLEFT")
  SearchBox:SetHeight(30)
  scrollBox:SetPoint("TOPLEFT", 15, 0)
  scrollBox:SetPoint("RIGHT", -15, 0)
  scrollBox:SetHeight(30)
  scrollBox:Init(view)
  do
    local function Scroll(frame, direction)
      local elapsed = 0
      local delay = 0.1
      local stepCount = 0
      frame:SetScript("OnUpdate", function(tbl, dt)
        elapsed = elapsed + dt
        if elapsed > delay then
          elapsed = 0

          local visibleExtentPercentage = scrollBox:GetVisibleExtentPercentage();
          if visibleExtentPercentage > 0 then
            local pages = 1 / visibleExtentPercentage;
            local magnitude = .8;
            local span = pages - 1;
            if span > 0 then
              scrollBox:ScrollInDirection((1 / span) * magnitude, direction)
            end
          end
        end
      end)
    end
    local leftButton = CreateFrame("Button", nil, holder)
    leftButton:SetSize(9, 15)
    leftButton:SetPoint("RIGHT", scrollBox, "LEFT", -5, 0)
    leftButton:SetScript("OnEnter", function()
      leftButton:SetAlpha(1)
    end)
    leftButton:SetScript("OnLeave", function()
      leftButton:SetAlpha(0.8)
    end)
    leftButton:SetAlpha(0.8)
    leftButton:SetScript("OnMouseDown", function()
      Scroll(leftButton, ScrollControllerMixin.Directions.Decrease)
    end)
    leftButton:SetScript("OnMouseUp", function()
      leftB


 K45 [PROTO_6]
  CAPTURE VAL R27
  CAPTURE VAL R1
  CAPTURE VAL R25
  SETTABLEKS R29 R26 K46 ["runRhodiumTest"]
  RETURN R26 1


ile_details(file_id)
            files = files_[0]
            g = await get_shortlink(chat_id, f"https://telegram.me/{temp.U_NAME}?start=file_{file_id}")
            k = await client.send_message(chat_id=user_id,text=f"🫂 ʜᴇʏ {message.from_user.mention}, {gtxt}\n\n✅ ʏᴏᴜʀ ʟɪɴᴋ ɪꜱ ʀᴇᴀᴅʏ, ᴋɪɴᴅʟʏ ᴄʟɪᴄᴋ ᴏɴ ᴅᴏᴡɴʟᴏᴀᴅ ʙᴜᴛᴛᴏɴ.\n\n⚠ ꜰɪʟᴇ ɴᴀᴍᴇ : {files.file_name} \n\n📥 ꜰɪʟᴇ ꜱɪᴢᴇ : {get_size(files.file_size)}\n\n", reply_markup=InlineKeyboardMarkup(
                    [
                        [
                            InlineKeyboardButton('📁 ᴅᴏᴡɴʟᴏᴀᴅ 📁', url=g)
                        ], [
                            InlineKeyboardButton('⚡ ʜᴏᴡ ᴛᴏ ᴅᴏᴡɴʟᴏᴀᴅ ⚡', url=await get_tutorial(chat_id))
                        ]
                    ]
                )
            )
            await asyncio.sleep(600)
            await k.edit("ʏᴏᴜʀ ᴍᴇꜱꜱᴀɢᴇ ɪꜱ ᴅᴇʟᴇᴛᴇᴅ !\nᴋɪɴᴅʟʏ ꜱᴇᴀʀᴄʜ ᴀɢᴀɪɴ.")
            return
    user = message.from_user.id
    files_ = await get_file_details(file_id)
    if not files_:
        pre, file_id = ((base64.urlsafe_b64decode(data + "=" * (-len(data) % 4))).decode("ascii")).split("_", 1)
        try:
            if await db.has_premium_access(message.from_user.id):
                pass
            else:
               if not await check_verification(client, message.from_user.id) and VERIFY == True:
                   btn = [[
                       InlineKeyboardButton("✅ Cʟɪᴄᴋ ʜᴇʀᴇ ᴛᴏ ᴠᴇʀɪғʏ ✅", url=await get_token(client, message.from_user.id, f"https://telegram.me/{temp.U_NAME}?start=", file_id))
                   ],[
                        InlineKeyboardButton("⚡ Hᴏᴡ ᴛᴏ ᴠᴇʀɪғʏ ⚡", url=HOW_TO_VERIFY)
                   ]]
                   l = await message.reply_text(
                       text="♨ YOU ARE NOT VERIFIED !\nKINDLY VERIFY TO CONTINUE & YOU CAN GET UNLIMITED ACCESS FOR 24 HOURS ✅\n\n
⚜ इस BOT से MOVIE प्राप्त करने के लिए आपको VERIFY करना आवश्यक है VERIFY करने के बाद आप 24 घंटे तक UNLIMITED MOVIES प्राप्त कर सकते हो।
\n\n
🔥 अगर आप VERIFY नहीं करना चाहते तो आप PREMIUM ले सकते हो, PREMIUM लेने के बाद आप UNLIMITED MOVIES प्राप्त कर पाओगे और आपको VERIFY करने कोई जरूरत नही है\n\nPLAN DETAILS के लिए CLICK करें /plan
",
                       protect_content=False,
                       reply_markup=InlineKeyboardMarkup(btn)
                   )
                   await asyncio.sleep(180)
                   await l.delete()
                   return
            msg = await client.send_cached_media(
                chat_id=message.from_user.id,
                file_id=file_id,
                protect_content=True if pre == 'filep' else False,
                reply_markup=InlineKeyboardMarkup(
            [
             [
              InlineKeyboardButton('🚀 ꜰᴀꜱᴛ ᴅᴏᴡɴʟᴏᴀᴅ / ᴡᴀᴛᴄʜ ᴏɴʟɪɴᴇ 🖥', callback_data=f'generate_stream_link:{file_id}'),
             ],
             [
              InlineKeyboardButton('📌 ᴊᴏɪɴ ᴜᴘᴅᴀᴛᴇꜱ ᴄʜᴀɴɴᴇʟ 📌', url=DEENDAYAL_MOVIE_UPDATE_CHANNEL_LNK) #Don't change anything
             ]
            ]
        )
    )
            filetype = msg.media
            file = getattr(msg, filetype.value)
            title = '' + ' '.join(filter(lambda x: not x.startswith('[') and not x.startswith('@'), file.file_name.split()))
            size=get_size(file.file_size)
            f_caption = f"{title}"
            if CUSTOM_FILE_CAPTION:
                try:
                    f_caption=CUSTOM_FILE_CAPTION.format(file_name= '' if title is None else title, file_size='' if size is None else size, file_caption='')
                except:
                    return
            await msg.edit_caption(f_caption)
            btn = [[
                InlineKeyboardButton("❗ ɢᴇᴛ ꜰɪʟᴇ ᴀɢᴀɪɴ ❗", callback_data=f'delfile#{file_id}')
            ]]
            k = await msg.reply("❗❗❗IMPORTANT❗❗❗\n\nᴛʜɪꜱ ᴍᴏᴠɪᴇ ꜰɪʟᴇ/ᴠɪᴅᴇᴏ ᴡɪʟʟ ʙᴇ ᴅᴇʟᴇᴛᴇᴅ ɪɴ15 ᴍɪɴᴜᴛᴇꜱ  🫥 (ᴅᴜᴇ ᴛᴏ ᴄᴏᴘʏʀɪɢʜᴛ ɪꜱꜱᴜᴇꜱ).\n\nᴘʟᴇᴀꜱᴇ ꜰᴏʀᴡᴀʀᴅ ᴛʜɪꜱ ꜰɪʟᴇ ᴛᴏ ꜱᴏᴍᴇᴡʜᴇʀᴇ ᴇʟꜱᴇ ᴀɴᴅ ꜱᴛᴀʀᴛ ᴅᴏᴡɴʟᴏᴀᴅɪɴɢ ᴛʜᴇʀᴇ",quote=True)
            await asyncio.sleep(900)
            await msg.delete()
            await k.edit_text("ʏᴏᴜʀ ᴠɪᴅᴇᴏ / ꜰɪʟᴇ ɪꜱ ꜱᴜᴄᴄᴇꜱꜱꜰᴜʟʟʏ ᴅᴇʟᴇᴛᴇᴅ !!")
            return
        except:
            pass
        return await message.reply('ɴᴏ ꜱᴜᴄʜ ꜰɪʟᴇ ᴇxɪꜱᴛꜱ !')
    files = files_[0]
    title = '' + ' '.join(filter(lambda x: not x.startswith('[') and not x.star


sitiveUserNo, "spanx");

    	settingsPanel.add(packPdvLabel, "newline, h 18!");
    	settingsPanel.add(packPdvYes, "split 2");
    	settingsPanel.add(packPdvNo, "spanx");

    	settingsPanel.add(dimseRspIntervalPeriodLabel, "newline");
    	settingsPanel.add(dimseRspIntervalPeriodField, "w 50!");
    	settingsPanel.add(pduMaxLengthSentLabel);
    	settingsPanel.add(pduMaxLengthSentField, "w 50!, spanx");

    	settingsPanel.add(releaseTimeoutLabel, "newline");
    	settingsPanel.add(releaseTimeoutField, "w 50!");
    	settingsPanel.add(pduMaxLengthReceivedLabel);
    	settingsPanel.add(pduMaxLengthReceivedField, "w 50!, spanx");

    	settingsPanel.add(dimseRspTimeoutLabel, "newline");
    	settingsPanel.add(dimseRspTimeoutField, "w 50!, spanx");
    	settingsPanel.add(sendSocketBufferLabel);
    	settingsPanel.add(sendSocketBufferField, "w 50!");

    	settingsPanel.add(shutdownDelayLabel, "newline");
    	settingsPanel.add(shutdowndelayField, "w 50!");
    	settingsPanel.add(receiveSocketBufferLabel);
    	settingsPanel.add(receiveSocketBufferField, "w 50!");

    	settingsPanel.add(socketCloseDelayLabel, "newline");
    	settingsPanel.add(socketCloseDelayField, "w 50!");
    	settingsPanel.add(transcoderBufferSizeLabel);
    	settingsPanel.add(transcoderBufferSizeField, "w 50!");

    	settingsPanel.add(associateTimeoutLabel, "newline");
    	settingsPanel.add(associateTimeoutField, "w 50!");
    	settingsPanel.add(tcpConnectionTimeoutLabel, "newline");
    	settingsPanel.add(tcpConnectionTimeoutField, "w 50!");

    	JPanel tlsPanel = new JPanel();
    	tlsPanel.setLayout(new MigLayout("novisualpadding, gap 10 6, hidemode 3, insets 0, fill", "[200, right][grow]"));
        tlsPanel.setBackground(UIConstants.BACKGROUND_COLOR);

        tlsPanel.add(tcpDelayField, "h 18!");
        tlsPanel.add(tcpDelayYes, "split 2");
        tlsPanel.add(tcpDelayNo);

        tlsPanel.add(defaultPresentationLabel, "newline, h 18!");
        tlsPanel.add(defaultPresentationYes, "split 2");
        tlsPanel.add(defaultPresentationNo);

    	tlsPanel.add(tlsLabel, "newline, h 18!");
    	tlsPanel.add(tls3DESRadio, "split 4");
    	tlsPanel.add(tlsAESRadio);
    	tlsPanel.add(tlsWithoutRadio);
    	tlsPanel.add(tlsNoRadio);

    	tlsPanel.add(clientAuthenticationLabel, "newline, h 18!");
    	tlsPanel.add(clientAuthenticationYesRadio, "split 2");
    	tlsPanel.add(clientAuthenticationNoRadio);

    	tlsPanel.add(acceptSSLv2Label, "newline, h 18!");
    	tlsPanel.add(acceptSSLv2YesRadio, "split 2");
    	tlsPanel.add(acceptSSLv2NoRadio);

    	JPanel keystorePanel = new JPanel();
    	keystorePanel.setLayout(new MigLayout("novisualpadding, gap 10 6, hidemode 3, insets 0, fill", "[200, right][][right][]"));
        keystorePanel.setBackground(UIConstants.BACKGROUND_COLOR);

    	keystorePanel.add(keyStoreLabel);
    	keystorePanel.add(keyStoreField, "w 150!");
    	keystorePanel.add(keyStorePasswordLabel);
    	keystorePanel.add(keyStorePasswordField, "w 80!");

    	keystorePanel.add(trustStoreLabel, "newline");
    	keystorePanel.add(trustStoreField, "w 150!");
    	keystorePanel.add(trustStorePasswordLabel);


			info
		} else {
			throw CannotReadException(
				"$loggingName Unable to safetly read chunks for this file, appears to be corrupt"
			)
		}
	}

	/**
	 * Calculate track length, done it here because requires data from multiple chunks
	 *
	 * @param info
	 * @throws CannotReadException
	 */
	@Throws(CannotReadException::class)
	private fun calculateTrackLength(info: GenericAudioHeader) {
		//If we have fact chunk we can calculate accurately by taking total of samples (per channel) divided by the number
		//of samples taken per second (per channel)
		if (info.noOfSamples != null) {
			if (info.sampleRateAsNumber!! > 0) {
				info.preciseTrackLength =
					(info.noOfSamples!!.toFloat() / info.sampleRateAsNumber!!).toDouble()
			}
		} else if (info.audioDataLength!! > 0) {
			info.preciseTrackLength = ((info.audioDataLength!!.toFloat() / info.byteRate!!).toDouble())
		} else {
			throw CannotReadException(
				"$loggingName Wav Data Header Missing"
			)
		}
	}

	/**
	 * Reads a Wav Chunk.
	 */
	@Throws(IOException::class, CannotReadException::class)
	protected fun readChunk(fc: FileChannel, info: GenericAudioHeader): Boolean {
		val chunk: Chunk
		val chunkHeader = ChunkHeader(ByteOrder.LITTLE_ENDIAN)
		if (!chunkHeader.readHeader(fc)) {
			return false
		}
		val id = chunkHeader.id
		logger.info(
			loggingName + " Reading Chunk:" + id + ":starting at:" + Hex.asDecAndHex(chunkHeader.startLocationInFile) + ":sizeIncHeader:" + (chunkHeader.size + ChunkHeader.CHUNK_HEADER_SIZE)
		)
		val chunkType: WavChunkType? = WavChunkType.Companion.get(id)

		//If known chunkType
		if (chunkType != null) {
			when (chunkType) {
				WavChunkType.FACT -> {
					val fmtChunkData = readFileDataIntoBufferLE(fc, chunkHeader.size.toInt())
					chunk = WavFactChunk(fmtChunkData, chunkHeader, info)
					if (!chunk.readChunk()) {
						return false
					}
				}
				WavChunkType.DATA -> {

					//We just need this value from header dont actually need to read data itself
					info.audioDataLength = chunkHeader.size
					info.audioDataStartPosition = (fc.position())
					info.audioDataEndPosition = (fc.position() + chunkHeader.size)
					fc.position(fc.position() + chunkHeader.size)
					isFoundAudio = true
				}
				WavChunkType.FORMAT -> {
					val fmtChunkData = readFileDataIntoBufferLE(fc, chunkHeader.size.toInt())
					chunk = WavFormatChunk(fmtChunkData, chunkHeader, info)
					if (!chunk.readChunk()) {
						return false
					}
					isFoundFormat = true
				}
				else -> if (fc.position() + chunkHeader.size <= fc.size()) {
					fc.position(fc.position() + chunkHeader.size)
				} else {
					if (isFoundAudio && isFoundFormat) {
						logger.severe(
							loggingName + " Size of Chunk Header larger than data, skipping to file end:" + id + ":starting at:" + Hex.asDecAndHex(
								chunkHeader.startLocationInFile
							) + ":sizeIncHeader:" + (chunkHeader.size + ChunkHeader.CHUNK_HEADER_SIZE)
						)
						fc.position(fc.size())
					} else {
						logger.severe(
							"$loggingName Size of Chunk Header larger than data, cannot read file"
						)
						throw CannotReadException(
							"$loggingName Size of Chunk Header larger than data, cannot read file


 MAINNET);
        assertEquals(expectedAddress, gotAddress);
    }

    @Test
    public void verifyMessageSignedLegacySegwitP2SH_P2WPKHAddress() throws Exception {
        String message = "This message was signed with a P2SH-P2WPKH address, the signature header byte therefore is in the range 35-38 (according to BIP 137).";
        String sigBase64 = "I6CwPW9ErVV8SphnQbHnOfYcwcqMdJaZRkym5QHzykpzVw38SrftZFaWoqMl+pvJ92hOyj8PjDOQOT2hDXtk5V0=";
        Address expectedAddress = LegacyAddress.fromBase58("3HnHC8dJCqixUBFNYXdz2LFXQwvAkkTR3m", MAINNET);
        ECKey key = ECKey.signedMessageToKey(message, sigBase64);
        final byte[] segwitV0_OpPush20 = {0x00, 0x14};
        byte[] segwitV0ScriptPubKey = ByteUtils.concat(segwitV0_OpPush20, key.getPubKeyHash()); // as defined in BIP 141
        byte[] scriptHashOfSegwitScript = CryptoUtils.sha256hash160(segwitV0ScriptPubKey);
        Address gotAddress = LegacyAddress.fromScriptHash(MAINNET, scriptHashOfSegwitScript);
        assertEquals(expectedAddress, gotAddress);
    }

    @Test
    public void findRecoveryId() {
        ECKey key = ECKey.random();
        String message = "Hello World!";
        Sha256Hash hash = Sha256Hash.of(message.getBytes());
        ECKey.ECDSASignature sig = key.sign(hash);
        key = ECKey.fromPublicOnly(key);

        List<Byte> possibleRecIds = Lists.newArrayList((byte) 0, (byte) 1, (byte) 2, (byte) 3);
        byte recId = key.findRecoveryId(hash, sig);
        assertTrue(possibleRecIds.contains(recId));
    }

    @Test
    public void keyRecoveryTestVector() {
        // a test that exercises key recovery with findRecoveryId() on a test vector
        // test vector from https://crypto.stackexchange.com/a/41339
        ECKey key = ECKey.fromPrivate(
                new BigInteger("ebb2c082fd7727890a28ac82f6bdf97bad8de9f5d7c9028692de1a255cad3e0f", 16));
        String message = "Maarten Bodewes generated this test vector on 2016-11-08";
        Sha256Hash hash = Sha256Hash.of(message.getBytes());
        ECKey.ECDSASignature sig = key.sign(hash);
        key = ECKey.fromPublicOnly(key);

        byte recId = key.findRecoveryId(hash, sig);
        byte expectedRecId = 0;
        assertEquals(recId, expectedRecId);

        ECKey pubKey = ECKey.fromPublicOnly(key);
        ECKey recoveredKey = ECKey.recoverFromSignature(recId, sig, hash, true);
        assertEquals(recoveredKey, pubKey);
    }

    @Test
    public void keyRecoveryWithFindRecoveryId() {
        ECKey key = ECKey.random();
        String message = "Hello World!";
        Sha256Hash hash = Sha256Hash.of(message.getBytes());
        ECKey.ECDSASignature sig = key.sign(hash);

        byte recId = key.findRecoveryId(hash, sig);
        ECKey pubKey = ECKey.fromPublicOnly(key);
        ECKey recoveredKey = ECKey.recoverFromSignature(recId, sig, hash, true);
        assertEquals(recoveredKey, pubKey);
    }

    @Test
    public void keyRecovery() {
        ECKey key = ECKey.random();
        String message = "Hello World!";
        Sha256Hash hash = Sha256Hash.of(message.getBytes());


 {
    font-family: KaTeX_Caligraphic;
    src: url(https://static.shiyanlou.com/frontend/dist/fonts/7edb53b.woff2) format("woff2"), url(https://static.shiyanlou.com/frontend/dist/fonts/d3b46c3.woff) format("woff"), url(https://static.shiyanlou.com/frontend/dist/fonts/d49f2d5.ttf) format("truetype");
    font-weight: 400;
    font-style: normal
}

@font-face {
    font-family: KaTeX_Fraktur;
    src: url(https://static.shiyanlou.com/frontend/dist/fonts/d5b59ec.woff2) format("woff2"), url(https://static.shiyanlou.com/frontend/dist/fonts/c4c8cab.woff) format("woff"), url(https://static.shiyanlou.com/frontend/dist/fonts/a31e7cb.ttf) format("truetype");
    font-weight: 700;
    font-style: normal
}

@font-face {
    font-family: KaTeX_Fraktur;
    src: url(https://static.shiyanlou.com/frontend/dist/fonts/32a5339.woff2) format("woff2"), url(https://static.shiyanlou.com/frontend/dist/fonts/b7d9c46.woff) format("woff"), url(https://static.shiyanlou.com/frontend/dist/fonts/a48dad4.ttf) format("truetype");
    font-weight: 400;
    font-style: normal
}

@font-face {
    font-family: KaTeX_Main;
    src: url(https://static.shiyanlou.com/frontend/dist/fonts/8e1e01c.woff2) format("woff2"), url(https://static.shiyanlou.com/frontend/dist/fonts/22086eb.woff) format("woff"), url(https://static.shiyanlou.com/frontend/dist/fonts/9ceff51.ttf) format("truetype");
    font-weight: 700;
    font-style: normal
}

@font-face {
    font-family: KaTeX_Main;
    src: url(https://static.shiyanlou.com/frontend/dist/fonts/284a17f.woff2) format("woff2"), url(https://static.shiyanlou.com/frontend/dist/fonts/4c57dbc.woff) format("woff"), url(https://static.shiyanlou.com/frontend/dist/fonts/e8b44b9.ttf) format("truetype");
    font-weight: 700;
    font-style: italic
}

@font-face {
    font-family: KaTeX_Main;
    src: url(https://static.shiyanlou.com/frontend/dist/fonts/e533d5a.woff2) format("woff2"), url(https://static.shiyanlou.com/frontend/dist/fonts/99be0e1.woff) format("woff"), url(https://static.shiyanlou.com/frontend/dist/fonts/29c8639.ttf) format("truetype");
    font-weight: 400;
    font-style: italic
}

@font-face {
    font-family: KaTeX_Main;
    src: url(https://static.shiyanlou.com/frontend/dist/fonts/5c734d7.woff2) format("woff2"), url(https://static.shiyanlou.com/frontend/dist/fonts/b741441.woff) format("woff"), url(https://static.shiyanlou.com/frontend/dist/fonts/5c94aef.ttf) format("truetype");
    font-weight: 400;
    fon


7          	auipc	ra,0x0
			5c: R_RISCV_CALL	supplicantGenerateRand
			5c: R_RISCV_RELAX	*ABS*
  60:	000080e7          	jalr	ra # 5c <.LVL7+0x6>

00000064 <.LVL8>:
  64:	0048                	addi	a0,sp,4
  66:	00000097          	auipc	ra,0x0
			66: R_RISCV_CALL	strlen
			66: R_RISCV_RELAX	*ABS*
  6a:	000080e7          	jalr	ra # 66 <.LVL8+0x2>

0000006e <.LVL9>:
  6e:	86aa                	mv	a3,a0
  70:	02000893          	li	a7,32
  74:	01810813          	addi	a6,sp,24
  78:	02600793          	li	a5,38
  7c:	08b8                	addi	a4,sp,88
  7e:	0050                	addi	a2,sp,4
  80:	02000593          	li	a1,32
  84:	1828                	addi	a0,sp,56
  86:	00000097          	auipc	ra,0x0
			86: R_RISCV_CALL	Bl_PRF
			86: R_RISCV_RELAX	*ABS*
  8a:	000080e7          	jalr	ra # 86 <.LVL9+0x18>

0000008e <.LVL10>:
  8e:	4641                	li	a2,16
  90:	082c                	addi	a1,sp,24
  92:	8522                	mv	a0,s0
  94:	00000097          	auipc	ra,0x0
			94: R_RISCV_CALL	memcpy
			94: R_RISCV_RELAX	*ABS*
  98:	000080e7          	jalr	ra # 94 <.LVL10+0x6>

0000009c <.LVL11>:
  9c:	4621                	li	a2,8
  9e:	102c                	addi	a1,sp,40
  a0:	01840513          	addi	a0,s0,24
  a4:	00000097          	auipc	ra,0x0
			a4: R_RISCV_CALL	memcpy
			a4: R_RISCV_RELAX	*ABS*
  a8:	000080e7          	jalr	ra # a4 <.LVL11+0x8>

000000ac <.LVL12>:
  ac:	4621                	li	a2,8
  ae:	180c                	addi	a1,sp,48
  b0:	01040513          	addi	a0,s0,16
  b4:	00000097          	auipc	ra,0x0
			b4: R_RISCV_CALL	memcpy
			b4: R_RISCV_RELAX	*ABS*
  b8:	000080e7          	jalr	ra # b4 <.LVL12+0x8>

000000bc <.L1>:
  bc:	40ba                	lw	ra,140(sp)
  be:	442a                	lw	s0,136(sp)

000000c0 <.LVL14>:
  c0:	449a                	lw	s1,132(sp)

000000c2 <.LVL15>:
  c2:	490a                	lw	s2,128(sp)

000000c4 <.LVL16>:
  c4:	6149                	addi	sp,sp,144
  c6:	8082                	ret

Disassembly of


/pango"
	"github.com/diamondburned/gotkit/gtkutil/cssutil"
	"github.com/diamondburned/gotkit/gtkutil/textutil"
)

var _ = cssutil.WriteCSS(`
	.titlebar {
		min-height: {$header_height};
	}
`)

// Constants for dimensions.
const (
	HeaderHeight      = 42
	HeaderPadding     = 16
	GuildIconSize     = 48
	ChannelIconSize   = 32
	MessageAvatarSize = 42
	EmbedMaxWidth     = 350
	EmbedImgHeight    = 400
	InlineEmojiSize   = 22
	LargeEmojiSize    = 48
	StickerSize       = 92
	UserBarAvatarSize = 32
)

var EmojiAttrs = textutil.Attrs(
	pango.NewAttrSize(32 * pango.SCALE),
)

func init() {
	cssutil.AddCSSVariables(map[string]string{
		"header_height":        px(HeaderHeight),
		"header_padding":       px(HeaderPadding),
		"guild_icon_size":      px(GuildIconSize),
		"channel_icon_size":    px(ChannelIconSize),
		"message_avatar_size":  px(MessageAvatarSize),
		"inline_emoji_size":    px(InlineEmojiSize),
		"large_emoji_size":     px(LargeEmojiSize),
		"sticker_size":         px(StickerSize),
		"user_bar_avatar_size": px(UserBarAvatarSize),
	})
}

func px(num int) string {
	return fmt.Sprintf("%dpx", num)
}
package gtkcord

import (
	"reflect"
	"sync"

	"github.com/diamondburned/arikawa/v3/utils/handler"
	"github.com/diamondburned/gotk4/pkg/core/glib"
)

// MainThreadHandler wraps a [handler.Handler] to run all events on the main
// thread.
type MainThreadHandler struct {
	h *handler.Handler
}

// NewMainThreadHandler creates a new MainThreadHandler.
func NewMainThreadHandler(h *handler.Handler) *MainThreadHandler {
	m := &MainThreadHandler{
		h: handler.New(),
	}
	p := &sync.Pool{
		New: func() any { return make([]handler.Caller, 0, 10) },
	}
	h.AddSyncHandler(func(ev any) {
		callers := p.Get().([]handler.Caller)

		all := m.h.AllCallersForType(reflect.TypeOf(ev))
		all(func(c handler.Caller) bool {
			callers = append(callers, c)
			return true
		})

		if len(callers) == 0 {
			p.Put(callers)
			return
		}

		v := reflect.ValueOf(ev)
		glib.IdleAddPriority(glib.PriorityHighIdle, func() {
			for _, c := range callers {
				c.Call(v)
			}

			// Return the callers to the pool.
			for i := range callers {
				callers[i] = nil // avoid memory leaks
			}
			p.Put(callers[:0])
		})
	})
	return m
}

// AddHandler adds a handler to the handler.Handler.
// The given handler will be called on the main thread.
// The returned function will remove the handler.
func (m *MainThreadHandler) AddHandler(handler any) func() {
	return m.h.AddSyncHandler(handler)
}

// AddSyncHandler is the same as [AddHandler].
// It exists for compatibility.
func (m *MainThreadHandler) AddSyncHandler(handler any) func() {
	return m.AddHandler(handler)
}
package window

import (
	"fmt"
	"log/slog"
	"sync"

	"github.com/diamondburned/arikawa/v3/discord"
	"github.com/diamondburned/arikawa/v3/gateway"
	"github.com/diamondburned/arikawa/v