Source Code Library is a powerful multi-language source code Library and clipboard extender with the following benefits: * Built-in library with 50,000++ lines of code * Fully support more than 30 programming languages * Manage your source code in a single, Secure place * Password protection & strong 448 bits encryption (optional) * Full integration with *all* major programming IDEs * Boost your productivity with its powerful clipboard extender and AutoText utility
One of those things I have to do fairly often in multithreaded programming is send off a whole bunch of threads to do their thing while I do something else on the main thread until they’re done. For example, imagine you’re downloading a bunch of images from the web, you don’t want to call httpGet one image right after another, because network resources are slow and processing them takes up almost no CPU time. But on the other hand, forkIO doesn’t return anything, so a thread thunk will have to put its contents somewhere you can access them later. Thus, my short, simple solution, far too small to bother putting up on Hackage: module Control.Concurrent.Future where import Control.Concurrent future :: IO a -> IO (MVar a) future thunk = do ref <- newEmptyMVar forkIO $ thunk >>= putMVar ref return ref forceAll :: [MVar a] -> IO [a] forceAll = mapM takeMVar
Snipplr is a public source code repository that gives you a place to store and organize all the little pieces of code that you use each day. Best of all, it lets you share your code snippets with other coders and designers. Did we mention it works with TextMate, too? It's code 2.0.
Welcome to LiteratePrograms! LiteratePrograms is a unique wiki where every article is simultaneously a document and a piece of code that you can view, download, compile, and run by simply using the "download code" tab at the top of every article. See Inse