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
use windows_sys::Win32::{ | |
System::{ | |
Services::{SERVICE_STATUS, ControlService, OpenServiceA, SC_MANAGER_ALL_ACCESS, SERVICE_STATUS_PROCESS, ENUM_SERVICE_STATUS_PROCESSA, OpenSCManagerA, EnumServicesStatusExA, SC_ENUM_PROCESS_INFO, SERVICE_STATE_ALL, SERVICE_WIN32, SC_MANAGER_ENUMERATE_SERVICE, SC_MANAGER_CONNECT} | |
}, | |
Foundation::GetLastError | |
}; | |
use anyhow::{anyhow, Result}; | |
use std::{ | |
ffi::{CStr, CString}, | |
ptr::null |
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
from websocket import create_connection | |
import json | |
template = [1,1,"3 OR "] | |
table_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890_" | |
data_chars = table_chars + "-/:;()$&@\"\\[]{}#%^*+=|~<>€£¥•.,?!'" | |
def send_test(ws, test): | |
test_arr = template[:] | |
test_arr[2] += test | |
ws.send(json.dumps(test_arr)) | |
r = ws.recv() |
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
#define WIN32_LEAN_AND_MEAN | |
#include "stdio.h" | |
#include "winsock2.h" | |
#include "ws2tcpip.h" | |
#include "Mstcpip.h" | |
// Need to link with Ws2_32.lib | |
#pragma comment (lib, "Ws2_32.lib") |
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
BNO055IMU.Parameters parameters = new BNO055IMU.Parameters(); | |
parameters.angleUnit = BNO055IMU.AngleUnit.RADIANS; | |
parameters.accelUnit = BNO055IMU.AccelUnit.METERS_PERSEC_PERSEC; | |
parameters.calibrationDataFile = "BNO055IMUCalibration.json"; // see the calibration sample opmode | |
parameters.loggingEnabled = true; | |
parameters.loggingTag = "IMU"; | |
parameters.accelerationIntegrationAlgorithm = new JustLoggingAccelerationIntegrator(); | |
imu = hardwareMap.get(BNO055IMU.class,"imu"); | |
imu.initialize(parameters); |
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
// Copyright (c) FIRST and other WPILib contributors. | |
// Open Source Software; you can modify and/or share it under the terms of | |
// the WPILib BSD license file in the root directory of this project. | |
package frc.robot.subsystems; | |
import java.util.function.DoubleSupplier; | |
import com.ctre.phoenix.motorcontrol.NeutralMode; | |
import com.ctre.phoenix.motorcontrol.TalonSRXFeedbackDevice; |
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
/** | |
* This is a very simple robot program that can be used to send telemetry to | |
* the data_logger script to characterize your drivetrain. If you wish to use | |
* your actual robot code, you only need to implement the simple logic in the | |
* autonomousPeriodic function and change the NetworkTables update rate | |
*/ | |
package dc; | |
import java.util.function.Supplier; |
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
Imgproc.cvtColor( input, input, Imgproc.COLOR_RGB2HSV ); | |
Core.inRange( input, new Scalar( hueMin, satMin, valMin ), | |
new Scalar( hueMax, satMax, valMax ), input ); | |
Mat target = input.submat( new Rect( topLeft, bottomRight ) ); | |
double avg = (int) Core.mean( target ).val[ 0 ]; | |
Imgproc.rectangle( input, topLeft, bottomRight, new Scalar( 0, 250, 0 ), 2 ); |
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
var questions = ["What is your team number?"]; | |
var teams = []; | |
var teamData = []; | |
var activeQ = 0; | |
var activeInt = []; | |
var activeTeamData = ["N/A"]; | |
//updateAll(); | |
onEvent("questionBtn", "click", function(event) { | |
setScreen("questions"); | |
activeQ = 0; |
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
# | |
# A fatal error has been detected by the Java Runtime Environment: | |
# | |
# SIGSEGV (0xb) at pc=0xb6940dec, pid=32073, tid=32076 | |
# | |
# JRE version: OpenJDK Runtime Environment (11.0.4.10) (build 11.0.4.10-frc+0-2020-11.0.4u10-2) | |
# Java VM: OpenJDK Client VM (11.0.4.10-frc+0-2020-11.0.4u10-2, mixed mode, concurrent mark sweep gc, linux-) | |
# Problematic frame: | |
# V [libjvm.so+0x13cdec] | |
# |