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 System.Collections.Generic; | |
using UnityEngine; | |
public static class UtilityExtensions | |
{ | |
/// <summary> | |
/// Gets the components only in immediate children of parent. | |
/// </summary> | |
/// <returns>The components only in children.</returns> | |
/// <param name="script">MonoBehaviour Script, e.g. "this".</param> |
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
#include <algorithm> | |
template <class Iterator> | |
inline void BubbleSort(Iterator begin, Iterator end) { | |
for (Iterator i = begin; i != end; ++i) | |
for (Iterator j = begin; j < i; ++j) | |
if (*i < *j) | |
std::iter_swap(i, j); | |
} |
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
/** Pipeline between three processes. | |
http://stackoverflow.com/q/20056084/ | |
See @chill's answer: http://stackoverflow.com/a/8092270 | |
*/ | |
#include <assert.h> | |
#include <errno.h> | |
#include <stdio.h> | |
#include <stdlib.h> |
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
/* Compile with: g++ -Wall –Werror -o shell shell.c */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <ctype.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/wait.h> |