22 result(s)
Analog to the fst and snd functions of the f# lib some functions for tuples with 3 values which i use quite regularly during prototyping phases.
27 people like thisPosted: 14 years ago by daniel szymanski
This function produces safe URLs for Web requests or URI construction. It forces the pattern: http:// + www. OR subdomain. + domain + absolute path. When used in an application that takes URLs as input, the user would be able to type "example.com" instead of "http://example.com" or "http://www.example.com". It also supports domains like google.co.uk or google.com.au.
8 people like thisPosted: 14 years ago by Taha Hachana
A Uri parser using the Cashel library [1]. This implementation is using ArraySegment
Posted: 14 years ago by Ryan Riley
How many Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)?
3 people like thisPosted: 13 years ago by Gene Belitski
A Turing machine emulator. An infinite tape is simulated by a zipper, instructions are stored in the binary tree for faster lookup.
4 people like thisPosted: 13 years ago by Daniil
A simple script to list the exceptions that can be thrown during the method invocation (both caught and uncaught).
5 people like thisPosted: 12 years ago by Natallie Baikevich
Naive "school-book" implimentation.
14 people like thisPosted: 12 years ago by Kaspar
I have provided a class that implements adaptive boosting (AdaBoost) which is a very elegant technique to create a strong classifier from a set of weak classifiers. The strong classifier is the sign of the weighted average of the best N weak classifiers where N is a user specified parameter. The training process consists of N selection rounds. During each round, the training samples are given a weight distribution. The classifier selected is the one that has the least error which is equal to the weighted average of incorrectly classified samples. Training samples that have been incorrectly classified are given a larger weight for the next round. This increases the likelihood of drafting a weak classifier that can help with as yet misclassified samples.
2 people like thisPosted: 12 years ago by Suzanna
Implementation of the 'best fit' heuristic algorithm for bin packing problems. Incudes an implementation of 'binary tree with duplicates'. See this blog post for details: http://fwaris.wordpress.com/2013/04/01/best-fit-bin-packing/ Update: Bug fixes and added 'worst fit' heuristic implementation
5 people like thisPosted: 12 years ago by Faisal Waris
Simple symmetric key cryptogrphy. Ok for low security usages.
5 people like thisPosted: 12 years ago by Faisal Waris
Imperative-style examples used during my talk for the Seattle F# Meetup on 7/17/2013. See corresponding functional-style examples at http://fssnip.net/iP
1 people like thisPosted: 12 years ago by Lincoln Atkinson
Functional-style examples used during my talk for the Seattle F# Meetup on 7/17/2013 See corresponding imperative-style examples at http://fssnip.net/iO
1 people like thisPosted: 12 years ago by Lincoln Atkinson
After watching this clip (http://www.youtube.com/watch?v=ZhuHCtR3xq8) on Youtube featuring Brian Beckman I wanted to try to sketch Brian's main argument that Monads' main purpose is function composition. I will post my sketch to http://rodhern.wordpress.com/2014/02/ . These snippets are the companion examples to the blog post.
3 people like thisPosted: 11 years ago by Robert Nielsen
After watching this clip (http://www.youtube.com/watch?v=ZhuHCtR3xq8) on Youtube featuring Brian Beckman I wanted to try to sketch Brian's main argument that Monads' main purpose is function composition. I will post my sketch to http://rodhern.wordpress.com/2014/02/ . These snippets are the companion examples to the blog post.
1 people like thisPosted: 11 years ago by Robert Nielsen
After watching this clip (http://www.youtube.com/watch?v=ZhuHCtR3xq8) on Youtube featuring Brian Beckman I wanted to try to sketch Brian's main argument that Monads' main purpose is function composition. I will post my sketch to http://rodhern.wordpress.com/2014/02/ . These snippets are the companion examples to the blog post.
1 people like thisPosted: 11 years ago by Robert Nielsen
Created during the morning session of Progressive.Net 2015 with Phil Trelford
1 people like thisPosted: 10 years ago by Chris O'Dell
Created during the morning session of Progressive.Net 2015 with Phil Trelford
1 people like thisPosted: 10 years ago by John Donnellan
This function enables the repeated insertion of a specified value into a sequence. It ensures that Seq.skip will never throw an exception by always ensuring it never skips more elements than remain in the sequence.
1 people like thisPosted: 8 years ago by Hugh Gleaves
Fast Fourier Transform algorithm inspired by the snippet http://fssnip.net/dC/title/fast-Fourier-transforms-FFT-. The original snippet was a beautiful and idiomatic implementation based on the definition of FFT. This version sacrifices idioms and elegance for performance. For data sets with 1024 samples this version seems to be about 100x faster and easier on the GC.
3 people like thisPosted: 8 years ago by Mårten Rånge
Type-safe Nullable
Posted: 5 years ago by Bang Jun-young
This is the solution of a homework the son of a friend had to solve during homeschooling and he asked a couple of his friends on how to solve the following problem: Given a kickboard has three rolls and a city roller has two rolls we want to know *how many kickboards and how many city rollers are parked*. We know two things: * The sum of all the rolls combined is 37 * There are 15 rollers (kickboards and rollers) parked Now being a developer I wanted to solve it via programming. :-D I've used the Decider library which allows you to formulate and solve the problem as following.
3 people like thisPosted: 4 years ago by toburger
A version of AsyncSeq.groupBy where the user can synchronously request all groups, but also all elements in each group during iteration and the operation does not deadlock.
0 people like thisPosted: 3 years ago by Tomas Petricek