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
| string filePath = Path.Combine(path, mode + ".json"); | |
| var theme = JsonConvert.DeserializeObject<ThemeSet>( | |
| File.ReadAllText(filePath); | |
| if (theme.AccentColors == null || theme.AccentColors.Count <= 0) | |
| { | |
| theme.AccentColors = this.Colors; | |
| File.WriteAllText( | |
| filePath, |
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
| foreach(var mode in item.Value.Modes) | |
| { | |
| string directory = $@"c:\temp\themes\{item.Key}"; | |
| Directory.CreateDirectory(directory); | |
| var theme = item.Value.GetTheme(mode, item.Value.DefaultColor); | |
| theme.ThemeName = $"{item.Key} {mode}"; | |
| File.WriteAllText( | |
| Path.Combine(directory, $"{item.Key}-{mode}.json"), |
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
| var xxx = new Dictionary<string, Color>() | |
| { | |
| { "Red - Dark", new Color(172, 25, 61) }, | |
| { "Pink - Dark", new Color(220, 79, 173) }, | |
| { "Orange - Dark", new Color(255, 129, 25) }, | |
| { "Green - Dark", new Color(0, 138, 23) }, | |
| { "Blue - Dark", new Color(0, 75, 139) }, | |
| { "Teal - Dark", new Color(0, 130, 153) }, | |
| { "Light Blue - Dark", new Color(93, 178, 255) }, | |
| { "Purple - Dark", new Color(70, 23, 180) }, |
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 SignInChoicePage : DialogPage | |
| { | |
| public SignInChoicePage() | |
| { | |
| this.HeaderText = this.WindowTitle = "Select Printer".Localize(); | |
| var commonMargin = new BorderDouble(4, 2); | |
| // Create export button for each plugin | |
| var buttonA = new RadioButton(new RadioButtonViewText("Sign in to access your existing printers".Localize(), theme.Colors.PrimaryTextColor)) |
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
| var rows = jQuery("tr", jQuery("table").eq(0)); | |
| var results = {}; | |
| for(var i = 1; i < rows.length; i++) | |
| { | |
| var cells = rows[i].cells; | |
| var make = cells[13].innerText; | |
| var model = cells[14].innerText; |
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
| digraph Dependencies { | |
| ratio = fill; | |
| node [style=filled color="#118893"]; | |
| start -> main | |
| start -> on_exit | |
| main -> sort | |
| main -> merge | |
| merge -> term | |
| term -> signal |
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
| // InteractiveScene.cs - Line 312 | |
| public IPrimitive TraceData() | |
| { | |
| var timer = Stopwatch.StartNew(); | |
| var result = sourceItem.TraceData(); | |
| Trace.WriteLine("TimeToInvoke TraceData(): " + timer.ElapsedMilliseconds); | |
| return result; | |
| } |
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
| private static Regex bracedNumbers = new Regex("[\\(\\{]+(\\d+\\.*\\d*|\\w{1})[\\}\\)]+", RegexOptions.CultureInvariant | RegexOptions.Compiled); | |
| private static Regex number = new Regex("[\\(\\{]+\\d+\\.*\\d*[\\}\\)]+", RegexOptions.CultureInvariant | RegexOptions.Compiled); | |
| public static void SanitizeLine(string text, HashSet<string> words) | |
| { | |
| // Remove escaped newlines | |
| text = text.Replace("\\n", " "); | |
| // Remove braced numbers (0), {0} |
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
| [Test] | |
| public void StlLoadTiming() | |
| { | |
| var timer = Stopwatch.StartNew(); | |
| var times = new List<string>(); | |
| var loadedObjects = new List<IObject3D>(); | |
| for(int i = 0; i < 5; i++) | |
| { | |
| loadedObjects.Add(Object3D.Load(@"C:\Users\John\Desktop\bdPenHolder_low_fixed.STL", CancellationToken.None, progress: ((double ratio, string state) progress) => |
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
| /// </summary> | |
| public static Regex regex = new Regex( | |
| "Z(\\d+\\.*\\d*)", | |
| RegexOptions.Multiline | |
| | RegexOptions.CultureInvariant | |
| | RegexOptions.Compiled | |
| ); | |
| void Main() | |
| { |