Skip to content

Instantly share code, notes, and snippets.

View gskachkov's full-sized avatar

Oleksander Skachkov gskachkov

  • Itera Consulting
  • Ukraine, Kiev
View GitHub Profile
@gskachkov
gskachkov / geraPdf.dart
Created January 21, 2024 14:02 — forked from dmslabsbr/geraPdf.dart
FlutterFlow PDF Action Code
// Automatic FlutterFlow imports
import '/backend/backend.dart';
import '/backend/schema/structs/index.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/actions/index.dart'; // Imports other custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom action code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!
// Change #1
import React, { useState, useEffect } from 'react';
import axios from 'axios';
// Change #1.1
const token = 'ba8c19a8c3b84112d8006704aec4e9fbe5a6b2d9';
const config = {
headers: { Authorization: `Bearer ${token}` }
};
#!/usr/bin/env python
import rospy
import mavros
from geometry_msgs.msg import PoseStamped
from mavros.msg import State
from mavros.srv import CommandBool, SetMode
# callback method for state sub
current_state = State()
export const updateObject = (id, caption) => ({
type: 'UPDATE_OBJECT',
id,
caption
})
export const thunkedUpdateObject = (id, caption) => dispatch => {
return axios
.post(...)
.then(_ => {
const resolve = async () => {
const result = await mySerbice.getData();
if (result === 'good') {
return result;
}
return mySerbice.getNewDate();
};
gst-launch-1.0 -v v4l2src device=/dev/video0 ! tee name=t ! queue ! videoconvert ! omxh265enc ! video/x-h265, stream-format=byte-stream ! h265parse ! rtph265pay config-interval=1 ! udpsink host=10.42.0.85 port=6000 t. ! queue ! video/x-raw, width=1280, height=720 ! videoconvert
CSS.registerProperty({
name: '--circle-color',
syntax: '<color>',
inherits: false
});
class SimpleLayoutWorlet
*intrinsicSizes() {}
*layout(children, edges, constraintSpace, styles) {
const childFragments = []
for(const child of children) {
const childFragment = yield child.layoutNextFragment();
...
}
class LayoutWorklet {
*intrinsicSizes() {}
*layout(children, edges, constraintSpace, styles) {
const childFragments = []
console.log(constraintSpace);
for(const child of children) {
const childFragment = yield child.layoutNextFragment();
console.log(childFragment);
childFragment.inlineOffset = Math.random() * constraintSpace.fixedInlineSize;
class factor {
constructor(options = {}) {
this.factor = options.factor || 1;
}
animate(currentTime, effect) {
effect.localTime = currentTime * this.factor;
}
};