Stash current changes
- git > Stash > Stash (Include Untracked)
Create stash as patch
git stash show "stash@{0}" -p > changes.patchApply patch
| using UnityEngine; | |
| /// <summary> | |
| /// Small helper class to convert viewport, screen or world positions to canvas space. | |
| /// Only works with screen space canvases. | |
| /// </summary> | |
| /// <example> | |
| /// objectOnCanvasRectTransform.anchoredPosition = specificCanvas.WorldToCanvasPoint(worldspaceTransform.position); | |
| /// </example> | |
| public static class CanvasPositioningExtensions { |
| /******************************************************************************* | |
| * Don't Be a Jerk: The Open Source Software License. | |
| * Adapted from: https://github.com/evantahler/Dont-be-a-Jerk | |
| ******************************************************************************* | |
| * _I_ am the software author - JohannesMP on Github. | |
| * _You_ are the user of this software. You might be a _we_, and that's OK! | |
| * | |
| * This is free, open source software. I will never charge you to use, | |
| * license, or obtain this software. Doing so would make me a jerk. | |
| * |
| class ScrollViewWithHeight extends StatelessWidget { | |
| final Widget child; | |
| const ScrollViewWithHeight({Key key, this.child}) : super(key: key); | |
| @override | |
| Widget build(BuildContext context) { | |
| return new LayoutBuilder(builder: (BuildContext context, BoxConstraints constraints) { | |
| return new SingleChildScrollView( | |
| child: new ConstrainedBox( |
| using UnityEngine; | |
| /// <summary> | |
| /// Small helper class to convert viewport, screen or world positions to canvas space. | |
| /// Only works with screen space canvases. | |
| /// </summary> | |
| /// <example> | |
| /// <code> | |
| /// objectOnCanvasRectTransform.anchoredPosition = specificCanvas.WorldToCanvasPoint(worldspaceTransform.position); | |
| /// </code> |
To send a request via the sandbox, you can use pm.sendRequest.
pm.test("Status code is 200", function () {
pm.sendRequest('https://postman-echo.com/get', function (err, res) {
pm.expect(err).to.not.be.ok;
pm.expect(res).to.have.property('code', 200);
pm.expect(res).to.have.property('status', 'OK');
});
});
| using System; | |
| using System.Threading; | |
| static class Program { | |
| static void Main() { | |
| Console.Write("Performing some task... "); | |
| using (var progress = new ProgressBar()) { | |
| for (int i = 0; i <= 100; i++) { | |
| progress.Report((double) i / 100); |
| // Copyright (c) 2012 Daniel Grunwald | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy of this | |
| // software and associated documentation files (the "Software"), to deal in the Software | |
| // without restriction, including without limitation the rights to use, copy, modify, merge, | |
| // publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons | |
| // to whom the Software is furnished to do so, subject to the following conditions: | |
| // | |
| // The above copyright notice and this permission notice shall be included in all copies or | |
| // substantial portions of the Software. |