|
|
I have a small quiz-like thing, with 30 Q's but you only do 10 each time you take the quiz.
So to get random Q's im using Random() and switch().
But you dont want the same Q twice, so i could create a value for every question that changes when the Q is asked, but thats a bit of a pain.
Is there any easyer way to check whether a Q has been asked?
|
|
|
|
|
You could do random shuffle with questions, and then use them seqentionaly. This way, you'll get random order and won't ask same question twice.
David
|
|
|
|
|
btw you should write "easier"
David
|
|
|
|
|
I know
But im just too damn lazy to change it
|
|
|
|
|
|
Hi,
I just started looking at this new typed app.config in Visual Studio 2005 and I must admit I'm very confused. I Googled quite a bit to find more information but could not found anything usable. I have a few questions and I appreciate if some of you could take the time to answer them.
1. How do I encrypt connection strings in Windows Forms apps. I read that it can be done automatically for ASP.NET apps, but this feature seems to have been left out of WinForms. Am I right? Do I need to manually code this or there's an automated way?
2. It seems that the config file is stored in a path that ends with the version number of the application (ie: c:\......\v1.0.0.0). What happens if users upgrade to v1.0.0.1 for example? Will they lose all their settings? How can I prevent this from happening? Can I store my app.configs in a version independent path (user settings and application settings)?
3. How can I access my UI project's settings from class libraries (other assemblies)?
4. How is app.config deployed with ClickOnce?
5. Why is Visual Studio 2005 creating app.configs for all the projects of my solution? It doesn't make sense to me, it should only create one for the UI project. Maybe this is a beta bug?
Thanks a lot for your help and time!
Carl
|
|
|
|
|
I've created a non-rectangular windows application and have placed the Windows Media Player control on top of one portion of the form. I have set my transparent color to reflect the color around my non-rectangular background image. When I run my application and set the URL for the WMP control, I do not see the video. If I select the form, then the transparent color is visible. I'm not sure why the redraw doesn't work properly and only screws up if the URL is set for the WMP control. Does anyone have any ideas? Thanks.
|
|
|
|
|
I have a combo box that I want to put 35x35 pixel images into. How do I allow this to display images. If that works, do I still just do a combo box selected item to use that image somewhere?
|
|
|
|
|
|
Hello everybody!
OK, simple question here, how do I convert a TXT file that has a line ending of CR or LF to CRLF? I tried reading each line with StreamReader, replacing "\r" or "\n" with "\r\n", and writing the line with StreamWriter.Write(), but it doesn't work!
What else could I try? Thanks!
Darth_Sulfur (Sulfurik)
http://www.SulfurSoft.tk
ftp://tsfc.ath.cx
http://tsfc.ath.cx
hotline://tsfc.ath.cx
|
|
|
|
|
Does reading the whole string into memory (using ReadToEnd ) and replacing "\r" or "\n" with "\r\n" work?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
When you read a line, it does not return the CR, LF, or CRLF, so replacing them won't work. Instead, just read the line in and write it back out with StreamWriter.WriteLine().
|
|
|
|
|
strText = strText.Replace(Microsoft.VisualBasic.ControlChars.Cr, Microsoft.VisualBasic.ControlChars.CrLF)
"People who never make mistakes, never do anything."
My blog
http://toddsnotsoamazinglife.blogspot.com/
|
|
|
|
|
|
YES! ReadToEnd() worked! Thanks you all!
Darth_Sulfur (Sulfurik)
http://www.SulfurSoft.tk
ftp://tsfc.ath.cx
http://tsfc.ath.cx
hotline://tsfc.ath.cx
|
|
|
|
|
I need to generate Excel Reports using Pre-Created Excel Template.
Data is fetched from the databse. Does any one know any managed open source tool
to achieve this? All help is appreciated.
|
|
|
|
|
Hi there!
I made an application that needs to give the number of UDP packets that pass in port 1024.
The program is the following
while(received_data != 0)
{
received_data = exp.udpclient.ReceiveFrom(exp.udpbuffer, 0, exp.udpbuffer.Length, SocketFlags.None, ref exp.udpep);
count++;
}
This program work fine in Windows, but the problem is that using ethereal I found that windows don´t receive all the packets that the server send. In Linux, ethereal receives all the packets that the server send. But my program running in mono, don´t receive all the packets =/
Anyone can help me to find a solution for this?!
The problem of performance is in mono, or is ReceiveFrom from the socket?!!
Thank you.
I hope to hear you soon.
|
|
|
|
|
|
UDP is a connectionless protocol. There is no gaurantee that any client will receive all the packetssent by any particular sender...basically UDP is just send and pray...
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
The opposite of the religious fanatic is not the fanatical atheist but the gentle cynic who cares not whether there is a god or not.
Eric Hoffer
|
|
|
|
|
Hi,
I have various reports Designed in Crystal Report and would like to embbed those reports in a Aspx Page. How will I do it, do I have to use Crystalreportviewer Control or how will this work when I add crystal report to my existing Aspx Project. Help highly appreciated.
Thanks,
|
|
|
|
|
Yes you have to use the crystalreportviewer, i have tested reports build in crystal reports 8 i jus add them to the solution, make a little change (like moving a text) and save it, then i link it to the viewer, if you dont see it, you might have to download a patch from crysal.
Carlos Sánchez Pérez
Mathesis Consultores
Cd. Obregon Sonora Mexico
carlos@mathesis.com.mx
|
|
|
|
|
Anyone know how I can access S.M.A.R.T. information about my disk drive using .Net?
And how to enable it by code?
Thanks a lot,
Bernardo Heynemann
Lead Architect at CoreTech.com.br
Bernardo Heynemann
Lead Developer / Architect for Core Tech Brazil
|
|
|
|
|
Is there is any way to handle events of different types by one function.
For example I want to handle events of EventHandler type and my custom events with single function that have different number of parameters or have no parameters.
|
|
|
|
|
You can add a handler to several different events, but if you need to determine where the event came from or what type of event it was, you have to check the values of the sender and eventargs parameters sent to the event handler.
An event handler has to be declared with the exact parameters as the eventhandler delegate, e.g. with the sender and eventargs parameters. From the event handler you can then call any methods you wish in your code.
---
b { font-weight: normal; }
|
|
|
|