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
| $cs = @("Black","White","Gray","DarkGray","Red","DarkRed","Green","DarkGreen","Blue","DarkBlue","Cyan","DarkCyan","Magenta","DarkMagenta","Yellow","DarkYellow") | |
| foreach ($tc in $cs) { | |
| foreach ($bc in $cs) { | |
| write-host " 123 " -foregroundcolor $tc -backgroundcolor $bc -noNewLine | |
| } | |
| write-host | |
| } |
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 InsertSorted($array, $item, $maxn, [scriptblock]$valueFunction) { | |
| $a = $valueFunction.InvokeReturnAsIs($item); | |
| $j = for($i = 0; $i -lt $array.Count; $i++) { | |
| $b = $valueFunction.InvokeReturnAsIs($array[$i]); | |
| if ($a -lt $b) { $i; break } | |
| } | |
| if($j -eq $null) { | |
| return ($array[0..($array.Count-1)] + $item)[-$maxn..-1]; | |
| } elseif($j -eq 0) { | |
| if($array.Count -lt $maxn) { |
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
| import Data.Text.Normalize | |
| import qualified Data.Text as T | |
| import GHC.IO.Encoding | |
| import System.Win32.Console | |
| procString :: (T.Text -> T.Text) -> String -> String | |
| procString f = T.unpack . f . T.pack | |
| testStr = "😀éé" |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Mouse scroll emulation test</title> | |
| <link href="style.css" rel="stylesheet"> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.16/p5.js"></script> | |
| <script src="pointerlock.js"></script><!-- https://github.com/IceCreamYou/PointerLock.js --> | |
| <script src="sketch.js"></script> | |
| </head> |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <CommandButtonInfo> | |
| <MetaData> | |
| <DateCreated>2016-03-24T15:45:16.0981452+03:00</DateCreated> | |
| <Author>MXI</Author> | |
| <Contact>http://mxii.eu.org/</Contact> | |
| <Description>Navigate to the next folder within common parent folder.</Description> | |
| <Version>1.0</Version> | |
| </MetaData> | |
| <CommandButton Type="File" SubType="Normal" PersistentID="20753363"> |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <CommandButtonInfo> | |
| <MetaData> | |
| <DateCreated>2016-03-24T15:45:16.0981452+03:00</DateCreated> | |
| <Author>MXI</Author> | |
| <Contact>http://mxii.eu.org/</Contact> | |
| <Description>Navigate to the next folder within common parent folder.</Description> | |
| <Version>1.0</Version> | |
| </MetaData> | |
| <CommandButton Type="File" SubType="Normal" PersistentID="20753363"> |
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
| import Data.Text.ICU | |
| import qualified Data.Text as T | |
| graphemeClustersCount :: LocaleName -> T.Text -> Int | |
| graphemeClustersCount loc = length . breaks (breakCharacter loc) | |
| testStr = "😀éé" | |
| main :: IO () | |
| main = print $ graphemeClustersCount Current $ T.pack $ testStr |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <title>Matrix (2D-array) transpose</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
| <script src="./suite.js"></script> | |
| </head> | |
| <body> | |
| <h1>Open the console to view the results</h1> |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <title>longest string</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
| <script src="./suite.js"></script> | |
| </head> | |
| <body> | |
| <h1>Open the console to view the results</h1> |
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 System.Collections.Generic; | |
| using System.Globalization; | |
| using System.Linq; | |
| using System.Runtime.InteropServices; | |
| namespace GeoInfoService | |
| { | |
| public static class GeoInfoService | |
| { |
OlderNewer