This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[include timelapse.cfg] # если еще не настроили таймлапсы то будет ошбку выдавать. на первое время можно закоментировать. | |
#[include macro.cfg] # если не копировали этот файл то тоже закоментить | |
# датчик филамента | |
[filament_switch_sensor filament_detection] | |
pause_on_runout: True | |
# When set to True, a PAUSE will execute immediately after a runout | |
# is detected. Note that if pause_on_runout is False and the | |
# runout_gcode is omitted then runout detection is disabled. Default | |
# is True. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inline fun <V: View> V.isVisibleAndActionOrGone(condition: Boolean, body: (V) -> Unit) { | |
if (condition) { | |
this.visibility = View.VISIBLE | |
body(this) | |
} else { | |
this.visibility = View.GONE | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inline fun <reified T> List<T>.foreach(crossinline action: (T) | |
-> Unit): Unit { | |
val size = size | |
var i = 0 | |
while (i < size) { | |
action(get(i)) | |
i++ | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MessageManager @Inject constructor(private val context: Context) { | |
fun showMessage(@StringRes message: Int, duration: Duration = Duration.Short) { | |
Toast.makeText(context, message, toToastDuration(duration)).show() | |
} | |
fun showMessage(message: CharSequence, duration: Duration = Duration.Short) { | |
Toast.makeText(context, message, toToastDuration(duration)).show() | |
} | |
fun showMessageAtTop(@StringRes message: Int, duration: Duration = Duration.Short) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using Develop.DevScripts.Game.Effects; | |
using Develop.DevScripts.Game.Effects.Components; | |
using Develop.DevScripts.Managers; | |
using LeopotamGroup.Collections; | |
using NUnit.Framework.Constraints; | |
using UnityEngine; | |
using Modificator = Develop.DevScripts.Game.Effects.Components.StatsEffectComponent.Modificator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://api.telegram.org/bot{API_TOKEN}/setWebHook?url={CURRENT_WEB_APP_URL} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doPost(e) { | |
var files = DriveApp.getFilesByName('GoogleScriptTeleg'); | |
var file = files.next(); | |
var spreadsheet = SpreadsheetApp.open(file); | |
var update = JSON.parse(e.postData.contents); | |
if ('message' in update) { | |
var msg = update.message; | |
var chatId = msg.chat.id; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public int Create_beam_parametric_section(FamilySymbol _family_symbol) | |
{ | |
if (_family_symbol == null) | |
return -1; | |
List<IPrimitive> primitiveList = new List<IPrimitive>(); | |
List<Vertex3>[] A_0 = (List<Vertex3>[]) null; | |
GeometryElement geometry = ((Autodesk.Revit.DB.Element) _family_symbol).get_Geometry(new Options()); | |
string str = ((Autodesk.Revit.DB.Element) _family_symbol).get_Parameter((BuiltInParameter) -1010105).AsString(); | |
IEnumerator enumerator1 = (IEnumerator) geometry.GetEnumerator(); | |
bool flag1 = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void HijackMethod(MethodInfo source, MethodInfo target) | |
{ | |
RuntimeHelpers.PrepareMethod(source.MethodHandle); | |
RuntimeHelpers.PrepareMethod(target.MethodHandle); | |
var sourceAddress = source.MethodHandle.GetFunctionPointer(); | |
var targetAddress = (long)target.MethodHandle.GetFunctionPointer(); | |
int offset = (int)(targetAddress - (long)sourceAddress - 4 - 1); // four bytes for relative address and one byte for opcode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Command2 | |
open Autodesk.Revit.UI | |
open Autodesk.Revit.Attributes | |
open System.Windows.Forms | |
[<Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)>] | |
type Command2() = | |
class | |
interface IExternalCommand with |
NewerOlder