Random Card Generator

I think most of you have run into the problem of generating random cards (shuffling them) in almost every programming language. If not here is your chance .Now I want to try this in ASP. Ya ya I know WHY ASP...because I want a challenge and want to see how you people would think of doing it.
---------------------------
Rules To Develope:
---------------------------
- 40 cards
- 4 different suits
- each suit 10 cards with number 10,9,8,7,6,5,4,3,2,1
All it has to do is generate an ASP page listed with the randomly generated cards.

View Replies


ADVERTISEMENT

Random Token Generator - Not Really Random

We have the need to have a random token (a 16 char alphanumeric field) to be used as the key for one of our SQL tables. I have created a random token generator, however after only 3 months in production, it appears that we had an instance where a token that already existed in the tables was created. There are 3810 records currently in the database so it isn't like there are billions of records there.

I contacted an old college buddy of mine who is a mathematician, and he claims, assuming that random really does mean random, that the chances of getting a duplicate token are 1 in 79.5 septillion (79,500,000,000,000,000,000,000,000).

So my conclusion is that this was either a complete freak of nature occurance, or my random generator isn't really all that random. Here is the code behind how I am generating this: Code:

View Replies View Related

Random Generator

So we use the Randomize function and Rnd to make a random number. Well my numbers can hardly be called random. So I have to ask is those two functions dependent on the web server? The web server sucks so much that it cant generate new Random numbers?

How Random is this?

Game1
2006-05-14 20:01:32 You picked a 4 of Clubs
2006-05-14 20:01:34 You picked a 4 of Clubs
2006-05-14 20:01:35 You picked a 2 of Diamonds
2006-05-14 20:01:37 You picked a 2 of Diamonds
2006-05-14 20:01:38 You picked a 2 of Diamonds

And then I added a Session function which takes the Number generated and make sure that it doesnt happen twice in a Row. But then it just switches between two values.

Game2
2006-08-09 13:55:12 You got hit by 11276
2006-08-09 13:55:16 You recieved 88515m³ Ice.
2006-08-09 13:55:21 You got hit by 11276
2006-08-09 13:55:30 You recieved 88515m³ Ice.
2006-08-09 13:55:37 You got hit by 11276
2006-08-09 13:55:39 You recieved 88515m³ Ice.

If I had'nt had the Session function it would simply be "2006-08-09 13:55:12 You got hit by 11276" 4 times in a row or something.

So I ask myself what is wrong? Is it the server or is it faulty programming on my side?

iOre = Int(30000 * Rnd + 5000)

If IsEmpty(Session("OreRandom")) = False then
DO WHILE Session("OreRandom") = iOre
Randomize
iOre = Int(30000 * Rnd + 5000)
LOOP
End If

Session("OreRandom") = iOre

View Replies View Related

ASP Random Number Generator?

Does anyone know how to code in a very simple random number generator?

Basically, my ASP site is linked to an SQL d/base. What I want to do is have a "Random quote of the day"... the R.N.G. should spit out a number, and that number references the random_quote_ID in the d/base and spits it out.

View Replies View Related

Random String Generator Problem

I have the following function which generates random strings:

function GenerateRandomStr(nLen, skipRandomize)
dim i, strTmp

if not skipRandomize then Randomize
strTmp = vbNullString

for i = 1 to nLen
strTmp = strTmp + Chr(fix(26 * Rnd) + 65)
next

GenerateRandomStr = strTmp
end function

But it is so happening that it is generating duplicate string which is causing the system to fail. Can anyone tell me why it is behaving in that way??

View Replies View Related

How To Create A Random Image Generator?

How bout I go about creating a section on my site that displays a random image, lets say:

1) every time the page is refreshed
2) in a certain amount of mins or hrs the pic changes
3) daily, monthly and so on?

Would I need a database of some sort or can it just be done with some asp code?

View Replies View Related

Name Generator

I'm getting ready to start design on a random name generator. Basically a user would type in their first and last name and it would generate a random name pulling from a database. My question is this, what would be the best way to pull the random name? I was thinking of maybe just grabbing say the third letter of the first and last name and then matching them to a name, but I thought this would create to many duplicates. Maybe somebody out there can point me in the right direction.

View Replies View Related

Any Generator

tell a good software that i can be using to generate my asp codes apart from code charge studio.

View Replies View Related

CRUD Or DAL Generator

Code:

The biggest n00b benefit I can see from Ruby on Rails, .NET, CakePHP or any framework/code generator is it's ability to auto create DAL and CRUD statments in a object oriented format.

View Replies View Related

Form Generator

Helping a friend to create a site in ASP, he has a bit of ASP knowledge and I have none at all We are looking add being able to add the abilitly to create new forms on his new website. Does anybody know of a good ASP form generator?

View Replies View Related

Web Template Generator

I am looking for a script or a tutorial on how to generate a web page by having a user fill in a few chosen fields and entering the information into some preprogrammed html code using variables.It would then display their page and underneath it the html code.

Exactly like this, but in asp or cold fusion:

http://www.tupics.com/freead/create.pl

View Replies View Related

C# Code Generator

I am a web programmer and I have recently been involved in developing my first ASP.NET application written in C#. I am looking for a code generator to help me to implement the skeleton of the application.

I tried to search on the Internet and found a few, but none of them generate the stored procedures, the data access layer and the business layer. Can someone suggest me a good and bug-free code generator so I can focus on implementing the business rules rather than writing stored procedures and developing logic to load and save the data?

View Replies View Related

Code Generator Programs

Does anyone know of any decent ASP code generators.I would like a program that automatically builds all the code for searches, reports, etc, giving just the path to a Microsoft Access MDB file. I have tried and used aspmaker, and it works pretty good. I was just wondering if there are any other programs out there that anyone recommends. Also does anyone know of any other "GOOD" asp forums besides this one

View Replies View Related

Auto Number Generator

i am developing an e-move system. basically, this system required a customer to login first into the system before make any reservation. when a customer complete fill up a form with required data such as name, address, telephone number, email, date and time, i was wondering to give the customer a specific number as a reference number. customer will use this number to retrieve back the information if he has any changes to make and also to view the propose quotation from the mover company. my problem is, how can i include that particular process (reference number) into my e-move system?is there any auto number generator code/application?

View Replies View Related

Image Gallery Generator

i'm looking for a free image gallery generator in ASP 3 on ASP+. I've already looked on sourceforge.net but no one seems to fit my needs which include:

- admin area to create/destroy galleries,
- upload/remove images,
- placing comments on images.

View Replies View Related

Create An HTML Generator

I design auction templates and I need a way for my buyers to be able to fill out a form, click submit, and have a preview of the HTML template come up as well as the HTML coding so they can copy & paste it into their auction listing. Does that make sense?

I have NO experience with ASP programs but I was told by someone that this is what I need to get the results I am looking for. I do very well learning things on my own but this one has stumped me. I've spent many hours looking for any kind of tutorial or program that I could purchase.

View Replies View Related

How Do I Make Random Images Not Random?

However, what I want to do is include a request.querystring("ID"), so that IF an ID is defined, eg ID=3, , it will display the relevant (not random) information. I've tried this every way I can think and get type mismatches, etc etc. It's probably really simple but I can't see it.

<%
limit=3
redim link(limit)
redim image (limit)

link(1)="xxx"
image(1)="image1.jpg"

link(2)="xxx"
image(2)="image2.jpg"

link(3)="xxx"
image(3)="image3.jpg"

randomize
random=int(rnd*limit)+1

%>
<center>
<a href="<%= link(random) %>">
<img src="<%= image(random) %>" border="0"></a>

View Replies View Related

Making It Random (getting Random Numbers)

I just wanted to know whats the best way to generate 50 or say X amount of number at random without having to repeat any of the previous number...

so far I've the following:

[VBS]<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

<%
function RandomNumber()
dim theRandom

Randomize
'RandomNumber = Int((upperbound - lowerbound + 1) * Rnd + lowerbound)

theRandom= Int((99 - (0) + 1) * Rnd + (0))

if (theRandom<10) then theRandom = "0" & theRandom

RandomNumber = theRandom
end function
%>[/VBS]

and then I've this in the body of HTML doc: Code:

View Replies View Related

Stored Procedure Parameters Generator

there used to be a script by Bob Barrows which generated the vbscript for
a stored procedure. The web site isn't there any more. Can anyone point me
somewhere else?

View Replies View Related

Last Digits Of A C.card

I saw in SPF an ASP code that was usable to hide the first digits of a credit card number and replace them by a "*". I'm really sorry to post such a thread, but I can't find it back. Does anyone have the link? I've tried to check it in the funky functions and sections like that. Maybe just missed it but well. tried to see many times.

View Replies View Related

JMail And E-card

i am using a form that sends an e-card..to explain briefly i am giving the code:

Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.ContentType = "text/html"
JMail.CharSet = "ISO-8859-9"
JMail.ServerAddress = "mail.mydomain.com:25"
JMail.Sender = "bla@mydomain.com"
JMail.AddRecipient theiremail

here problem comes. when user enters a different e-mail address (not same with my domain)
it gives error. how can i solve this problem.. can jmail send an e-mail to differents domains?

View Replies View Related

Credit Card Authentication

What all is involved in a secure site? Not just good security, but an actual secure connection?

Is it all up to the host? Is there a lot of extra/different ASP stuff? What about credit card authentication? Shopping carts?

View Replies View Related

Question About Wild Card Ip's

I want to set a range of IP's using wildcard symbols but the script doesn't seem to be working. I'm putting the ip in a varchar value and calling it from the script. Can't something like 68.43.*.* work?

View Replies View Related

Folder Wild Card In URL With ASP

I am trying to create a URL for each user in my site something like
http://domainname.com/UserName But creating a folder for each user
seems a waste.

Basically I'd like to make the URL point to the index.asp without
changing the URL with redirects and such...

View Replies View Related

Validate Credit Card

How can we validate credit card in ASP?How can we create a dll file in VB?

View Replies View Related

Credit Card Processing

I'm working on a new project that involves purchasing stuff online. But I don't really know where to start. I know you need to process the cards through a gateway, and that's about it.

What I want is a secure page where the customer enters their credit card info and hits submit. I don't want to process it manually, I want it all to be automatic. I'm not asking for help coding this, because I understand its very complicated, and I don't trust that I will be able to make it secure if I were to do it myself.

What I'm asking is, can anyone recommend a good ASP script for processing credit cards? (all cards will be from the UK, so visa, mastercard, maestro, switch, solo etc...).

I don't want a shopping portal, just the credit card processing bit is what I'm after (anything under $100 would be ideal)! And also, what is a good gateway to use in the UK? And any other info/tips you can give me would be great too!

View Replies View Related

Encryption Of Credit Card

I am trying to create a simple, secure credit card payment system using either public/private key encrytpion.

I know public key encryption is probably more secure, but it is also slower from what I have been reading. What I am looking for is some examples of public or private key encryption.

View Replies View Related

Credit Card Information

My client wants to have credit card information fields on his forms for his website visitors to be able to buy his wervices by credit card.The credit card info-Brand, number and expiry date will be sent to the server and stored in the database as the .asp page calls itself on Submit.

How secure is this?I've never had to worry about it before but is form information encrypted before being sent to the server? Are there any legal obligations for handling peoples credit card information?The actual credit card payments will be handled manually at the clients company.

View Replies View Related

Credit Card Form

where I would start if I wanted to start accepting credit cards as online payment instead of paypal?

View Replies View Related

Credit Card Validation

I cannot seem to find an asp script that will succesfully validate a credit card for me. I have 3 fields to work with. Very simple I thought.

CC_NAME
CC_TYPE
CC_EXPIRE

I just want to check the cc againt the algorithm used to verify number matches type and expire date hasn't past.

View Replies View Related

Encrypting Credit Card Info In ASP?

I have a website for our online store. Until now we have received payment through email, which we then run in our local store's Credit Card machine.

We want to move up from there. I have signed up for Paypal and that is easy.

We want to also be able to accept the CC info in our own website securely. We are not looking to actually run the Credit Card, we just want to get the information from the user and pass it on to ourselves in a secure manner, so that we can run the information locally on our Credit Card machine.

So, I guess, my questionj is not really about credit card's at all. Rather I am asking, how can I get a form's data sent to my computer 100% (or close to that) securely.

View Replies View Related

ASP Ecard/business Card Creator

I would like to create a page where someone could select from say 12 different cards, Once they have clicked on the card it will take them to a page where they can input about 5 - 6 lines of text, select a font, font color and font size they would like to use.

Then they can hit a submit button that will take them to a confimation page showing them the card they have created. Once they view the card they can hit an aprove button which will then enter the information they have input into a database and also email the completed card to them as well as to myself so I can see what they created.

Does anyone have any idea where I could find a tutorial to help me do this? I am pretty sure I will have no problems with most of it. However, my concern is the font style, color and size selector, i have no clue how to go about creating something like that.

View Replies View Related

Online Credit Card Purchases

Either in the US or EU, when a customer makes a credit card purchase online, for how long after can the vendor legally store the encrypted credit card number in its database?

Its extremely hard to find this info online.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved