{-# LANGUAGE OverloadedStrings #-}
module Set2 where
import Set1
import Data.Bits
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
import Data.Bits | |
import Data.Word | |
base64Chars = zip [(0::Word8)..] "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" | |
getFst ((b,c):xs) a = if a == b then c else getFst xs a | |
getBase64Char = getFst base64Chars | |
encodeTriple :: Word8 -> Word8 -> Word8 -> String | |
encodeTriple a b c = | |
map getBase64Char $ zipWith (.|.) |
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
module Set1 where | |
import qualified Data.Map.Strict as M | |
import Data.Bits | |
import Data.Word | |
import Data.Char (toLower) | |
import Data.List (transpose, sort, group) | |
import qualified Data.ByteString as BS | |
import qualified Data.ByteString.Char8 as C | |
import Crypto.Cipher.AES |
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 UnityEditor.SceneManagement; | |
[InitializeOnLoad] | |
public class AutoSave : ScriptableWizard | |
{ | |
private static float autoSaveDelay = 15.0f; | |
private static double timeSinceAutoSave; | |
private static bool sEnabled; |
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 UnityEngine.Rendering; | |
using UnityEditor; | |
public class PlaceTreeShadowCasters | |
{ | |
[@MenuItem ("Terrain/Place Tree Shadow Casters")] | |
static void Run() | |
{ |