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
| #include "Windows.h" | |
| #include <iostream> | |
| #include <thread> | |
| using namespace std; | |
| void WaitForKey(int vKey) | |
| { | |
| while (!GetAsyncKeyState(vKey)); | |
| } |
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 Control.Monad | |
| import Data.Bits | |
| import Data.List | |
| import Data.List.Split | |
| import Data.Word | |
| createMask::Int -> [Word8] | |
| createMask mask = take 4 $ gen mask ++ repeat 0 | |
| where | |
| gen mask |
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
| fizzbuzz xs = | |
| let | |
| fizz = cycle ["","","fizz"] | |
| buzz = cycle ["","","","","buzz"] | |
| f x i = if null x then show i else x | |
| in | |
| zipWith3 (\fz bz i-> f (fz++bz) i) fizz buzz xs | |
| main = do | |
| putStr $ unlines $ fizzbuzz [1..100] |
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
| let rec reverse str = | |
| let a = Console.ReadLine() | |
| if a <> "0" then | |
| reverse a | |
| printfn "%s" str | |
| [<EntryPoint>] | |
| let main argv = | |
| reverse "" |
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
| open System.Speech.Synthesis | |
| open System | |
| type language = { | |
| presents: string array | |
| line: string | |
| lastPrefix: string | |
| suffix: int->string | |
| } | |
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.Linq; | |
| using System.Web; | |
| using System.Web.Mvc; | |
| using System.Linq.Expressions; | |
| public static class CheckBoxListForExtensions | |
| { | |
| public static MvcHtmlString CheckBoxListFor<TModel, TValue>(this HtmlHelper<TModel> html, Expression<Func<TModel, TValue>> expression, SelectList selectList) |
NewerOlder