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
| -- convert a number to its hex representation | |
| function num2hex(num, hexdigits) | |
| local hexstr = '0123456789abcdef' | |
| local s = '' | |
| while num > 0 do | |
| local mod = math.fmod(num, 16) | |
| s = string.sub(hexstr, mod+1, mod+1) .. s | |
| num = math.floor(num / 16) | |
| end | |
| if s == '' then s = '0' end |
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
| # Conformance file for ms-oxcrpc | |
| #Not sure what should go 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
| alias nows="rename -n 's/\s+/_/g'" |
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
| #!/bin/bash | |
| #Generate a list of files that are not at least 400x400 | |
| #if number of args is greater than 1 | |
| if [ $# -gt 1 ]; | |
| then | |
| what=$@ | |
| else | |
| what='*.png *.jpg' |
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
| System.DllNotFoundException: openjpeg-dotnet-x86_64.dll | |
| at (wrapper managed-to-native) OpenMetaverse.Imaging.OpenJPEG:DotNetAllocEncoded64 (OpenMetaverse.Imaging.OpenJPEG/MarshalledImage&) | |
| at OpenMetaverse.Imaging.OpenJPEG.DecodeToImage (System.Byte[] encoded, OpenMetaverse.Imaging.ManagedImage& managedImage) [0x0002d] in /home/techplex/Documents/projects/opensim_web_viewer/viewer/Whitecore-LibOMV/OpenMetaverse/Imaging/OpenJPEG.cs:289 | |
| at OpenMetaverse.Assets.AssetTexture.Decode () [0x00020] in /home/techplex/Documents/projects/opensim_web_viewer/viewer/Whitecore-LibOMV/OpenMetaverse/Assets/AssetTypes/AssetTexture.cs:98 | |
| at OpenMetaverse.AppearanceManager+<DownloadTextures>c__AnonStorey12.<>m__13 (TextureRequestState state, OpenMetaverse.Assets.AssetTexture assetTexture) [0x00007] in /home/techplex/Documents/projects/opensim_web_viewer/viewer/Whitecore-LibOMV/OpenMetaverse/AppearanceManager.cs:1630 | |
| at OpenMetaverse.AssetManager+<HttpRequestTexture>c__AnonStorey1A.<>m__1C (System.Net.HttpWebRequest req |
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
| #!/usr/bin/python | |
| from xml.dom.minidom import parse | |
| import xml.dom.minidom | |
| # Open XML document using minidom parser | |
| dom = xml.dom.minidom.parse("HAWC300_300_outrigger_s12.xml") | |
| root = dom.documentElement | |
| # get a list of all the tanks |
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
| <?php | |
| header('Content-Type: application/json'); | |
| function scandir_folders($d, $blacklist = array('.', '..')) { | |
| return array_filter(scandir($d), function ($f) use($d, $blacklist) { | |
| return is_dir($d . DIRECTORY_SEPARATOR . $f) && !in_array($f, $blacklist); | |
| }); | |
| } | |
| function scandir_all($d, $blacklist = array('.', '..')) { |
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
| <?php | |
| function scandir_folders($d, $blacklist = array('.', '..')) { | |
| return array_filter(scandir($d), function ($f) use($d, $blacklist) { | |
| return is_dir($d . DIRECTORY_SEPARATOR . $f) && !in_array($f, $blacklist); | |
| }); | |
| } | |
| function scandir_all($d, $blacklist = array('.', '..')) { | |
| return array_filter(scandir($d), function ($f) use($d, $blacklist) { |
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
| #Input fuzzy number. Possibility distribution | |
| pos = { | |
| 156: 0, | |
| 157: 0.25, | |
| 158: 0.5, | |
| 159: 0.75, | |
| 160: 1, | |
| 161: 1, | |
| 162: 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
| /** | |
| * constrain a number between an upper and lower bound | |
| * @param {num} min lower bound | |
| * @param {num} value value to be constrained | |
| * @param {num} max upper bound | |
| * @return {num} the constrained value | |
| */ | |
| function constrain(min, value, max) { | |
| if (value > max) | |
| return max; |