Random # Generation
I'm trying to sort a list of 10 people into two groups--RANDOMLY. I've gotten as far as to generate a random number and assign a name to it. I just need to know how to generate 9 more numbers, making sure no numbers/names repeat. Code:
View Replies
ADVERTISEMENT
I want to create a random number where it concatenates with the "day counter" as explained below and name of the person inorder to generate a unique id.
by day counter i mean. there are 365 days in a year and today is the 18th day of the yeat. so the counter generated shud be 18&Smilesmita. How do i do this in ASP ?
View Replies
View Related
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
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
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
i want to generate bill for a user which needs to be in pdf format. so, i came across fdf toolkit......but i am not able to understand how to use it....i looked at the 15seconds.com sites.....also but no help. so, if anybody can give a nice tutorial for this, i would be very thankful.
secondly, is it better to use this fdf toolkit or third party pdf generating tools like asp-pdf from persits inc, aspeasy pdf...etc. if yes, then which tools are the best.
my requirements is that the pdf file should be generated from the database and also from the form....both.
View Replies
View Related
Is there any way to generate a pdf document dynamically using ASP?? My client want a letter to be generated in pdf. I am able to generate the letter in rtf. So a method to convert the rtf to pdf is also fine. Is there any way to generate it using a library function or built in object (with out using Third part toolkit). Even if using any object library.
View Replies
View Related
I want to do it with an external stylesheet. I know I could do this using an internal stylesheet and if I can't crack the problem soon, will end up doing so.
Basically, I have a database table with site information, for example the site logo. What I would like to do is something along these lines: Code:
View Replies
View Related
Does anybody know How can I generate Images from ASP?
View Replies
View Related
.CSV File Generation in ASP Hello, I am able to convert recordset into .csv file and download it. My problem is how I can display message to user that file download complete.
View Replies
View Related
Ok, I currently have an ASP application. In this application, an administrator will need the capacity to print reports of the data stored in a MySQL database.
Let me note now that this is a college project, and I can only basically do what I am allowed to, rather than having full control over the server and making any necessary changes.
The problem is, I don't have permission to write files from my application. How dumb is that? Anyway, I need an alternative way. Are there any ASP PDF converters or any similar that I can query the DB, get the necessary data then present it as a printable document?
A temporary .txt file would have been sufficient, but now that that is ruled out, I need to find another way of doing this.
View Replies
View Related
In a form that is supposed to work online, my user would enter values in say 15 fields. Now when I click "Submit" button, this should create a table at runtime.Next,whenever this button is clicked,this table should be re-generated.
View Replies
View Related
Is there any way to create automatic generation number like, INW001.......INW002.... ans so on without using any code in ms-access using "autonumber" type with default value.
or
Can you give me the code for creating automatic generation of numbers for a column IDNO , using alphanumeric.
Eg: INW001 , Next should be INW002 ,....... INW010 and so on
View Replies
View Related
Can anyone offer advice on how to make session ids not as predictable as usersession = session.sessionid?
View Replies
View Related
How do I generate an email through outlook? My program now needs to send out an email to an outlook distribution list. Unfortunately, I neither know how to send an email through ASP let alone sending it via Outlook.
View Replies
View Related
Can anyone here suggest me a solution to solve my follwoing problem?
1) I got a .aspx page and on that page i got a combo box and a command button.
Combo box displays records from the database.
I wanted to generate a report which is based on the record that user selects from the combo. The report is designed using crystal report correctly and saved in Inetpub
folder... Code:
View Replies
View Related
What's a way to do a: Page generated in X.XXXXXXXXX seconds.
View Replies
View Related
If I have 5 variables "SUB_1, SUB_2, SUB_3, SUB_4, SUB_5" and I assign them values from a SQL2005 database..
SUB_1 =(UPDATE.Fields.Item("SUB_1").Value)
SUB_2 =(UPDATE.Fields.Item("SUB_2").Value)
SUB_3 =(UPDATE.Fields.Item("SUB_3").Value)
SUB_4 =(UPDATE.Fields.Item("SUB_4").Value)
SUB_5 =(UPDATE.Fields.Item("SUB_5").Value)
I have a WHILE LOOP generating a dynamic table from a different database table
Code: ....
View Replies
View Related
Does anyone know a script out there or a component that will generate a PDF file dynamically? I want to make a report from a database available online in PDF....
View Replies
View Related
while i'm munching on my thai green chicken soup i wonder if anyone can suggest any good code generator out there for producing asp code from microsoft access tables?
View Replies
View Related
Is it possible to generate crystal reports using the "Push" method? Can I retrieve data records from a database and then push that information out to a crystal report through an ASP interface?
View Replies
View Related
I'm working with a client that runs an ASP based site, and we are running into some roadblocks.
First off, I don't know which ASP-friendly blogging platform to go with. I want something similar in functionality to Wordpress if possible. I've looked at Forest Blog, Presstopia, .Blog, and now Community Server. Which is best in terms of creating search friendly URL's and overall functionality?
Also, we are looking for a sitemap generation script that runs on the server. It seems as though all of the off-site generators are choking and only generating 260 URL's out of 15000. I'm not sure if it's a crawling problem, but if you know of any good sitemap generator for large ASP sites that would be helpful.
View Replies
View Related
I'm working on converting a php script I had written over to asp. It's purpose is to generate a registry file from information stored in an MSSQL database. It's not actually creating or changing the file I have specified, but it's not giving me errors either. It's almost as if it's stuck in an infinate loop and I cannot figure it out.
Here's the code I am using for creating/updateing the file:
View Replies
View Related
We developed a software for dynamic Flash movies generation from XML.
You prepare XML with movie content description and use ActiveSWF component to generate movie. Hope, this software will be very useful for creating rich media content at server-side using data from any sources(DB, Web services, RSS, etc...) Code:
View Replies
View Related
I have a SQL database. I want to make the report form using ASP script. In my script, if i click the report button, i want to see the data that print into word document file with 2 or 3 columns. For that case, i 'm trying to export the data from SQL to MS Access datdabase and from Access database, can i merge these data into word document?
View Replies
View Related
The code to show how long it took the page to generate in seconds ?!?, if you get onto the main page of this site, www.tgplus.net and loom at the left had side, it tells you how long it took the page 2 generate.
View Replies
View Related
I'm pretty sure this is possible in ASP, something about making CPU time markers and then taking the difference and switching it into seconds/minutes I just don't recall how to go about doing it.
View Replies
View Related
I am trying to generate a random number. I am using randomize and then rnd to return a decimal number between 100 and 120. This will give me a longitude. I am doing something similar to generate a latitude.
I created this on a page which refreshs every minute. I put these points into a map and they are showing up in groups of straight lines. Since rnd is time based will refreshing every 60 seconds return similar numbers?
View Replies
View Related
I want to display data of a Random Member on my page.. and I did a search in these forums and I tried to do this:
[CODE] SELECT tblMiembros.*, tblDatosPersonales.*
FROM tblMiembros, tblDatosPersonales
ORDER BY rnd(isnull(tblMiembros.ID_APLICANTE) * 0 + 1)"[/CODE]
This doesnt throw any errors. but it always displays the same row... (first in database)
am I doing something wrong? am I missing something?
View Replies
View Related
I have a client asking me about random images on his site, basically I am using the following code:-
<%
RANDOMIZE
Response.write("<IMG SRC='../gfx/bg-img0" & INT((3)*RND()) & ".jpg'>")
%>
Agreed its not the best code, but he is finding that the same image could be repeated like three times in a run.
I have an include file which displays the image, and the random script is placed inside that include. So when he is going from page to page this is where the issue lies.
Can anyone help me out here, is it even possible to have a different image load each time, and not have them repeating.
View Replies
View Related
I am using random number to be used as a unique identifir. Since random numbers are in decimals I am using going to convert it into an integer and since I need to append this Id into my URL, I am converting it into a string. SO my formula looks like this.
CStr(Int((Highest-Lowest+1)*Rnd+Lowest))
S0 now every time a new record is generated would this formula generate a unique number for unique identification in the table. I can't see how it can do it. Say A user is assigned a random number; then another user subscribes so how would the server determines that the random value assigned to next user is not already assigned to any other user.
In case if this can't work (a unique ID for every user) then I'll stick to this very same formula and after the random number is generated, I'll check this number with the table in the database and see whether it's been assigned already. If yes, I'll request another random value, if not then I'll go with it. Is this the right strategy?
View Replies
View Related
I have done random image display with the help suggestion from this discussion form. now I want to provide link on each image. i.e. all the images display randomly, should have different link. is it possible? if yes, how?
View Replies
View Related
is there sombody who can helpme witht he following, i am ''pretty new'' to
php and am looking for a script to show images randomly at a 10/ 15 seconds
interval. is there anybody who can help me with this or does know where to
find a good template script for this?
View Replies
View Related