|
Advertising?
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
|
It's the best lead I've had in weeks.
|
|
|
|
|
We do need to get together one of these days, but a working trip would interfere with our drinking. After all, we're practically neighbors. I wish I could break away for a day to see you in Sedona, since it's just around the corner, but I'm swamped at work for a while. If the company ever decides to hire a real programmer, I'll definitely contact you. In the meantime, they expect me to do this with a spreadsheet - which is completely impractical - hence my effort to create a reasonable facsimile of a working data management program in my free time at home.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Roger Wright wrote: interfere with our drinking
I don't know about you, but with me the first drink interferes with any others.
Roger Wright wrote: a working data management program in my free time at home.
Keep pluggin' and askin' as necessary.
|
|
|
|
|
hi,
I have to show the number and name of file being copied.I have assigned the file name and number to a label.But, Gui is being so responsive that it can be displayed visually correct.It looks like the process has hung and only display the last filename and number after task completion.I have to show the filename and number just while it is being copied.
regards
Bill
|
|
|
|
|
Yes. You have to use Background Worker .
For Your Ref[^]
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Like we have FlowLayoutPanel, where controls can automatically get laid out according to their sizes and sequence, I have a requirement of a fluid layout.
In a rectangle or area (say 500w X 100h), there are some fixed small controls. lets say a rectangle control of (100w X 30h) is fixed at point (0 top , 150 left) Now, I need to fill this bigger rectangle with small shaped controls with constant areas but variable widths. Height can be maximum wherever possible.
The controls not adjacent to fixed control will be rectangles So, no problems. The controls adjacent to fixed controls will need to take polygon shape of variable heights to fit in the balance space.
Any logic already existing? Any approaches?
And yes, this is for winforms.
|
|
|
|
|
Som Shekhar wrote: Any logic already existing?
AFAIK it doesn't exsist. Maybe 3rd party control would have it.
Som Shekhar wrote: Any approaches?
I Would use OnResize event and programaticly calculate the behaver
|
|
|
|
|
Saksida Bojan wrote: AFAIK
Yes, "AFAIK" applies to me too. I just hoped that others may have some experience or thoughts.
|
|
|
|
|
Ok, I'm making this program for my statistic class Dealing with boundaries and Limits..
When user enters a set of numbers, I would like it to count the same numbers it enters, for example.
1,2,7,8,3,5,8,8.
1 = 1
2 = 1
3 = 1
5 = 1
8 = 3
without writing like 100 if else loops
if ( num =1)
num1 += 1;
else
if ( num =2)
num2 += 1;
etc, any idea how to do this program?
|
|
|
|
|
Can you use a dictionary with logic like this -
Dictionary<int, int> objCount;<br />
int num;
if (objCount.ContainsKey(num))<br />
{<br />
objCount[num]++;<br />
}<br />
else<br />
{<br />
objCount.Add(num, 1);<br />
}
There's nothing left in my right brain and nothing right in my left brain. |
|
|
|
|
|
int[] myNumberCounter = new int[100]; <br />
<br />
myNumberCounter[12]++;<br />
myNumberCounter[2]++;<br />
myNumberCounter[19]++;<br />
|
|
|
|
|
Whether that is a good idea or not depends on what kind of data you are going to get. If the data is an int (i.e. a 32 bit number), then declaring an array to hold it is a little excessive. Likewise, if the data is likely to be "clumpy" with many values below 1000, and many above 30000, but few in between, then an array is unlikely to be efficient.
Additionally, you will need to provide checking to ensure you will not exceed the arry blounds. Extending an array is very inefficient, as the entire array has to be copied to a new, bigger, array.
If you do not know what data you will recieve, then a Dictionary is likely to be a better solution.
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
I agree - mostly - in this case it was "sort of" indicated values in the area of
0- ~100. And if that's the case i would deam Dictionary excessive, otherwise I agree.
|
|
|
|
|
Homework.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Use LINQ?
var list = new int[] { 1, 2, 7, 8, 3, 5, 8, 8 };
var query = from i in list
group i by i into grp
select new
{
Number = grp.Key,
Count = grp.Count()
};
var counts = query.ToDictionary(t => t.Number, t => t.Count);
|
|
|
|
|
hi
i have a application which need a port to send data, but im in need of a utility which will tell me the availalbe ports, and whether they are opened or can they be used??
|
|
|
|
|
I think you already asked this question, didn't you? Or do you want some different information this time?
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
Just write the code to try opening the port. If you get an exception, it's not available.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
ya i did write a thread previously, but i couldnt find it sorry .
i only want to print statements, i dun want to open the port, when i do this method, it ends up opening the port when the port is availble
|
|
|
|
|
Hi,
My project has layered architecture. Business logic has separate project and in this project I have to use some registered OCX method.
Current situation:
In presentation layer I have window forms. It is easy to add OCX control in toolbox and draw it on any form. Object of drawn OCX control can be used for calling its methods. But I don't want to do it in presentation layer.
I have following question:
Should I manually add reference of OCX in business logic project? If yes then how I can use it in cs files?
Please tell me how to call method of OCX without having forms. That means no creation of control at design time.
Thanks.
Hassan Nisar
|
|
|
|
|
You probably need to create an interface which exposes few methods that acts like facade methods. This methods should eventually call the methods on the control. With this, your business logic project will not be aware of the OCX controls. You can inject this interface instance into your business classes from the presentation layer.
Best wishes,
Navaneeth
|
|
|
|
|
Go through these tutorials. [^]
There's nothing left in my right brain and nothing right in my left brain. |
|
|
|
|
|
you can probably do it like this...
|
|
|
|
|
hi
Is there any way i could check whether the data has been sent in serial port??
|
|
|
|