This file contains hidden or 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 class EstimateConeRayAnglesEditor: UnityEditor.Editor | |
| { | |
| private enum State { Wait, Started, Processing } | |
| private static readonly string[] excludedSerializedNames = new string[]{ "propToIgnore1", "propToIgnore2" }; | |
| public override void OnInspectorGUI() | |
| { | |
| // Combining Editor.DrawPropertiesExcluding and Editor.DoDrawDefaultInspector | |
| SerializedProperty iterator = serializedObject.GetIterator(); |
This file contains hidden or 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 UnityEditor; | |
| using UnityEngine; | |
| namespace ubco.ovilab.ViconUnityStream.Editor | |
| { | |
| [CanEditMultipleObjects] | |
| [CustomPropertyDrawer(typeof(S), true)] | |
| public class SimpleTypeValueDrawer: PropertyDrawer | |
| { | |
| public override float GetPropertyHeight(SerializedProperty property, GUIContent label) |
This file contains hidden or 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
| data <- error_data | |
| # outliersValue <- boxplot.stats(data$errors)$out | |
| # data <- data[!data$time %in% outliersValue, ] | |
| data <- summarize(group_by(data, technique, size, ppid), errors=mean(errors), .groups="drop") | |
| mutate( | |
| summarise( | |
| group_by(data, technique, size), | |
| p_value = shapiro.test(errors)$p.value), | |
| normality = ifelse(p_value > 0.05, "Normal", "Not Normal")) |
This file contains hidden or 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
| // Copied from @GAmuzak | |
| public class ComponentWithSwapColorBehaviour: MonoBehaviour | |
| { | |
| // Based on the render pipeline, this may be different. | |
| // For URP this should be "_BaseColor", with SRP or sprites it should be "_Color" | |
| private static readonly int ShaderProp = Shader.PropertyToID("_BaseColor"); | |
| [SerializeField] private Renderer targetRenderer; | |
| private MaterialPropertyBlock materialPropertyBlock; |
This file contains hidden or 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
| # To modify the sampels, create a symlink of the Samples~ directory | |
| New-Item -ItemType SymbolicLink -Path ../Samples -Target ../Samples~ |
This file contains hidden or 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
| local Players = game:GetService("Players") | |
| local projectileBase = script.Parent.projectile | |
| local prompt = script.Parent.ProximityPrompt | |
| prompt.Triggered:Connect(function (player) | |
| shootProjectile(30, 0.95, 2, 10) | |
| end) | |
| -- example call: shootProjectile(30, 0.95, 2, 10) |
This file contains hidden or 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 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; either version 3 of the License, or | |
| # (at your option) any later version. | |
| # | |
| # This program is distributed in the hope that it will be useful, but | |
| # WITHOUT ANY WARRANTY; without even the implied warranty of | |
| # MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| # General Public License for more details. | |
| # |
This file contains hidden or 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
| % Close to the end of main tex file, have this: | |
| % from https://tex.stackexchange.com/questions/596258/automatic-detection-of-overleaf-for-fallback-images/598669#598669 | |
| \ifnum\pdfstrcmp{\jobname}{output}=0 | |
| \bibliography{bibliography.bib} | |
| \else | |
| % wherever the master bib file is | |
| \bibliography{\string~/Documents/org/bibliography/references.bib} | |
| \fi |
This file contains hidden or 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
| (defun dive/org-mark-as-reviewed () | |
| "Mark current selected items as REVIEWED." | |
| (org-set-property "REVIEWED" (org-time-stamp '(16) nil))) | |
| (add-to-list 'org-agenda-bulk-custom-functions | |
| '(?R dive/org-mark-as-reviewed)) |
This file contains hidden or 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 BlackFox | |
| { | |
| using System; | |
| using System.ComponentModel; | |
| using System.Runtime.InteropServices; | |
| using System.Security; | |
| /// <summary> | |
| /// As long as this object exists all mouse events created from a touch event for legacy support will be disabled. | |
| /// </summary> |
NewerOlder