Dear All, I have a very long list of values as follow (43, 560) (516, 1533) (1316, 3047) (520, 1528) (3563, 1316) (45, 557) (3562, 1312) (2686, 1964) (2424, 3340) (3559, 1317) (50, 561) (2427, 3336) (1313, 3046) (3562, 1313) (3559, 1318) (2689, 1962) (2429, 3339) (3721, 2585) (1317, 3048) I would like to group values within a certain tolerance. Say I set tolerance to 3, my 1st and 6th results ((43, 560) (45, 557)) should be grouped together in an average value: (44, 558.5). What approach would be the best? I really don't know where to start from. The …

Member Avatar
Member Avatar
+0 forum 7

This snippet defines a function returning new identifiers created from reading the computer's time.

Member Avatar
Member Avatar
+0 forum 5

Raffle function to generate unique numbers for each player, related to the same table with a recursive aproach. I had to do a simple raffle system for a contest that I was working on and tried many things and the most simple and the most effective one to generate unique numbers for each player was this, a simple recursive function.

Member Avatar
Member Avatar
+0 forum 3

I have a mysql database that includes the fields first_name, last_name, email. I have an input form to enter in the above information. If the e-mail address already exists, then I have a message page that lets the user know this and display the first and last name that already exists. Duplicate first and last names are OK. The code below is not catching the duplicate e-mail address that is entered in the input form. How do I get it to work? $result = mysql_query("SELECT * FROM mail_list_db where '$email_address' = email") or die(mysql_error()); $count = mysql_num_rows($result); echo "Count = …

Member Avatar
Member Avatar
+0 forum 5

hi all pls help me... how to create unique reference id for all users registering in my site...?? tnx in advnc...

Member Avatar
Member Avatar
+0 forum 3

I read several topics similar to what I'm asking, but none of them seemed to be very helpful to me. I have a form where users can generate codes that are stored in a column with a Unique constraint. The codes are strings with length of 7 characters. The users can enter a number and the program generates that many codes, and this can be repeated until the maximum number of codes is reached. My problem is with duplicate values. But not with values that are already present in the database in the moment of entering new entries(I check for …

Member Avatar
Member Avatar
+0 forum 1

I have a table with columns id,month,year,user_name,...etc in this table i want to make month,year and username unique.is it possible?IF it is ,please tell me, i required.

Member Avatar
Member Avatar
+0 forum 2

Hi, i have been trying to combine data from 2 different sources, to make unique rows: here it is my situation Data in DGV already in dgv, Unbound: column1 | Qty "Sugar", 100 "Salt", 100 "Color", 200 "Malto", 150 Data in datatable: column1 | Qty "Sugar", 80 "Salt", 60 "Apio", 25 "Lemon", 60 "Color", 60 So i want a control that matches the column1 in datatable against DGV.Column1, and if value matches only add second column value and if not, then make a new row in DGV. Final decided outcome: column1 | Qty|Qty2 "Sugar"| 100 | 80 "Salt" | 100 …

Member Avatar
+0 forum 0

I'm trying to get random images to display onto four different cells with their corresponding links in place. All that's happenning is one random image is chosen and displayed throughout. Is there a way to pull 4 images from the given list and display them randomly instead? **Thanks a bunch for any help provided.** <script language="JavaScript"> <!-- /* Random Image Link Script- By JavaScript Kit(http://www.javascriptkit.com) Over 200+ free JavaScripts here! Updated: 00/04/25 */ function random_imglink(){ var myimages=new Array() //specify random images below. You can have as many as you wish myimages[1]="http://dl.dropbox.com/u/5739741/jam%20mascot/Main%20Page%20Buttons/allstar%20classic.png" myimages[2]="http://dl.dropbox.com/u/5739741/jam%20mascot/Main%20Page%20Buttons/allstar%20clinic.png" myimages[3]="http://dl.dropbox.com/u/5739741/jam%20mascot/Main%20Page%20Buttons/hopla.png" myimages[4]="http://dl.dropbox.com/u/5739741/jam%20mascot/Main%20Page%20Buttons/jam%20night.png" myimages[5]="http://dl.dropbox.com/u/5739741/jam%20mascot/Main%20Page%20Buttons/jamcamp.png" myimages[6]="http://dl.dropbox.com/u/5739741/jam%20mascot/Main%20Page%20Buttons/mailing%20list.png" //specify corresponding links below …

Member Avatar
Member Avatar
+0 forum 18

Hi guys, im trying to find out the best way to set a unique session variable. Normally I would use a "username", but this project does not need a login script or users table. Whats the best way to create a unique session so that I can echo out the details in a "review order" page, from a database? Any help with this would be great. Thanks!!

Member Avatar
Member Avatar
+0 forum 1

Hello, I am trying to fill an array with 20 unique random values between 1 and 60. I know what I need to do to get this to work, but I'm not sure how to do it. Here's what I've got: void fillArray( int arr[], int size) { int arr2[20]; bool found[20] = {false}; for (int i = 0; i < size; i++) { arr[i] = rand() % 60 + 1; arr2[i] = arr[i]; for (int j = 0; j < size; j++) // check for duplicates in array { if (arr[i] == arr[j]) { found[i] = true; arr[i] = …

Member Avatar
Member Avatar
+0 forum 4

Given a 7x4 array generate four random numbers from the array with no repetition. I can already generate four random numbers the problem is the repetition part. Here's my code so far int f[4]; int s[4]; for( i = 0; i < 4; i++) { // use as index for array a f[i] = rand() % 7; s[i] = rand() % 4; cout << a[f[i]][s[i]] << "\n"; } Any suggestions?

Member Avatar
Member Avatar
+0 forum 15

Hi, I want to generate a unique id but stuck at one point where I need a max 10char long output like A2987F2EWS, 234EGT56GT..... unlike SHA1 or MD5 so human can read it. Code is below but the better way is accaptable by me though. Thanks $mysql_id = 1; $mysql_id_padded = str_pad($mysql_id, 19, '0', STR_PAD_LEFT); $mysql_id_modified = substr($mysql_id, -1, 1) . $mysql_id_padded; echo $mysql_id_modified; //Now I need to generate an id which should be user-friendly

Member Avatar
Member Avatar
+0 forum 5

Hey everyone, I'm a graphic designer about to undertake a project and need some good answers and advice. I'm currently building an online store that will have approximately 200+ products. As this is a wholesale company, only those who are members will be able to buy. So a customer login is needed. Prices will not be seen until client logs in. Now heres the tricky part. The prices on products vary depending on the client. So I need the online store to tie in with our accounting system. How would you approach this? What progamming would you do and why? …

Member Avatar
Member Avatar
+0 forum 1

Hey everyone, I think this is the appropriate place for this posting. I'm a graphic designer about to undertake a project and need some good answers and advice. I'm currently building an online store that will have approximately 200+ products. As this is a wholesale company, only those who are members will be able to buy. So a customer login is needed. Prices will not be seen until client logs in. Now heres the tricky part. The prices on products vary depending on the client. So I need the online store to tie in with our accounting system. How would …

Member Avatar
Member Avatar
+0 forum 2

I have the following input and my program is not running: 1 3 2 1 3 7 8 [CODE] #include<iostream> #include <cstdlib> using namespace std; int main() { int arr[7], min, i=0, j=0; for(int i=0; i<7; i++) { cout<<"Enter value at arr["<<i<<"]: "; cin>>arr[i]; } min = arr[j]; for(; i<7; i++) { if(arr[i] < min) { min = arr[i]; } if(arr[i] == min) { min = arr[j+1]; //set min to next value in the array i=j+1; //set i to value in the min + 1... program hangs here... } } cout<<endl<<min; cout<<endl<<endl; system("pause"); return 0; } [/CODE] I think my …

Member Avatar
Member Avatar
+0 forum 7

my table has 2 fields, both are Keys. I save similar items in that table , like if 2 items are similar but have different Ids (in another table) I use this table to know that they are similar. so if items 1111, 1112 are the same and 1000,1002,1004 are the same, it'll looks like this- field1, field2 1111, 1112 1112, 1111 1000, 1002 1000, 1004 1002, 1000 1002, 1004 1004, 1002 1004, 1000 now I want to display the option to delete the connection between 2 items using a form, but I don't want the user to pick 1111,1112 …

Member Avatar
Member Avatar
+0 forum 3

1. I want to take unique district values from the below xml. How to do it in XPATH? 2. I want to take unique taluk values and district name="xyz". what is the xpath expression? XML structure: <?xml version="1.0" encoding="utf-8"?> <imageData> <row> <slno>1</slno> <sitecode>001</sitecode> <sitename>Mel Sittamur</sitename> <photono>001_001_001.jpg</photono> <photodate>07-09-2008</photodate> <district>Villupuram</district> <taluk>Senji</taluk> <monument><![CDATA[Jain Temple, Sri Parsvanadha]]></monument> <subject><![CDATA[Tower]]></subject> <description><![CDATA[Yet to Provide the data ]]></description> </row> <row> <slno>2</slno> <sitecode>001</sitecode> <sitename>Mel Sittamur</sitename> <photono>001_001_002.jpg</photono> <photodate>07-09-2008</photodate> <district>Villupuram</district> <taluk>Senji</taluk> <monument><![CDATA[Jain Temple, Sri Parsvanadha]]></monument> <subject><![CDATA[Tower detail]]></subject> <description><![CDATA[Yet to Provide the data ]]></description> </row> <row> <slno>3</slno> <sitecode>001</sitecode> <sitename>Mel Sittamur</sitename> <photono>001_001_003.jpg</photono> <photodate>07-09-2008</photodate> <district>xyz</district> <taluk>Senji</taluk> <monument><![CDATA[Jain Temple, Sri Parsvanadha]]></monument> <subject><![CDATA[Saraswati]]></subject> <description><![CDATA[Yet to Provide …

Member Avatar
Member Avatar
+0 forum 8

I have an abstract class and two sub classes. Can asp.net ensure that each subclass has a unique ID when a record is created. For example: [CODE] Sub Class #1 1 3 Sub Class #2 2 4 [/CODE] Your help is kindly appreciated. Thank You.

Member Avatar
Member Avatar
+0 forum 1

For my user system, I require each user to have a unique id. The reading in and saving of the user data is all done, but now I'm focusing on adding new users. In my add user dialog, I have the information fields required to create a new user, one of which is the ID (which must be unique). For this I have created a function that I thought would always give a unique id but it does not. I'll paste the code below and hopefully you can tell me what I've done wrong!! [CODE] Function getnextuserid() Dim id As …

Member Avatar
Member Avatar
+0 forum 2

friends i want to create a array which contain no of unique key , it also need store in mysql database , which i have done on my wamp server but when i m running this code on web server online i getting that my page will hangup .......so please help me.... code [CODE]$no_of_pin=$_POST['no_pin']; $pin_cost=$_POST['pin_cost']; if(($no_of_pin!=null) && ($pin_cost!=null)) { for($a=0;$a<$no_of_pin;) { $pin=mt_rand(1000000,9999999999); $qry=$obj->ex_query("select pin_id from uapl_pin where pin_id=$pin")or die(); if($qry==1) { $a--; } else { $qry=$obj->ex_query("insert into uapl_pin values($pin,$pin_cost,'unused','$date','')")or die(); if($qry>0) { $prt_pin[$a]=$pin; $a++; } } } } else { $mgs="Please Enter The value First."; }[/CODE] plase help its urgent …

Member Avatar
Member Avatar
+0 forum 5

Hey guys, Here's the problem I have: I am writing a server application in Java using the ServerSocket and Socket classes. I have an instance of ServerSocket which listens for connection and accepts them. The server runs a website that requires users to log in using an e-mail and a password. Everything works fine until I tried it on my local network at home - I am using a wireless router for 3 computers and they all share the same IP address and differ by their local address, e.g. one is 192.168.1.1 and another is 192.168.1.2, etc. The problem is …

Member Avatar
Member Avatar
+0 forum 7

I have achieved so many keyword for my website but there is no more unique visitors so anybody please suggest me that how to get more and more unique visitors on my website.

Member Avatar
Member Avatar
+0 forum 14

I am creating a login script and I need to check that the username and e-mail don't current exist in the database otherwise it will print an error. I've tried the following but it's not working: [CODE=php]//Create Username Array $SQL = "SELECT Username from user" $Result = mysql_query($SQL); $Array = mysql_fetch_array($Result); //Check Username if ($Username = $Array) {$errormessage = "Sorry, the username $Username is already in use.";} else { //Check Password if ($Password != $RePassword) {$errormessage = "$FName likes it in the butthole, hence why their password doesn't match. Don't worry; however, we've disptached our butt elves to $Addr_Street $Addr_City, …

Member Avatar
Member Avatar
+0 forum 8

Hi All , I am Building a Ad System for my website based on PPC. So My Question is PPC Means [B]Pay Per Unique Click[/B] or [B]Pay Per Click[/B]. How should i calculate the PPC for the following ? Say No of Clicks is 50 No of Unique Click is 25 Cost Per Click is X Then Total Amount to be paid by advertiser is 1) 50X or 2) 25X [B]Which one is right ? [/B] Please Help me out... Thank you.

Member Avatar
+0 forum 0

Hi all, I've been learning PHP and SQL slowly over the past couple of weeks for a project (so please be gentle!). I have a database, MEMBERS, as follows: [CODE] ID | Name | Job Title | Current Employer | State | Manager 1 | Joe Smith | Sample Title | Big Company | CA | No [/CODE] There are several thousand entries and I wish to count them. I have a GET search page where a person can search for any of the fields, eg. ID, Name, Title, etc. It works as intended. So if I search for a …

Member Avatar
Member Avatar
+0 forum 1

Hi, I would need to create unique filenames appended by the iteration number. For eg. [CODE]for( i=0;i<iterations;i++){ ofstream outfile("iterfile"+"i"); // i.e filename should be iterfile0 for 1st iteration. } [/CODE] I need to cast "i" from int to char so I tried [CODE]ofstream outfile("iterfile"+(char)i)[/CODE] but it did not work. How do I do this correctly?

Member Avatar
Member Avatar
+0 forum 6

Hello. I am using Delphi 2010 to build a small application that builds a very very simple database in CSV file format. I am using the Jcl and JVCL libraries (TJvCSVDataset, TJvDataSource and TJvDBGrid). I set up the fields ("Last Name", "First Name" and "Email"), where "Email" is the only with the UniqueKey property. I added a record then I added a second one, putting the same value under "Email". When I post changes to the DB I obviously get a "Key is not unique" error. I would like to avoid to the user to enter a duplicate e-mail address …

Member Avatar
Member Avatar
+0 forum 1

Hi, I have pasted my code below, please paste it into a JSP and tell me why it gives the error "Unterminated String Constant" [CODE] <html> <head> <title>Debugging</title> <script language="javascript"> function changeOn(object, objectId) { alert('in function'); if (object == 'bookingsButton') { alert('first if'); document.getElementById(objectId).src = 'Images/BookingsOn.png'; } else if (object == 'detailsButton') { alert('2nd if'); document.getElementById(objectId).src = 'Images/DetailsOn.png'; } } function changeOff(object, objectId) { if (object == 'bookingsButton') { document.getElementById(objectId).src = 'Images/Bookings.png'; } else if (object == 'detailsButton'){ document.getElementById(objectId).src = 'Images/Details.png'; } } </script> </head> <body> <% for (int i = 0; i < 2; i++) { %> <table> <tr> …

Member Avatar
Member Avatar
+0 forum 2

The End.