|
I have raw metal sheets of various rectangular sizes (x1*y1, x2*y2,
... xn*yn).I want select best fit sheet which fullfill my requirement for getting new sheets of X*Y it also has some tolerence.
e.g
I have metals sheets like 200*100,300*200,250*500,50*100,100*100
and I Require 3 pieces of 100*100 with 3mm tolerence.so how do I find the best fit soluion and how do I implement this logic.
Thanks in advance.
|
|
|
|
|
please stop cross posting - you posted it in algorithms, which is probably more correct - posting it here as well wont get you a solution any faster
'g'
|
|
|
|
|
i am developing a Desktop Application in c# where user have to give username and password to login. This application runs when windows starts. Now user have to give password for login to windows and then again the have to login in my application. My question is is there any option to get the login credential so that user have to login once for windows and my application?
Thanks in advance.
|
|
|
|
|
You are saying that the user logging into Windows is, by default, the same one logging into your application at start-up? So why bother logging them in at all? Assume it is the same user and start your application. Unless you have another reason for tracking who is logged in to your application?
Then you could use one of these or similar:
Environment.UserName
System.Windows.Forms.SystemInformation.UserName
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
nils illegitimus carborundum
|
|
|
|
|
one user can logout at any time from Application without loogin off from windows. and other user have to login into the application before the use the particular machine. so i have to keep separate user database form my application.
|
|
|
|
|
montosen wrote: one user can logout at any time from Application without loogin off from windows
Then there's absolutely no way to use the current windows login info for anything beyond retrieving the currently logged-in user. If anothger user can come along and start using apps on another user's logon credentials, the app MUST ask for user ID and password.
.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
|
|
|
|
|
yeha! i guess ur right.
|
|
|
|
|
You could check to see if the currently logged-in user is part of a particular group, and if so, just let them use the program. Otherwise, make them enter a password.
.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
|
|
|
|
|
|
I'm sure I'll get shouted at for this but OO is not the answer to everything. Your requirement looks very simple so keep it that way. If you really feel the need to objectify such a trivial requirement then break it down into logical components and go from there but you can end up over-engineering the solution. KISS - "keep it simple, stupid" works nearly every time.
Take a look at this, as well: Design Patterns[^].
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
nils illegitimus carborundum
|
|
|
|
|
I agree with you. I got halfway through typing the same response to the original post and then chickened out.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
Why do programmers often confuse Halloween and Christmas?
Because 31 Oct = 25 Dec.
|
|
|
|
|
Henry Minute wrote: I got halfway through typing the same response to the original post and then chickened out.
Very good: I'm so used to being flamed that another roasting wouldn't hurt a bit!
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
nils illegitimus carborundum
|
|
|
|
|
Others have answered succinctly, but I must beg of you - don't crosspost. It makes it hard for people to follow answers.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Can anyone give me a link\TUTORIAL where i can able to draw the graph in a C# CRYSTAL RPORT.?
Thanks in advance..
|
|
|
|
|
lavate malllik wrote: Can anyone give me a link\TUTORIAL where i can able to draw the graph in a C# CRYSTAL RPORT.?
Google for the bit that I have made bold in your question. Correct your spelling of 'rport' first though.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
Why do programmers often confuse Halloween and Christmas?
Because 31 Oct = 25 Dec.
|
|
|
|
|
Hi,
I have window application and windows service in C#. I want to display both application in System tray. I want to handle service like start ,service start up, stop using system tray . I would like to know how to create setup on project so that service can installed and it display in system try. with in system try I want to display one menu for open windows application.
I want to merger windows application and windows service in one application and want to create setup .When we install setup ,service should be installed and it should displayed in System try.
Please give me any idea !!!!!!
rajesh
|
|
|
|
|
Partial Answer.
Q: How to show an Icon for a running Windows Forms application?
A: Use the NotifyIcon control. You can find it in the Toolbox.
Steps:
Create a Windows forms application.
Add a "notifyIcon" control (.Net component).
Assign an icon to your notifyIcon control.
Make sure the notifyIcon.visible property is true.
HTH,
Marcelo
|
|
|
|
|
Hi every1.
I have a list in my project and theough it I add some data to a file. Now, I need to delete one record when user insert the approperiate UserId and Username.
Could you please advice me how I can do that. give me an example, please.
thx
|
|
|
|
|
What exactly are you having trouble with? Do you not know how to compare strings? Do you not know how to use a for loop? Are you having trouble with file access? If so, what kind of trouble specifically?
|
|
|
|
|
I've been wondering this for a while...
When I create something in the IDE - a form with buttons and boxes and other widgets - I usually spend a great deal of time setting the properties of each item. Obviously VS saves those properties somewhere, else it would be impossible to remember them after I close the session. But where? The Designer file only stores declarations; that's the first place I looked. But out of curiosity I've opened every file in Solution Explorer to locate these property settings, and I can't find a hint of them. Since I don't believe in magic, there must be some other way for the IDE to keep track of the properties I've selected. But where?
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Roger Wright wrote: The Designer file only stores declarations; that's the first place I looked.
Look again. Make a button, set some properties, then open the designer file. Go to the button declaration and do a "Find All References" on it. The properties are set in the Designer file.
|
|
|
|
|
Ah, Luc hit it on the button - the regions needed expanding. It's all there. Thanks!
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
In my projects, the properties all appear to be set in the *.Designer.cs files
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Silly me, I didn't expand the regions in the file... [whacks forehead]
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Hi Roger,
several files are created for you, next to the regular source files you create yourself:
for a solution abc there is an abc.sln file, it is a text file pointing to the projects;
and an abc.suo file, it is a hidden file, holding binary data.
for a form xyz there is a xyz.designer.cs or xyz.designer.vb holding declarations and initialization code;
there are settings files
there probably also are resource files, depending on your usage of resources.
Most of the simple stuff you enter through Visual Designer goes into the designer.cs/vb files.
As it uses regions, you'd have to open up the regions (or disable outlining) to see all of its content.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|