Good day I have a table which I have already uploaded a list on however I want to return all the records which are duplicated and have a year between 2014 and 2015, i.e if I have a table like this Year IDNumber FirstName Surname Email 2014 8809254 Tom Jackson jtr@gmail.com 2014 8809254 Tom Jackson ytr@gmail.com 2015 8809254 Tom Jackson fyj@gmail.com I only want to return duplicated records that have a entry in 2014 and 2015, so if this person had entries in 2014 only, then the query will discard this person. What I want to achieve with this is …

Member Avatar
Member Avatar
+0 forum 6

Hello, I am stuck with this problem.... I have few folders that contains a filename as **registration.txt** --- note the folder names are different since as and when a new user will register a folder gets created with its name and then the text file with the details of the user.... I have to read the user id from the text files to the Listbox and then check if any user id has been repeated in the list box....(stuck here) I have able to read the data but just not able to perform the check on the id... Please someone …

Member Avatar
Member Avatar
+0 forum 1

I want to check for duplicates when inserting a new contact in my database, then showing a msg that the contact is already in the db. this is what i've done: function isDuplicate(names,phone,email,adresa){ var isduplicate=false; for(var i=0;i<addresslist.length; i++){ if(addresslist[i].names.toLowerCase()==names.toLowerCase() && addresslist[i].phone.toLowerCase()==phone.toLowerCase()&& addresslist[i].email.toLowerCase()==email.toLowerCase()&& addresslist[i].adresa.toLowerCase()==adresa.toLowerCase() ){ isduplicate=true; } } return isduplicate; } later if(isDuplicate(name,phone,email,adresa)){ $('#notice').empty().html('Kontakti ndodhet tashme ne databaze').show('slow'); } and also i want to check that the phone form has only numbers. if(isNaN(new Number(phone))){ $('#notice').empty().html('Telefoni duhet te kete vetem vlera te vlefshme numerike').show('slow'); } is thi code ok?

Member Avatar
Member Avatar
+0 forum 2

Although there are many similar questions and answers here and i've tried my best to make it work but no luck. This is my code: $content = "Blah...blah...[image=1], blah...blah...blah...[image=2], blah...blah...blah...[image=1], no more..."; function get_image($content) { $stripper = $content; preg_match_all("/\[image=(.+?)\]/smi",$stripper, $search); $total = count($search[0]); for($i=0; $i < $total; $i++) { $image_id = $search[1][$i]; if($image_id > 0) { $image = 'This is an image: <img src="images/'.$image_id.'.jpg" />'; } $stripper = str_replace($search[0][$i], $image, $stripper); } return $stripper; } I want to remove the duplicate "[image=1]" and return: Blah...blah...This is an image: <image>, blah...blah...blah...This is an image: <image>, blah...blah...blah..., no more... or Blah...blah..., blah...blah...blah...This …

Member Avatar
Member Avatar
+0 forum 2

Hello Everyone! I am a beginner user of Python without IT background (I am interested in IT developing my knowledge step by step). So far I did simple scripts in Python and I encountered a problem. I was looking on Google, however I didn't find the satisfactory answers which would help me - Therfore, I decided to write here. I'm struggling to identify duplicates in CSV file. My CSV file contains contacts from the database. Every column corresponds to particular data (name, surname, job title, company, email, contact ID etc.). In this database there are duplicates and I want to …

Member Avatar
Member Avatar
+0 forum 8

> Write an EFFICIENT program that reads in the name of a file containing positive integers that are less than 1,000,000. The program prints out the integers in the file, in the order that they appear, eliminating duplicates. So if the file contained 8 3 1 9 2 8 15 9 8 4, the program would print 8 3 1 9 22 15 4. Here I am not even sure how to approach. Do we read in the file name as an int array, and then eliminate duplicates and save the result in that same file? Any suggestions would be …

Member Avatar
Member Avatar
+0 forum 14

Hi guys! I'm currently making an integration of 2 different web apps. I would to ask if is it possible to restrict adding duplicate data in your table. for Example i have two different tables from two different databases. App1_Invoice (from Web App 1 database) e.g. transno name amount App2_Invoice (from Web App 2 database) e.g. id, <- AUTO_INCREMENT PRIMARY KEY transno amount subject I will Insert App1_Invoice.transno to App2_Invoice.transno and so on so forth. (I can't alter the App2_Invoice Table. it might ruin the whole Web App2) but anyway, Is there any way in SQL to restrict that?! since …

Member Avatar
Member Avatar
+0 forum 4

I'm trying to have my program find duplicates in an array of strings, and if it finds one, it swaps the duplicate to itemamount - 1, adds +1 to the WordAmt for that word, and moves the loop one spot down. I just am not sure how to properly do this. Everything works up to the swap function, which swaps as intended and lists all the words in alphabetical order. I just need all duplicate words to properly be swapped away and the WordAmt for that word to be added. void sortArray(WordStruct Words[1000], int itemamount) { int indexMax, j, first; …

Member Avatar
Member Avatar
+0 forum 1

hi need to show the duplicates on a column table when they have two other values in common on other column. form_name + field_value name1 | value_x name2 | value_y how can i create the query to search when values x, y, etc have form_name name1 and name2 ? thanks

Member Avatar
Member Avatar
+0 forum 3

Simple code to see if array of primitives has duplicates. The aim is to only check if there are any duplicates, but not to check what element is repeated, or its position etc. PS: Do you know some handy snippet? Don't way, post it!

Member Avatar
Member Avatar
+4 forum 5

Hi I am running the following SQL (extract shown below) INSERT INTO users (user_id, username, username_clean) SELECT member_id, username, lower(REPLACE(username, '.', '_')) FROM members The problem arises when lower(REPLACE(username, '.', '_')) produces a duplicate that already exists in username_clean as the users table does not permit duplicates. Is there a SQL or PHP solution to append a suffix such as 1,2,3 etc after such a duplicate so that they do not exist in the users table? I could do this manually but as I want to run this routine many times this is not a solution. Many thanks in advance …

Member Avatar
Member Avatar
+0 forum 1

Say I have a basic list. [CODE]x = [2,3,1,3,5,4,5] [/CODE] And I want to find the sum result applied against the list without duplicates. So with duplicates the code could be. [CODE][elem * 2 for elem in x if elem >= 1 ] > [2, 4, 6, 6, 8, 10] [/CODE] But I don't want duplicates. So my thought was I should make a copy of the list filtered. # so for elements in x not equal to any other elements in the list * 2. #So first sort the list #Then remove any items that are equal to the …

Member Avatar
Member Avatar
+0 forum 3

Hi all, I'm writing a webcrawler as part of a search engine project at university, and have been using jsoup to my advantage. This connects to a page and neatly takes all the href's from anchor tags for me. However, when I add these to the arraylist of URLs waited to be connected to and crawled, I can end up with literally hundreds of duplicates. I'm now a bit lost in the bottomless pit of hashset copy/remove functions people have written for this problem, and am not convinced this is the best solution. I would prefer to be able to …

Member Avatar
Member Avatar
+0 forum 4

Hello! I am having some trouble with reading data for a list. If at the end of the file there is a new line character, this function reads the last set of data again, and then exits the loop. The addElem function works fine, I tested it separately. As there is almost impossible for me to generate a such text file without putting a new line character at the end of the file, i would like to know if there is a method to skip the new line character. [CODE]void aClass::readData(string filename) { string name; string surname; string address; int …

Member Avatar
Member Avatar
+0 forum 6

hi to everyone, im having trouble with python programming... i have these 3 problems.... 1. remove a duplicates in a sorted integer 2. a python program that will detect if a number is divisible by 3 if you have solutions for my problems, can you help me pls...

Member Avatar
Member Avatar
-2 forum 6

I am having a problem with the SQL INSERT command in VB. I am trying in move data from one table to another. The problem is I am going from a table with duplicates to one with no duplicates. Since there are duplicates the SQL statement bombs. Here is the SQL code: INSERT INTO tblAssignmentAttendWard ( fldAssignAttendingWard ) SELECT tblPatients.fldAttending FROM tblPatients) The: tblPatients.fldAttending contains duplicate entries The: tblAssignmentAttendWard.fldAssingAttendingWard (is a Key with NO DUPLICATES) Here is the error: Error Number: -2147217900 [Microsoft][ODBC Microsoft Access Driver] The changes you requested to the table were not successful because they would create …

Member Avatar
Member Avatar
+0 forum 3

Hey all! I'm trying to figure out how to check if an element already exists in a vector. EXAMPLE: Elements in the vector are: "Dog", "Cat", "Fish", "Bird" If a user tries to add (case ignored) "Dog", "dog" or any other variation, I want it to spit out and error stating it already exists. If a user tries to add (case ignored)"Elephant", I want it to properly add it to the vector in all lowercase letters. The vector will be sorted alphabetically after all additions have been made. Essentially, this is what I have but as you can see is …

Member Avatar
Member Avatar
+0 forum 16

My code is a php search function which is supposed to search from two tables in my database and displays matching results from the two tables in a line after line format. It is supposed to match the two tables with a common key field. However, the primary table has some rows that does not have any matches with the secondary table. (i.e. the secondary table has no matching key in any of the rows within it) A basic search should show the results from the two tables, but if a searched term in the primary table does not have …

Member Avatar
+0 forum 0

Hi, I need to create a stack with a key and for each key one or more instances of a data structure associated. A multi map seems to be best suited for this. However, I don't know how I could extract an element with the maximum key value whithout knowing that max value. Is that possible with a multi-map ? Is there a special iterator for this ? thanks for your help !! matt-

Member Avatar
Member Avatar
+0 forum 6

The End.