tagged [algorithm]
Creating a "spell check" that checks against a database with a reasonable runtime
Creating a "spell check" that checks against a database with a reasonable runtime I'm not asking about implementing the spell check algorithm itself. I have a database that contains hundreds of thousa...
- Modified
- 28 Jan at 22:42
Kinect pattern recognition
Kinect pattern recognition I bought a Kinect to play around with on my PC in C#. (And what fun it is to program!) I'm using CLNUIDevice.dll to get the depth image from Kinect. This works fine and I'm ...
- Modified
- 30 Jan at 21:30
Bad implementation of Enumerable.Single?
Bad implementation of Enumerable.Single? I came across this implementation in Enumerable.cs by reflector. ``` public static TSource Single(this IEnumerable source, Func predicate) { //check paramete...
Multiple Date range comparison for overlap: how to do it efficiently?
Multiple Date range comparison for overlap: how to do it efficiently? To check for overlap in two different dateranges, `{Start1, End1}` and `{Start2, End2}` I am checking: The question is, . If I hav...
- Modified
- 6 Feb at 01:12
C# CRC implementation
C# CRC implementation I am trying to integrate a Serial-port device into my application, which needs CRC-CCTT validation for the bytes that I send to it. I'm kinda new into managing byte packets, and ...
XIRR Calculation
XIRR Calculation How do I calculate Excel's `XIRR` function using C#?
- Modified
- 3 Mar at 13:33
Boyer-Moore Practical in C#?
Boyer-Moore Practical in C#? Boyer-Moore is probably the fastest non-indexed text-search algorithm known. So I'm implementing it in C# for my [Black Belt Coder](http://www.blackbeltcoder.com) website....
- Modified
- 9 Mar at 02:0
Checking if all elements in a list are unique
Checking if all elements in a list are unique What is the best way (best as in the conventional way) of checking whether all elements in a list are unique? My current approach using a `Counter` is: Ca...
How to calculate a standard deviation [array]
How to calculate a standard deviation [array] This code above is a short-handed sample of an unexpected behavior of an cumulative algorithm (see the bold value). In real, this is a class which also ho...
shuffle (rearrange randomly) a List<string>
shuffle (rearrange randomly) a List I need to rearrange my List array, it has a non-determinable number of elements in it. Can somebody give me example of how i do this, thanks
Match 2 lists of strings by ressemblance
Match 2 lists of strings by ressemblance I have 2 lists of strings. I want to find the best matching pairs from my lists. For example, I have those 2 lists: I want to get the following results: To com...
When are bitwise operations appropriate
When are bitwise operations appropriate I am aware of the basic premise of what bitwise operation are (although would appreciate a "for dummies" explanation); however I am unaware of when it is approp...
- Modified
- 23 Apr at 03:34
how would i find the time and space complexity of this code?
how would i find the time and space complexity of this code? I am having difficulty finding space and time complexity for this code that i wrote to find number of palindromes in a string. ``` /** Thi...
- Modified
- 2 May at 16:10
How to manage large set of data on a mobile device
How to manage large set of data on a mobile device I am currently implementing a Japanese dictionary and would like some ideas on how to find entries in a fast and efficient manner. The dictionary ent...
- Modified
- 9 May at 13:13
Fastest way to fill an array with a single value
Fastest way to fill an array with a single value I would like to fill a 2D array with a single value that I have, however, I would like to do it the quickest way possible has the 2D array's length wil...
- Modified
- 10 May at 00:19
Digital camera algorithms
Digital camera algorithms I'm working on a simple video device and I'd like to introduce some standard cool camera features. Amongst all I'd like to introduce - - - Right now I'm looking for some exam...
- Modified
- 12 May at 11:2
Recognizing handwritten shapes
Recognizing handwritten shapes I want to recognize handwriting shape and figure out which shape it probably is in the set. Simply saying, if I draw a triangle, the application should recognize it as a...
- Modified
- 30 May at 05:30
Camera Module Focus Adjust using Contrast Transfer Function
Camera Module Focus Adjust using Contrast Transfer Function Currently I'm designing a test program for mobile phone camera module. I'm trying to control a precision motor that adjust the focus barrel ...
- Modified
- 3 Jun at 14:18
Algorithm: How do I fade from Red to Green via Yellow using RGB values?
Algorithm: How do I fade from Red to Green via Yellow using RGB values? I want to display a color based on a value from 0 to 100. At one end (100), it's pure Red, the other end (0), pure Green. In the...
How to draw gridline on WPF Canvas?
How to draw gridline on WPF Canvas? I need to build a function drawing gridline on the canvas in WPF: ![example gridline](https://i.stack.imgur.com/XHVJv.png) How would I go about this?
A fast array shift implementation in C#?
A fast array shift implementation in C#? I need to shift to the right and to the left an array by N places. The items that pop out on the side where i shift to must get back into on the other side. Th...
- Modified
- 6 Jul at 21:7
Best way to track maximal distance in a set of points?
Best way to track maximal distance in a set of points? Assume that I have a collection of 2 dimensional points, and a way to determine the distance between them. This collection is frequently modified...
- Modified
- 14 Jul at 23:24
Intersection between two rectangles in 3D
Intersection between two rectangles in 3D To get the line of intersection between two rectangles in 3D, I converted them to planes, then get the line of intersection using cross product of their norma...
- Modified
- 27 Aug at 10:15
Find smallest irregular polygon from combination of vertices (Performance Critical)
Find smallest irregular polygon from combination of vertices (Performance Critical) I need to find an irregular polygon with the smallest surface area out of several vertices on a 2D plane. There are ...
- Modified
- 10 Sep at 19:33