List of freely available resources to study computer graphics programming.
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
| Shader "Unlit/InfiniteGrid" | |
| { | |
| Properties | |
| { | |
| [Toggle] _WorldUV ("Use World Space UV", Float) = 1.0 | |
| _GridScale ("Grid Scale", Float) = 1.0 | |
| _GridBias ("Grid Bias", Float) = 0.5 | |
| _GridDiv ("Grid Divisions", Float) = 10.0 | |
| _BaseColor ("Base Color", Color) = (0,0,0,1) | |
| _LineColor ("Line Color", Color) = (1,1,1,1) |
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 System; | |
| using UnityEditor; | |
| using UnityEditor.Build; | |
| using UnityEngine; | |
| using Object = UnityEngine.Object; | |
| [InitializeOnLoad] | |
| public class BuildHandler : MonoBehaviour | |
| { | |
| /// <summary> |
I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.
So below I made a list of leetcode problems that are as close to grokking problems as possible.
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
| // Quick try at doing a "print value" node for Unity ShaderGraph. | |
| // Tested on Unity 2019.2.17 with ShaderGraph 6.9.2. | |
| // | |
| // Use with CustomFunction node, with two inputs: | |
| // - Vector1 Value, the value to display, | |
| // - Vector2 UV, the UVs of area to display at. | |
| // And one output: | |
| // - Vector4 Color, the color. | |
| // Function name is DoDebug. |
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
| function isValidCPF(value: string) { | |
| if (typeof value !== 'string') { | |
| return false; | |
| } | |
| value = value.replace(/[^\d]+/g, ''); | |
| if (value.length !== 11 || !!value.match(/(\d)\1{10}/)) { | |
| return false; | |
| } |
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
| //int vesioncode = context().getPackageManager().getPackageInfo(context().getPackageName(), 0).versionCode; | |
| public static int GetVersionCode() { | |
| AndroidJavaClass contextCls = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); | |
| AndroidJavaObject context = contextCls.GetStatic<AndroidJavaObject>("currentActivity"); | |
| AndroidJavaObject packageMngr = context.Call<AndroidJavaObject>("getPackageManager"); | |
| string packageName = context.Call<string>("getPackageName"); | |
| AndroidJavaObject packageInfo = packageMngr.Call<AndroidJavaObject>("getPackageInfo", packageName, 0); | |
| return packageInfo.Get<int>("versionCode"); | |
| } | |
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
| # | |
| # STL GDB evaluators/views/utilities - 1.03 | |
| # | |
| # The new GDB commands: | |
| # are entirely non instrumental | |
| # do not depend on any "inline"(s) - e.g. size(), [], etc | |
| # are extremely tolerant to debugger settings | |
| # | |
| # This file should be "included" in .gdbinit as following: | |
| # source stl-views.gdb or just paste it into your .gdbinit file |
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
| // Copyright (c) 2012 Calvin Rien | |
| // http://the.darktable.com | |
| // | |
| // This software is provided 'as-is', without any express or implied warranty. In | |
| // no event will the authors be held liable for any damages arising from the use | |
| // of this software. | |
| // | |
| // Permission is granted to anyone to use this software for any purpose, | |
| // including commercial applications, and to alter it and redistribute it freely, | |
| // subject to the following restrictions: |