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();
}
Related
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 make z axis change from code in unity?
I tried this:
if (Input.GetKey("e")) {
Car.transform.rotate(xAngle, yAngle, zAngle);
}
and it tells me that Transform does not contain rotate.
What should i do?
Either use a relative Torque or use the Rotation of the Transform Object:
transform.Rotate(Vector3 eulerAngles, Space relativeTo)
so for example you would use:
Car.transform.Rotate(new Vector3(x,y,z), Space.Self)
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
Ok so i'm halfway into the semester in a C# coding class and I just have a simple question.
When Im reading others code I see people do something like this:
string exampleString = new string();
StreamReader exampleSr = new StreamReader();
Int exampleInt = new int();
char a = new Char();
I have a few questions:
For like the String one, wouldn't it be the same if I just did
string exampleString = " ";?
What do people use these for?
And also what goes inside the parenthesis?
Just a few simple questions, im not sure what to search up to my find the answer to my questions so im asking here, Thanks!
In the case of the string, string a = ""; is not the same as string b = new string();.
Why:
a is now set to literally "", that means an empty string.
trying to define b in the way shown above will result in an error, because the constructor of string is not defined for 0 arguments.
you can declare a cariable like this, too:
string c;
this will result in an empty variable with no value in it (yet).
you'll have to assign it a value before you can use it, though (otherwise you'll get an error).
I'm not sure if i gave you a useful answer, so please ask me if you have any further questions.
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 have created A Shiny App And i want to insert the same content of my shinyapp app in my C# Application. If there's any way to do that ?
One way of doing it, this is how I set it up for my team, so we can have the best of both worlds is to use an iframe. If you're using MVC then something like this should do:
Controller.cs
using System.Web.Mvc;
namespace Dashboard.Controllers
{
public class ShinyController : Controller
{
public ActionResult Index()
{
ViewBag.IFrameSrc = "Address to your shiny app";
return View();
}
}
}
Index.cshtml
<iframe style="border: 0; position:relative; width:100%; height:100%" src="#ViewBag.IFrameSrc"></iframe>
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I want to extract the browser name and Operating system in differant strings from
this string. How can I use substring to extract them from
{ Browser/leavethis (Operating System) Leavethis/Leavethis (Leavethis, Leavethis) Leavethis/Leavethis/Leavethis }
Instead of splitting the useragent, you should use the properties already supplied the Asp.net Framework to detect the browser/os.
Use this
to get the browser name Request.Browser.Browser and browser version Request.Browser.MajorVersion
to get the Os name Request.Browser.Platform and os version Request.UserAgent
A regex such as the following should work, but I suspect #bastos.sergio's answer is the correct way to get what you need.
Regex r = new Regex(#"{\s+(?<Browser>\w+)/[^(]+\((?<OperatingSystem>[^)]+).+");
string browser;
string OS;
var match = r.Match(s);
if (match.Success)
{
browser = match.Groups["Browser"].Value;
OS = match.Groups["OperatingSystem"].Value;
}
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 7 years ago.
Improve this question
I need a library to read 2D barcode (datamatrix) from images on C# project (windows Forms).
I tried using some SDKs, but the SDKs I tried are not free.
Is there any free SDK for reading 2d Barcode from images?
There's an example available:
using DataMatrix.net; // Add ref to DataMatrix.net.dll
using System.Drawing; // Add ref to System.Drawing.
[...]
// ---------------------------------------------------------------
// Date 180310
// Purpose Get text from a DataMatrix image.
// Entry sFileName - Name of the barcode file (PNG, + path).
// Return The text.
// Comments See source, project DataMatrixTest, Program.cs.
// ---------------------------------------------------------------
private string DecodeText(string sFileName)
{
DmtxImageDecoder decoder = new DmtxImageDecoder();
System.Drawing.Bitmap oBitmap = new System.Drawing.Bitmap(sFileName);
List<string> oList = decoder.DecodeImage(oBitmap);
StringBuilder sb = new StringBuilder();
sb.Length = 0;
foreach (string s in oList)
{
sb.Append(s);
}
return sb.ToString();
}
You'll need DataMatrix.net!
Best free Datamatrix coder\decoder that i've used is libdmtx: http://www.libdmtx.org/ . It has c# wrapper, so feel free to use it. I can't write sample code right now, but if you won't be able to handle it yourself, i'll help you a bit later with that.
EDIT:
libdmtx comes with console utils - if you will be able to read your barcodes with console app, you surely will read it using code.
EDIT2:
Here's code samples: http://libdmtx.wikidot.com/libdmtx-net-wrapper
I wonder if you have pictures containing some other info, except the barcode. The thing is - i don't know any free\open source lib to handle finding barcode on a picture, containing any other data properly.
And here's the link to other datamatrix implementations: http://www.libdmtx.org/resources.php