|
sorry, my meaning was activity-selection algorithm that is greedy algorithm in C#. i have a project for university, i thanks so much if u help me.
best regards...
|
|
|
|
|
The whole point behind you getting these assignments is for YOU to demonstrate that you can applied what you've learned. It's NOT for us to do the work for you.
|
|
|
|
|
Here's an activity selection algorithmm coded in C# - probably not what you want.
But you have not explained what you want.
static void Main(string[] args)
{
Random rndGen = new Random();
var activities = new List<string>() { "bake bread", "mow lawn", "read book", "sleep", "don batman costume", "sneeze",
"have a beer", "code furiously", "make excuse for late assignment", "plead for help"};
for (int i = 0; i < 3; i++)
{
int act = rndGen.Next(activities.Count);
Console.WriteLine((i+1).ToString() + ". " + activities[act]);
}
Console.ReadLine();
}
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
The only valid measurement of code quality: WTFs/minute.
|
|
|
|
|
I think maybe a command line parser is in order.
|
|
|
|
|
mazizi0 wrote: hi dears... Hello luvver
mazizi0 wrote: i want the activity-selection algorithm in c#. Oooh, ooh I know this game. I want a Porsche.
mazizi0 wrote: thanks for u... No no. Thanks for YOU!
|
|
|
|
|
So what are you going to do when (if) you pass your course & get a job?
Ask your fellow employees to do your work for you, then take the credit for it?
How long do you think you'd last in that job?
Man up - put a bit of effort in and do it yourself or you're on a slippery slope to nowhere career-wise.
|
|
|
|
|
In a C# 2010 windows application that I am writing, I am accessing excel 2010 spreadsheets. I am obtaining information about the data contained within the excel spreadsheet from the file name.
My problem occurs when an excel spreadsheet has been openend and not closed properly by the application. The program actually aborts. When I try to access these particular spreadsheets again, there is a try call error that occurs.
Is there some code I can write to check to make certain the excel spreadsheet is ok and there is no problem with the file? If so, can you show me the code and/or point me to a link that will show me how to solve this problem?
|
|
|
|
|
dcof wrote: Is there some code I can write to check to make certain the excel spreadsheet is ok and there is no problem with the file? Quite possibly, but you need to provide much more detail about the actual problem that is occurring, for anyone to be able to make any useful suggestions.
|
|
|
|
|
Is there code to check the excel file to see if it's OK?
No, not really.
You need to write your code to handle the situation where it's not. This includes properly wrapping sensitive sections of your code that deals with opening, reading, and closing the Excel file and properly handling those exceptions according to your business rules for processing the file.
|
|
|
|
|
hello, i have a service in WCF that wil recieve a alrge xml in response. here is my config
<bindings>
<basicHttpBinding>
<binding name="CVSCValidateContactAlertSOAP" />
<binding name="CVSCUpdateOperationsContactSOAP" />
<binding name="ContactRegisterSOAP" />
<binding name="FindContactsListSOAP" />
<binding name="FindReviewsByAccountSOAP" />
<binding name="AddReviewSOAP" />
<binding name="ProductOfferingSOAP" />
<binding name="OperationSupportSOAP" maxBufferPoolSize="2147483647"
maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"
transferMode="Streamed">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
<binding name="CustomerAccountSOAP" maxBufferPoolSize="2147483647"
maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"
transferMode="Streamed">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
<binding name="BusinessInteractionSOAP" />
</basicHttpBinding>
</bindings>
the answer from the server is
Server stack trace:
en System.ServiceModel.Channels.HttpInput.ThrowMaxReceivedMessageSizeExceeded()
en System.ServiceModel.Channels.HttpInput.GetMessageBuffer()
en System.ServiceModel.Channels.HttpInput.ReadBufferedMessage(Stream inputStream)
en System.ServiceModel.Channels.HttpInput.ParseIncomingMessage(HttpRequestMessage httpRequestMessage, Exception& requestException)
en System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
en System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
en System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
en System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
en System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
en System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
en System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
en System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
en IServicioCuenta.buscarCuenta(Auditoria auditoria, CriterioSeleccion criterio)
en ServicioCuentaClient.buscarCuenta(Auditoria auditoria, CriterioSeleccion criterio)
|
|
|
|
|
|
|
I found this SHARE_INFO_503 structure (Windows)[^] which uses the same value names, but in this documentation the actual values are mentioned.
0100000101101110011001000111001011101001
|
|
|
|
|
At the bottom of that MSDN document, you'll see it says "Header: Lmshare.h (include Lm.h)".
Searching the header files listed in Lm.h for one of the values will lead you to LMaccess.h. The values start on line 1250 of that file:
#define ACCESS_NONE 0
#define ACCESS_ALL ( ACCESS_READ | \
ACCESS_WRITE | \
ACCESS_CREATE | \
ACCESS_EXEC | \
ACCESS_DELETE | \
ACCESS_ATRIB | \
ACCESS_PERM \
)
#define ACCESS_READ 0x01
#define ACCESS_WRITE 0x02
#define ACCESS_CREATE 0x04
#define ACCESS_EXEC 0x08
#define ACCESS_DELETE 0x10
#define ACCESS_ATRIB 0x20
#define ACCESS_PERM 0x40
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I am looking for a solution by which i type some keyword and get the list of url which contain that world
|
|
|
|
|
Where are all these URLs stored?
|
|
|
|
|
I am to search these URL from web. It's like google. google serach key world from web pages i want the same but as we know that google work on the indexing. I want to return only the website url that is similiar to entered word
|
|
|
|
|
Then you first need to create a database of all URLs that exist in the world; that will be quite a big list.
|
|
|
|
|
You could only do this by building up a list of all visitable URL's and then you could query that.
|
|
|
|
|
I am to search these URL from web. It's like google. google serach key world from web pages i want the same but as we know that google work on the indexing. I want to return only the website url that is similiar to entered word
|
|
|
|
|
When you search via Google, they aren't going off and hunting for matches on the web at that point. They search their indexed versions, which they have previously crawled. You need to take a similar approach in order to satisfy your requirement.
|
|
|
|
|
Why don't you use google for that. Try the following search:
allinurl: codeproject answers
This will give you all urls that contains "codeproject" as well as "answers" as keywords.
Try it out!
Cheers
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
Hi,
I am developing Google Earth application using C# WPF. To navigate Google Earth Plug-in URL, I used
WebBrowser control in wpf window but I am getting Java Script error while Google Earth plug-in to webBrowser in
WPF. Same code i applied in C# winform but not throwing any javascript errors and it is working good.
Google Earth Plug-in javascript Error:
Could not complete the operation due to error 80131509
Line: 38
Character: 7
Google Earth Plug-in Link:
http:
Please let me know to resolve the problem in WPF Window.
Regards,
chittibabu
|
|
|
|
|
citibabu wrote: Line: 38
Character: 7
Please don't expect people to guess what may be on this line at character 7.
|
|
|
|
|
i want help on the way i could implement skype on my windows 8 using c# and xaml
|
|
|
|