Question about Microsoft Operating Systems

1 Answer

How to random the 50 question but only 25 question only appear in the form?

Posted by on

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

    Dedicated:

    Visited the website for 20 consecutive days.

  • Expert
  • 90 Answers

Hi,

Fetch all 50 questions in some collection, say "A".
take new collection say "B".

for position 'X' from 1 to 25,
take a random number (between 0 and 1) and multiply it by 'X', take mod 50 of that number say "I" and fetch the I'th element from A --> B and remove this element from A. Now next time the mod should be (50-X)

This will help you to get 25 random questions from a set of 50 questions.

Thanks.

Posted on Mar 18, 2009

  • Kuldeep Kumar Dubey
    Kuldeep Kumar Dubey Mar 18, 2009

    Additionally, here by questions i mean the index of those question, so as to make handling of things easy and you can get the actual text of that question from the index.


    Thanks again.


×

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

How to Make the Matrix Raining Codes by Using Only Notepad?


thats easy..

open notepad then copy and paste the following text

@echo off
color 0a
cls
:a
set /a a=%random%
if %a% geq 16384 set /a aa=1
if %a% lss 16384 set /a aa=0
set /a b=%random%
if %b% geq 16384 set /a bb=1
if %b% lss 16384 set /a bb=0
set /a c=%random%
if %c% geq 16384 set /a cc=1
if %c% lss 16384 set /a cc=0
set /a d=%random%
if %d% geq 16384 set /a dd=1
if %d% lss 16384 set /a dd=0
set /a e=%random%
if %e% geq 16384 set /a ee=1
if %e% lss 16384 set /a ee=0
set /a f=%random%
if %f% geq 16384 set /a ff=1
if %f% lss 16384 set /a ff=0
set /a g=%random%
if %g% geq 16384 set /a gg=1
if %g% lss 16384 set /a gg=0
set /a h=%random%
if %h% geq 16384 set /a hh=1
if %h% lss 16384 set /a hh=0
set /a i=%random%
if %i% geq 16384 set /a ii=1
if %i% lss 16384 set /a ii=0
set /a j=%random%
if %j% geq 16384 set /a jj=1
if %j% lss 16384 set /a jj=0
set /a k=%random%
if %k% geq 16384 set /a kk=1
if %k% lss 16384 set /a kk=0
set /a l=%random%
if %l% geq 16384 set /a ll=1
if %l% lss 16384 set /a ll=0
set /a m=%random%
if %m% geq 16384 set /a mm=1
if %m% lss 16384 set /a mm=0
set /a n=%random%
if %n% geq 16384 set /a nn=1
if %n% lss 16384 set /a nn=0
set /a o=%random%
if %o% geq 16384 set /a oo=1
if %o% lss 16384 set /a oo=0
set /a p=%random%
if %p% geq 16384 set /a pp=1
if %p% lss 16384 set /a pp=0
set /a q=%random%
if %q% geq 16384 set /a qq=1
if %q% lss 16384 set /a qq=0
set /a r=%random%
if %r% geq 16384 set /a rr=1
if %r% lss 16384 set /a rr=0
set /a s=%random%
if %s% geq 16384 set /a ss=1
if %s% lss 16384 set /a ss=0
set /a t=%random%
if %t% geq 16384 set /a tt=1
if %t% lss 16384 set /a tt=0
set /a u=%random%
if %u% geq 16384 set /a uu=1
if %u% lss 16384 set /a uu=0
set /a v=%random%
if %v% geq 16384 set /a vv=1
if %v% lss 16384 set /a vv=0
set /a w=%random%
if %w% geq 16384 set /a ww=1
if %w% lss 16384 set /a ww=0
set /a x=%random%
if %x% geq 16384 set /a xx=1
if %x% lss 16384 set /a xx=0
set /a y=%random%
if %y% geq 16384 set /a yy=1
if %y% lss 16384 set /a yy=0
set /a z=%random%
if %z% geq 16384 set /a zz=1
if %z% lss 16384 set /a zz=0
echo %aa% %bb% %cc% %dd% %ee% %ff% %gg% %hh% %ii% %jj% %kk% %ll% %mm% %nn% %oo% %pp% %qq% %rr% %ss% %tt% %uu% %vv% %ww% %xx% %yy% %zz%
goto a





Dont copy this line or anything below it.

once the text is pasted into notepad. click file then Save As...

where is says Save as type: click the drop down and select All Files

the save Type the File name: as Matrix.bat


or you could just google how to make a Matrix bat file.. LOL

Oct 20, 2016 | Microsoft Operating Systems

1 Answer

Why do my photos change order after I sync from computer to ipad?


you need to sort them as you want them to appear, alphabetically, modified, size, date created..... or so on

Jul 20, 2014 | Apple 16GB Wi-Fi iPad 2 with Accessories...

1 Answer

Runtime error 216 at 00Cd358


Run time error 216 can cause permanent damage to your operating system if left unrepairable.

Symptoms of Run-time Error 216 This Trojan invades the registry and modifies command files, sometimes with unpredictable results. Some of the common symptoms include:
  • Inability to open some programs such as internet explorer
  • Random CD/DVD drives opening and closing
  • Pop up dialogue boxes appearing randomly
  • Appearance and disappearance of important files
  • Extremely slow downloads
First
  1. Boot to safe mode by pressing the F8 key at start up
  2. Once the system has booted run a good anti virus program to eliminate the Trojan

You will need to also use a good registry cleaner to fix all of the entries that the Trojan modified. Once all that is done, the error should disappear for good.
summary Any time you have a virus, Trojan or other form of malware that causes a noticeable error in system behavior or performance, you should run a manual anti-virus and spy ware scan. Once that is complete, you should run a good registry cleaner to remove all of the damage and left over junk entries these programs can leave behind after they are dead.

Aug 17, 2011 | Operating Systems

1 Answer

This download appears when chat with some one on facebook, please help me to prevent this form the chat http://static.ak.fbcdn.net/sound/pling.mp3


You PC is definitely infected with a Virus or a Malware. I recommend you to get a good antivirus software update it and clean your PC thoroughly.

Good Luck!

Jan 21, 2011 | Operating Systems

1 Answer

How do i get a personal support tech for datacard 150i?


I have a problem at work editing the project properties
From the menu bar, select Edit and then Production Form Properties. The Edit Production Form Properties dialog box opens.
data source for select OLE DB provider and source
when Click on the Choose button this message appears error occurred the selection or configuration of adata source

Oct 19, 2010 | Operating Systems

1 Answer

Simulate the Shortest Job First CPU scheduling algorithm


Nice try! Find an upper-class student to give you one-on-one tutoring for your homework.

Jan 14, 2009 | Operating Systems

1 Answer

To form a jumbled words


Using VB as an example

Dim intLength as Integer
Dim y as Integer
Dim arrOut( ) as String
Dim TempLetter as String
intLength=len(text1.text)
ReDim arrOut(intLength)
Randomize
dim boolDone as boolean ' flag to track unfilled positions

Write a loop that gets each letter from text1, then choose a random number from 1 to intLength

Get the existing letter, then put it into a different position in the arrOut, based on the random number. If something is in that position, try again:

for y=1 to intLength
tempLetter = mid(text1.text,y,1)
boolDone=false
do while boolDone=false
r =CInt(Int((y * Rnd()) + 1)) 'Get random # from 1 to length
if arrOut(r) ="" then 'see if spot has been used
arrOut(r) = tempLetter
boolDone = true
end if
loop
next 'get next letter in text1

text2.text=join(arrOut,"") ' concatenate arrOut, no delimiter.


Hope that helps.





Jul 16, 2008 | Operating Systems

Not finding what you are looking for?
Operating Systems Logo

Related Topics:

56 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Operating Systems Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Scott Fryer

Level 2 Expert

80 Answers

Alex Krenvalk

Level 2 Expert

401 Answers

Are you a Microsoft Operating System Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...