|
If you dont have any thing on it, so dont respond with you such invaluable suggestions
|
|
|
|
|
In truth Dave is quite correct, If someone supplied the code to do what you are after how would you support / change the code if you don't understand the documentation?
Have a try with the documentation to produce something that extracts the data and learn from it, it's the best way in my opinion.
if your stuck on something then post the code that doesn't work or work as expected (that is relevant to the problem) with as much detail as you can and you will get a better response.
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
What it seems is that you expect that quite a few people here are experienced in operating the API of those machines...
The truth is quite the opposite I assure you. Not only do 99.9% of us not have a single bit of experience in those machines, we also do not have access to the API documentation.
But, being the great developers and awesome mentors we are, we are willing to help, the problem is that, again, we have zero information other than what you give us. If you want help, you need to throw us a bone here. Post up the code from the API documentation and start asking questions. We are asking for code, it doesn't have to be your code but we need something, anything, and some specific questions from you in order to help.
We don't have these machines sitting on our desks, in our closets, or at our facility. We don't have access to your computer, hard drive, or network. We can't see the documentation sitting on your desk and certainly can't get what you already have. Help us help you.
|
|
|
|
|
Ron Beyer wrote: Help us help you. Very well said.
/ravi
|
|
|
|
|
|
Thanks Simon and Ron...
I do understand what you meant to say.
Dave: you kindly make this thread professional.
|
|
|
|
|
monisshamsi wrote: m a starter C# programming This is not a project that's suitable for a starter.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Beyond code for communicating with a specific type of machine, you'll also have to create a design which allows for easily adding further machines. Also that's a task for an experienced professional, not for a beginner.
Devices in health care often communicate via the serial port. So you might want to learn some basics for that topic. But then, the data to be sent to the device, and received from the device follow their own vendor- - or even device- -specific patterns.
|
|
|
|
|
Hi,
I am searching for a simple Audio recorder c# code which can
record a audio to a .wav file and play that audio with simple code.
Thanks & Regards,
Ranjith
|
|
|
|
|
There are many, many[^] resources available that can help.
|
|
|
|
|
You already asked that question here [^] five days ago: did the replies you received not help ?
“But I don't want to go among mad people,” Alice remarked.
“Oh, you can't help that,” said the Cat: “we're all mad here. I'm mad. You're mad.”
“How do you know I'm mad?” said Alice.
“You must be," said the Cat, or you wouldn't have come here.” Lewis Carroll
|
|
|
|
|
Hi:
in my winform app i use Emgu get my local video device, and i want list all video device in a listview, not use the index of device.
somebody can help me? thanks!
|
|
|
|
|
|
|
Hi,
I have a datagridview form with two columns that display a text value from a second table in the dataset and set an integer field in the target record based on the text field selected in a combobox.
Those two fields display blanks, always. One can display the appropriate text values with the drop down, but nothing gets set.
What's making me crazy is that that form, if pulled out of the project, made a standalone in its own project, hitting the same database, of identical dataset and everything else I can find, works fine.
Any ideas?
Thank you.
John Malcosky
|
|
|
|
|
I am trying to understand what the issue is - everything is working fine so where is the issue
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
The first thing I would do is to iterate through the source of the datagridview, outputting the results via a debug statement, to be sure that the columns do actually contain data.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
just a sec...my english is not so good
let me rephrase every thing:
- You have a datagridview with 2 columns.
- Now this datagridview displays a text from a DataSet.
(Till here its fine.)
Quote: and set an integer field in the target record based on the text field selected in a combobox.
- This is confusing
Quote: One can display the appropriate text values with the drop down, but nothing gets set.
What's making me crazy is that that form, if pulled out of the project, made a standalone in its own project, hitting the same database, of identical dataset and everything else I can find, works fine.
You have clubbed so many things in just one sentence. Its hard to simulate what you are saying(It is also my lack of knowledge)but i request you to put forth a simpler version of this question.
Thanks
|
|
|
|
|
I'm new to LINQ / lambda expressions. I have a list of documents that contains a string field for the creation date. What should the where clause look like to return all documents created in a given date range (eg - within the last year)?
|
|
|
|
|
Assuming you mean you have a Doc class like this:
public class Doc
{
public string Title { get; set; }
public string Date { get; set; }
public Doc(string t, string d)
{
Title = t;
Date = d;
}
}
Then it's pretty simple:
List<Doc> docs = new List<Doc>() { new Doc("Title1", "2014-1-10"),
new Doc("Title2", "2013-12-31")};
var inYear = docs.Where(d => DateTime.Parse(d.Date).Year == DateTime.Now.Year);
But personally, I'd store the creation date as a DateTime, rather than a string.
Never underestimate the power of stupid things in large numbers
--- Serious Sam
|
|
|
|
|
Thank you for the reply. Personally, I agree with you on the string as a datetime comment. Unfortunately, this pre-dates me and I guess it makes life easier in other areas of code.
To add a little clarity to my question. I'm looking for a range check, >= startdate and <= enddate?
|
|
|
|
|
littleGreenDude wrote: I guess it makes life easier in other areas of code.
Somehow I seriously doubt that. I have yet to find a single instance of storing a date/time as a string making it easier to do anything date/time related.
It's far more likely that the previous Muppet didn't know what he was doing.
|
|
|
|
|
So either do two checks in one Where:
DateTime earliest = new DateTime(2013, 12, 1);
DateTime latest = new DateTime(2014, 1, 14);
var inYear = docs.Where(d => DateTime.Parse(d.Date) >= earliest && DateTime.Parse(d.Date) < latest); Or do two Wheres:
DateTime earliest = new DateTime(2013, 12, 23);
DateTime latest = new DateTime(2014, 1, 14);
var inYear = docs.Where(d => DateTime.Parse(d.Date) >= earliest).Where(d => DateTime.Parse(d.Date) < latest);
Now go and kick the idiot who decided string is a good storage medium...
Never underestimate the power of stupid things in large numbers
--- Serious Sam
|
|
|
|
|
Hopefully, this will give you some idea as to how to do this:
using System;
using System.Collections.Generic;
using System.Linq;
namespace LinqDateTest
{
class Program
{
private readonly Dictionary<string, MySimpleClass> _mySimpleClasses = new Dictionary<string, MySimpleClass>();
static void Main(string[] args)
{
new Program().AllocAndTest();
}
private int _index = 1;
public void AllocAndTest()
{
Alloc("10/03/2024");
Alloc("10/12/2013");
Alloc("11/12/2013");
Alloc("12/12/2013");
var results = (from p in _mySimpleClasses
let myDate = DateTime.Parse(p.Value.MyStringDate)
where myDate > DateTime.Now.Subtract(TimeSpan.FromDays(100)) && myDate < DateTime.Now
select p.Value).ToList();
foreach (var value in results)
{
Console.WriteLine("Index {0}, Value {1}", value.Index, value.MyStringDate);
}
Console.Read();
}
private void Alloc(string dateValue)
{
_mySimpleClasses.Add(dateValue, new MySimpleClass { MyStringDate = dateValue, Index = _index++ });
}
}
public class MySimpleClass
{
public string MyStringDate;
public int Index;
}
} Saying that, I really wouldn't like to push the idea of using a string to represent the date. If the string value isn't parseable using Parse, the whole Linq query will blow up. A simple extension will take care of this:
public static class DateExtensions
{
public static DateTime ToSafeDate(this string value)
{
DateTime parsedDate;
if (!DateTime.TryParse(value, out parsedDate))
{
parsedDate = DateTime.MinValue;
}
return parsedDate;
}
} This would turn the Linq query into:
var results = (from p in _mySimpleClasses
let myDate = p.Value.MyStringDate.ToSafeDate()
where myDate > DateTime.Now.Subtract(TimeSpan.FromDays(100)) && myDate < DateTime.Now
select p.Value).ToList();
|
|
|
|
|
Hi Gang,
I am having a big brain cramp and cannot find anything on this anywhere. I have a small winforms app that will allow me to create configurations and serialize them to files. The app will read the files from a directory and display them in a datagridview along with a details view for the selected item in the datagrid. I have a binding source and a binding navigator. Here is the issue. Initially there will be no configuration files so the List<Config> will be created but will be empty. This in turn disables the Navigator so the AddNewItem button is disabled so nothing can ever be added. As a work around for now, I create a blank object that has a name <ChangeMe> so that there is at least one record. Having this one record enables everything and it all works great. So my question is, how can I get it to enable when the list is empty?
Thanks!
Mondis
|
|
|
|