This file contains 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
-(NSArray*) initVariations:(NSArray*)variationDictionaries { | |
int l = [variationDictionaries count]; | |
SMVariation *vArray[l]; | |
for(int i=0;i<l; i++){ | |
NSDictionary* variationDictionary = [variationDictionaries objectAtIndex:i]; | |
SMVariation *variation = [[SMVariation alloc] initFromDictionary:variationDictionary]; | |
vArray[i] = variation; | |
} | |
NSArray *variationsArray = [NSArray arrayWithObjects:vArray count:l]; | |
return variationsArray; |
This file contains 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 UnityEngine; | |
using UnityEditor; | |
public static class CopyRefUtil | |
{ | |
[MenuItem ("Assets/Copy Ref To Clipboard %&c")] | |
public static void GetReferencesString() | |
{ | |
string path = AssetDatabase.GetAssetPath(Selection.activeObject); | |
if(path.IndexOf("Resources") > -1) |
This file contains 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 UnityEngine; | |
using UnityEditor; | |
using System.Text; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class SerializedPropertyViewer : EditorWindow | |
{ | |
public class SPData |
This file contains 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 UnityEngine; | |
using UnityEditor; | |
public class ReallyBreakPrefabInstance | |
{ | |
[MenuItem ("GameObject/REALLY Break Prefab Instance")] | |
public static void BreakIt() | |
{ | |
Transform xForm = Selection.activeTransform; | |
if(xForm != null) |
This file contains 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 UnityEngine; | |
using System; | |
using System.Collections.Generic; | |
using System.Collections; | |
public class CollectionsExample : MonoBehaviour | |
{ | |
void Start() | |
{ |
This file contains 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() | |
{ | |
'use strict'; | |
angular | |
.module('vid.vids.controllers') | |
.controller('NewVidController', NewVidController) | |
NewVidController.$inject = ['$rootScope', '$scope', 'Authentication', 'Snackbar', 'Vids', 'cloudinary']; |
This file contains 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 UnityEngine; | |
using System; | |
using System.Collections.Generic; | |
using System.Collections; | |
/** | |
* A simple copy of example code from the manual, modified to orient particles | |
* based on the center of the system. | |
*/ |
This file contains 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
class Solution: | |
def maxSubArray(self, nums: List[int]) -> int: | |
solutions = [] | |
bestSolution = -sys.maxsize - 1 | |
for i in range(0, len(nums)): | |
num = nums[i] | |
prevSolution = 0 | |
if(i > 0): | |
prevSolution = solutions[i - 1] | |
This file contains 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 enum States | |
{ | |
Idle, | |
Walking, | |
Running | |
} | |
public float speed = 0.0f; | |
public void SetState(States newState) |
OlderNewer