Does .NET 4 support any 6-Sigma calculation? [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I will need to write an app to run statistical analysis on a DataGrid. Pp and Ppk is easy to do with standard deviation calculation in C#. But Some number such as estimated deviation (rBar/d2) used for Cp and Cpk - that is too complex (for me ) to code. Are there existing libraries, commercial or open source, that I can implement?

Extreme Optimization might be something you are looking for.
Edit
How about SPC Chart?

You might wanna check out Sho, it's a tool for doing stuff with data and it provides a lot of math libraries.
http://channel9.msdn.com/Blogs/Charles/John-Platt-Introduction-to-Sho
http://research.microsoft.com/en-us/projects/sho/

I have used MathNet.Numerics for these type calculations.
https://www.nuget.org/packages/MathNet.Numerics/
https://numerics.mathdotnet.com/
Example for cp and cpk:
public class ProcessPerformance
{
public static ProcessPerformanceResult Calculate(double[] data,double lsl,double usl,double sigma =3.0,double cpSigma=6.0)
{
if(data.Count() ppkLsl ? ppkLsl : ppkUsl;
var cP = (usl - lsl) / (descriptiveStatistics.StandardDeviation * cpSigma);
var median = MathNet.Numerics.Statistics.Statistics.Median(data);
return new ProcessPerformanceResult(){Cp=cP,Cpk=cPk,Median= median, DescriptiveStatistics=descriptiveStatistics};
}
public class ProcessPerformanceResult
{
//https://en.wikipedia.org/wiki/Process_capability_index
public double Cpk { get; set; }
public double Cp {get;set;}
public double Median {get;set;}
public MathNet.Numerics.Statistics.DescriptiveStatistics DescriptiveStatistics {get;set;}
}
}

Related

OCR : C#/.net for Extract URL from Image [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 months ago.
Improve this question
Can any one help me to extract only URL from image when doing images processing OCR.
I checked, all OCR dll are in paid version. Is there any free libraries.
I used IronOCR and problem solve. I created GetText Function which fetch URL from text when image converted to text.
IronTesseract IronOcr = new IronTesseract();
var Result = IronOcr.Read(Path.GetTempPath() + "image.png");
string _url = GetText(Result.Text);
private string GetText(string myString)
{
Match url = Regex.Match(myString, #"[-a-zA-Z0-9#:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()#%_\+.~#?&//=]*)");
return url.ToString();
}

Create function in c# that returns value [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I want create function in c# WPF that returns 10 digit values. It contains as below
One Digit (Static) -> 'G'
Two Digit (Dynamic) -> '19' Of current Year
Two Digit (Dynamic) -> '04' of Current Month
Five Digit (Dynamic) -> '00284' <- It is returned from sql table. The length of this must be fixed.
The return value for above code is 'G190400284' (I want this value as return)
if my five digit(4.) value is supposed to 1 then it's returns 'G1904000001'
Something like that?
using System;
public class Program
{
public static void Main()
{
Console.WriteLine(CreateString(1));
Console.WriteLine(CreateString(284));
}
public static string CreateString(int id)
{
var n = DateTime.Now;
return "G" + n.Year.ToString().Substring(2,2) + n.Month.ToString().PadLeft(2,'0') + id.ToString().PadLeft(5,'0');
}
}
// This returns
// G190400001
// G190400284
https://dotnetfiddle.net/oteEpe

How to store the results in a database to see history results [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I am making a game where people listen to determine whether something is black or white. I want to store how many times they got it correct and how many times they got it wrong in a database so they can see the old results.
What kind of database (like Sqlite) should I use? How should I save this information and display it later?
You can use BinarySerializtion, XMLSerialization,......
so first create a class:
[Serializable]
public class Result
{
Public int TimesRight {get;set;}
Public int TimesWrong {get;set;}
}
now in your game:
Result result = new Result();
result.TimesRight = x; //value of times right
result.TimesWrong = y; //value of times wrong
Now choose the way you want to save it, here are some references for Binary and XML serialization:
Binary Serialization
XML Serialization

Help with Javascript to C# converter [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I find a algorithm writen by javascript,now i want to convert it to C#,
Any tool can do this?
Well, you could start with Javascript.Net to try your code within another application before rewriting/converting it. Whatever you do, don't rely on auto-generated code for an algorithm of any importance.
If memory serves, there was actually a flavor of JavaScript that ran on the .Net CLR. I don't think it ever caught on.
Using javascript.net or jscript with .net Reflector, will save you brain and keyboard, may be
There is a dialect of JavaScript called UnityScript that can be converted into C# using the UnityScript-to-C# converter.
I also wrote a tool called universal-transpiler can convert a small subset of JavaScript into C# and several other languages.
Input in JavaScript:
function add(a,b){
var g = [3,4,5];
return a+b+(g[0])+(g.length);
}
function divide(a,b){
return a/b;
}
Output in C# from universal-transpiler:
public static int add(int a,int b){
int[] g={3,4,5};
return a+b+(g[0])+(g.Length);
}
public static int divide(int a,int b){
return a/b;
}

How to draw candle charts in C# [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
How can I draw candle charts in C#? Does anybody has any examples with a nice interface?
I've used the MSChart and found it to be pretty good. It supports candlestick charts. I've used ZedGraph as well but found a few graphical anomalies showed up on my charts but they were otherwise good as well.
I use this for stock data but its in VB
With Chart1.ChartAreas("myarea")
.AxisY.Maximum = (Math.Ceiling((HighValue * 100)) / 100)
.AxisY.Minimum = (Math.Floor((LowValue * 100)) / 100)
.AxisY.LabelStyle.Format = "{0.00}"
End With
Dim s1 As New Series
With s1
.ChartArea = "myarea"
.ChartType = SeriesChartType.Candlestick
.XValueType = ChartValueType.String
.YValueType = ChartValueType.Single
.YValuesPerPoint = 4
.CustomProperties = "PriceDownColor=Red, PriceUpColor=Green"
End With
For i = Globals.GraphColumns - 1 To 0 Step -1
OutData = Data_Array.Item(i)
s1.Points.AddXY(OutData.thedate, OutData.high, OutData.low, OutData.close, OutData.open)
Next
Chart1.Series.Add(s1)
Me.Controls.Add(Chart1)
ZedGraph is a very easy-to-use LGPLed charting library that can handle candlestick charts.
If you need to save an image to disk, it can do that. If you need to display an interactive graph that supports zooming/panning, it can do that as well with the excellent ZedGraphControl control.
I'm using the .netCharting library for this and it's pretty good. It supports all sorts of charts - candle included. One thing to watch out for is that with the current version (5.3) you have to reverse the high and low price - a pretty ugly and obvious bug. It's a commercial product, but reasonably priced, so could be worth it, depending on your project.
Maybe ChartDirector can be a good solution
http://www.advsofteng.com/doc/cdcomdoc/candlestick.htm
Try xamChart Control Trial version from Infragistics.
Here is another sample at CodeProject

Categories

Resources