Random Number Generation And Probability


Posted on 16th Feb 2014 07:03 pm by admin

Hello, I am working on a function which has to insert data into a SQL table.

we have to supply the function with number of entry needs to be inserted into the database and the work of the function is to insert the entry into SQL in such a way that 30% of the entry have their type(a column in my db) as 'a' , 20% as 'b' , 40% as 'c' and rest 10% as 'd'.

Is there any way i can do this? Do I need to run 4 while loops?

Thanks.

No comments posted yet

Your Answer:

Login to answer
347 Like 54 Dislike
Previous forums Next forums
Other forums

Forgot password won't work
My forgot password thing is not working properly. It is giving me this errorMailbox unavailable. The

CU&UC guide
Hi Gurus,

can anybody provide me the link for CU&UC upgrade guide

Thanks i

ob_ dynamic content
i was wondering about the potential to use ob to create a <div then remove it when the page

Solution Manager BPR
Does the SolMan-BPR-ARIS-Integration (http://www.ids-scheer.com/en/ARIS/ARIS_Platform/ARIS_Business_

Error when call dll from oracle
Hi all, please help me!

I have dll write C language, I want call it from oracle procedur

What do you call the "token" thing?
You know how some sites have links that run on tokens? Tokens are links that only stay alive for a c

extending tidy
I have problem with type-hinting and extending tidy. This code creates error:
Code: class cMyTidy

Sending CC Info by email
I am a little bit less knowledgable in the security area as most developers and I know I have a lot

Help with lottery style system?
I'm working on a currency system for forums and it is going to have a type of lottery system built i

error checking breaking my code
Hi there, OK first of all, big apologies for what I assume is really fundamental errors in the struc

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash