text stringlengths 1 2.83M | id stringlengths 16 152 | metadata dict | __index_level_0__ int64 0 949 |
|---|---|---|---|
---
title: GetMaxPlayers
description: Returns the maximum number of players that can join the server, as set by the server variable 'maxplayers' in server.
tags: ["player"]
---
## คำอธิบาย
Returns the maximum number of players that can join the server, as set by the server variable 'maxplayers' in server.cfg.
| Name... | openmultiplayer/web/docs/translations/th/scripting/functions/GetMaxPlayers.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetMaxPlayers.md",
"repo_id": "openmultiplayer",
"token_count": 379
} | 397 |
---
title: GetPlayerCameraFrontVector
description: This function will return the current direction of player's aiming in 3-D space, the coords are relative to the camera position, see GetPlayerCameraPos.
tags: ["player"]
---
## คำอธิบาย
This function will return the current direction of player's aiming in 3-D space, ... | openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerCameraFrontVector.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerCameraFrontVector.md",
"repo_id": "openmultiplayer",
"token_count": 976
} | 398 |
---
title: GetPlayerInterior
description: Retrieves the player's current interior.
tags: ["player"]
---
## คำอธิบาย
Retrieves the player's current interior. A list of currently known interiors with their positions can be found on this page.
| Name | Description |
| -------- | ----------... | openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerInterior.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerInterior.md",
"repo_id": "openmultiplayer",
"token_count": 460
} | 399 |
---
title: GetPlayerSkin
description: Returns the class of the players skin.
tags: ["player"]
---
## คำอธิบาย
Returns the class of the players skin
| Name | Description |
| -------- | ---------------------------------------- |
| playerid | The player you want to get the skin from |
... | openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerSkin.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerSkin.md",
"repo_id": "openmultiplayer",
"token_count": 314
} | 400 |
---
title: GetPlayerWeaponData
description: Get the weapon and ammo in a specific player's weapon slot (e.
tags: ["player"]
---
## คำอธิบาย
Get the weapon and ammo in a specific player's weapon slot (e.g. the weapon in the 'SMG' slot).
| Name | Description |
|... | openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerWeaponData.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetPlayerWeaponData.md",
"repo_id": "openmultiplayer",
"token_count": 568
} | 401 |
---
title: GetVehicleDistanceFromPoint
description: This function can be used to calculate the distance (as a float) between a vehicle and another map coordinate.
tags: ["vehicle"]
---
## คำอธิบาย
This function can be used to calculate the distance (as a float) between a vehicle and another map coordinate. This can b... | openmultiplayer/web/docs/translations/th/scripting/functions/GetVehicleDistanceFromPoint.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/GetVehicleDistanceFromPoint.md",
"repo_id": "openmultiplayer",
"token_count": 676
} | 402 |
---
title: IsPlayerInVehicle
description: Checks if a player is in a specific vehicle.
tags: ["player", "vehicle"]
---
## คำอธิบาย
Checks if a player is in a specific vehicle.
| Name | Description |
| --------- | ----------------------------------------- |
| playerid | ID of the p... | openmultiplayer/web/docs/translations/th/scripting/functions/IsPlayerInVehicle.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/IsPlayerInVehicle.md",
"repo_id": "openmultiplayer",
"token_count": 561
} | 403 |
---
title: MoveObject
description: Move an object to a new position with a set speed.
tags: []
---
## คำอธิบาย
Move an object to a new position with a set speed. Players/vehicles will 'surf' the object as it moves.
| Name | Description |
| ----------- | ----------... | openmultiplayer/web/docs/translations/th/scripting/functions/MoveObject.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/MoveObject.md",
"repo_id": "openmultiplayer",
"token_count": 1469
} | 404 |
---
title: PlayerTextDrawAlignment
description: Set the text alignment of a player-textdraw.
tags: ["player", "textdraw", "playertextdraw"]
---
## คำอธิบาย
Set the text alignment of a player-textdraw.
| Name | Description |
| --------- | ------------------... | openmultiplayer/web/docs/translations/th/scripting/functions/PlayerTextDrawAlignment.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/PlayerTextDrawAlignment.md",
"repo_id": "openmultiplayer",
"token_count": 834
} | 405 |
---
title: PlayerTextDrawShow
description: Show a player-textdraw to the player it was created for.
tags: ["player", "textdraw", "playertextdraw"]
---
## คำอธิบาย
Show a player-textdraw to the player it was created for
| Name | Description |
| -------- | ------------------------... | openmultiplayer/web/docs/translations/th/scripting/functions/PlayerTextDrawShow.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/PlayerTextDrawShow.md",
"repo_id": "openmultiplayer",
"token_count": 612
} | 406 |
---
title: SendClientMessageToAll
description: Displays a message in chat to all players.
tags: []
---
## คำอธิบาย
Displays a message in chat to all players. This is a multi-player equivalent of SendClientMessage.
| Name | Description |
| --------------- | -----------... | openmultiplayer/web/docs/translations/th/scripting/functions/SendClientMessageToAll.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SendClientMessageToAll.md",
"repo_id": "openmultiplayer",
"token_count": 487
} | 407 |
---
title: SetNameTagDrawDistance
description: Set the maximum distance to display the names of players.
tags: []
---
## คำอธิบาย
Set the maximum distance to display the names of players.
| Name | Description |
| -------------- | -------------------- |
| Float:distance | The distance to set. |
##... | openmultiplayer/web/docs/translations/th/scripting/functions/SetNameTagDrawDistance.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetNameTagDrawDistance.md",
"repo_id": "openmultiplayer",
"token_count": 318
} | 408 |
---
title: SetPlayerChatBubble
description: Creates a chat bubble above a player's name tag.
tags: ["player"]
---
## คำอธิบาย
Creates a chat bubble above a player's name tag.
| Name | Description |
| ------------ | -----------------------------------------... | openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerChatBubble.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerChatBubble.md",
"repo_id": "openmultiplayer",
"token_count": 620
} | 409 |
---
title: SetPlayerObjectRot
description: Set the rotation of an object on the X, Y and Z axis.
tags: ["player"]
---
## คำอธิบาย
Set the rotation of an object on the X, Y and Z axis.
| Name | Description |
| ---------- | -------------------------------------------------... | openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerObjectRot.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerObjectRot.md",
"repo_id": "openmultiplayer",
"token_count": 737
} | 410 |
---
title: SetSVarFloat
description: Set a float server variable.
tags: []
---
:::warning
This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions!
:::
## คำอธิบาย
Set a float server variable.
| Name | Description |
| ----------- | -------------------------------... | openmultiplayer/web/docs/translations/th/scripting/functions/SetSVarFloat.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetSVarFloat.md",
"repo_id": "openmultiplayer",
"token_count": 429
} | 411 |
---
title: SetVehicleVelocity
description: Sets the X, Y and Z velocity of a vehicle.
tags: ["vehicle"]
---
## คำอธิบาย
Sets the X, Y and Z velocity of a vehicle.
| Name | Description |
| --------- | --------------------------------------------- |
| vehicleid | The ID of the ve... | openmultiplayer/web/docs/translations/th/scripting/functions/SetVehicleVelocity.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetVehicleVelocity.md",
"repo_id": "openmultiplayer",
"token_count": 492
} | 412 |
---
title: StopRecordingPlayerData
description: Stops all the recordings that had been started with StartRecordingPlayerData for a specific player.
tags: ["player"]
---
## คำอธิบาย
Stops all the recordings that had been started with StartRecordingPlayerData for a specific player.
| Name | Description ... | openmultiplayer/web/docs/translations/th/scripting/functions/StopRecordingPlayerData.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/StopRecordingPlayerData.md",
"repo_id": "openmultiplayer",
"token_count": 387
} | 413 |
---
title: TextDrawSetSelectable
description: Sets whether a textdraw can be selected (clicked on) or not.
tags: ["textdraw"]
---
## คำอธิบาย
Sets whether a textdraw can be selected (clicked on) or not
| Name | Description |
|----------|--------------------... | openmultiplayer/web/docs/translations/th/scripting/functions/TextDrawSetSelectable.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/TextDrawSetSelectable.md",
"repo_id": "openmultiplayer",
"token_count": 676
} | 414 |
---
title: VectorSize
description: Returns the norm (length) of the provided vector.
tags: []
---
## คำอธิบาย
Returns the norm (length) of the provided vector.
| Name | Description |
| ------- | ------------------------------------- |
| Float:X | The vector's magnitude on the X axis. |
|... | openmultiplayer/web/docs/translations/th/scripting/functions/VectorSize.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/VectorSize.md",
"repo_id": "openmultiplayer",
"token_count": 428
} | 415 |
---
title: float
description: Converts an integer into a float.
tags: []
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Converts an integer into a float.
| Name | Description |
| ----- | ----------------------------------- |
| value | Integer value to convert t... | openmultiplayer/web/docs/translations/th/scripting/functions/float.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/float.md",
"repo_id": "openmultiplayer",
"token_count": 319
} | 416 |
---
title: fmatch
description: Find a filename matching a pattern.
tags: []
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Find a filename matching a pattern.
| Name | Description |
| ------------- | --------------------------... | openmultiplayer/web/docs/translations/th/scripting/functions/fmatch.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/fmatch.md",
"repo_id": "openmultiplayer",
"token_count": 672
} | 417 |
---
title: strins
description: Insert a string into another string.
tags: []
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Insert a string into another string.
| Name | Description |
| ----------------------- | ------------------------... | openmultiplayer/web/docs/translations/th/scripting/functions/strins.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/strins.md",
"repo_id": "openmultiplayer",
"token_count": 616
} | 418 |
---
title: Material Text Alignments
description: A list of Material Text Alignments
---
## Text alignments
| ID | Value |
| --------------------------------- | ----- |
| OBJECT_MATERIAL_TEXT_ALIGN_LEFT | 0 |
| OBJECT_MATERIAL_TEXT_ALIGN_CENTER | 1 |
| OBJECT_MATERIAL_TEXT_ALIG... | openmultiplayer/web/docs/translations/th/scripting/resources/materialtextalignment.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/resources/materialtextalignment.md",
"repo_id": "openmultiplayer",
"token_count": 232
} | 419 |
---
title: OnClientMessage
description: Bu callback, NPC bir ClientMessage algılandığında tetiklenir.
tags: []
---
## Açıklama
Bu callback, NPC bir ClientMessage algılandığında tetiklenir. Bu, örneğin bir SendClientMessageToAll fonksiyonu gönderdiğinizde oyuncuya SendClientMessage fonksiyonu yansıdığı anda tetiklenec... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnClientMessage.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnClientMessage.md",
"repo_id": "openmultiplayer",
"token_count": 354
} | 420 |
---
title: OnPlayerDisconnect
description: Bu callback oyuncu sunucudan ayrıldığında çağrılır.
tags: ["player"]
---
## Açıklama
Bu callback oyuncu sunucudan ayrıldığında çağrılır.
| İsim | Açıklama |
| -------- | ---------------------------------- |
| playerid | Sunucudan ayrılan oyuncu... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerDisconnect.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerDisconnect.md",
"repo_id": "openmultiplayer",
"token_count": 583
} | 421 |
---
title: OnPlayerPickUpPickup
description: Fonksiyon, oyuncu CreatePickup ile oluşturulan bir işaretin (pickup) üstüne geldiğinde çağrılır.
tags: ["player"]
---
## Açıklama
Fonksiyon, oyuncu CreatePickup ile oluşturulan bir işaretin (pickup) üstüne geldiğinde çağrılır.
| Parametre | Açıklama ... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerPickUpPickup.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerPickUpPickup.md",
"repo_id": "openmultiplayer",
"token_count": 598
} | 422 |
---
title: OnTrailerUpdate
description: Bu fonksiyon, oyuncu aracına römork bağladığında çağrılır.
tags: []
---
## Açıklama
Bu fonksiyon, oyuncu aracına römork bağladığında çağrılır.
| Parametre | Açıklama |
| --------- | ----------------------------------------------- |
| play... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnTrailerUpdate.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnTrailerUpdate.md",
"repo_id": "openmultiplayer",
"token_count": 722
} | 423 |
---
title: AddSimpleModel
description: İndirmek için yeni bir özel basit nesne modeli ekler.
tags: []
---
:::warning
Bu işlev SA-MP 0.3.DL R1'e eklenmiştir ve önceki sürümlerde çalışmayacaktır!
:::
## Açıklama
İndirmek için yeni bir özel basit nesne modeli ekler. Model dosyaları, oynatıcının belgelerinde\GTA San A... | openmultiplayer/web/docs/translations/tr/scripting/functions/AddSimpleModel.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/AddSimpleModel.md",
"repo_id": "openmultiplayer",
"token_count": 1215
} | 424 |
---
title: AttachObjectToPlayer
description: Objeyi oyuncuya bağlama.
tags: ["player"]
---
## Açıklama
Bir objeyi oyuncuya bağlar.
| Parametre | Açıklama |
| ------------- | ------------------------------------------------------------------ |
| objectid ... | openmultiplayer/web/docs/translations/tr/scripting/functions/AttachObjectToPlayer.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/AttachObjectToPlayer.md",
"repo_id": "openmultiplayer",
"token_count": 1329
} | 425 |
---
title: CreateExplosionForPlayer
description: Tek bir oyuncunun gördüğü patlama oluşturma.
tags: ["player"]
---
## Açıklama
Tek bir oyuncunun gördüğü patlama oluşturma. Bu, patlamaları diğer oyunculardan izole etmek veya yalnızca belirli sanal dünyalarda görünmelerini sağlamak için kullanılabilir.
| Parametre ... | openmultiplayer/web/docs/translations/tr/scripting/functions/CreateExplosionForPlayer.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/CreateExplosionForPlayer.md",
"repo_id": "openmultiplayer",
"token_count": 744
} | 426 |
---
title: "Anahtar Kelimeler: Direktifler"
---
Direktifler, derleyiciye kaynak kodunuzu nasıl yorumlaması gerektiğini kontrol etmek için iletilen talimatlardır.
## `#assert`
Bu, sabit ifadenin doğru olup olmadığını kontrol eder ve doğru değilse derlemeyi duraklatır.
```c
#define MOO 10
#assert MOO > 5
```
Bu soru... | openmultiplayer/web/docs/translations/tr/scripting/language/Directives.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/language/Directives.md",
"repo_id": "openmultiplayer",
"token_count": 7041
} | 427 |
---
title: "Gecikme Telafisi"
description: Gecikme telafisi açıklaması.
---
SA-MP sunucularında 0.3z'den bu yana ateş edilen mermiler için gecikme telafisi varsayılan olarak etkindir. [server.cfg](server.cfg) dosyasında `lagcompmode` sunucu değişkenini kullanarak etkinleştirilebilir veya devre dışı bırakılabilir. Bu d... | openmultiplayer/web/docs/translations/tr/server/LagCompensation.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/server/LagCompensation.md",
"repo_id": "openmultiplayer",
"token_count": 308
} | 428 |
---
title: OnEnterExitModShop
description: 当玩家进入或离开改装店时,这个回调函数被调用。
tags: []
---
## 描述
当玩家进入或离开改装店时,这个回调函数被调用。
| 参数名 | 描述 |
| ---------- | ------------------------------------------- |
| playerid | 进入或离开改装店的玩家的 ID |
| enterexit | 1 表示玩家进入,0 表示玩家离开 ... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnEnterExitModShop.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnEnterExitModShop.md",
"repo_id": "openmultiplayer",
"token_count": 687
} | 429 |
---
title: OnPlayerClickPlayerTextDraw
description: 这个回调函数在玩家点击玩家-文本绘制时被调用。
tags: ["player", "textdraw", "playertextdraw"]
---
## 描述
这个回调函数在玩家点击玩家-文本绘制时被调用。当玩家取消选择模式(ESC)时它不被调用,不过,OnPlayerClickTextDraw 回调会调用。
| 参数名 | 描述 |
| ------------ | ------------------------------ |
| playerid ... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerClickPlayerTextDraw.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerClickPlayerTextDraw.md",
"repo_id": "openmultiplayer",
"token_count": 1369
} | 430 |
---
title: OnPlayerInteriorChange
description: 当某个玩家的内部空间改变时调用。
tags: ["player"]
---
## 描述
当某个玩家的内部空间改变时调用。可以由 [SetPlayerInterior](../functions/SetPlayerInterior) 触发,或者当玩家进入/离开建筑物时触发。
| 参数名 | 描述 |
| ------------- | --------------------------- |
| playerid | 改变了内部空间的玩家 ID。 |
| new... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerInteriorChange.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerInteriorChange.md",
"repo_id": "openmultiplayer",
"token_count": 716
} | 431 |
---
title: OnPlayerText
description: 当玩家发送聊天消息时调用。
tags: ["player"]
---
## 描述
当玩家发送聊天消息时调用。
| 参数名 | 描述 |
| -------- | --------------------- |
| playerid | 输入文本的玩家的 ID。 |
| text[] | 玩家输入的文本。 |
## 返回值
它在过滤脚本中总是先被调用,因此在那里返回 0 会阻止其他脚本看到它。
## 案例
```c
public OnPlayerText(playerid, text[])
{
... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerText.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerText.md",
"repo_id": "openmultiplayer",
"token_count": 531
} | 432 |
---
title: OnVehicleStreamOut
description: 当一辆车为玩家的客户端流出时,这个回调被调用(离太远了,以至于玩家看不到它)。
tags: ["vehicle"]
---
## 描述
当一辆车为玩家的客户端流出时,这个回调被调用(离太远了,以至于玩家看不到它)。
| 参数名 | 描述 |
| ----------- | ------------------------- |
| vehicleid | 为玩家流出的车辆 ID。 |
| forplayerid | 不再流入该车辆的玩家 ID。 |
## 返回值
它在过滤脚本... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnVehicleStreamOut.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnVehicleStreamOut.md",
"repo_id": "openmultiplayer",
"token_count": 488
} | 433 |
---
title: Attach3DTextLabelToPlayer
description: 将三维文本标签附加到玩家身上。
tags: ["player", "3dtextlabel"]
---
## 描述
将三维文本标签附加到玩家身上。
| 参数名 | 说明 |
| --------- | ------------------------------------------------------ |
| Text3D:textid | 要附加的三维文本标签的 ID。由 Create3DTextLabel 返回。... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/Attach3DTextLabelToPlayer.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/Attach3DTextLabelToPlayer.md",
"repo_id": "openmultiplayer",
"token_count": 1052
} | 434 |
---
title: GetPlayerCameraPos
description: 获取玩家视角的位置。
tags: ["player", "camera"]
---
## 描述
获取玩家视角的位置。
| 参数名 | 说明 |
| -------- | --------------------------------------- |
| playerid | 要获得视角位置的玩家 ID。 |
| Float:x | 通过引用传递,存储 X 坐标的浮点型变量。 |
| Float:y | 通过引用传递,存储 Y 坐标的浮... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/GetPlayerCameraPos.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/GetPlayerCameraPos.md",
"repo_id": "openmultiplayer",
"token_count": 891
} | 435 |
---
title: atan
description: 以度为单位求正切的多值倒数。
tags: ["math"]
---
<LowercaseNoteCN />
:::warning
请注意,y 值是第一个参数,x 值是第二个参数。这是因为数学符号是 y/x(即 y 除以 x),而惯例是按照对它们执行的操作顺序写入操作数。
:::
## 描述
以度为单位求正切的多值倒数。在三角函数中,反正切是正切的逆运算。为了计算该值,该函数会考虑两个参数的符号以确定象限。
| 参数名 | 说明 |
| ------- | --------------------- |
| Float:y | ... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/atan2.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/atan2.md",
"repo_id": "openmultiplayer",
"token_count": 859
} | 436 |
---
title: "Advanced Structures"
---
## Array manipulation
### Finding an empty slot properly
This example shows how to find an empty slot in an array using standard coding practices.
```c
new
gMyArray[10];
stock FindEmptySlot()
{
new
i = 0;
while (i < sizeof (gMyArray) && gMyArray[i])
{
... | openmultiplayer/web/docs/tutorials/AdvancedStructures.md/0 | {
"file_path": "openmultiplayer/web/docs/tutorials/AdvancedStructures.md",
"repo_id": "openmultiplayer",
"token_count": 4819
} | 437 |
{
"printWidth": 999,
"proseWrap": "never"
}
| openmultiplayer/web/frontend/content/.prettierrc/0 | {
"file_path": "openmultiplayer/web/frontend/content/.prettierrc",
"repo_id": "openmultiplayer",
"token_count": 23
} | 438 |
# Open Multiplayer
Nadolazeći mod za _Grand Theft Auto: San Andreas_ koji će u potpunosti biti kompatibilan sa postojećim multiplayer modom _San Andreas Multiplayer._
<br />
Ovo znači da će **postojeći SA:MP klijent i sve SA:MP skripte raditi sa/na open.mp** i, pored toga, mnoge će greške također biti ispravljene un... | openmultiplayer/web/frontend/content/bs/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/bs/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 259
} | 439 |
---
title: Turfs (formerly gangzones) module
date: "2019-10-19T04:20:00"
author: J0sh
---
Hello! I have just finished our Turf implementation into the server and I thought of posting a overview of this module and to show we haven't quit or anything!
```pawn
// Creates a Turf. A playerid can be passed in order to make... | openmultiplayer/web/frontend/content/en/blog/turfs-formerly-gangzones-module.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/en/blog/turfs-formerly-gangzones-module.mdx",
"repo_id": "openmultiplayer",
"token_count": 523
} | 440 |
# Open Multiplayer
Nadolazeći multiplayer mod za _Grand Theft Auto: San Andreas_ koji će biti u potpunosti kompatibilan sa već postojećim multiplayer modom, _San Andreas Multiplayer._
To znači da će **postojeći SA:MP klijent i sve postojeće SA:MP skripte biti kompatibilne sa open.mp-om,** a osim toga, mnoge pogreške ... | openmultiplayer/web/frontend/content/hr/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/hr/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 282
} | 441 |
# FAQ
<hr />
## Wat is open.mp?
open.mp (Open Multiplayer, OMP) is een alternatieve multiplayer modificatie voor San Andreas,
gestart als reactie op de spijtige toename van problemen met updates en het management van SA:MP. De
eerste versie zal enkel een alternatief voor de server bevatten, en bestaande SA:MP client... | openmultiplayer/web/frontend/content/nl/faq.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/nl/faq.mdx",
"repo_id": "openmultiplayer",
"token_count": 2010
} | 442 |
---
title: Синхронизација возила
date: "2019-11-09T11:33:00"
author: Southclaws
---
Брза објава демонстрира еволуцију синхронизације возила.
<video autoPlay loop width="100%" controls>
<source src="https://assets.open.mp/assets/images/videos/vehicle_sync_01.mp4" type="video/mp4" />
Извините, Ваш претраживач не по... | openmultiplayer/web/frontend/content/sr/blog/vehicle-sync.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/sr/blog/vehicle-sync.mdx",
"repo_id": "openmultiplayer",
"token_count": 477
} | 443 |
---
title: How can I join the team?
date: "2021-08-29T01:24:09"
author: Potassium
---
➖ ЯК МОЖНА ПРИЄДНАТИСЯ ДО КОМАНДИ?
Нам це питання задають БАГАТО, тому ми подумали, що маємо написати про це повідомлення!
По-перше, величезне спасибі за зацікавленість зробити свій внесок!
Як ви знаєте, ми всі ветерани SA-MP грав... | openmultiplayer/web/frontend/content/uk/blog/how-to-join-the-team.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/uk/blog/how-to-join-the-team.mdx",
"repo_id": "openmultiplayer",
"token_count": 1780
} | 444 |
---
title: 地盘(原帮派区域)模块
date: "2019-10-19T04:20:00"
author: J0sh
---
大家好! 我刚刚完成了我们在服务器中的地盘的实现,我想在这里发表一下这个模块的概述,以表明我们没有放弃任何东西!
```pawn
// 创建一个地盘。为了使它成为某个玩家的地盘,可以传递玩家ID参数。
native Turf:Turf_Create(Float:minx, Float:miny, Float:maxx, Float:maxy, Player:owner = INVALID_PLAYER_ID);
// 销毁一个地盘。
native Turf_Destroy(Turf:turf)... | openmultiplayer/web/frontend/content/zh-cn/blog/turfs-formerly-gangzones-module.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/zh-cn/blog/turfs-formerly-gangzones-module.mdx",
"repo_id": "openmultiplayer",
"token_count": 992
} | 445 |
import useSWR from "swr";
import { apiSWR } from "src/fetcher/fetcher";
import { Link } from "src/types/_generated_GitHub";
import { User, UserSchema } from "src/types/_generated_User";
import { APIError } from "src/types/_generated_Error";
import { LinkSchema } from "src/types/_generated_Discord";
type Props = {
b... | openmultiplayer/web/frontend/src/components/OAuthButton.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/OAuthButton.tsx",
"repo_id": "openmultiplayer",
"token_count": 748
} | 446 |
import { Flex, Link } from "@chakra-ui/layout";
import { useColorModeValue } from "@chakra-ui/react";
import NextLink from "next/link";
import React, { FC } from "react";
import { WEB_ADDRESS } from "src/config";
import { User } from "src/types/_generated_User";
import ProfilePicture from "./ProfilePicture";
type Prop... | openmultiplayer/web/frontend/src/components/member/MemberLink.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/member/MemberLink.tsx",
"repo_id": "openmultiplayer",
"token_count": 339
} | 447 |
import Admonition from "../Admonition";
export default function TipNpcCallback() {
return (
<Admonition type="tip">
<p>This callback can also be called by NPC.</p>
</Admonition>
);
}
| openmultiplayer/web/frontend/src/components/templates/npc-callbacks-tip.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/templates/npc-callbacks-tip.tsx",
"repo_id": "openmultiplayer",
"token_count": 73
} | 448 |
import Admonition from "../../../Admonition";
export default function NoteLowercase({ name = "函数" }) {
return (
<Admonition type="warning">
<p>这个${name}以小写字母开头。</p>
</Admonition>
);
}
| openmultiplayer/web/frontend/src/components/templates/translations/zh-cn/lowercase-note.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/templates/translations/zh-cn/lowercase-note.tsx",
"repo_id": "openmultiplayer",
"token_count": 98
} | 449 |
import type { AppProps } from "next/app";
import Router from "next/router";
import { DefaultSeo } from "next-seo";
import { ToastContainer } from "react-nextjs-toast";
import NProgress from "nprogress";
import Nav from "src/components/site/Nav";
import Footer from "src/components/site/Footer";
import "normalize.css";... | openmultiplayer/web/frontend/src/pages/_app.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/pages/_app.tsx",
"repo_id": "openmultiplayer",
"token_count": 976
} | 450 |
import { Box, Heading } from "@chakra-ui/react";
import { NextSeo } from "next-seo";
import ErrorBanner from "src/components/ErrorBanner";
import { CardList } from "src/components/generic/CardList";
import ServerRow from "src/components/listing/ServerRow";
import LoadingBanner from "src/components/LoadingBanner";
impor... | openmultiplayer/web/frontend/src/pages/partners.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/pages/partners.tsx",
"repo_id": "openmultiplayer",
"token_count": 987
} | 451 |
module github.com/openmultiplayer/web
go 1.14
require (
github.com/Masterminds/semver v1.5.0
github.com/PuerkitoBio/goquery v1.6.0
github.com/RoaringBitmap/roaring v0.9.4 // indirect
github.com/Southclaws/go-samp-query v1.2.1
github.com/Southclaws/qstring v1.1.0
github.com/Southclaws/sampctl v0.0.0-202101091436... | openmultiplayer/web/go.mod/0 | {
"file_path": "openmultiplayer/web/go.mod",
"repo_id": "openmultiplayer",
"token_count": 959
} | 452 |
package web
import (
"net/http"
)
// RouteUse is router.User but for individual routes.
func RouteUse(mws ...func(http.Handler) http.Handler) func(http.Handler) http.Handler {
return func(f http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
var handler = f
fo... | openmultiplayer/web/internal/web/middleware.go/0 | {
"file_path": "openmultiplayer/web/internal/web/middleware.go",
"repo_id": "openmultiplayer",
"token_count": 159
} | 453 |
-- AlterTable
ALTER TABLE "Server" ADD COLUMN "pending" BOOL NOT NULL DEFAULT false;
-- CreateTable
CREATE TABLE "ServerIPBlacklist" (
"id" STRING NOT NULL,
"ip" STRING NOT NULL,
CONSTRAINT "ServerIPBlacklist_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "ServerIPBlacklist_ip_key" ON... | openmultiplayer/web/prisma/migrations/20231021221052_add_pending_status_and_blacklist_table/migration.sql/0 | {
"file_path": "openmultiplayer/web/prisma/migrations/20231021221052_add_pending_status_and_blacklist_table/migration.sql",
"repo_id": "openmultiplayer",
"token_count": 130
} | 454 |
{
"files.exclude": {
"node_modules": true,
"data": true
}
}
| overleaf/web/.vscode/settings.json/0 | {
"file_path": "overleaf/web/.vscode/settings.json",
"repo_id": "overleaf",
"token_count": 35
} | 455 |
const Errors = require('../Errors/Errors')
class InvalidEmailError extends Errors.BackwardCompatibleError {}
class InvalidPasswordError extends Errors.BackwardCompatibleError {}
module.exports = {
InvalidEmailError,
InvalidPasswordError,
}
| overleaf/web/app/src/Features/Authentication/AuthenticationErrors.js/0 | {
"file_path": "overleaf/web/app/src/Features/Authentication/AuthenticationErrors.js",
"repo_id": "overleaf",
"token_count": 64
} | 456 |
const { callbackify } = require('util')
const pLimit = require('p-limit')
const { ObjectId } = require('mongodb')
const OError = require('@overleaf/o-error')
const { Project } = require('../../models/Project')
const UserGetter = require('../User/UserGetter')
const ProjectGetter = require('../Project/ProjectGetter')
con... | overleaf/web/app/src/Features/Collaborators/CollaboratorsGetter.js/0 | {
"file_path": "overleaf/web/app/src/Features/Collaborators/CollaboratorsGetter.js",
"repo_id": "overleaf",
"token_count": 2906
} | 457 |
/* eslint-disable
max-len,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Full docs: ... | overleaf/web/app/src/Features/Cooldown/CooldownMiddleware.js/0 | {
"file_path": "overleaf/web/app/src/Features/Cooldown/CooldownMiddleware.js",
"repo_id": "overleaf",
"token_count": 444
} | 458 |
function _getIndefiniteArticle(providerName) {
const vowels = ['a', 'e', 'i', 'o', 'u']
if (vowels.includes(providerName.charAt(0).toLowerCase())) return 'an'
return 'a'
}
function linkOrUnlink(accountLinked, providerName, email) {
const action = accountLinked ? 'linked' : 'no longer linked'
const actionDesc... | overleaf/web/app/src/Features/Email/EmailOptionsHelper.js/0 | {
"file_path": "overleaf/web/app/src/Features/Email/EmailOptionsHelper.js",
"repo_id": "overleaf",
"token_count": 230
} | 459 |
function shouldDisplayFeature(req, name, variantFlag) {
if (req.query && req.query[name]) {
return req.query[name] === 'true'
} else {
return variantFlag === true
}
}
module.exports = { shouldDisplayFeature }
| overleaf/web/app/src/Features/Helpers/FeatureFlag.js/0 | {
"file_path": "overleaf/web/app/src/Features/Helpers/FeatureFlag.js",
"repo_id": "overleaf",
"token_count": 75
} | 460 |
const async = require('async')
const _ = require('underscore')
const { callbackify } = require('util')
const { ObjectId } = require('mongodb')
const Settings = require('@overleaf/settings')
const {
getInstitutionAffiliations,
promises: InstitutionsAPIPromises,
} = require('./InstitutionsAPI')
const FeaturesUpdater ... | overleaf/web/app/src/Features/Institutions/InstitutionsManager.js/0 | {
"file_path": "overleaf/web/app/src/Features/Institutions/InstitutionsManager.js",
"repo_id": "overleaf",
"token_count": 3847
} | 461 |
const settings = require('@overleaf/settings')
const UserAuditLogHandler = require('../User/UserAuditLogHandler')
const UserGetter = require('../User/UserGetter')
const OneTimeTokenHandler = require('../Security/OneTimeTokenHandler')
const EmailHandler = require('../Email/EmailHandler')
const AuthenticationManager = re... | overleaf/web/app/src/Features/PasswordReset/PasswordResetHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/PasswordReset/PasswordResetHandler.js",
"repo_id": "overleaf",
"token_count": 1402
} | 462 |
const { db } = require('../../infrastructure/mongodb')
const { normalizeQuery } = require('../Helpers/Mongo')
const OError = require('@overleaf/o-error')
const metrics = require('@overleaf/metrics')
const { promisifyAll } = require('../../util/promises')
const { Project } = require('../../models/Project')
const logger ... | overleaf/web/app/src/Features/Project/ProjectGetter.js/0 | {
"file_path": "overleaf/web/app/src/Features/Project/ProjectGetter.js",
"repo_id": "overleaf",
"token_count": 2090
} | 463 |
const { SamlLog } = require('../../models/SamlLog')
const logger = require('logger-sharelatex')
function log(providerId, sessionId, data) {
try {
const samlLog = new SamlLog()
samlLog.providerId = providerId = (providerId || '').toString()
samlLog.sessionId = sessionId = (sessionId || '').toString().subs... | overleaf/web/app/src/Features/SamlLog/SamlLogHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/SamlLog/SamlLogHandler.js",
"repo_id": "overleaf",
"token_count": 348
} | 464 |
const async = require('async')
const OError = require('@overleaf/o-error')
const PlansLocator = require('./PlansLocator')
const _ = require('lodash')
const SubscriptionLocator = require('./SubscriptionLocator')
const UserFeaturesUpdater = require('./UserFeaturesUpdater')
const Settings = require('@overleaf/settings')
c... | overleaf/web/app/src/Features/Subscription/FeaturesUpdater.js/0 | {
"file_path": "overleaf/web/app/src/Features/Subscription/FeaturesUpdater.js",
"repo_id": "overleaf",
"token_count": 4372
} | 465 |
const Settings = require('@overleaf/settings')
const RecurlyWrapper = require('./RecurlyWrapper')
const PlansLocator = require('./PlansLocator')
const SubscriptionFormatters = require('./SubscriptionFormatters')
const SubscriptionLocator = require('./SubscriptionLocator')
const V1SubscriptionManager = require('./V1Subs... | overleaf/web/app/src/Features/Subscription/SubscriptionViewModelBuilder.js/0 | {
"file_path": "overleaf/web/app/src/Features/Subscription/SubscriptionViewModelBuilder.js",
"repo_id": "overleaf",
"token_count": 4949
} | 466 |
const Settings = require('@overleaf/settings')
const request = require('request-promise-native')
async function getQueues(userId) {
return request({
uri: `${Settings.apis.tpdsworker.url}/queues/${userId}`,
json: true,
})
}
module.exports = {
promises: {
getQueues,
},
}
| overleaf/web/app/src/Features/ThirdPartyDataStore/TpdsQueueManager.js/0 | {
"file_path": "overleaf/web/app/src/Features/ThirdPartyDataStore/TpdsQueueManager.js",
"repo_id": "overleaf",
"token_count": 111
} | 467 |
const OError = require('@overleaf/o-error')
const { User } = require('../../models/User')
const { callbackify } = require('util')
const MAX_AUDIT_LOG_ENTRIES = 200
function _canHaveNoInitiatorId(operation, info) {
if (operation === 'reset-password') return true
if (operation === 'unlink-sso' && info.providerId ==... | overleaf/web/app/src/Features/User/UserAuditLogHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/User/UserAuditLogHandler.js",
"repo_id": "overleaf",
"token_count": 580
} | 468 |
const logger = require('logger-sharelatex')
const OError = require('@overleaf/o-error')
const { db } = require('../../infrastructure/mongodb')
const { normalizeQuery } = require('../Helpers/Mongo')
const metrics = require('@overleaf/metrics')
const async = require('async')
const { callbackify, promisify } = require('ut... | overleaf/web/app/src/Features/User/UserUpdater.js/0 | {
"file_path": "overleaf/web/app/src/Features/User/UserUpdater.js",
"repo_id": "overleaf",
"token_count": 4006
} | 469 |
/* eslint-disable
node/handle-callback-err,
max-len,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* F... | overleaf/web/app/src/infrastructure/FileWriter.js/0 | {
"file_path": "overleaf/web/app/src/infrastructure/FileWriter.js",
"repo_id": "overleaf",
"token_count": 2247
} | 470 |
module.exports = {
acceptsJson(req) {
return req.accepts(['html', 'json']) === 'json'
},
}
| overleaf/web/app/src/infrastructure/RequestContentTypeDetection.js/0 | {
"file_path": "overleaf/web/app/src/infrastructure/RequestContentTypeDetection.js",
"repo_id": "overleaf",
"token_count": 42
} | 471 |
const mongoose = require('../infrastructure/Mongoose')
const { DocSchema } = require('./Doc')
const { FileSchema } = require('./File')
const { Schema } = mongoose
const FolderSchema = new Schema({
name: { type: String, default: 'new folder' },
})
FolderSchema.add({
docs: [DocSchema],
fileRefs: [FileSchema],
... | overleaf/web/app/src/models/Folder.js/0 | {
"file_path": "overleaf/web/app/src/models/Folder.js",
"repo_id": "overleaf",
"token_count": 153
} | 472 |
const Settings = require('@overleaf/settings')
const mongoose = require('../infrastructure/Mongoose')
const TokenGenerator = require('../Features/TokenGenerator/TokenGenerator')
const { Schema } = mongoose
const { ObjectId } = Schema
// See https://stackoverflow.com/questions/386294/what-is-the-maximum-length-of-a-val... | overleaf/web/app/src/models/User.js/0 | {
"file_path": "overleaf/web/app/src/models/User.js",
"repo_id": "overleaf",
"token_count": 2101
} | 473 |
extends ../layout
block content
.content.content-alt
.container
.row
.col-xs-12
.card
.page-header
h1 Admin Panel
tabset(bookmarkable-tabset ng-cloak)
tab(heading="System Messages" bookmarkable-tab="system-messages")
each message in systemMessages
.alert.alert-... | overleaf/web/app/views/admin/index.pug/0 | {
"file_path": "overleaf/web/app/views/admin/index.pug",
"repo_id": "overleaf",
"token_count": 1659
} | 474 |
div.binary-file-header
// Linked Files: URL
div(ng-if="openFile.linkedFileData.provider == 'url'")
p
i.fa.fa-fw.fa-external-link-square.fa-rotate-180.linked-file-icon
| Imported from
|
a(ng-href='{{openFile.linkedFileData.url}}') {{ displayUrl(openFile.linkedFileData.url) }}
|
... | overleaf/web/app/views/project/editor/binary-file-header.pug/0 | {
"file_path": "overleaf/web/app/views/project/editor/binary-file-header.pug",
"repo_id": "overleaf",
"token_count": 1037
} | 475 |
.history-toolbar(
ng-controller="HistoryV2ToolbarController"
ng-if="ui.view == 'history' && history.isV2"
)
span.history-toolbar-selected-version(ng-show="history.loadingFileTree")
i.fa.fa-spin.fa-refresh
| #{translate("loading")}…
//- point-in-time mode info
span.history-toolbar-selected-version... | overleaf/web/app/views/project/editor/history/toolbarV2.pug/0 | {
"file_path": "overleaf/web/app/views/project/editor/history/toolbarV2.pug",
"repo_id": "overleaf",
"token_count": 1989
} | 476 |
.row
.col-xs-12(ng-cloak)
form.project-search.form-horizontal(role="form")
.form-group.has-feedback.has-feedback-left.col-md-7.col-xs-12
input.form-control.col-md-7.col-xs-12(
placeholder=translate('search_projects')+"…",
aria-label=translate('search_projects')+"…",
autofocus='autofocus',
... | overleaf/web/app/views/project/list/project-list.pug/0 | {
"file_path": "overleaf/web/app/views/project/list/project-list.pug",
"repo_id": "overleaf",
"token_count": 3607
} | 477 |
each institution in managedInstitutions
p
| You are a manager of
|
strong(ng-non-bindable)= institution.name
p
a.btn.btn-primary(href="/metrics/institutions/" + institution.v1Id)
i.fa.fa-fw.fa-line-chart
|
| View metrics
p
a(href="/institutions/" + institution.v1Id + "/hub")
i.fa.fa-fw.f... | overleaf/web/app/views/subscriptions/dashboard/_managed_institutions.pug/0 | {
"file_path": "overleaf/web/app/views/subscriptions/dashboard/_managed_institutions.pug",
"repo_id": "overleaf",
"token_count": 358
} | 478 |
extends ../layout
block content
main.content.content-alt#main-content
.container
.row
.col-md-6.col-md-offset-3.col-lg-4.col-lg-offset-4
.card
.page-header
h1 #{translate("confirm_email")}
form(
async-form="confirm-email",
name="confirmEmailForm"
action="/user/ema... | overleaf/web/app/views/user/confirm_email.pug/0 | {
"file_path": "overleaf/web/app/views/user/confirm_email.pug",
"repo_id": "overleaf",
"token_count": 447
} | 479 |
{
"presets": [
[
"@babel/react",
{
"runtime": "automatic"
}
],
[
"@babel/env",
{
"useBuiltIns": "usage",
"corejs": { "version": 3 }
}
]
],
"plugins": ["angularjs-annotate", "macros"],
// Target our current Node version in test environme... | overleaf/web/babel.config.json/0 | {
"file_path": "overleaf/web/babel.config.json",
"repo_id": "overleaf",
"token_count": 413
} | 480 |
version: "2.3"
volumes:
data:
services:
test_unit:
build: .
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
user: node
command: npm run test:unit:app
environment:
BASE_CONFIG:
SHARELATEX_CONFIG:
NODE_OPTIONS: "--unhandled-rejections=strict"
test_acceptance:
build: ... | overleaf/web/docker-compose.ci.yml/0 | {
"file_path": "overleaf/web/docker-compose.ci.yml",
"repo_id": "overleaf",
"token_count": 877
} | 481 |
import _ from 'lodash'
/* global MathJax */
import App from '../base'
export default App.directive('mathjax', function ($compile, $parse) {
return {
link(scope, element, attrs) {
if (!(MathJax && MathJax.Hub)) return
if (attrs.delimiter !== 'no-single-dollar') {
const inlineMathConfig =
... | overleaf/web/frontend/js/directives/mathjax.js/0 | {
"file_path": "overleaf/web/frontend/js/directives/mathjax.js",
"repo_id": "overleaf",
"token_count": 412
} | 482 |
import App from '../../../base'
import { react2angular } from 'react2angular'
import { rootContext } from '../../../shared/context/root-context'
import ChatPane from '../components/chat-pane'
App.controller('ReactChatController', function ($scope, ide) {
$scope.chatIsOpen = ide.$scope.ui.chatOpen
ide.$scope.$wat... | overleaf/web/frontend/js/features/chat/controllers/chat-controller.js/0 | {
"file_path": "overleaf/web/frontend/js/features/chat/controllers/chat-controller.js",
"repo_id": "overleaf",
"token_count": 233
} | 483 |
import React from 'react'
import PropTypes from 'prop-types'
import MenuButton from './menu-button'
import CobrandingLogo from './cobranding-logo'
import BackToProjectsButton from './back-to-projects-button'
import ChatToggleButton from './chat-toggle-button'
import OnlineUsersWidget from './online-users-widget'
import... | overleaf/web/frontend/js/features/editor-navigation-toolbar/components/toolbar-header.js/0 | {
"file_path": "overleaf/web/frontend/js/features/editor-navigation-toolbar/components/toolbar-header.js",
"repo_id": "overleaf",
"token_count": 1476
} | 484 |
import PropTypes from 'prop-types'
import { useTranslation } from 'react-i18next'
import Icon from '../../../shared/components/icon'
import iconTypeFromName from '../util/icon-type-from-name'
import { useSelectableEntity } from '../contexts/file-tree-selectable'
import FileTreeItemInner from './file-tree-item/file-t... | overleaf/web/frontend/js/features/file-tree/components/file-tree-doc.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/components/file-tree-doc.js",
"repo_id": "overleaf",
"token_count": 588
} | 485 |
import { createContext, useContext, useState } from 'react'
import PropTypes from 'prop-types'
const FileTreeCreateFormContext = createContext()
export const useFileTreeCreateForm = () => {
const context = useContext(FileTreeCreateFormContext)
if (!context) {
throw new Error(
'useFileTreeCreateForm is ... | overleaf/web/frontend/js/features/file-tree/contexts/file-tree-create-form.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/contexts/file-tree-create-form.js",
"repo_id": "overleaf",
"token_count": 260
} | 486 |
import { findInTree } from '../util/find-in-tree'
export function isNameUniqueInFolder(tree, parentFolderId, name) {
if (tree._id !== parentFolderId) {
tree = findInTree(tree, parentFolderId).entity
}
if (tree.docs.some(entity => entity.name === name)) return false
if (tree.fileRefs.some(entity => entity.... | overleaf/web/frontend/js/features/file-tree/util/is-name-unique-in-folder.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/util/is-name-unique-in-folder.js",
"repo_id": "overleaf",
"token_count": 140
} | 487 |
import './controllers/outline-controller'
import { matchOutline, nestOutline } from './outline-parser'
import isValidTeXFile from '../../main/is-valid-tex-file'
class OutlineManager {
constructor(ide, scope) {
this.ide = ide
this.scope = scope
this.shareJsDoc = null
this.isTexFile = false
this.fl... | overleaf/web/frontend/js/features/outline/outline-manager.js/0 | {
"file_path": "overleaf/web/frontend/js/features/outline/outline-manager.js",
"repo_id": "overleaf",
"token_count": 1303
} | 488 |
import { useCallback } from 'react'
import PropTypes from 'prop-types'
import { useShareProjectContext } from './share-project-modal'
import Icon from '../../../shared/components/icon'
import { Button, Col, Row, OverlayTrigger, Tooltip } from 'react-bootstrap'
import { Trans, useTranslation } from 'react-i18next'
impor... | overleaf/web/frontend/js/features/share-project-modal/components/invite.js/0 | {
"file_path": "overleaf/web/frontend/js/features/share-project-modal/components/invite.js",
"repo_id": "overleaf",
"token_count": 1202
} | 489 |
// window location-related functions in a separate module so they can be mocked/stubbed in tests
export function reload() {
window.location.reload()
}
export function assign(url) {
window.location.assign(url)
}
| overleaf/web/frontend/js/features/share-project-modal/utils/location.js/0 | {
"file_path": "overleaf/web/frontend/js/features/share-project-modal/utils/location.js",
"repo_id": "overleaf",
"token_count": 62
} | 490 |
import { getJSON } from '../../../infrastructure/fetch-json'
export function fetchWordCount(projectId, clsiServerId, options) {
let query = ''
if (clsiServerId) {
query = `?clsiserverid=${clsiServerId}`
}
return getJSON(`/project/${projectId}/wordcount${query}`, options)
}
| overleaf/web/frontend/js/features/word-count-modal/utils/api.js/0 | {
"file_path": "overleaf/web/frontend/js/features/word-count-modal/utils/api.js",
"repo_id": "overleaf",
"token_count": 103
} | 491 |
/*
EditorWatchdogManager is used for end-to-end checks of edits.
The editor UI is backed by Ace and CodeMirrors, which in turn are connected
to ShareJs documents in the frontend.
Edits propagate from the editor to ShareJs and are send through socket.io
and real-time to document-updater.
In document-upd... | overleaf/web/frontend/js/ide/connection/EditorWatchdogManager.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/connection/EditorWatchdogManager.js",
"repo_id": "overleaf",
"token_count": 2411
} | 492 |
/* eslint-disable
max-len,
no-cond-assign,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS103: Rewrite code to no longer use __guard__
* DS207: Conside... | overleaf/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/Helpers.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/Helpers.js",
"repo_id": "overleaf",
"token_count": 822
} | 493 |
import App from '../../../base'
App.controller('FileTreeController', function ($scope) {
$scope.openNewDocModal = () => {
window.dispatchEvent(
new CustomEvent('file-tree.start-creating', { detail: { mode: 'doc' } })
)
}
$scope.orderByFoldersFirst = function (entity) {
if ((entity != null ? ent... | overleaf/web/frontend/js/ide/file-tree/controllers/FileTreeController.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/file-tree/controllers/FileTreeController.js",
"repo_id": "overleaf",
"token_count": 152
} | 494 |
import _ from 'lodash'
/* eslint-disable
max-len,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Full doc... | overleaf/web/frontend/js/ide/history/components/historyLabelsList.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/history/components/historyLabelsList.js",
"repo_id": "overleaf",
"token_count": 2078
} | 495 |
/* eslint-disable no-useless-escape */
import PropTypes from 'prop-types'
function WikiLink({ url, children, skipPlainRendering }) {
if (window.wikiEnabled) {
return (
<a href={url} target="_blank">
{children}
</a>
)
} else {
return <>{children}</>
}
}
WikiLink.propTypes = {
ur... | overleaf/web/frontend/js/ide/human-readable-logs/HumanReadableLogsRules.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/human-readable-logs/HumanReadableLogsRules.js",
"repo_id": "overleaf",
"token_count": 9302
} | 496 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.