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
| // how to add external library with .h files to your project? | |
| - download the library somewhere on your pc, unzip | |
| - in app properties, VC++ Directories, can set Include directories | |
| // https://stackoverflow.com/questions/26142706/how-do-i-include-a-header-file-located-in-a-specific-folder-c | |
| --------------------------------------------- | |
| ERROR: | |
| fatal: 'submodule' appears to be a git command, but we were not able to execute it. Maybe git-submodule is broken? |
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
| void DrawBounds(Bounds b, float delay=0) | |
| { | |
| // bottom | |
| var p1 = new Vector3(b.min.x, b.min.y, b.min.z); | |
| var p2 = new Vector3(b.max.x, b.min.y, b.min.z); | |
| var p3 = new Vector3(b.max.x, b.min.y, b.max.z); | |
| var p4 = new Vector3(b.min.x, b.min.y, b.max.z); | |
| Debug.DrawLine(p1, p2, Color.blue, delay); | |
| Debug.DrawLine(p2, p3, Color.red, delay); |
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
| // Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt) | |
| Shader "Hidden/Internal-GUITextureClipText" | |
| { | |
| Properties { _MainTex ("Texture", 2D) = "white" {} } | |
| CGINCLUDE | |
| #pragma vertex vert | |
| #pragma fragment frag |
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 is faster than unity *.bounds.IntersectRay(ray) | |
| // original source https://gamedev.stackexchange.com/a/103714/73429 | |
| float RayBoxIntersect(Vector3 rpos, Vector3 rdir, Vector3 vmin, Vector3 vmax) | |
| { | |
| float t1 = (vmin.x - rpos.x) / rdir.x; | |
| float t2 = (vmax.x - rpos.x) / rdir.x; | |
| float t3 = (vmin.y - rpos.y) / rdir.y; | |
| float t4 = (vmax.y - rpos.y) / rdir.y; | |
| float t5 = (vmin.z - rpos.z) / rdir.z; |
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
| Your PHP installation appears to be missing the MySQL extension which is required by WordPress. | |
| - your wp is too old for the new php version, try enable 5.4 from cpanel, then upgrade wp, then upgrade php | |
| - server is missing mysql plugin (check from phpinfo, no mysql support modules) | |
| https://phoenixnap.com/kb/your-php-installation-appears-to-be-missing-the-mysql-extension-which-is-required-by-wordpress |
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
| // error | |
| Parse error: syntax error, unexpected 'new' (T_NEW) | |
| // before | |
| Search results for "<?php /* Search Count */ $allsearch = &new WP_Query("s=$s&showposts=-1"); $key = wp_specialchars($s, 1); $count = $allsearch->post_count; _e(''); _e('<strong>'); echo $key; _e('</strong>'); wp_reset_query(); ?>" | |
| // after (removed &) | |
| Search results for "<?php /* Search Count */ $allsearch = new WP_Query("s=$s&showposts=-1"); $key = wp_specialchars($s, 1); $count = $allsearch->post_count; _e(''); _e('<strong>'); echo $key; _e('</strong>'); wp_reset_query(); ?>" |
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
| #cs ---------------------------------------------------------------------------- | |
| AutoIt Version: 3.3.14.5 | |
| Script Function: | |
| BlueStacks ClashRoyale 2vs2 Bot | |
| #ce ---------------------------------------------------------------------------- | |
| ; Script Start - Add your code below here |
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
| // https://www.reddit.com/r/Unity3D/comments/94z2aa/easy_capslock_detection/ | |
| [System.Runtime.InteropServices.DllImport("USER32.dll")] public static extern short GetKeyState(int nVirtKey); | |
| bool IsCapsLockOn => (GetKeyState(0x14) & 1) > 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
| // measure debug.log with large loop | |
| using UnityEngine; | |
| public class LogSpamTest : MonoBehaviour | |
| { | |
| void Start() | |
| { | |
| var stopwatch = new System.Diagnostics.Stopwatch(); | |
| stopwatch.Start(); |
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
| http://www.dependencywalker.com/ | |
| - drag dll file to the window | |
| - see main dependency tree list for depends (you always get references to gdi, user32, kernel etc..) | |
| - see Exports window for exported function names |