BREAKABLE_GLASS,
	["VEHICLE"] = COLLISION_GROUP_VEHICLE,
	["PLAYER_MOVEMENT"] = COLLISION_GROUP_PLAYER_MOVEMENT,
	["NPC"] = COLLISION_GROUP_NPC,
	["IN_VEHICLE"] = COLLISION_GROUP_IN_VEHICLE,
	["WEAPON"] = COLLISION_GROUP_WEAPON,
	["VEHICLE_CLIP"] = COLLISION_GROUP_VEHICLE_CLIP,
	["PROJECTILE"] = COLLISION_GROUP_PROJECTILE,
	["DOOR_BLOCKER"] = COLLISION_GROUP_DOOR_BLOCKER,
	["PASSABLE_DOOR"] = COLLISION_GROUP_PASSABLE_DOOR,
	["DISSOLVING"] = COLLISION_GROUP_DISSOLVING,
	["PUSHAWAY"] = COLLISION_GROUP_PUSHAWAY,
	["NPC_ACTOR"] = COLLISION_GROUP_NPC_ACTOR,
	["NPC_SCRIPTED"] = COLLISION_GROUP_NPC_SCRIPTED,
	["WORLD"] = COLLISION_GROUP_WORLD
}

--- ENUMs of solid for use with entity:getSolid
-- @name builtins_library.SOLID
-- @class table
-- @field NONE
-- @field BSP
-- @field BBOX
-- @field OBB
-- @field OBB_YAW
-- @field CUSTOM
-- @field VPHYSICS

env.SOLID = {
	["NONE"] = SOLID_NONE,
	["BSP"] = SOLID_BSP,
	["BBOX"] = SOLID_BBOX,
	["OBB"] = SOLID_OBB,
	["OBB_YAW"] = SOLID_OBB_YAW,
	["CUSTOM"] = SOLID_CUSTOM,
	["VPHYSICS"] = SOLID_VPHYSICS
}

--- ENUMs of solid flags for use with entity:getSolidFlags
-- @name builtins_library.FSOLID
-- @class table
-- @field CUSTOMRAYTEST
-- @field CUSTOMBOXTEST
-- @field NOT_SOLID
-- @field TRIGGER
-- @field NOT_STANDABLE
-- @field VOLUME_CONTENTS
-- @field FORCE_WORLD_ALIGNED
-- @field USE_TRIGGER_BOUNDS
-- @field ROOT_PARENT_ALIGNED
-- @field TRIGGER_TOUCH_DEBRIS
env.FSOLID = {
	["CUSTOMRAYTEST"] = FSOLID_CUSTOMRAYTEST,
	["CUSTOMBOXTEST"] = FSOLID_CUSTOMBOXTEST,
	["NOT_SOLID"] = FSOLID_NOT_SOLID,
	["TRIGGER"] = FSOLID_TRIGGER,
	["NOT_STANDABLE"] = FSOLID_NOT_STANDABLE,
	["VOLUME_CONTENTS"] = FSOLID_VOLUME_CONTENTS,
	["FORCE_WORLD_ALIGNED"] = FSOLID_FORCE_WORLD_ALIGNED,
	["USE_TRIGGER_BOUNDS"] = FSOLID_USE_TRIGGER_BOUNDS,
	["ROOT_PARENT_ALIGNED"] = FSOLID_ROOT_PARENT_ALIGNED,
	["TRIGGER_TOUCH_DEBRIS"] = FSOLID_TRIGGER_TOUCH_DEBRIS
}

--- ENUMs of mesh types. To be used with mesh.generate.
-- @name builtins_library.MATERIAL
-- @class table
-- @field LINES
-- @field LINE_LOOP
-- @field LINE_STRIP
-- @field POINTS
-- @field POLYGON
-- @field QUADS
-- @field TRIANGLES
-- @field TRIANGLE_STRIP
env.MATERIAL = {
	["POINTS"] = MATERIAL_POINTS or 0,
	["LINES"] = MATERIAL_LINES or 1,
	["TRIANGLES"] = MATERIAL_TRIANGLES or


flags,
                                            PARTITION_ITERATOR *part_iter);

#include "partition_info.h"

#ifdef WITH_PARTITION_STORAGE_ENGINE
uint fast_alter_partition_table(THD *thd, TABLE *table,
                                Alter_info *alter_info,
                                HA_CREATE_INFO *create_info,
                                TABLE_LIST *table_list,
                                char *db,
                                const char *table_name);
bool set_part_state(Alter_info *alter_info, partition_info *tab_part_info,
                    enum partition_state part_state);
uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info,
                           HA_CREATE_INFO *create_info,
                           Alter_table_ctx *alter_ctx,
                           bool *partition_changed,
                           bool *fast_alter_table);
char *generate_partition_syntax(partition_info *part_info,
                                uint *buf_length, bool use_sql_alloc,
                                bool show_partition_options,
                                HA_CREATE_INFO *create_info,
                                Alter_info *alter_info,
                                const char *current_comment_start);
bool verify_data_with_partition(TABLE *table, TABLE *part_table,
                                uint32 part_id);
bool compare_partition_options(HA_CREATE_INFO *table_create_info,
                               partition_element *part_elem);
bool partition_key_modified(TABLE *table, const MY_BITMAP *fields);
#else
#define partition_key_modified(X,Y) 0
#endif

void create_partition_name(char *out, const char *in1,
                           const char *in2, uint name_variant,
                           bool translate);
void create_subpartition_name(char *out, const char *in1,
                              const char *in2, const char *in3,
                              uint name_variant);

void set_field_ptr(Field **ptr, const uchar *new_buf, const uchar *old_buf);
void set_key_field_ptr(KEY *key_info, const uchar *new_buf,
                       const uchar *old_buf);

extern const LEX_STRING partition_keywords[];

#endif /* SQL_PARTITION_INCLUDED */


rgin-right: 225px;
}
/* Individual command cell */
.new-notebook.command {
  /* temporary style fix in react notebook, the class is used in selenium for selecting last cell
   * we should remove its style in the shelldemo.less once we don't need to support the old notebook
   */
  /**
   * Only show the minimize/maximize and copy buttons when command is locked.
   *
   * TODO(jeffpang): Get rid of these when we harmonize locking with ACLs
   */
  /**
   * Style for commands shown to a user with no Edit permissions.
   */
  /**
   * Style for commands shown to a user with no Run permissions.
   */
}
.new-notebook.command.mainCommand {
  clear: both;
  background-color: white;
  border-radius: 2px;
  transition: all .14s;
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding-left: 3px;
}
.new-notebook.command.mainCommand:hover {
  border: 1px solid #9b9b9b;
  padding-left: 3px;
  box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.12), 0px 2px 4px 0px rgba(0, 0, 0, 0.25);
}
.new-notebook.command.mainCommand .CodeMirror-code,
.new-notebook.command.mainCommand .CodeMirror.cm-s-eclipse-focus {
  background: transparent !important;
}
.new-notebook.command.mainCommand .command-text {
  margin: 6px 0 0;
  padding: 0;
  border-radius: 2px;
  background-color: rgba(0, 0, 0, 0.03);
}
.new-notebook.command.mainCommand .command-buttons {
  padding: 0px;
  margin-right: 10px;
  margin-top: 9px;
  border-radius: 2px;
}
.new-notebook.command.mainCommand .command-result {
  margin: 0 7px 7px 7px;
  padding: 0 6px;
}
.new-notebook.command.mainCommand .command-result .error-summary {
  padding-left: 16px;
}
.new-notebook.command.mainCommand .command-result .toggle-error-btn {
  cursor: pointer;
  color: rgba(0, 0, 0, 0.46);
  position: absolute;
}
.new-notebook.command.mainCommand .command-result .toggle-error-btn:hover {
  color: rgba(0, 0, 0, 0.62);
}
.new-notebook.command.mainCommand .notebook-command-title {
  margin: 0 80px 0 9px;
  display: block;
}
.new-notebook.command.mainCommand .notebook-command-title input {
  width: 100%;
  font-size: 27px;
  line-height: 33px;
  height: 33px;
  margin: 6px 0 0 0;
  border: none;
  box-shadow: none;
  word-spacing: normal;
  letter-spacing: normal;
  padding: 0;
  border-bottom: 1px solid transparent;
}
.new-notebook.command.mainCommand .notebook-command-title.editing input {
  border-bottom: 1px solid #DADADA;
}
.new-notebook.command .primaryPrompt {
  margin: 0 6px;
}
.new-notebook.command .widget {
  background: none;
}
.new-notebook.command .widget.widget-input .widget-content {
  padding-left: 10px;
}
.new-notebook.command.is-editing .command-text {
  box-shadow: inset 0px 0px 2px 0px rgba(0, 0, 0, 0.12), inset 0px -1px 2px 0px rgba(0, 0, 0, 0.12);


Packet[12] << 8));
            apsFrame.DestinationEndpoint = 0;
            apsFrame.SourceAddress = (ushort)(packet.Packet[4] | (packet.Packet[5] << 8));
            apsFrame.SourceEndpoint = 0;
            apsFrame.Profile = 0;

            apsFrame.Payload = packet.Packet.Slice(12,packet.Packet.Length-13);
            // apsFrame.Payload = packet.Packet.Skip(12).ToArray();
            // apsFrame.Payload = apsFrame.Payload.Take(apsFrame.Payload.Count() - 1).ToArray();

            return apsFrame;
        }
    }
}


t: Int) {
            value = anInt
        }

        protected constructor(`in`: Parcel) {
            value = `in`.readInt()
        }

        override fun equals(o: Any?): Boolean {
            if (this === o) return true
            if (o == null || javaClass != o.javaClass) return false

            val that = o as ParcelableImpl?

            return value == that!!.value
        }

        override fun hashCode(): Int {
            return value
        }

        override fun writeToParcel(dest: Parcel, flags: Int) {
            dest.writeInt(value)
        }

        override fun describeContents(): Int {
            return 0
        }

        companion object {

            val CREATOR: Parcelable.Creator<ParcelableImpl> = object : Parcelable.Creator<ParcelableImpl> {
                override fun createFromParcel(`in`: Parcel): ParcelableImpl {
                    return ParcelableImpl(`in`)
                }

                override fun newArray(size: Int): Array<ParcelableImpl?> {
                    return arrayOfNulls(size)
                }
            }
        }
    }

}package com.evernote.android.state.lint

import com.android.tools.lint.checks.infrastructure.LintDetectorTest
import com.android.utils.SdkUtils
import junit.framework.AssertionFailedError
import java.io.File
import java.io.InputStream

abstract class AbstractDetectorTest : LintDetectorTest() {
    override fun getTestResource(relativePath: String, expectExists: Boolean): InputStream {
        val path = "resources/test/java/$relativePath".replace('/', File.separatorChar)
        return File(testDataRootDir, path).inputStream()
    }

    private val testDataRootDir: File
        get() {
            val source = javaClass.protectionDomain.codeSource
            val location = source.location
            val classesDir = SdkUtils.urlToFile(location)
            return classesDir.parentFile.absoluteFile.parentFile.parentFile
        }

    protected fun getTestFile(file: String) = TestFile().from(file, this).to(file)!!

    override fun tearDown() {
        try {
            super.tearDown()
        } catch (e: AssertionFailedError) {
            // this is weird 🤷
            if (e.message != "There was a crash during lint execution; consult log for details") {
                throw e
            }
        }
    }
}
package io.github.evanrupert.excelkt

import org.apache.poi.xssf.usermodel.*
import java.io.FileOutputStream
import java.time.LocalDate
import java.time.LocalDateTime
import java.time.ZoneId
import java.util.*

@DslMarker
annotation class ExcelElementMarker

/**
 * Super class for all Excel elements
 * @property xssfWorkbook underlying apache poi workbook from which styles and fonts are created
 */
@ExcelElementMarker
abstract class ExcelElement {
    abstract val xssfWorkbook: XSSFWorkbook

    /**
     * Creates a new XSSFCellStyle from the options specified in the init block
     *
     * @param init block function where style attributes can be specified
     * @return newly created XSSFCellStyle
     */
    fun createCellStyle(init: XSSFCellStyle.() -> Unit = { }): XSSFCellStyle = xssfWorkbook.createCellStyle().apply(init)

    /**
     * Creates a new XSSFFont from the options specified in the init block
     *
     * @param init block function where font attributes can be specified
     * @return newly created XSSFFont
     */
    fun createFont(init: XSSFFont.() -> Unit = { }): XSSFFont = xssfWorkbook.create


": "dom-csspositiontrydescriptors-position-area", "dfnText": "position-area", "external": false, "refSections": [], "url": "#dom-csspositiontrydescriptors-position-area" },
                "dom-csspositiontrydescriptors-positionanchor": { "dfnID": "dom-csspositiontrydescriptors-positionanchor", "dfnText": "positionAnchor", "external": false, "refSections": [], "url": "#dom-csspositiontrydescriptors-positionanchor" },
                "dom-csspositiontrydescriptors-positionarea": { "dfnID": "dom-csspositiontrydescriptors-positionarea", "dfnText": "positionArea", "external": false, "refSections": [], "url": "#dom-csspositiontrydescriptors-positionarea" },
                "dom-csspositiontrydescriptors-right": { "dfnID": "dom-csspositiontrydescriptors-right", "dfnText": "right", "external": false, "refSections": [], "url": "#dom-csspositiontrydescriptors-right" },
                "dom-csspositiontrydescriptors-top": { "dfnID": "dom-csspositiontrydescriptors-top", "dfnText": "top", "external": false, "refSections": [], "url": "#dom-csspositiontrydescriptors-top" },
                "dom-csspositiontrydescriptors-width": { "dfnID": "dom-csspositiontrydescriptors-width", "dfnText": "width", "external": false, "refSections": [], "url": "#dom-csspositiontrydescriptors-width" },
                "dom-csspositiontryrule-name": { "dfnID": "dom-csspositiontryrule-name", "dfnText": "name", "external": false, "refSections": [{ "refs": [{ "id": "ref-for-dom-csspositiontryrule-name" }], "title": "8.1. The CSSPositionTryRule interface" }], "url": "#dom-csspositiontryrule-name" },
                "dom-csspositiontryrule-style": { "dfnID": "dom-csspositiontryrule-style", "dfnText": "style", "external": false, "refSections": [{ "refs": [{ "id": "ref-for-dom-csspositiontryrule-style" }], "title": "8.1. The CSSPositionTryRule interface" }], "url": "#dom-csspositiontryrule-style" },
                "e112902f": { "dfnID": "e112902f", "dfnText": "end", "external": true, "refSections": [{ "refs": [{ "id": "ref-for-end" }, { "id": "ref-for-end\u2460" }, { "id": "ref-for-end\u2461" }], "title": "3.1.1. \nResolving the Position Area Grid" }, { "refs": [{ "id": "ref-for-end\u2462" }], "title": "6.1. Giving Fallback Options: the position-try-fallbacks property" }], "url": "https://www.w3.org/TR/css-writing-modes-4/#end" },
                "e1f6e4b9": { "dfnID": "e1f6e4b9", "dfnText": "physical", "external": true, "refSections": [{ "refs": [{ "id": "ref-for-physical" }], "title": "3.1.2. \nSyntax of <position-area> Values" }], "url": "https://www.w3.org/TR/css-writing-modes-4/#physical" },
                "e308a45f": { "dfnID": "e308a45f", "dfnText": "user origin", "external": true, "refSections": [{ "refs": [{ "id": "ref-for-cascade-or


        )
        bookList.add(book3)

        val book4 = Book(
            R.drawable.img4,
            "Stephan Hitchins",
            "Transforming your ideas into a Action",
            "How to thinking creatively, the design thinking process."
        )
        bookList.add(book4)

        val book5 = Book(
            R.drawable.img5,
            "Nathan Metzeler",
            "Kotlin Programming for beginners",
            "The Kotlin programming language."
        )
        bookList.add(book5)

        val book6 = Book(
            R.drawable.img6,
            "Ken Kousen",
            "Kotlin cookbook",
            "A problem focused approach."
        )
        bookList.add(book6)

        val book7 = Book(
            R.drawable.img7,
            "Richard Osman",
            "The last devil to die",
            "The new thursday murder club mystery "
        )
        bookList.add(book7)

        val book8 = Book(
            R.drawable.img8,
            "Oprah Winfrey",
            "Success History",
            "Biography."
        )
        bookList.add(book8)

        val book9 = Book(
            R.drawable.img9,
            "Barak Obama",
            "A promised land",
            "Biography."
        )
        bookList.add(book9)

        bookList.add(book1)
        bookList.add(book2)
        bookList.add(book3)
        bookList.add(book4)
        bookList.add(book5)
        bookList.add(book6)
        bookList.add(book7)
        bookList.add(book8)
        bookList.add(book9)
    }

        //Create the function on lick
        override fun OnClick(book: Book) {
            val intent = Intent(applicationContext, DetailActivity::class.java)
            //pass the variable from interface
            intent.putExtra(BOOK_ID_XTRA,book.id)
            startActivity(intent)

        }
    }package com.mathgeniusguide.nineballscorekeeper.enums

enum class ShotCondition {
    BREAK,
    BALL_IN_HAND,
    DEFENSE,
    ECLIPSE,
    INTENTIONAL_ECLIPSE,
    SELF_ECLIPSE,
    NORMAL
}package com.mathgeniusguide.nineballscorekeeper.enums

enum class BallStatus {
    ON_TABLE,
    PLAYER1,
    PLAYER2,
    SCORED_THIS_TURN,
    DEAD;
}package com.mathgeniusguide.nineballscorekeeper.adapters

import android.content.Context
import android.view.Gravity
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import androidx.appcompat.app.AlertDialog
import androidx.recyclerview.widget.RecyclerView
import com.mathgeniusguide.nineballscorekeeper.MainActivity
import com.mathgeniusguide.nineballscorekeeper.R
import com.mathgeniusguide.nineballscorekeeper.databinding.ChartItemBinding
import com.mathgeniusguide.nineballscorekeeper.databinding.EditShotAlertBinding
import com.mathgeniusguide.nineballscorekeeper.enums.PlayerTurn
import com.mathgeniusguide.nineballscorekeeper.objects.ChartShot
import com.mathgeniusguide.nineballscorekeeper.util.addEmptyShotAt
import com.mathgeniusguide.nineballscorekeeper.util.cleanGameString
import com.mathgeniusguide.nineballscorekeeper.util.getChartShotTitle
import com.mathgeniusguide.nineballscorekeeper.util.isClean

class ChartAdapter (private val items: List<ChartShot>, private val context: Context, private val mainActivity: MainActivity) : RecyclerView.Adapter<ChartAdapter.ViewHolder> () {
    override fun getItemCount(): Int {
        return items.size
    }

    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int):


Log.e("app", "openFileChooser");
			Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
			intent.setType("*/*");
			intent.addCategory(Intent.CATEGORY_OPENABLE);
			try
			{
				((Activity) (X5WebView.this.getContext())).startActivityForResult(Intent.createChooser(intent, "choose files"),
						1);
			}
			catch (android.content.ActivityNotFoundException ex)
			{

			}

			super.openFileChooser(uploadFile, acceptType, captureType);
		}
		/**
		 * webview 的窗口转移
		 */
		@Override
		public boolean onCreateWindow(WebView arg0, boolean arg1, boolean arg2, Message msg) {
			// TODO Auto-generated method stub
			if (X5WebView.isSmallWebViewDisplayed == true) {

				WebViewTransport webViewTransport = (WebViewTransport) msg.obj;
				WebView webView = new WebView(X5WebView.this.getContext()) {

					protected void onDraw(Canvas canvas) {
						super.onDraw(canvas);
						Paint paint = new Paint();
						paint.setColor(Color.GREEN);
						paint.setTextSize(15);
						canvas.drawText("新建窗口", 10, 10, paint);
					};
				};
				webView.setWebViewClient(new WebViewClient() {
					public boolean shouldOverrideUrlLoading(WebView arg0, String arg1) {
						arg0.loadUrl(arg1);
						return true;
					};
				});
				LayoutParams lp = new LayoutParams(400, 600);
				lp.gravity = Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL;
				X5WebView.this.addView(webView, lp);
				webViewTransport.setWebView(webView);
				msg.sendToTarget();
			}
			return true;
		}

		@Override
		public boolean onJsAlert(WebView arg0, String arg1, String arg2, JsResult arg3) {
			/**
			 * 这里写入你自定义的window alert
			 */
			// AlertDialog.Builder builder = new Builder(getContext());
			// builder.setTitle("X5内核");
			// builder.setPositiveButton("确定", new
			// DialogInterface.OnClickListener() {
			//
			// @Override
			// public void onClick(DialogInterface dialog, int which) {
			// // TODO Auto-generated method stub
			// dialog.dismiss();
			// }
			// });
			// builder.show();
			// arg3.confirm();
			// return true;
			Log.i("yuanhaizhou", "setX5webview = null");
			return super.onJsAlert(null, "www.baidu.com", "aa", arg3);
		}

		/**
		 * 对应js 的通知弹框 ，可以用来实现js 和 android之间的通信
		 */
		@Override
		public boolean onJsPrompt(WebView arg0, String arg1, String arg2, String arg3, JsPromptResult arg4) {
			// 在这里可以判定js传过来的数据，用于调起android native 方法
			if (X5WebView.this.isMsgPrompt(arg1)) {
				if (X5WebView.this.onJsPrompt(arg2, arg3)) {
					return true;
				} else {
					return false;
				}
			}
			return super.onJsPrompt(arg0, arg1, arg2, arg3, arg4);
		}

		@Override
		public void onReceivedTitle(WebView arg0, final String arg1) {
			super.onReceivedTitle(arg0, arg1);
			Log.i("yuanhaizhou", "webpage title is " + arg1);

		}
	};

	@SuppressLint("SetJavaScriptEnabled")
	public X5WebView(Context arg0, AttributeSet arg1) {
		super(arg0, arg1);
		this.setWebViewClientExtension(new X5WebViewEventHandler(this));// 配置X5webview的事件处理
		this.setWebViewClient(client


     for (int i = 6; i > 0; i--)
            {
                for (int j = 0; j < i; j++)
                {
                    Console.Write("* ");
                }
                Console.WriteLine();
            }
        }
    }
}


     * export const subscribeWebhookChannel = async() => {
     *  let res

     *  await TwitchClient.post('/webhooks/hub', {
     *      "hub.callback": 'https://www.example.com',
     *      "hub.mode": "subscribe",
     *      "hub.topic": `https://api.twitch.tv/helix/streams?user_id=7777777`,
            "hub.lease_seconds": 90000
     *  })
     *  .then((response: any) => {
     *      res = response.status
     *  })
     *  .catch(function (error: any) {
     *      if (error.response) {
     *          res = error.response.status
     *      }
     *  });
     *  return res;
     *  }
     * @memberof TwitchClient
     */
    post(path: string, data: any) {
        return this.instance.post(path, data);
    }
}

/**
 * Revoke access token of the Twitch API
 */
export const revokeAccessToken = async() => {
    let res

    await axios({
        url: 'https://id.twitch.tv/oauth2/revoke',
        method: 'post',
        params: {
            client_id: TWITCH_CLIENT_ID,
            token: access_token
        }
    })
    .then((response: any) => {
        res = response.status
    })
    .catch(function (error: any) {
        if (error.response) {
            res = error.response.status
        }
    });

    if (res == 200) {
        console.log('Twitch access token revoked securely')
    } else {
        console.log('Couldn\'t revoke the Twitch access token, or it\'s invalid')
    }
}

//OAuth
/*const {
    TWITCH_OAUTH_TOKEN
} = process.env

let client_id: string

const Twitch = {
    getClientId() {
        if (client_id) {
            //Access token does expire meaning it should also verify it does and if it does, generate a new access token
            return client_id;
        } else {
            axios({
                url: 'https://id.twitch.tv/oauth2/validate',
                method: 'get',
                headers: {
                    Authorization: `OAuth ${TWITCH_OAUTH_TOKEN}`
                }
            }).then(function(response) {
                client_id = response.data.client_id
                console.log(client_id)
            })//.catch(function(error) {});
        }
    }
}

const config = {
    baseURL: 'https://api.twitch.tv/helix',
    headers: {
                'Accept': 'application/vnd.twitchtv.v5+json'
            },
}

class TwitchClient {
    access_token = Twitch.getClientId();
    //console.log(access_token)
    instance: any

    constructor() {
        this.instance = axios.create(config)

        this.instance.interceptors.request.use((config: { headers: { 'Client-Id': string; Authorization: string; }; }) => {
            config.headers[`Client-Id`] = client_id;
            config.headers.Authorization = `Bearer ${TWITCH_OAUTH_TOKEN}`;
            //console.log(config)

            return config
        })

        this.instance.interceptors.request.use(AxiosLogger.requestLogger)

        this.instance.interceptors.response.use(AxiosLogger.responseLogger)
    }

    get(path:any) {
        return this.instance.get(path);
    }

    post(path:any, json: any) {
        return this.instance.post(path, json);
    }
}
*/
export default new TwitchClient// Which HTML element is the target of the event
function mouseTarget(e: any) {
	var targ;
	if (e.target) targ = e.target;
	else if (e.srcElement) targ = e


 &TaskWatchHandler{
		alive: true,
		mChan: make(chan rbody.StreamedTaskEvent),
	}
	tc, err1 := s.taskManager.WatchTask(id, tw)
	if err1 != nil {
		if strings.Contains(err1.Error(), ErrTaskNotFound.Error()) {
			rbody.Write(404, rbody.FromError(err1), w)
			return
		}
		rbody.Write(500, rbody.FromError(err1), w)
		return
	}

	// Make this Server Sent Events compatible
	w.Header().Set("Content-Type", "text/event-stream")
	w.Header().Set("Cache-Control", "no-cache")
	w.Header().Set("Connection", "keep-alive")
	w.Header().Set("Access-Control-Allow-Origin", "*")

	// get a flusher type
	flusher, ok := w.(http.Flusher)
	if !ok {
		// This only works on ResponseWriters that support streaming
		rbody.Write(500, rbody.FromError(ErrStreamingUnsupported), w)
		return
	}
	// send initial stream open event
	so := rbody.StreamedTaskEvent{
		EventType: rbody.TaskWatchStreamOpen,
		Message:   "Stream opened",
	}
	fmt.Fprintf(w, "data: %s\n\n", so.ToJSON())
	flusher.Flush()

	// Get a channel for if the client notifies us it is closing the connection
	n := w.(http.CloseNotifier).CloseNotify()
	t := time.Now()
	for {
		// Write to the ResponseWriter
		select {
		case e := <-tw.mChan:
			logger.WithFields(log.Fields{
				"task-id":            id,
				"task-watcher-event": e.EventType,
			}).Debug("new event")
			switch e.EventType {
			case rbody.TaskWatchMetricEvent, rbody.TaskWatchTaskStarted:
				// The client can decide to stop receiving on the stream on Task Stopped.
				// We write the event to the buffer
				fmt.Fprintf(w, "data: %s\n\n", e.ToJSON())
			case rbody.TaskWatchTaskDisabled, rbody.TaskWatchTaskStopped, rbody.TaskWatchTaskEnded:
				// A disabled task should end the streaming and close the connection
				fmt.Fprintf(w, "data: %s\n\n", e.ToJSON())
				// Flush since we are sending nothing new
				flusher.Flush()
				// Close out watcher removing it from the scheduler
				tc.Close()
				// exit since this client is no longer listening
				rbody.Write(200, &rbody.ScheduledTaskWatchingEnded{}, w)
			}
			// If we are at least above our minimum buffer time we flush to send
			if time.Now().Sub(t).Seconds() > StreamingBufferWindow {
				flusher.Flush()
				t = time.Now()
			}
		case <-n:
			logger.WithFields(log.Fields{
				"task-id": id,
			}).Debug("client disconnecting")
			// Flush since we are sending nothing new
			flusher.Flush()
			// Close out watcher removing it from the scheduler
			tc.Close()
			// exit since this client is no longer listening
			rbody.Write(200, &rbody.ScheduledTaskWatchingEnded{}, w)
			return
		case <-s.killChan:
			logger.WithFields(log.Fields{
				"task-id": id,
			}).Debug("snapteld exiting; disconnecting client")
			// Flush since we are sending nothing new
			flusher.Flush()
			// Close out watcher removing i


#pragma once
#define GPS_MAX_SATELLITES_IN_USE (12)
#define GPS_MAX_SATELLITES_IN_VIEW (16)

/**
 * @brief GPS fix type
 *
 */
typedef enum
{
  GPS_FIX_INVALID, /*!< Not fixed */
  GPS_FIX_GPS,     /*!< GPS */
  GPS_FIX_DGPS,    /*!< Differential GPS */
} gps_fix_t;

/**
 * @brief GPS fix mode
 *
 */
typedef enum
{
  GPS_MODE_INVALID = 1, /*!< Not fixed */
  GPS_MODE_2D,          /*!< 2D GPS */
  GPS_MODE_3D           /*!< 3D GPS */
} gps_fix_mode_t;

/**
 * @brief GPS satellite information
 *
 */
typedef struct
{
  uint8_t num;       /*!< Satellite number */
  uint8_t elevation; /*!< Satellite elevation */
  uint16_t azimuth;  /*!< Satellite azimuth */
  uint8_t snr;       /*!< Satellite signal noise ratio */
} gps_satellite_t;

/**
 * @brief GPS time
 *
 */
typedef struct
{
  uint8_t hour;      /*!< Hour */
  uint8_t minute;    /*!< Minute */
  uint8_t second;    /*!< Second */
  uint16_t thousand; /*!< Thousand */
} gps_time_t;

/**
 * @brief GPS date
 *
 */
typedef struct
{
  uint8_t day;   /*!< Day (start from 1) */
  uint8_t month; /*!< Month (start from 1) */
  uint16_t year; /*!< Year (start from 2000) */
} gps_date_t;

/**
 * @brief GPS object
 *
 */
typedef struct
{
  float latitude;                                                /*!< Latitude (degrees) */
  float longitude;                                               /*!< Longitude (degrees) */
  float altitude;                                                /*!< Altitude (meters) */
  gps_fix_t fix;                                                 /*!< Fix status */
  uint8_t sats_in_use;                                           /*!< Number of satellites in use */
  gps_time_t tim;                                                /*!< time in UTC */
  gps_fix_mode_t fix_mode;                                       /*!< Fix mode */
  uint8_t sats_id_in_use[GPS_MAX_SATELLITES_IN_USE];             /*!< ID list of satellite in use */
  float dop_h;                                                   /*!< Horizontal dilution of precision */
  float dop_p;                                                   /*!< Position dilution of precision  */
  float dop_v;                                                   /*!< Vertical dilution of precision  */
  uint8_t sats_in_view;                                          /*!< Number of satellites in view */
  gps_satellite_t sats_desc_in_view[GPS_MAX_SATELLITES_IN_VIEW]; /*!< Information of satellites in view */
  gps_date_t date;                                               /*!< Fix date */
  bool valid;                                                    /*!< GPS validity */
  float speed;                                                   /*!< Ground speed, unit: m/s */
  float cog;                                                     /*!< Course over ground */
  float variation;                                               /*!< Magnetic variation */
} gps_t;


/*
 * Copyright (C) 2010 IBM Corporation
 *
 * Authors:
 * Mimi Zohar <zohar@us.ibm.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 2 of the License.
 *
 * File: evm_secfs.c
 *	- Used to signal when key is on keyring
 *	- Get the key and enable EVM
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/uaccess.h>
#include <linux/module.h>
#include "evm.h"

static struct dentry *evm_init_tpm;

/**
 * evm_read_key - read() for <securityfs>/evm
 *
 * @filp: file pointer, not actually used
 * @buf: where to put the result
 * @count: maximum to send along
 * @ppos: where to start
 *
 * Returns number of bytes read or error code, as appropriate
 */
static ssize_t evm_read_key(struct file *filp, char __user *buf,
			    size_t count, loff_t *ppos)
{
	char temp[80];
	ssize_t rc;

	if (*ppos != 0)
		return 0;

	sprintf(temp, "%d", evm_initialized);
	rc = simple_read_from_buffer(buf, count, ppos, temp, strlen(temp));

	return rc;
}

/**
 * evm_write_key - write() for <securityfs>/evm
 * @file: file pointer, not actually used
 * @buf: where to get the data from
 * @count: bytes sent
 * @ppos: where to start
 *
 * Used to signal that key is on the kernel key ring.
 * - get the integrity hmac key from the kernel key ring
 * - create list of hmac protected extended attributes
 * Returns number of bytes written or error code, as appropriate
 */
static ssize_t evm_write_key(struct file *file, const char __user *buf,
			     size_t count, loff_t *ppos)
{
	char temp[80];
	int i, error;

	if (!capable(CAP_SYS_ADMIN) || evm_initialized)
		return -EPERM;

	if (count >= sizeof(temp) || count == 0)
		return -EINVAL;

	if (copy_from_user(temp, buf, count) != 0)
		return -EFAULT;

	temp[count] = '\0';

	if ((sscanf(temp, "%d", &i) != 1) || (i != 1))
		return -EINVAL;

	error = evm_init_key();
	if (!error) {
		evm_initialized = 1;
		pr_info("initialized\n");
	} else
		pr_err("initialization failed\n");
	return count;
}

static const struct file_operations evm_key_ops = {
	.read		= evm_read_key,
	.write		= evm_write_key,
};

int __init evm_init_secfs(void)
{
	int error = 0;

	evm_init_tpm = securityfs_create_file("evm", S_IRUSR | S_IRGRP,
					      NULL, NULL, &evm_key_ops);
	if (!evm_init_tpm || IS_ERR(evm_init_tpm))
		error = -EFAULT;
	return error;
}


 responderUri directly - THIS IS THE FIX!
      ]
    });

print('body for creating assignment is  : $body');
    try {
      final response = await http.post(url, headers: headers, body: body);

      print("Response Status: ${response.statusCode}");
      print("Response Body: ${response.body}");

      if (response.statusCode == 200) {
        final data = jsonDecode(response.body);
        final assignmentId = data['id'];
        print('Assignment created successfully with ID: $assignmentId');
        return assignmentId;
      } else {

        print('Assignment creation failed inside createAssignment method : ${response.statusCode}');
         print(response.body);
        return null;
      }
    } catch (e) {
      print('Error creating assignment: $e');
      return null;
    }
  }

  Future<String?> getTopicIdByCreating(String courseId, String title) async {
  final log = Logger('GoogleClassroomApi creating Topics');
  log.info('Calling createTopic from Google Classroom.');

  // Obtain the OAuth2 token
    final token = await _getToken();
  if (token == null) {
    print('Failed to obtain token.');
    return null;
  }

  final url = Uri.parse('https://classroom.googleapis.com/v1/courses/$courseId/topics');
  final headers = {
    'Authorization': 'Bearer $token',
    'Content-Type': 'application/json',
  };
  final body = jsonEncode({
    "name": title,
  });

  try {
    // Make the POST request to create the topic
    final response = await http.post(url, headers: headers, body: body);

    if (response.statusCode == 200) {
      // Parse the response and extract the topicId
      final data = jsonDecode(response.body);
      return data['topicId'];
    } else {
      print('Failed to create topic. Status code: ${response.statusCode}, Response: ${response.body}');
    }
  } catch (e) {
    print('Error creating topic: $e');
  }

  return null;
}
Future<String?> getTopicId(String courseId, String title) async {
  final log = Logger('GoogleClassroomApi getting TopicId');
  log.info('Calling listTopics from Google Classroom.');

  final token = await _getToken();
  if (token == null) {
    print('Failed to obtain token.');
    return null;
  }

  final url = Uri.parse('https://classroom.googleapis.com/v1/courses/$courseId/topics');
  final headers = {
    'Authorization': 'Bearer $token',
    'Accept': 'application/json',
  };

  try {
    final response = await http.get(url, headers: headers);

    if (response.statusCode == 200) {
      final data = jsonDecode(response.body);
      final topics = data['topic'] as List<dynamic>;

      for (var topic in topics) {
        if (topic['name'] == title) {
          return topic['topicId'];
        }
      }

      log.warning('Topic with name "$title" not found. So i need to create a new topic');
      return getTopicIdByCreating(courseId, title);
    } else {
      print('Failed to list topics. Status code: ${response.statusCode}, Response: ${response.body}');
    }
  } catch (e) {
    print('Error listing topics: $e');
  }

  return null;
}
/*
 Future<void> createCourseWorkMaterial(String courseId, String accessToken, String title, ) async {
      final url = Uri.parse('https://classroom.googleapis.com/v1/courses/$courseId/courseWorkMaterials');

      final headers = {
        'Authorization': 'Bearer $accessToken',
        'Content-Type': 'application/json',
      };

      final body = jsonEncode({
        "title": "My New Course Material",
        "description": "This is a description of the material.",
        "materials": [
          {
            "link": {


els(): Int {
        return 420
    }

    fun defaultRelativePadding(): Float {
        return 0.05F
    }

    // [background, foreground]
    fun getQrColors(dynamic: Boolean): Pair<Int, Int> {
        var darkModule: Int
        var lightBg: Int

        if (dynamic) {
            val themedContext = ContextThemeWrapper(context, R.style.AppTheme)
            lightBg = MaterialColors.getColor(
                themedContext,
                com.google.android.material.R.attr.colorSurface,
                Color.WHITE
            )
            darkModule = MaterialColors.getColor(
                themedContext,
                com.google.android.material.R.attr.colorOnSurfaceVariant,
                Color.BLACK
            )

            // swap
            if (lightBg.isDark()) {
                lightBg = darkModule.also { darkModule = lightBg }
            }

            val darkModuleVariant = MaterialColors.getColor(
                themedContext,
                com.google.android.material.R.attr.colorOnSurface,
                Color.BLACK
            )

            darkModule = maxOf(
                darkModule,
                darkModuleVariant,
                Comparator.comparingDouble { value -> value.darkness() })
        } else {
            darkModule = Color.BLACK
            lightBg = Color.WHITE
        }

        return lightBg to darkModule
    }

    fun Int.isDark(): Boolean {
        return darkness() >= 0.5
    }

    fun Int.darkness(): Double {
        return 1 - (0.299 * Color.red(this) + 0.587 * Color.green(this) + 0.114 * Color.blue(this)) / 255
    }
}package me.alllexey123.itmowidgets.ui.widgets.data

import me.alllexey123.itmowidgets.R

sealed class LessonListWidgetEntry {
    abstract val layoutId: Int

    object Error : LessonListWidgetEntry() {
        override val layoutId: Int = R.layout.item_lesson_list_error
    }
    object FullDayEmpty : LessonListWidgetEntry() {
        override val layoutId: Int = R.layout.item_lesson_list_empty
    }
    object NoMoreLessons : LessonListWidgetEntry() {
        override val layoutId: Int = R.layout.item_lesson_list_no_more
    }
    object LessonListEnd : LessonListWidgetEntry() {
        override val layoutId: Int = R.layout.item_lesson_list_end
    }
    object Updating : LessonListWidgetEntry() {
        override val layoutId: Int = R.layout.item_lesson_list_updating
    }

    // null to hide
    data class LessonData(
        val subject: String = "",
        val times: String? = null,
        val teacher: String? = null,
        val workTypeId: Int = 0,
        val room: String? = null,
        val building: String? = null,
        override val layoutId: Int,
    ) : LessonListWidgetEntry()
}package com.bank.transfers.app.usecase

import com.bank.transfers.app.domain.Account
import com.bank.transfers.app.domain.AccountId
import com.bank.transfers.app.domain.CustomerId
import com.bank.transfers.app.domain.Transaction
import com.bank.transfers.app.domain.Transfer
import com.bank.transfers.app.port.driven.AccountFinder
import com.bank.transfers.app.port.driven.Transactor
import com.bank.transfers.app.port.driven.TransactorResult
import com.bank.transfers.app.port.driver.TransferMoneyRequest
import com.bank.transfers.app.port.driver.TransferMoneyResponse
import io.mockk.every
import io.mockk.mockk
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
import java.math.BigDecimal
import java.util.UUID

class TransferMoneyUseCaseTest {

    private val transactor = mockk<Transactor>()

    private val accountFinder = mockk<AccountFinder>()

    private val creat


et: offset into the adapter data from which to start scanning, returns
 *          the last scanned position.
 * @size: number of bytes to scan from offset
 *
 * Scan for pattern @pattern with applied mask @mask in the adapter data,
 * starting from offset @offset.
 *
 * The bytes in @pattern and @mask are interpreted left-to-right, regardless
 * of endianness.  All four bytes of the pattern must be present in the
 * adapter for it to match, even if the first or last bytes are masked out.
 *
 * It is an error to call this function without making sure that there is
 * enough data (offset+size bytes) in the adapter.
 *
 * This function calls gst_adapter_masked_scan_uint32_peek() passing %NULL
 * for value.
 *
 * Returns: offset of the first match, or -1 if no match was found.
 *
 * Example:
 * |[
 * // Assume the adapter contains 0x00 0x01 0x02 ... 0xfe 0xff
 *
 * gst_adapter_masked_scan_uint32 (adapter, 0xffffffff, 0x00010203, 0, 256);
 * // -> returns 0
 * gst_adapter_masked_scan_uint32 (adapter, 0xffffffff, 0x00010203, 1, 255);
 * // -> returns -1
 * gst_adapter_masked_scan_uint32 (adapter, 0xffffffff, 0x01020304, 1, 255);
 * // -> returns 1
 * gst_adapter_masked_scan_uint32 (adapter, 0xffff, 0x0001, 0, 256);
 * // -> returns -1
 * gst_adapter_masked_scan_uint32 (adapter, 0xffff, 0x0203, 0, 256);
 * // -> returns 0
 * gst_adapter_masked_scan_uint32 (adapter, 0xffff0000, 0x02030000, 0, 256);
 * // -> returns 2
 * gst_adapter_masked_scan_uint32 (adapter, 0xffff0000, 0x02030000, 0, 4);
 * // -> returns -1
 * ]|
 */
gssize
gst_adapter_masked_scan_uint32 (GstAdapter * adapter, guint32 mask,
    guint32 pattern, gsize offset, gsize size)
{
  return gst_adapter_masked_scan_uint32_peek (adapter, mask, pattern, offset,
      size, NULL);
}


付所需参数
	Status     field.Int32  // 1 正常 0异常
	CreateTime field.Time
	UpdateTime field.Time
	IsDelete   field.Int32

	fieldMap map[string]field.Expr
}

func (p payment) Table(newTableName string) *payment {
	p.paymentDo.UseTable(newTableName)
	return p.updateTableName(newTableName)
}

func (p payment) As(alias string) *payment {
	p.paymentDo.DO = *(p.paymentDo.As(alias).(*gen.DO))
	return p.updateTableName(alias)
}

func (p *payment) updateTableName(table string) *payment {
	p.ALL = field.NewAsterisk(table)
	p.ID = field.NewInt64(table, "id")
	p.Name = field.NewString(table, "name")
	p.Channel = field.NewString(table, "channel")
	p.Types = field.NewString(table, "types")
	p.Params = field.NewString(table, "params")
	p.Status = field.NewInt32(table, "status")
	p.CreateTime = field.NewTime(table, "create_time")
	p.UpdateTime = field.NewTime(table, "update_time")
	p.IsDelete = field.NewInt32(table, "is_delete")

	p.fillFieldMap()

	return p
}

func (p *payment) GetFieldByName(fieldName string) (field.OrderExpr, bool) {
	_f, ok := p.fieldMap[fieldName]
	if !ok || _f == nil {
		return nil, false
	}
	_oe, ok := _f.(field.OrderExpr)
	return _oe, ok
}

func (p *payment) fillFieldMap() {
	p.fieldMap = make(map[string]field.Expr, 9)
	p.fieldMap["id"] = p.ID
	p.fieldMap["name"] = p.Name
	p.fieldMap["channel"] = p.Channel
	p.fieldMap["types"] = p.Types
	p.fieldMap["params"] = p.Params
	p.fieldMap["status"] = p.Status
	p.fieldMap["create_time"] = p.CreateTime
	p.fieldMap["update_time"] = p.UpdateTime
	p.fieldMap["is_delete"] = p.IsDelete
}

func (p payment) clone(db *gorm.DB) payment {
	p.paymentDo.ReplaceConnPool(db.Statement.ConnPool)
	return p
}

func (p payment) replaceDB(db *gorm.DB) payment {
	p.paymentDo.ReplaceDB(db)
	return p
}

type paymentDo struct{ gen.DO }

type IPaymentDo interface {
	gen.SubQuery
	Debug() IPaymentDo
	WithContext(ctx context.Context) IPaymentDo
	WithResult(fc func(tx gen.Dao)) gen.ResultInfo
	ReplaceDB(db *gorm.DB)
	ReadDB() IPaymentDo
	WriteDB() IPaymentDo
	As(alias string) gen.Dao
	Session(config *gorm.Session) IPaymentDo
	Columns(cols ...field.Expr) gen.Columns
	Clauses(conds ...clause.Expression) IPaymentDo
	Not(conds ...gen.Condition) IPaymentDo
	Or(conds ...gen.Condition) IPaymentDo
	Select(conds ...field.Expr) IPaymentDo
	Where(conds ...gen.Condition) IPaymentDo
	Order(conds ...field.Expr) IPaymentDo
	Distinct(cols ...field.Expr) IPaymentDo
	Omit(cols ...field.Expr) IPaymentDo
	Join(table schema.Tabler, on ...field.Expr) IPaymentDo
	LeftJoin(table schema.Tabler, on ...field.Expr) IPaymentDo
	RightJoin(table schema.Tabler, on ...field.Expr) IPaymentDo
	Group(cols ...field.Expr) IPaymentDo
	Having(conds ...gen.Condition) IPaymentDo
	Limit(limit int) IPaymentDo
	Offset(offset int) IPaymentDo
	Count() (count int64, err error)
	Scopes(funcs ...func(gen.


) {
					DataDirEntry entry = new DataDirEntry(specs[description],
							address, size, tableEntryOffset, isLowAlignmentMode());
					dataDirectory.put(entry.getKey(), entry);
				}
			}
			counter++;
		}
	}

	private void loadWindowsSpecificFields() throws IOException {
		int offsetLoc;
		int lengthLoc;
		final int description = 1;

		if (magicNumber == MagicNumber.PE32) {
			offsetLoc = 2;
			lengthLoc = 4;
		} else if (magicNumber == MagicNumber.PE32_PLUS) {
			offsetLoc = 3;
			lengthLoc = 5;
		} else {
			windowsFields = IOUtil.initFullEnumMap(WindowsEntryKey.class);
			return; // no fields
		}
		IOUtil.SpecificationFormat format = new IOUtil.SpecificationFormat(0, description,
				offsetLoc, lengthLoc);
		windowsFields = IOUtil.readHeaderEntries(WindowsEntryKey.class, format,
				WINDOWS_SPEC, headerbytes, getOffset());
		directoryNr = windowsFields
				.get(WindowsEntryKey.NUMBER_OF_RVA_AND_SIZES).getValue();
		if (directoryNr > 16) {
			directoryNr = 16;
		}
	}

	@Override
	public String getInfo() {
		return "---------------" + IOUtil.NL + "Optional Header" + IOUtil.NL
				+ "---------------" + IOUtil.NL + IOUtil.NL + "Standard fields" + IOUtil.NL
				+ "..............." + IOUtil.NL + IOUtil.NL + getStandardFieldsInfo() + IOUtil.NL
				+ "Windows specific fields" + IOUtil.NL + "......................."
				+ IOUtil.NL + IOUtil.NL + getWindowsSpecificInfo() + IOUtil.NL + "Data directories"
				+ IOUtil.NL + "................" + IOUtil.NL + IOUtil.NL + "virtual_address/size"
				+ IOUtil.NL + IOUtil.NL + getDataDirInfo();
	}

	/**
	 * Returns a description of all data directories.
	 *
	 * @return description of all data directories.
	 */
	public String getDataDirInfo() {
		StringBuilder b = new StringBuilder();
		for (DataDirEntry entry : dataDirectory.values()) {
			b.append(entry.getKey() + ": " + entry.getVirtualAddress() + "(0x"
					+ Long.toHexString(entry.getVirtualAddress()) + ")/"
					+ entry.getDirectorySize() + "(0x"
					+ Long.toHexString(entry.getDirectorySize()) + ")" + IOUtil.NL);
		}
		return b.toString();
	}

	/**
	 * Returns a string with description of the windows specific header fields.
	 * Magic number must be set.
	 *
	 * @return string with windows specific fields
	 */
	public String getWindowsSpecificInfo() {
		StringBuilder b = new StringBuilder();
		for (StandardField entry : windowsFields.values()) {
			long value = entry.getValue();
			HeaderKey key = entry.getKey();
			String description = entry.getDescription();
			if (key.equals(IMAGE_BASE)) {
				b.append(description + ": " + value + " (0x"
						+ Long.toHexString(value) + "), "
						+ getImageBaseDescription(value) + IOUtil.NL);
			} else if (key.equals(SUBSYSTEM)) {
				// subsystem has only 2 bytes
				b.append(description + ": " + getSubsystem().getDescription()
						+ IOUtil.NL);
			} else if (key.equals(DLL_CHARACTERISTICS)) {
				b.append(IOUtil.NL + description + ": " + IOUtil.NL);
				b.append(getCharacteristicsInfo(value) + IOUtil.NL);
			}

			else {
				b.append(description + ": " + value + " (0x"
						+ Long.toHexString(value) + ")" + IOUtil.NL);
				if (key.equals(NUMBER_OF_RVA_AND_SIZES)) {
					di


      }
            table = Vec::new();
        } else {
            table.push(
                line.split(" ").filter(|s| s != &"").map(|x| usize::from_str(x).unwrap()).collect(),
            );
        }
    }
    tables.push(table);
    Game { nums, tables }
}
fn transpose(board: Vec<Vec<bool>>) -> Vec<Vec<bool>> {
    (0..board[0].len()).map(|i| board.iter().map(|inner| inner[i]).collect()).collect()
}

fn score(board: &Vec<Vec<usize>>, nums: &[usize]) -> Option<usize> {
    let mut marked: Vec<Vec<bool>> = board
        .clone()
        .into_iter()
        .map(|row| row.into_iter().map(|num| nums.contains(&num)).collect())
        .collect();
    let mut win = false;
    if marked.iter().any(|row| row.iter().all(|x| *x)) {
        win = true;
    }
    marked = transpose(marked);
    if marked.iter().any(|row: &Vec<bool>| row.iter().all(|x| *x)) {
        win = true;
    }
    if win {
        let mut score = 0;
        for row in board {
            for num in row {
                if !nums.contains(&num) {
                    score += num;
                }
            }
        }
        Some(score * nums.last().unwrap())
    } else {
        None
    }
}

fn solve_a(input: Game) -> usize {
    for i in 0..input.nums.len() {
        for board in &input.tables {
            if let Some(score) = score(&board, &input.nums[0..i]) {
                return score;
            }
        }
    }
    panic!("at the disco")
}

fn solve_b(mut input: Game) -> usize {
    for i in 0..input.nums.len() {
        if input.tables.len() == 1 {
            if let Some(score) = score(&input.tables[0], &input.nums[0..i]) {
                return score;
            }
        }
        input.tables = input
            .tables
            .into_iter()
            .filter(|board| score(&board, &input.nums[0..i]).is_none())
            .collect();
    }
    panic!("at the disco")
}

fn main() {
    println!(
        "A: {}\tB: {}",
        solve_a(parse(aoc::str_input(INPUT))),
        solve_b(parse(aoc::str_input(INPUT)))
    );
}

#[cfg(test)]
mod test {
    use super::*;
    use aoc::str_input;

    const TEST_INPUT: &'static str = "\
7,4,9,5,11,17,23,2,0,14,21,24,10,16,13,6,15,25,12,22,18,20,8,19,3,26,1

22 13 17 11  0
 8  2 23  4 24
21  9 14 16  7
 6 10  3 18  5
 1 12 20 15 19

 3 15  0  2 22
 9 18 13 17  5
19  8  7 25 23
20 11 10 24  4
14 21 16 12  6

14 21 17 24  4
10 16 15  9 19
18  8 23 26 20
22 11 13  6  5
 2  0 12  3  7";

    #[test]
    fn sample_a() {
        assert_eq!(solve_a(parse(str_input(TEST_INPUT))), 4512)
    }

    #[test]
    fn sample_b() {
        assert_eq!(solve_b(parse(str_input(TEST_INPUT))), 1924)
    }
}
<filename>src/internal/internal_utils.rs
use std::any::Any;

use crate::internal::keyscout::{KeyScout, KeyScoutChild};
use crate::internal::tag_builder::TagBuilder;
use crate::io::streams::{ReadStream, StandardIO, IORead, Stream


 } from 'react';
import {
  registerShortcut,
  registerShortcutHandler,
  unregisterShortcut,
  unregisterShortcutHandler,
} from './shortcuts';
import {
  RegisterShortcutHandlerOptions,
  RegisterShortcutOptions,
  Scope,
  ShortcutHandler,
} from './types';

/**
 * React hook wrapping `registerShortcutHandler` setup
 * to do all the necessary registration and cleanup
 */
export const useShortcutHandler = (
  callback: ShortcutHandler,
  options?: RegisterShortcutHandlerOptions,
) => {
  const { scope = Scope.Default } = options || {};

  useEffect(() => {
    registerShortcutHandler(callback, { scope });
    return () => {
      unregisterShortcutHandler(callback);
    };
  }, [callback, scope]);
};

/**
 * React hook wrapping `registerShortcut` setup
 * to do all the necessary registration and cleanup
 */
export const useShortcut = (
  callback: ShortcutHandler,
  options: RegisterShortcutOptions,
) => {
  const { scope = Scope.Default, key, enabled = true } = options;

  useEffect(() => {
    if (enabled) {
      registerShortcut(callback, { scope, key });
      return () => {
        unregisterShortcut(callback);
      };
    }
  }, [enabled, callback, scope, key]);
};
import { transform } from "./extern/fft";

const AudioContext = window.AudioContext;

const memo = <T extends unknown>(f: (() => T)): (() => T) => {
  let x: undefined | T = undefined;

  return (): T => {
    if (x === undefined) {
      x = f();
    }

    return x;
  };
};

export const createAudioContext = memo(async () => {
  const context = new AudioContext();

  await Promise.all([
    context.audioWorklet.addModule('/audio-processors/white-noise-processor.js'),
    context.audioWorklet.addModule('/audio-processors/simple-wave-processor.js'),
    context.audioWorklet.addModule('/audio-processors/copy-buffer-processor.js'),
  ]);

  return context;
});

export const createNoiseNode = (context: AudioContext, amplitude: number): AudioWorkletNode => (
  new AudioWorkletNode(context, 'white-noise-processor', { processorOptions: { amplitude } })
);

const bufferSize = 4096;

export type Wave = (radians: number) => number;

const sin: Wave = Math.sin;
const square: Wave = (radians) => Math.sign(Math.sin(radians))
const sawtooth: Wave = (radians) => ((radians % Math.PI) / Math.PI * 2) - 1;
const triangle_: Wave = (radians) => Math.asin(Math.sin(radians));
const triangle: Wave = (radians) => triangle_(radians) / (Math.PI / 2);
const hex: Wave = (radians) => Math.min(1, Math.max(triangle_(radians), -1));

export const createSimpleWaveNode = (context: AudioContext, wave: WaveName, frequencies: Array<number>, amplitude: number) => (
  new AudioWorkletNode(context, 'simple-wave-processor', { processorOptions: { wave, frequencies, amplitude } })
);

export const waves = { sin, square, sawtooth, triangle, hex };

export type WaveName = keyof typeof waves;

type BufferCopy = {
  buffer: Array<number>;
  channelIndex: number;
  inputIndex: number;
}
export const createCopyBufferNode = (context: AudioContext, copyMode: 'all' | 'first' | 'none', onCopy: (copy: BufferCopy) => unknown) => {
  const copyBufferNode = new AudioWorkletNode(context, 'copy-buffer-processor', { numberOfInputs: 1, numberOfOutputs: 1, processorOptions: { copyMode } });
  copyBuffer


import com.intellij.openapi.editor.Editor
import com.intellij.openapi.project.Project
import com.intellij.psi.PsiDocumentManager
import com.intellij.psi.PsiFile
import com.intellij.psi.SmartPsiElementPointer
import com.intellij.psi.xml.XmlAttribute

/**
 * @author Kostiantyn Diachenko
 */
class RemoveRedundantDataSlyUnwrapValueAction(
    val pointer: SmartPsiElementPointer<XmlAttribute>) : BaseHtlIntentionAction(
    { "Remove data-sly-unwrap attribute value" }
) {
  override fun invoke(project: Project, editor: Editor, file: PsiFile) {
    val element = pointer.element ?: return
    val psiDocumentManager = PsiDocumentManager.getInstance(project)
    val document = psiDocumentManager.getDocument(file)
        ?: return

    val valueTextRange = element.valueElement?.textRange ?: return
    val (start, end) = valueTextRange.startOffset to valueTextRange.endOffset
    document.replaceString(start - 1, end, "")
    psiDocumentManager.commitDocument(document)
  }
}
package com.aemtools.codeinsight.htl.model

import com.aemtools.common.completion.lookupElement
import com.aemtools.common.constant.const.htl.DATA_SLY_LIST
import com.aemtools.common.constant.const.htl.DATA_SLY_REPEAT
import com.aemtools.common.constant.const.htl.DATA_SLY_SET
import com.aemtools.common.constant.const.htl.DATA_SLY_TEMPLATE
import com.aemtools.common.constant.const.htl.DATA_SLY_TEST
import com.aemtools.common.constant.const.htl.DATA_SLY_UNWRAP
import com.aemtools.common.constant.const.htl.DATA_SLY_USE
import com.aemtools.common.util.findChildrenByType
import com.aemtools.index.util.extractTemplateDefinition
import com.aemtools.lang.htl.icons.HtlIcons.DATA_SLY_LIST_ICON
import com.aemtools.lang.htl.icons.HtlIcons.DATA_SLY_REPEAT_ICON
import com.aemtools.lang.htl.icons.HtlIcons.HTL_FILE_ICON
import com.aemtools.lang.htl.icons.HtlIcons.LIST_HELPER_ICON
import com.aemtools.lang.htl.icons.HtlIcons.REPEAT_HELPER_ICON
import com.aemtools.lang.htl.icons.HtlIcons.SLY_SET_VARIABLE_ICON
import com.aemtools.lang.htl.icons.HtlIcons.SLY_TEST_VARIABLE_ICON
import com.aemtools.lang.htl.icons.HtlIcons.SLY_UNWRAP_VARIABLE_ICON
import com.aemtools.lang.htl.icons.HtlIcons.SLY_USE_VARIABLE_ICON
import com.aemtools.lang.htl.icons.HtlIcons.TEMPLATE_PARAMETER_ICON
import com.aemtools.lang.htl.psi.HtlVariableName
import com.aemtools.lang.util.extractHtlHel
import com.aemtools.lang.util.extractItemAndItemListNames
import com.aemtools.lang.util.htlAttributeName
import com.aemtools.lang.util.htlVariableName
import com.aemtools.lang.util.isOption
import com.aemtools.lang.util.resolveUseClass
import com.intellij.codeInsight.lookup.LookupElement
import com.intellij.psi.xml.XmlAttribute

/**
 * Represents the name of variable and the [XmlAttribute] in which it was declared.
 *
 * @author Dmytro Primshyts
 */
open class HtlVariableDeclaration internal constructor(
    /**
     * Declaration [XmlAttribute].
     */
    val xmlAttribute: XmlAttribute,
    /**
     * The name of variable.
     */
    val variableName: String,
    /**
     * The type of Htl declaration attribute.
     */
    val attributeType: DeclarationAttributeType,
    /**
     * T


tationRun();
			if(pAR)
			{
			    m_iLabelWidth = pAR->getWidth();
      			    da.xoff = pDA->xoff + pContainer->getX() - m_iLabelWidth;
			    fp_Line * pLine = static_cast<fp_Line *>(pContainer);
			    da.yoff = pDA->yoff + pContainer->getY() + pLine->getAscent();
			    da.bDirtyRunsOnly = false;
			    m_iXLabel = da.xoff;
			    m_iYLabel = da.yoff;
			    pAR->draw(&da);
			    da.xoff = pDA->xoff + pContainer->getX();
			}
		}
		da.yoff = pDA->yoff + pContainer->getY();
		pContainer->draw(&da);
	}
	_drawBoundaries(pDA);
}

fp_Container * fp_AnnotationContainer::getNextContainerInSection() const
{

	fl_ContainerLayout * pCL = static_cast<fl_ContainerLayout *>(getSectionLayout());
	fl_ContainerLayout * pNext = pCL->getNext();
	while(pNext && pNext->getContainerType() == FL_CONTAINER_ENDNOTE)
	{
		pNext = pNext->getNext();
	}
	if(pNext)
	{
		return pNext->getFirstContainer();
	}
	return nullptr;
}

fp_Container * fp_AnnotationContainer::getPrevContainerInSection() const
{

	fl_ContainerLayout * pCL = static_cast<fl_ContainerLayout *>(getSectionLayout());
	fl_ContainerLayout * pPrev = pCL->getPrev();
	while(pPrev && pPrev->getContainerType() == FL_CONTAINER_ENDNOTE)
	{
		pPrev = pPrev->getPrev();
	}
	if(pPrev)
	{
		return pPrev->getLastContainer();
	}
	return nullptr;
}

void fp_AnnotationContainer::setY(UT_sint32 iy)
{
        fp_VerticalContainer::setY(iy);
}

void fp_AnnotationContainer::layout(void)
{
	_setMaxContainerHeight(0);
	UT_sint32 iY = 0, iPrevY = 0;
	iY= 0;
	fl_DocSectionLayout * pDSL = getDocSectionLayout();
	UT_sint32 iMaxFootHeight = 0;
	iMaxFootHeight = pDSL->getActualColumnHeight();
	iMaxFootHeight -= getGraphics()->tlu(20)*3;
	UT_uint32 iCountContainers = countCons();
	fp_Container *pContainer, *pPrevContainer = nullptr;
	for (UT_uint32 i=0; i < iCountContainers; i++)
	{
		pContainer = static_cast<fp_Container*>(getNthCon(i));
//
// This is to speedup redraws.
//
		if(pContainer->getHeight() > _getMaxContainerHeight())
			_setMaxContainerHeight(pContainer->getHeight());

		if(pContainer->getY() != iY)
		{
			pContainer->clearScreen();
		}

		pContainer->setY(iY);

		UT_sint32 iContainerHeight = pContainer->getHeight();
		UT_sint32 iContainerMarginAfter = pContainer->getMarginAfter();

		iY += iContainerHeight;
		iY += iContainerMarginAfter;
		//iY +=  0.5;
		if(iY > iMaxFootHeight)
		{
			iY = iMaxFootHeight;
		}
		else
		{
			if (pPrevContainer)
			{
				pPrevContainer->setAssignedScreenHeight(iY - iPrevY);
			}
		}
		pPrevContainer = pContainer;
		iPrevY = iY;
	}

	// Correct height position of the last line
	if (pPrevContainer)
	{
		pPrevContainer->setAssignedScreenHeight(iY - iPrevY + 1);
	}


tp://msdn.microsoft.com/en-us/library/zthk2dkh.aspx

pub fn compute_abi_info(ccx: &CrateContext,
                          atys: &[Type],
                          rty: Type,
                          ret_def: bool) -> FnType {
    let mut arg_tys = Vec::new();

    let ret_ty;
    if !ret_def {
        ret_ty = ArgType::direct(Type::void(ccx), None, None, None);
    } else if rty.kind() == Struct {
        ret_ty = match llsize_of_alloc(ccx, rty) {
            1 => ArgType::direct(rty, Some(Type::i8(ccx)), None, None),
            2 => ArgType::direct(rty, Some(Type::i16(ccx)), None, None),
            4 => ArgType::direct(rty, Some(Type::i32(ccx)), None, None),
            8 => ArgType::direct(rty, Some(Type::i64(ccx)), None, None),
            _ => ArgType::indirect(rty, Some(Attribute::StructRet))
        };
    } else {
        let attr = if rty == Type::i1(ccx) { Some(Attribute::ZExt) } else { None };
        ret_ty = ArgType::direct(rty, None, None, attr);
    }

    for &t in atys {
        let ty = match t.kind() {
            Struct => {
                match llsize_of_alloc(ccx, t) {
                    1 => ArgType::direct(t, Some(Type::i8(ccx)), None, None),
                    2 => ArgType::direct(t, Some(Type::i16(ccx)), None, None),
                    4 => ArgType::direct(t, Some(Type::i32(ccx)), None, None),
                    8 => ArgType::direct(t, Some(Type::i64(ccx)), None, None),
                    _ => ArgType::indirect(t, None)
                }
            }
            _ => {
                let attr = if t == Type::i1(ccx) { Some(Attribute::ZExt) } else { None };
                ArgType::direct(t, None, None, attr)
            }
        };
        arg_tys.push(ty);
    }

    return FnType {
        arg_tys: arg_tys,
        ret_ty: ret_ty,
    };
}
mod canonical;
mod user;

pub use canonical::{CanonicalMimeApps, CANONICAL};
pub use user::{MimeApps, Rule as MimeappsRule, APPS};
use ed25519_dalek::{PublicKey, Signature};
use tai64::TAI64N;

use crate::WasmiumError;
/// (identifier (32bytes) | hash (32bytes) | signature (64bytes) | manifest_body_byte_length)
/// Signature - 64 bytes
#[derive(Debug, Clone, Copy)]
pub struct WasmiumManifestHeader {
    identifier: blake3::Hash,
    account: Option<PublicKey>,
    hash: blake3::Hash,
    signature: Option<Signature>,
}

impl Default for WasmiumManifestHeader {
    fn default() -> Self {
        let time_now = TAI64N::now();

        Self {
            identifier: blake3::hash(b""),
            account: Option::default(),
            hash: blake3::hash(b""),
            signature: Option::default(),
        }
    }
}

impl WasmiumManifestHeader {
    pub fn add_account(&mut self, value: PublicKey) -> &mut Self {
        self.account = Some(value);

        self
    }

    pub fn from_bytes(&mut self, signature: Signature) -> &mut Self {
        self.signature = Some(signature);

        self
    }

    pub fn to


服務的依賴。

Couchbase 不會自動進行再平衡，這簡化了設計。通常情況下，它配置了一個名為 moxi 的路由層，它會從叢集節點了解路由變化【32】。

當使用路由層或向隨機節點發送請求時，客戶端仍然需要找到要連線的 IP 地址。這些地址並不像分割槽的節點分佈變化的那麼快，所以使用 DNS 通常就足夠了。

### 執行並行查詢

到目前為止，我們只關注讀取或寫入單個鍵的非常簡單的查詢（加上基於文件分割槽的次級索引場景下的分散 / 聚集查詢）。這也是大多數 NoSQL 分散式資料儲存所支援的訪問層級。

然而，通常用於分析的 **大規模並行處理（MPP, Massively parallel processing）** 關係型資料庫產品在其支援的查詢型別方面要複雜得多。一個典型的資料倉庫查詢包含多個連線，過濾，分組和聚合操作。MPP 查詢最佳化器將這個複雜的查詢分解成許多執行階段和分割槽，其中許多可以在資料庫叢集的不同節點上並行執行。涉及掃描大規模資料集的查詢特別受益於這種並行執行。

資料倉庫查詢的快速並行執行是一個專門的話題，由於分析有很重要的商業意義，可以帶來很多利益。我們將在 [第十章](/v1_tw/ch10) 討論並行查詢執行的一些技巧。有關並行資料庫中使用的技術的更詳細的概述，請參閱參考文獻【1,33】。

## 本章小結

在本章中，我們探討了將大資料集劃分成更小的子集的不同方法。資料量非常大的時候，在單臺機器上儲存和處理不再可行，而分割槽則十分必要。分割槽的目標是在多臺機器上均勻分佈資料和查詢負載，避免出現熱點（負載不成比例的節點）。這需要選擇適合於你的資料的分割槽方案，並在將節點新增到叢集或從叢集刪除時重新平衡分割槽。

我們討論了兩種主要的分割


](https://img.shields.io/badge/Python-3.x-blue.svg)](https://python.org)
[![License](https://img.shields.io/badge/License-MIT-green.svg)]()

Многофункциональный Discord бот для управления и мониторинга MTA:SA сервера.

# ⚠⚠ ВНИМАНИЕ ⚠⚠
### ОБЯЗАТЕЛЬНО ПЕРЕД ЗАПУСКОМ ЗАПРЕТИТЕ ИСПОЛЬЗОВАТЬ КОМАНДЫ БОТА ВСЕМ! ИНАЧЕ ЛЮБОЙ СМОЖЕТ СДЕЛАТЬ ЧТО УГОДНО
![image](https://github.com/user-attachments/assets/0acec393-7bda-48d1-902c-7ca85e9b59c8)

## ✨ Основные возможности

### 📊 Мониторинг сервера
- Отображение статуса сервера в Discord
- Просмотр количества игроков
- Список игроков с никами
- Всё в реальном времени в отдельном канале

### ⚖ Административные функции
- Система выговоров/варнов в Discord (с ведением динамической таблицы)
- Управление базой данных:
  - Выдача админских прав
  - Управление скинами игроков
  - Контроль игровой валюты
- Подключение к серверу по SSH для удалённого управления
- Включение/отключение сервера (требуется запуск через screen)
- Создание промокодов

### 👥 Управление игроками
- Поиск информации об игроке по ID или никнейму
- Система репутации
- Управление вторыми аккаунтами (возможны баги)
- Уведомления о новых регистрациях

### 🗳 Интерактивные функции
- Голосования (реализовано до появления встроенной функции в Discord)
- И другие полезные возможности

## 🚀 Установка и настройка

### Предварительные требования
- Установленный `Python 3.x`
- Доступ к Discord серверу с правами администратора
- Discord сервер с созданными необходимыми каналами
- Бот должен быть запущен на том же хосте, что и сервер!
- Соответственно VDS/VPS сервер

### Создайте дискорд бота
- Создайте бота на сайте https://discord.com/developers/applications
- Добавьте его на сервер
- **ОТКЛЮЧИТЕ ДОСТУП К КОМАНДАМ БОТА НА СЕРВЕРЕ!**
- Дайте возможность просматривать сообщения
- Введите токен бота в конфиг файл

### Пошаговая установка
1. Создайте новую директорию для бота на том же хосте, что и сервер, например `/bot`
2. Скопируйте файлы бота в созданную директорию

### Конфигурация
1. Откройте файл `/misc/env.py` и укажите токен вашего Discord бота:
   ```python
   TOKEN = "ваш_токен_бота"
   ```
   * _Примечание: Можно использовать переменные окружения (ра


// load bot sdk info
	botBytes, err := os.ReadFile(BotInfoPath)
	if err == nil {
		json.Unmarshal(botBytes, &BotInfo)
		var botList []string
		for _, robot := range BotInfo.Robots {
			botList = append(botList, robot.Esn)
		}
		logger.Println("Loaded bot info file, known bots: " + fmt.Sprint(botList))
	}

	ReadSessionCerts()
	LoadCustomIntents()
	VarsInited = true
}

func GetDownloadedVoskModels() {
	array, err := os.ReadDir(VoskModelPath)
	if err != nil {
		logger.Println(err)
		return
	}
	for _, dir := range array {
		DownloadedVoskModels = append(DownloadedVoskModels, dir.Name())
	}
}

func LoadCustomIntents() {
	jsonBytes, err := os.ReadFile(CustomIntentsPath)
	if err == nil {
		json.Unmarshal(jsonBytes, &CustomIntents)
		CustomIntentsExist = true
		logger.Println("Loaded custom intents:")
		for _, intent := range CustomIntents {
			logger.Println(intent.Name)
		}
	}
}

func LoadIntents() ([]JsonIntent, error) {
	var path string
	if runtime.GOOS == "darwin" && Packaged {
		appPath, _ := os.Executable()
		path = filepath.Dir(appPath) + "/../Frameworks/chipper/"
	} else if runtime.GOOS == "android" || runtime.GOOS == "ios" {
		path = AndroidPath + "/static/"
	} else {
		path = "./"
	}
	jsonFile, err := os.ReadFile(path + "intent-data/" + APIConfig.STT.Language + ".json")

	// var matches [][]string
	// var intents []string
	var jsonIntents []JsonIntent
	if err == nil {
		err = json.Unmarshal(jsonFile, &jsonIntents)
		// if err != nil {
		// 	logger.Println("Failed to load intents: " + err.Error())
		// }

		// for _, element := range jsonIntents {
		// 	//logger.Println("Loading intent " + strconv.Itoa(index) + " --> " + element.Name + "( " + strconv.Itoa(len(element.Keyphrases)) + " keyphrases )")
		// 	intents = append(intents, element.Name)
		// 	matches = append(matches, element.Keyphrases)
		// }
		// logger.Println("Loaded " + strconv.Itoa(len(jsonIntents)) + " intents and " + strconv.Itoa(len(matches)) + " matches (language: " + APIConfig.STT.Language + ")")
	}
	return jsonIntents, err
}

func WriteJdocs() {
	writeBytes, _ := json.Marshal(BotJdocs)
	os.WriteFile(JdocsPath, writeBytes, 0644)
}

// removes a bot from jdocs file
func DeleteData(thing string) {
	var newdocs []botjdoc
	for _, jdocentry := range BotJdocs {
		if jdocentry.Thing != thing {
			newdocs = append(newdocs, jdocentry)
		}
	}
	BotJdocs = newdocs
	WriteJdocs()
}

func GetJdoc(thing, jdocname string) (AJdoc, bool) {
	for _, botJdoc := range BotJdocs {
		if botJdoc.Name == jdocname && botJdoc.Thing == thing {
			return botJdoc.Jdoc, true
		}
	}
	return AJdoc{}, false
}

//    DocVersion     uint64 `protobuf:"varint,1,opt,name=doc_version,json=docVersion,proto3" json:"doc_version,omitempty"`            // first version = 1; 0 => invalid or doesn't exist
// FmtV


count;
	spaces=spaces*2;
	words=words*2;

    if (c>='A' && c<='Z')
      c+='a'-'A';
    if (c>='a' && c<='z'  || c>=128) {
                ++words, ++wordcount;
      word0=word0*263*32+c;
      text0=text0*997*16+c;
      wordlen++;
      wordlen=min(wordlen,45);
    }
    else if (word0) {
      word5=word4*23;
      word4=word3*19;
      word3=word2*17;
      word2=word1*13;
      word1=word0*11;
      wordlen1=wordlen;
      word0=wordlen=0;
    }
    if (c>='0' && c<='9') {
      number0=number0*263*32+c;
    }
    else if (number0) {
      number1=number0*11;
      number0=0;
    }
    if( c=='.' || c=='!' || c=='?' || c==',' || c==';' || c==':') spafdo=0; else { ++spafdo; spafdo=min(63,spafdo); }
 if (c==32 || c==10) { ++spaces, ++spacecount; if (c==10) nl1=nl, nl=pos-1;}
    int col=min(255, pos-nl), above=buf[nl1+col]; // text column context
    if (col<=2) {
		if (col==2) frstchar=min(c,96); else frstchar=0;
	}
	cm.set(spafdo|col<<8 );
    cm.set(spafdo|spaces<<8 ); //
    cm.set(frstchar<<11|c);
    cm.set(col<<8|frstchar);

 cm.set(spaces<<8|words&255);

    cm.set(number0+word2*31);
    cm.set(number0+word1*31);
    cm.set(number0*31+c);
    cm.set(number0+number1*31);
    cm.set(word0+number1*31);

    cm.set(frstchar<<7);
    cm.set(wordlen<<16|c);
    cm.set(wordlen1<<8|col);
    cm.set(c*64+spacecount/2);
    U32 h=wordcount*64+spacecount;
    cm.set((c<<13)+h);
    cm.set(h);
    cm.set(h+spafdo*8);

U32 d=c4&0xffff;
cm.set(d<<9|frstchar);

h=word0*271+buf(1);
    cm.set(h);
    cm.set(word0);
    cm.set(h+word1);
    cm.set(word0+word1*31);
    cm.set(h+word1+word2*29);
    cm.set(text0&0xffffff);
    cm.set(text0&0xfffff);

    cm.set(h+word2);
    cm.set(h+word3);
    cm.set(h+word4);
    cm.set(h+word5);
    cm.set(buf(1)|buf(3)<<8|buf(5)<<16);
    cm.set(buf(2)|buf(4)<<8|buf(6)<<16);

    cm.set(h+word1+word3);
    cm.set(h+word2+word3);

    // Text column models
    cm.set(col<<16|buf(1)<<8|above);
    cm.set(buf(1)<<8|above);
    cm.set(col<<8|buf(1));
    cm.set(col*(c==32));
    cm.set(col);
  }
  cm.mix(m);
}

//////////////////////////// recordModel ///////////////////////

// Model 2-D data with fixed record length.  Also order 1-2 models
// that include the distance to the last match.

void recordModel(Mixer& m) {
  static int cpos1[256] , cpos2[256], cpos


HECK-NOT: [[@LINE-1]]:{{[0-9]+}}:

// --------------------------------------------------------------------------//
// Invalid immediate

sqrshrun z31.h, {z28.d-z31.d}, #65
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 64].
// CHECK-NEXT: sqrshrun z31.h, {z28.d-z31.d}, #65
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:

// --------------------------------------------------------------------------//
// Invalid Register Suffix

sqrshrun z23.s, {z12.s-z15.s}, #24
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
// CHECK-NEXT: sqrshrun z23.s, {z12.s-z15.s}, #24
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:


/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPLv3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or later as published by the Free
** Software Foundation and appearing in the file LICENSE.GPL included in
** the packaging of this file. Please review the following information to
** ensure the GNU General Public License version 2.0 requirements will be
** met: http://www.gnu.org/licenses/gpl-2.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/

#ifndef QWINRTMEDIAPLAYERCONTROL_H
#define QWINRTMEDIAPLAYERCONTROL_H

#include <QtMultimedia/QMediaPlayerControl>

struct IMFMediaEngineClassFactory;

QT_BEGIN_NAMESPACE

class QVideoRendererControl;

class QWinRTMediaPlayerControlPrivate;
class QWinRTMediaPlayerControl : public QMediaPlayerControl
{
    Q_OBJECT
public:
    QWinRTMediaPlayerControl(IMFMediaEngineClassFactory *factory, QObject *parent = 0);
    ~QWinRTMediaPlayerControl();

    QMediaPlayer::State state() const Q_DECL_OVERRIDE;
    QMediaPlayer::MediaStatus mediaStatus() const Q_DECL_OVERRIDE;

    qint64 duration() const Q_DECL_OVERRIDE;

    qint64 position() const Q_DECL_OVERRIDE;
    void setPosition(qint64 position) Q_DECL_OVERRIDE;

    int volume() const Q_DECL_OVERRIDE;
    void setVolume(int volume) Q_DECL_OVERRIDE;

    bool isMuted() const Q_DECL_OVERRIDE;
    void setMuted(bool muted) Q_DECL_OVERRIDE;

    int bufferStatus() const Q_DECL_OVERRIDE;

    bool isAudioAvailable() const Q_DECL_OVERRIDE;
    bool isVideoAvailable() const Q_DECL_OVERRIDE;

    bool isSeekable() const Q_DECL_OVERRIDE;

    QMediaTimeRange availablePlaybackRanges() const Q_DECL_OVERRIDE;

    qreal playbackRate() const Q_DECL_OVERRIDE;
    void setPlaybackRate(qreal rate) Q_DECL_OVERRIDE;

    QMediaContent media() const Q_DECL_OVERRIDE;
    const QIODevice *mediaStream() const Q_DECL_OVERRIDE;
    void setMedia(const QMediaContent &media, QIODevice *stream) Q_DECL_OVERRIDE;

    void play() Q_DECL_OVERRIDE;
    void pause() Q_DECL_OVERRIDE;
    void stop() Q_DECL_OVERRIDE;

    QVideoRendererControl *videoRendererControl();

private:
    Q_INVOKABLE void finishRead();

    QScopedPointer<QWinRTMediaPlayerControlPrivate, QWinRTMediaPlayerControlPrivate> d_ptr;
    Q_DECLARE_PRIVATE(QWinRTMediaPlayerControl)
};

QT_END_NAMESPACE

#endif // QWINRTMEDIAPLAYERCONTROL_H


EAC 003D2B0C  54 A0 10 3A */	slwi r0, r5, 2
/* 803D6EB0 003D2B10  38 C6 41 14 */	addi r6, r6, lbl_80474114@l
/* 803D6EB4 003D2B14  7C C6 00 2E */	lwzx r6, r6, r0
/* 803D6EB8 003D2B18  7C C9 03 A6 */	mtctr r6
/* 803D6EBC 003D2B1C  4E 80 04 20 */	bctr
/* 803D6EC0 003D2B20  38 63 00 2C */	addi r3, r3, 0x2c
/* 803D6EC4 003D2B24  48 00 02 F4 */	b lbl_803D71B8
/* 803D6EC8 003D2B28  38 64 21 4C */	addi r3, r4, 0x214c
/* 803D6ECC 003D2B2C  48 00 02 EC */	b lbl_803D71B8
/* 803D6ED0 003D2B30  38 64 21 70 */	addi r3, r4, 0x2170
/* 803D6ED4 003D2B34  48 00 02 E4 */	b lbl_803D71B8
/* 803D6ED8 003D2B38  38 64 21 74 */	addi r3, r4, 0x2174
/* 803D6EDC 003D2B3C  48 00 02 DC */	b lbl_803D71B8
/* 803D6EE0 003D2B40  38 64 21 78 */	addi r3, r4, 0x2178
/* 803D6EE4 003D2B44  48 00 02 D4 */	b lbl_803D71B8
/* 803D6EE8 003D2B48  38 64 00 88 */	addi r3, r4, 0x88
/* 803D6EEC 003D2B4C  48 00 02 CC */	b lbl_803D71B8
/* 803D6EF0 003D2B50  38 64 21 3C */	addi r3, r4, 0x213c
/* 803D6EF4 003D2B54  48 00 02 C4 */	b lbl_803D71B8
/* 803D6EF8 003D2B58  38 64 01 80 */	addi r3, r4, 0x180
/* 803D6EFC 003D2B5C  48 00 02 BC */	b lbl_803D71B8
/* 803D6F00 003D2B60  38 64 21 58 */	addi r3, r4, 0x2158
/* 803D6F04 003D2B64  48 00 02 B4 */	b lbl_803D71B8
/* 803D6F08 003D2B68  38 64 01 34 */	addi r3, r4, 0x134
/* 803D6F0C 003D2B6C  48 00 02 AC */	b lbl_803D71B8
/* 803D6F10 003D2B70  38 64 21 6C */	addi r3, r4, 0x216c
/* 803D6F14 003D2B74  48 00 02 A4 */	b lbl_803D71B8
/* 803D6F18 003D2B78  80 84 00 64 */	lwz r4, 0x64(r4)
/* 803D6F1C 003D2B7C  4B FD 5D C9 */	bl func_803ACCE4
/* 803D6F20 003D2B80  54 60 15 BA */	rlwinm r0, r3, 2, 0x16, 0x1d
/* 803D6F24 003D2B84  7C 7F 02 14 */	add r3


nrel\n");
		t.vprint();

	}
};

MyApp * app;

int main(){

	GLV glv(0,0);

	Window * win = new Window(500,500,"Versor",&glv);
	app = new MyApp(win);

	glv << *app;

	Application::run();

	return 0;

}
/*
 * =====================================================================================
 *
 *       Filename:  xReflectionSurfaces.cpp
 *
 *    Description:  reflections into surfaces
 *
 *        Version:  1.0
 *        Created:  12/03/2013 17:25:18
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Pablo Colapinto (), wolftype (gmail)
 *   Organization:  Media Arts and Technology Program, UCSB
 *
 * =====================================================================================
 */

#include "vsr_cga3D_app.h"
#include "gfx/gfx_mesh.h"
#include "vsr_shapes.h"

using namespace vsr;
using namespace vsr::cga3D;
using namespace gfx;

struct MyApp : App {

  Point mouse;

  float time;
  float amtA, amtB;

  float vmode;

  Mesh m;
  Mesh torus;

  bool bDrawSpheres, bDrawRef, bAvg, bUseDist;

  Frame frame,frame2;

  void setup(){

      gui(vmode,"mode",0,5);
      gui(amtA,"amtA",-100,100);
      gui(amtB,"amtB",-100,100);
      gui(bDrawSpheres, "Sphs")(bDrawRef,"refs")(bAvg,"Avg")(bUseDist,"dist");

      m = Mesh::Sphere();
      torus = Shape::Torus();

      frame2.pos(3,0,0);

      objectController.attach(&frame);
      objectController.attach(&frame2);
  }

  void onDraw(){

      mouse = calcMouse3D();

      auto pntcontrol = frame.pos();
      auto parcontrol = frame.py();
      auto ccontrol = frame.cxz();
      auto lcontrol = frame.ly();
      auto planecontrol = frame.dxy();

      int mode = vmode;
      switch (mode){
        case 0:Draw(pntcontrol,1,1,0); break;
        case 1:Draw(parcontrol, 1,1,0); break;
        case 2:Draw(ccontrol,1,1,0); break;
        case 3:Draw(lcontrol,1,1,0); break;
        case 4:Draw(planecontrol,1,1,0); break;
      }

      auto control2 = frame2.pz();//Ro::sur( cxz ), Vec::y);//mouse;
      Draw(control2, 1,0,1);

     m.drawElements();

     // auto nc = (control);
      int ptr = 0;//m.vertices();
      for (auto i : m.original() ){

        //distance to the line
       auto pnt = Ro::point( i.Pos[0], i.Pos[1], i.Pos[2] );
       VT dist;

       switch (mode){
        case 0:
          dist = 1.0 / (1+ Ro::sqd(pnt, pntcontrol) ) ; break;
        case 1:
          dist =  1.0  / ( fabs( ( pnt <= ( parcontrol ^ Inf(1) ).dual() ).wt() ) + 1.0 ) ;
          break;
        case 2:
          dist = 1.0 / ( 1.0 + ( fabs( ( pnt <= ( ccontrol.dual() ) ).wt() ) ) ); break;
        case 3:
          dist = 1.0 / ( fabs( ( pnt <= ( lcontrol.dual() ) ).wt() ) + 1.0 ); break;
        case 4:


from tests.base_case import ChatBotTestCase
from chatterbot.conversation import Statement
from chatterbot import preprocessors

class PreprocessorIntegrationTestCase(ChatBotTestCase):
    """
    Make sure that preprocessors work with the chat bot.
    """

    def test_clean_whitespace(self):
        self.chatbot.preprocessors = [preprocessors.clean_whitespace]
        response = self.chatbot.get_response('Hello,    how are you?')

        self.assertEqual(response.text, 'Hello, how are you?')

class CleanWhitespacePreprocessorTestCase(ChatBotTestCase):
    """
    Make sure that ChatterBot's whitespace removing preprocessor works as expected.
    """

    def test_clean_whitespace(self):
        statement = Statement(text='\tThe quick \nbrown fox \rjumps over \vthe \alazy \fdog\\.')
        cleaned = preprocessors.clean_whitespace(statement)
        normal_text = 'The quick brown fox jumps over the \alazy dog\\.'

        self.assertEqual(cleaned.text, normal_text)

    def test_leading_or_trailing_whitespace_removed(self):
        statement = Statement(text='     The quick brown fox jumps over the lazy dog.   ')
        cleaned = preprocessors.clean_whitespace(statement)
        normal_text = 'The quick brown fox jumps over the lazy dog.'

        self.assertEqual(cleaned.text, normal_text)

    def test_consecutive_spaces_removed(self):
        statement = Statement(text='The       quick brown     fox      jumps over the lazy dog.')
        cleaned = preprocessors.clean_whitespace(statement)
        normal_text = 'The quick brown fox jumps over the lazy dog.'

        self.assertEqual(cleaned.text, normal_text)

class HTMLUnescapePreprocessorTestCase(ChatBotTestCase):
    """
    Make sure that ChatterBot's html unescaping preprocessor works as expected.
    """

    def test_html_unescape(self):

        # implicit concatenation
        statement = Statement(
            text=(
                'The quick brown fox <b>jumps</b> over'
                ' the lazy dog.'
            )
        )

        normal_text = (
            'The quick brown fox jumps over'
            ' the lazy dog.'
        )

        cleaned = preprocessors.unescape_html(statement)

        self.assertEqual(cleaned.text, normal_text)

class ConvertToASCIIPreprocessorTestCase(ChatBotTestCase):
    """
    Make sure that ChatterBot's ASCII conversion preprocessor works as expected.
    """

    def test_convert_to_ascii(self):
        statement = Statement(text=u'Klüft skräms inför på fédéral électoral große')
        cleaned = preprocessors.convert_to_ascii(statement)
        normal_text = 'Kluft skrams infor pa federal electoral groe'

        self.assertEqual(cleaned.text, normal_text)


H B, 5, *(03E13h)			; 7152
	STH B, 5, *AR7				; 7153
	STH B, 5, *AR7-				; 7154
	STH B, 5, *AR7+				; 7155
	STH B, 5, *+AR7				; 7156
	STH B, 5, *AR7-0B			; 7157
	STH B, 5, *AR7-0			; 7158
	STH B, 5, *AR7+0			; 7159
	STH B, 5, *AR7+0B			; 7160
	STH B, 5, *AR7-%			; 7161
	STH B, 5, *AR7-0%			; 7162
	STH B, 5, *AR7+%			; 7163
	STH B, 5, *AR7+0%			; 7164
	STH B, 5, *AR7(03E14h)			; 7165
	STH B, 5, *+AR7(03E15h)			; 7166
	STH B, 5, *+AR7(03E16h)%		; 7167
	STH B, 5, *(03E17h)			; 7168
	STH B, 6, *AR0				; 7169
	STH B, 6, *AR0-				; 7170
	STH B, 6, *AR0+				; 7171
	STH B, 6, *+AR0				; 7172
	STH B, 6, *AR0-0B			; 7173
	STH B, 6, *AR0-0			; 7174
	STH B, 6, *AR0+0			; 7175
	STH B, 6, *AR0+0B			; 7176
	STH B, 6, *AR0-%			; 7177
	STH B, 6, *AR0-0%			; 7178
	STH B, 6, *AR0+%			; 7179
	STH B, 6, *AR0+0%			; 7180
	STH B, 6, *AR0(03E18h)			; 7181
	STH B, 6, *+AR0(03E19h)			; 7182
	STH B, 6, *+AR0(03E1Ah)%		; 7183
	STH B, 6, *(03E1Bh)			; 7184
	STH B, 6, *AR1				; 7185
	STH B, 6, *AR1-				; 7186
	STH B, 6, *AR1+				; 7187
	STH B, 6, *+AR1				; 7188
	STH B, 6, *AR1-0B			; 7189
	STH B, 6, *AR1-0			; 7190
	STH B, 6, *AR1+0			; 7191
	STH B, 6, *AR1+0B			; 7192
	STH B, 6, *AR1-%			; 7193
	STH B, 6, *AR1-0%			; 7194
	STH B, 6, *AR1+%			; 7195
	STH B, 6, *AR1+0%			; 7196
	STH B, 6, *AR1(03E1Ch)			; 7197
	STH B, 6, *+AR1(03E1Dh)			; 7198
	STH B, 6, *+AR1(03E1Eh)%		; 7199
	STH B, 6, *(03E1Fh)			; 7200
	STH B, 6, *AR2				; 7201
	STH B, 6, *AR2-				; 7202
	STH B, 6, *AR2+				; 7203
	STH B, 6, *+AR2				; 7204
	STH B,


 St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

/*
 * @test
 * @key headful
 * @bug 8015926
 * @summary Tests that there are no NPE during painting
 * @author Sergey Malenkov
 */

import javax.swing.JFrame;
import javax.swing.JTree;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.event.TreeModelEvent;
import javax.swing.event.TreeModelListener;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;

import static javax.swing.WindowConstants.DISPOSE_ON_CLOSE;

public class Test8015926 implements TreeModelListener, Runnable, Thread.UncaughtExceptionHandler {

    public static void main(String[] args) throws Exception {
        UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
        SwingUtilities.invokeAndWait(new Test8015926());
        Thread.sleep(1000L);
    }

    private JTree tree;

    @Override
    public void treeStructureChanged(TreeModelEvent event) {
    }

    @Override
    public void treeNodesRemoved(TreeModelEvent event) {
    }

    @Override
    public void treeNodesInserted(TreeModelEvent event) {
        this.tree.expandPath(event.getTreePath());
    }

    @Override
    public void treeNodesChanged(TreeModelEvent event) {
    }

    @Override
    public void run() {
        Thread.currentThread().setUncaughtExceptionHandler(this);

        DefaultMutableTreeNode root = new DefaultMutableTreeNode();
        DefaultMutableTreeNode child = new DefaultMutableTreeNode("Child");
        DefaultTreeModel model = new DefaultTreeModel(root);

        this.tree = new JTree();
        this.tree.setModel(model);

        JFrame frame = new JFrame(getClass().getSimpleName());
        frame.add(this.tree);

        model.addTreeModelListener(this); // frame is not visible yet
        model.insertNodeInto(child, root, root.getChildCount());
        model.removeNodeFromParent(child);

        frame.setSize(640, 480);
        frame.setLocationRelativeTo(null);
        frame.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
        frame.setVisible(true);
    }

    @Override
    public void uncaughtException(Thread thread, Throwable exception) {
        exception.printStackTrace();
        System.exit(1);
    }
}
/*
 * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

/*
 @test
 @key headful
 @bug 8056151 8131751
 @summary Switching to GTK L&F on-the-fly leads to X Window System error RenderBadPicture
 @run


 val ERROR_UTILITY_MODULE_NOT_FOUND: Int = 0x80110006.toInt()
    const val ERROR_SAVEDATA_LOAD_NO_MEMSTICK: Int = 0x80110301.toInt()
    const val ERROR_SAVEDATA_LOAD_MEMSTICK_REMOVED: Int = 0x80110302.toInt()
    const val ERROR_SAVEDATA_LOAD_ACCESS_ERROR: Int = 0x80110305.toInt()
    const val ERROR_SAVEDATA_LOAD_DATA_BROKEN: Int = 0x80110306.toInt()
    const val ERROR_SAVEDATA_LOAD_NO_DATA: Int = 0x80110307.toInt()
    const val ERROR_SAVEDATA_LOAD_BAD_PARAMS: Int = 0x80110308.toInt()
    const val ERROR_SAVEDATA_LOAD_NO_UMD: Int = 0x80110309.toInt()
    const val ERROR_SAVEDATA_LOAD_INTERNAL_ERROR: Int = 0x80110309.toInt()
    const val ERROR_SAVEDATA_RW_NO_MEMSTICK: Int = 0x80110321.toInt()
    const val ERROR_SAVEDATA_RW_MEMSTICK_REMOVED: Int = 0x80110322.toInt()
    const val ERROR_SAVEDATA_RW_MEMSTICK_FULL: Int = 0x80110323.toInt()
    const val ERROR_SAVEDATA_RW_MEMSTICK_PROTECTED: Int = 0x80110324.toInt()
    const val ERROR_SAVEDATA_RW_ACCESS_ERROR: Int = 0x80110325.toInt()
    const val ERROR_SAVEDATA_RW_DATA_BROKEN: Int = 0x80110326.toInt()
    const val ERROR_SAVEDATA_RW_NO_DATA: Int = 0x80110327.toInt()
    const val ERROR_SAVEDATA_RW_BAD_PARAMS: Int = 0x80110328.toInt()
    const val ERROR_SAVEDATA_RW_FILE_NOT_FOUND: Int = 0x80110329.toInt()
    const val ERROR_SAVEDATA_RW_CAN_NOT_SUSPEND: Int = 0x8011032a.toInt()
    const val ERROR_SAVEDATA_RW_INTERNAL_ERROR: Int = 0x8011032b.toInt()
    const val ERROR_SAVEDATA_RW_BAD_STATUS: Int = 0x8011032c.toInt()
    const val ERROR_SAVEDATA_RW_SECURE_FILE_FULL: Int = 0x8011032d.toInt()
    const val ERROR_SAVEDATA_DELETE_NO_MEMSTICK: Int = 0x80110341.toInt()
    const val ERROR_SAVEDATA_DELETE_MEMSTICK_REMOVED: Int = 0x80110342.toInt()
    const val ERROR_SAVEDATA_DELETE_MEMSTICK_PROTECTED: Int = 0x80110344.toInt()
    const val ERROR_SAVEDATA_DELETE_ACCESS_ERROR: Int = 0x80110345.toInt()
    const val ERROR_SAVEDATA_DELETE_DATA_BROKEN: Int = 0x80110346.toInt()
    const val ERROR_SAVEDATA_DELETE_NO_DATA: Int = 0x80110347.toInt()
    const val ERROR_SAVEDATA_DELETE_BAD_PARAMS: Int = 0x80110348.toInt()
    const val ERROR_SAVEDATA_DELETE_INTERNAL_ERROR: Int = 0x8011034b.toInt()
    const val ERROR_SAVEDATA_SAVE_NO_MEMSTICK: Int = 0x80110381.toInt()
    const val ERROR_SAVEDATA_SAVE_MEMSTICK_REMOVED: Int = 0x80110382.toInt()
    const val ERROR_SAVEDATA_SAVE_NO_SPACE: Int = 0x80110383.toInt()
    const val ERROR_SAVEDATA_SAVE_MEMSTICK_PROT


ed;
        }
    }

    /*Rotates the step according the parent's direction
    Also flips the sprite horizontally if necessary

    Input: sprite [Phaser:Sprite] - The sprite to be affected*/
    position_footsteps(sprite) {
        sprite.scale.x = this.foot_forward === foot_forward_types.RIGHT ? -1 : 1;
        sprite.rotation = ((this.current_direction + 2) * Math.PI) / 4;
    }

    /*Displays a new step on screen
    Will recycle dead sprites if available

    Input: direction [number] = The parent's current direction
           action [string] = The parent's current action*/
    create_step(direction, action) {
        if (this.data.middlelayer_group.getIndex(this.group) < 0) {
            this.data.middlelayer_group.add(this.group);
        }
        this.current_direction = direction;
        this.current_action = action;
        this.update_foot();
        const footsteps_type = this.current_action === base_actions.IDLE ? "double" : "single";
        const animation_name = this.footsteps_sprite_base.getAnimationKey(FOOTSTEPS_KEY_NAME, footsteps_type);

        let footsteps_sprite;
        if (this.dead_index === 0) {
            const sprite_key = this.footsteps_sprite_base.getSpriteKey(FOOTSTEPS_KEY_NAME);
            footsteps_sprite = this.group.create(0, 0, sprite_key);
            footsteps_sprite.anchor.setTo(this.anchor_x, this.anchor_y);
            this.footsteps_sprite_base.setAnimation(footsteps_sprite, FOOTSTEPS_KEY_NAME);
        } else {
            footsteps_sprite = this.dead_steps[--this.dead_index];
            footsteps_sprite.reset(0, 0);
        }
        const animation_obj = footsteps_sprite.animations.getAnimation(animation_name);
        animation_obj.stop(true);
        this.group.base_collision_layer = this.data.map.collision_layer;
        footsteps_sprite.x = this.char.sprite.x;
        footsteps_sprite.y = this.char.sprite.y;
        this.position_footsteps(footsteps_sprite);

        animation_obj.onComplete.addOnce(() => {
            this.kill_step(footsteps_sprite);
        });
        this.set_expire_timer(footsteps_sprite, animation_name);

        this.set_new_step_timer();
    }

    /*Updates the "foot_forward" property*/
    update_foot() {
        this.footsteps_time_interval =
            this.current_action === base_actions.WALK ? WALKING_TIME_INTERVAL : RUNNING_TIME_INTERVAL;
        if (this.current_action === base_actions.IDLE) {
            this.foot_forward = foot_forward_types.NONE;
        } else {
            this.foot_forward =
                this.foot_forward === foot_forward_types.LEFT ? foot_forward_types.RIGHT : foot_forward_types.LEFT;
        }
    }

    /*Kills all sprites and resets the timers

    Input: force_destroy [boolean] - If true, destroys steps instead*/
    clean_all(force_destroy = false) {
        this.new_step_timer.stop(true);
        this.expire_timer.stop(true);
        this.group.children.forEach((sprite: Phaser.Sprite) => {
            if (force_destroy) {
                sprite.destroy();
            } else {
                sprite.animations.currentAnim.stop(true);
                sprite.animations.currentAnim.onComplete.removeAll();
                sprite.kill();
            }
        });
        this.


service)
  if tonumber(status) and upstream_status_codes then
    upstream_status_codes:inc(1, {
      status,
      service.id or "",
      service.system_name or ""
    })
  end
end

local function add_resp_time(response_time, service)
  local time = tonumber(response_time)

  if time and upstream_resp_times then
    upstream_resp_times:observe(time, {
      service.id or "",
      service.system_name or ""
    })
  end
end

function _M.report(status, response_time, service)
  if not service then
    service = {}
  end
  inc_status_codes_counter(status, service)
  add_resp_time(response_time, service)
end

return _M


   const invalidFields = new Set(
          error.issues.map((issue) => issue.path?.[0]?.key).filter(Boolean)
        );

        // Clear errors for fields that are no longer invalid
        Object.keys(newErrors).forEach((field) => {
          if (!invalidFields.has(field)) {
            delete newErrors[field];
          }
        });

        this.errors = newErrors;
      }
    }
  };

  handleFormSubmit = async (data: FormResultData, event: SubmitEvent) => {
    this.isSubmitting = true;
    this.errors = {};

    const validationData = {
      ...data,
      country: this.selectedCountry
    };

    try {
      const validatedData = v.parse(this.FormSchema, validationData);

      // Your API call logic here
      await this.saveData(validatedData);

      // Handle success
      console.log('Form submitted successfully:', validatedData);

    } catch (error) {
      if (error instanceof v.ValiError) {
        this.errors = this.formatValiError(error);
      } else {
        // Handle API errors
        console.error('Submission failed:', error);
      }
    } finally {
      this.isSubmitting = false;
    }
  };

  formatValiError(valiError: v.ValiError) {
    const errors = {};

    for (const issue of valiError.issues) {
      const path = issue.path?.[0]?.key;
      if (path) {
        if (!errors[path]) {
          errors[path] = [];
        }
        errors[path].push(issue.message);
      }
    }

    return errors;
  }

  setSelectedCountry = (key: string | null) => {
    this.selectedCountry = key;
    // Clear country errors when selection is made
    if (key && this.errors.country) {
      const newErrors = { ...this.errors };
      delete newErrors.country;
      this.errors = newErrors;
    }
  };
}
```

## Decision Matrix

### Choose **Approach 1** (Changeset + Forms-Legacy) if

✅ You have existing complex changeset validation logic
✅ Large codebase with many changeset dependencies
✅ Team is experienced with ember-changeset
✅ Need the most gradual migration strategy
✅ Want minimal code changes initially

### Choose **Approach 2** (Changeset + Modern Forms) if

✅ Want modern component features while keeping changeset validation
✅ Need advanced UI features (slots, filtering, clearable inputs)
✅ Existing changeset validation is complex but components need modernization
✅ Want better accessibility and UX without rewriting validation logic
✅ Team is comfortable with some additional boilerplate

### Choose **Approach 3** (Valibot + Modern Forms) if

✅ Starting new features or greenfield projects
✅ Want modern TypeScript-first validation
✅ Prefer simpler, more direct validation
✅ Want the latest component features with automatic data binding
✅ Don't have complex existing changeset logic

## Migration Checklist

### Pre-Migration Planning

- [ ] Audit current changeset-form usage across codebase
- [ ] Identify complex validation rules and custom logic
- [ ] Choose migration approach based on project needs
- [ ] Plan migration order (start with simpler forms)

### Approach 1: Changeset + Forms-Legacy

- [ ] Remove `@frontile/changeset-form` dependency
- [ ] Install `@frontile/forms-legacy` if not present
- [ ] Convert ChangesetForm wrapper to direct changeset usage
- [ ] Implement manual changeset field binding
- [ ] Add form submission and validation handling
- [ ] Update imports to use forms-legacy components
- [ ] Refer to [


 the class manually.
 */

import { exists, mapValues } from '../runtime.ts';
import {
    EntityTypes,
    EntityTypesFromJSON,
    EntityTypesFromJSONTyped,
    EntityTypesToJSON,
    FieldAllOf,
    FieldAllOfFromJSON,
    FieldAllOfFromJSONTyped,
    FieldAllOfToJSON,
    FieldUpdate,
    FieldUpdateFromJSON,
    FieldUpdateFromJSONTyped,
    FieldUpdateToJSON,
    FieldUpdateDescription,
    FieldUpdateDescriptionFromJSON,
    FieldUpdateDescriptionFromJSONTyped,
    FieldUpdateDescriptionToJSON,
    FieldUpdateName,
    FieldUpdateNameFromJSON,
    FieldUpdateNameFromJSONTyped,
    FieldUpdateNameToJSON,
    Option,
    OptionFromJSON,
    OptionFromJSONTyped,
    OptionToJSON,
    Validation,
    ValidationFromJSON,
    ValidationFromJSONTyped,
    ValidationToJSON,
} from './index.ts';

/**
 *
 * @export
 * @interface Field
 */
export interface Field {
    /**
     *
     * @type {FieldUpdateName}
     * @memberof Field
     */
    name: FieldUpdateName;
    /**
     * Present if and only if `type` is `SINGLE_OPTION` or `MULTI_OPTION`.
     *
     * List of options (key, value, and translations) for the Custom Field.
     *
     * **Example:**
     * {
     *   {
     *     "key": "TEMPORARILY_CLOSED",
     *     "value": "Temporarily Closed"
     *   },
     *   {
     *     "key": "COMING_SOON",
     *     "value": "Coming Soon"
     *   },
     *   {
     *     "key": "CLOSED",
     *     "value": "Closed"
     *     "translations": [
     *       {
     *         "languageCode": "fr",
     *         "value": "Fermé"
     *       }
     *     ]
     *   },
     *   {
     *     "key": "OPEN",
     *     "value": "Open"
     *   }
     * }
     *
     * The behavior of the options' keys depends on which Custom Fields endpoint you are using:
     * * Get and List: The options' keys will be included in the response.
     * * Create: Do not specify option keys. They will be automatically assigned when the field is created.
     * * Update: If you include an option with an existing key, the option with that key will be updated with the value you specify. If you would like to add an option, specify its value but not its key, as the key will be automatically assigned when the option is added.
     *     * **NOTE:** If you do not include an existing option in your Update request, it will be deleted.
     * @type {Array<Option>}
     * @memberof Field
     */
    options?: Array<Option>;
    /**
     * The Custom Field's group.
     * @type {string}
     * @memberof Field
     */
    group?: FieldGroupEnum;
    /**
     *
     * @type {FieldUpdateDescription}
     * @memberof Field
     */
    description?: FieldUpdateDescription;
    /**
     * Custom Field multi-language profile behavior, which is one of:
     *
     * `PRIMARY_ONLY`: The Custom Field can only have a value set on its primary language profile.
     *
     * `OVERRIDABLE`: The Custom Field can have a value set on any alternate language profiles, which will override the primary language profile value when the alternate language profile is requested. When requested, if a value is not set for an alternate language profile, the primary language profile value will be returned.
     *
     * `LANGUAGE_SPECIFIC`: The Custom Field can have a value set on any alternate language profiles. When requested, if a va