Questions tagged [unique]

Refers to an element that is distinctly different from any other element in a collection.

Filter by
Sorted by
Tagged with
0 votes
0 answers
8 views

Finding unique character in a string using xor #xor #string #java #uniquelement #DSA

import java.util.*; public class stringuni{ public static void main(String args[]){ String arr="suman"; String a=uniques(arr); System.out.println(a); } static String ...
Suman 's user avatar
-1 votes
1 answer
41 views

Amount of unique values in a column [closed]

Let's say there are a lot of lines in a column which is like: /aba72?mprag=ABCDD&radgroup=$%VDFVFid%7D&bobuecontext=$%7678XEL_CONTEXT%7D&do_id=$%7BMI%7D I want to find out how many of ...
roto's user avatar
  • 1
0 votes
0 answers
13 views

Generating unique vectors using randi

I want to randomly generate 6 vectors using randi, but I want to add specific parameters for what can be generated. First, I don't want any vectors to be duplicates. What can I add to make them unique?...
Michaela Schnell's user avatar
0 votes
2 answers
61 views

Find unique elements in an array question in C

I need to print all the unique elements in an array of ints but when I compile my program I get below error. muratakar$ gcc Code.c Code.c:20:39: error: expected expression int isUnique = ...
MEDOMAI's user avatar
1 vote
1 answer
90 views

Error "no unique or exclusion constraint matching ON CONFLICT" for composite keys with overlapping columns [duplicate]

I have a table that looks like this: CREATE TABLE IF NOT EXISTS list ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), tok TEXT, sid TEXT NOT NULL, aid TEXT, hash TEXT, qtt SMALLINT, p ...
bouncytorch's user avatar
2 votes
1 answer
51 views

Is ROWID unique across all Progress database tables?

Is Progress ROWID unique across the whole Progress database? Meaning the same ROWID cannot exist in other tables - it's always unique? So you could fetch a single record from a big database by only ...
W0lfw00ds's user avatar
  • 2,052
1 vote
1 answer
31 views

Validate uniqueness between 2 columns from different tables through an association

I have a design issue to handle a uniqueness constraint on a postgres db in a rails app. I have: a companies table, which has firm_id and name column a firms table with a group_id column (id linked ...
Ouhbelle's user avatar
1 vote
3 answers
109 views

Append dot and counter as suffix for values encountered more than once like R's make.unique function

I need the same functionality of R function make.unique in PHP. In R: > dup_array = c("a", "b", "a", "c") > make.unique(dup_array) [1] "a" &...
Ömer An's user avatar
  • 624
-1 votes
0 answers
34 views

Many to Many on duplicate

let's say I have item table that have {id,name,price}, user{id, name}. I made a basket table for them {id, userID, itemID, quantity}. The problem is when I add itmeA to userA. userB can not have itemA....
Ahmed Khaldoon's user avatar
0 votes
2 answers
49 views

Why finding unique number among xn + 1 numbers by counting bits and then modulo by x works

I know that if we have given array that looks e.g. like this: [7,6,7,6,5,7,6], where every number is repeated x times except the one number that is unique in array, then we can: Write numbers (it's ...
Szyszka947's user avatar
-1 votes
0 answers
13 views

Googlesheets Unique Array Malfunction

So I'm working in Googlesheets, constructing a spreadsheet for breaking down and reporting company credit card use. I've got a raw dump from the CC, picked apart and examined on tab 2. Step One and ...
Jon's user avatar
  • 1
0 votes
0 answers
31 views

TYPO3 Form Framework Unique Selectable Identifier

I have a question to form framework. For some reasons it would be great to let editors add forms to a website. My problem now is that I want to standardise for example mails. So my idea was/is to add ...
Benjamin's user avatar
0 votes
1 answer
33 views

Google Sheets, make list of unique values from two columns

Google Sheets: Col B:B has a ton of duplicate values and in col A10 I need to get a list of unique values from B:B. formula =unique(filter(FLATTEN(B:B,A$9:A9),FLATTEN(B:B,A$9:A9)<>"",...
LAmaral's user avatar
  • 11
1 vote
1 answer
56 views

Remove duplicates of a Data.Sequence

I have a sequence Seq a with Eq a and I want to remove the duplicates inside this sequence. I do fromList $ nub $ toList mysequence Is there a more efficient way? This is a sequence of Edge where ...
Stéphane Laurent's user avatar
0 votes
0 answers
50 views

duplicate user even though i made a unique key

When I go to a profile page the info component is been duplicated and the console show me this error: Warning: Encountered two children with the same key, '6533b2da05b6c61616e9b2ed'. Keys should be ...
Phoenix Phoenix's user avatar
0 votes
1 answer
52 views

Number of common values between two ranges counted only once each

I have two numerical value ranges, say A1:G2: COLUMN A COLUMN B COLUMN C COLUMN D COLUMN E COLUMN F COLUMN G 15 114 101 32 87 61 138 3 45 12 101 80 29 61 and A5:G6: COLUMN A COLUMN B COLUMN C ...
bluetick's user avatar
-1 votes
1 answer
35 views

Group data in an associative multidimensional array and remove duplicates in subarrays

I have an array like this: $array = [ [ 2 => 'kategorie_01', 'tags' => [ 1 => 'tag_01', 2 => 'tag_02', ], ], [ 3 => '...
skow's user avatar
  • 9
1 vote
2 answers
127 views

How to find and remove all duplicates objects from an array of objects [duplicate]

I am getting below response, i wanted to remove all the duplicates object based on lineId and status. I am trying to find all the duplicates with new status in below response. In the below example, i ...
Shilpa's user avatar
  • 29
0 votes
3 answers
148 views

Count unique IDs with other criteria

Each assigned label should get the number of Colored Books using its unique BookID with same Name, Month and Color in initialize. Image of Raw Data: Raw Data Text: BookID Name Month Color ...
Shiela's user avatar
  • 614
0 votes
0 answers
29 views

Using Filter() and index match to pull values from one sheet to another?

Link to problem spreadsheet enter link description here I have a spreadsheet where I'm trying to build an overview tab that only shows the dates and values if there is data present for that date. On ...
Brendan Kelley's user avatar
0 votes
0 answers
31 views

How do I use Index and Small in excel sheet

I have three sheets in excel one is supplier sheet and other two sheets are customer sheet. I want that when I update the supplier sheet so the data automatically copy to customer sheet as well. For ...
Abdul Wahab's user avatar
0 votes
2 answers
36 views

Google Apps Script - Unique values results are not Unique

I am fairly new to Google Apps Script, but I am working on using some scripting to summarise the data in some Google Sheets databases I am developing. It will also help with populating a dashboard ...
John's user avatar
  • 1
0 votes
0 answers
42 views

Given an array of size n, find a way to arrange it such that no two side-by-side index pairs match for n-1 different arrays (team scheduling)

I have a simulator in Java in which I am trying to create a schedule of unique team matchups for a given sports league. In soccer, each team will play each other exactly ONCE with the first numTeams-1 ...
ap1kay's user avatar
  • 1
0 votes
0 answers
14 views

Duplicates in one column with ONLY 2 values(/A & B) in another column

enter image description here The last column F in the image is what is expected. Please how do I go about it? Columns A, B, C D, and E would have to be considered to get F. I am using Excel. Thanks I ...
Phil's user avatar
  • 1
0 votes
0 answers
34 views

Unique() doesn't remove duplicates in two instances of seq() [duplicate]

In the R I have two vectors created by seq(). One vector is a subset of the other. After concatenation, unique() returns what look like duplicate values: 0.6, 0.7, 0.9 set.seed(27) x <- seq(from =...
Scarper's user avatar
0 votes
2 answers
60 views

How to get count of a name next to the column?

Name Count Mike 2 Andrew 1 Mike 2 How can I get a count column like this in Excel? Note: I don't want something like this: Name Count Mike 2 Andrew 1
Antonio's user avatar
  • 47
-3 votes
1 answer
93 views

Unique lines of very huge text file in python [closed]

Suppose I have very huge text file, with lines of different arbitrary lengths. I want to remove duplicate lines, how do I do this in python? How to write disk-based code, I don't understand. Can not ...
Lexoner's user avatar
0 votes
1 answer
33 views

How to keep two Lots when matching on unique combinations across multiple R dataframe columns

I am trying to return two sets of unique combinations when matched on unique combinations of multiple variables. Specifically, I want to return two "Lot" numbers for each unique combination ...
DP1113111's user avatar
-2 votes
3 answers
84 views

Remove immediate duplicate items

I need to remove immediately-subsequent duplicate items from a given array items. For example, if I have this array: [1, 2, 2, 3, 3, 1, 1, 4, 5, 5, 4, 4, 4, 6, 2] … this is what the result should be: ...
Parzh from Ukraine's user avatar
2 votes
1 answer
26 views

ID pairing and unique pair count

I am writing a code in R which should analzye two columns P1 and P2 which both contain ID-code and the respective PAIR column. I want each individual ID-code to be only used once for a pair, but the ...
Shankz's user avatar
  • 21
0 votes
1 answer
31 views

date type: cannot convert unique date(object) to date type

date type of original Dataflame is object type. "23/07/01" means Year 2023, month 7, date 1 "23/07/01" is on 'data' column so I write code as below. df['date'] = pd.to_datetime(...
Sattai's user avatar
  • 1
-2 votes
2 answers
46 views

SQL query to consolidate names

Table data has a field 'Name' with data like this Names State Sometimes WA Some times KS Som etimes NY ABCDE Corp CA SSS Corp WA SSS Corporation VI ABCDE CA ABCDE Corporation NJ Need to ...
SAK's user avatar
  • 21
0 votes
0 answers
43 views

Error in unique.default but I am not using unique!! R Shiny app build

Hey Stacked overflow community, Only built one Shiny app before but running into problems with this one! I keep getting this error which is preventing me from showing my treemap. Very confused because ...
Russ's user avatar
  • 1
0 votes
2 answers
32 views

Creating a dataframe with the counts of unique values from a different dataframe

I have a dataframe that contains multiple columns with different values between 0 and 1. e.g. > DF column1 column2 column3 column4 1 0 0 0.5 1 2 0.5 0.5 0.5 ...
Anders Jørgensen's user avatar
2 votes
6 answers
112 views

In linux I want to compare yesterday's file to today's file getting only changes from today as the output, ignoring some fields

I have 2 pipe delimited files. yesterday.txt and today.txt yesterday.txt: 1234|12|Bill|Blatt|programmer 3243|34|Bill|Blatt|dentist 98734|25|Jack|Blatt|programmer 748567|31|Mark|Spark|magician today....
bbaldwin81's user avatar
0 votes
2 answers
41 views

How to add an element into inner xml attributes array and make sure it's sorted and unique

I'm working with firewalld XML file that looking like: <?xml version="1.0" encoding="utf-8"?> <zone> <short>Public</short> <description>For use in ...
lyres's user avatar
  • 117
0 votes
2 answers
54 views

PHP - Count Unique Word and Add Counted Prefix

I tried this $data = "air;air;air;bus;air;air;bus;air;air"; $a = substr_count($data,"air"); $b = substr_count($data,"bus"); $data = implode($a . ' x ', array_unique(...
Pekzz's user avatar
  • 67
0 votes
1 answer
63 views

Excel: Replace 0 which is returned by UNIQUE() by another value

In Excel I use the unique() function to get unique values of a column. As soon as I have empty rows in my column, they appear as "0". Formula for D2: =UNIQUE(C2:C8) My question: How can I ...
vigri's user avatar
  • 477
0 votes
0 answers
120 views

Solved - How to validate multiple :unique email fields in Laravel 10 Livewire v3?

Edit: I just found the answer, i need it to specify the real table column and ignore the given id unique:company_emails,email im trying to get this working. First thing, i don't know why but livewire ...
cristobal's user avatar
-1 votes
1 answer
72 views

Show Unique Values with other columns from excel sheet to Listbox

I have data here that I want to get the unique values for Column C = Project ID. Date || Project ID || Implementation Area || Start Time || End Time || Status 8/28/2023 || 1145544 || ...
Shiela's user avatar
  • 614
0 votes
0 answers
60 views

Postgresql primary key violation duplicate key value

Can some body tell me please why I am getting Unique violation: 7 ERROR: duplicate key value violates unique constraint if I try to make simple insert to the Postgresql table? I made some insert ...
Čamo's user avatar
  • 3,863
0 votes
3 answers
48 views

Pair each combination of two columns and calculate sum for a third column in data.table

I have two very large df: df 1 and df2. Df 1 contains the columns "from", "to" and "count". The values in "from" and "to" represent commuting points ...
Ann's user avatar
  • 31
0 votes
1 answer
69 views

How to store and sort numbers ever appeared without large memory?

The program give me lots of integers range from 0 to about 2^n_qubits, and have the same hamming weight. The code below just give a simple example, I can't control the random number generator, and it'...
zjsun's user avatar
  • 31
0 votes
1 answer
50 views

Unique constraint on multiple columns with JPA annotation

I have a problem when i add a unique constraint on multiple columns with JPA annotation. I use PostgresSQL I'd like to add unique constraint on 3 columns : "user_id", "science_id" ...
dusk's user avatar
  • 13
1 vote
1 answer
87 views

Randomised 3-day golf groups for 12 players

I started working on a CTE-based MySQL script for a small side project I have... and that is to determine, out of a group of 12 players, over 3 days, each group of 4 so that no plyer plays with the ...
SMacK's user avatar
  • 13
0 votes
1 answer
139 views

Excel VBA Form Show Unique Entries with Time Calculation in Listbox

I would like to ask your help about my query below. I have here 2 different forms. Form 1 for saving entries. For saving entries, I already have code. It's already working. Form 2 is a form to display ...
Shiela's user avatar
  • 614
1 vote
1 answer
81 views

How to partition mysql table without adding partition column to Ptimary Key?

I want to partition a very large table by a column that is neither part of the primary key nor part of the unique keys. Thus, I cannot create a partition as follows: CREATE TABLE persons ( id bigint ...
membersound's user avatar
  • 82.6k
1 vote
0 answers
19 views

What is the best way to process a vast number of strings keeping unique ones only?

My program produces a very large number (billions) of fixed-size strings (about 110 characters long) from which I want to extract the unique ones, expecting there to be about 100-200 million. I cannot ...
Gordon Royle's user avatar
0 votes
1 answer
38 views

Find the sub-set of unique objects in a list which contains duplicate references to the objects

I have an algorithm that creates a set of lists in the values of a dictionary. However, the number of lists is less than the number of dictionary keys because some of the values are references to the ...
Bill's user avatar
  • 10.6k
0 votes
1 answer
54 views

PHP can I merge a single array by combining duplicates based on the value of a key? [closed]

I have a single, multidimensional array that has multiple parts. Some of them are duplicates such that there are 2 (or more) different entries for the same part, most of the data is the same, but ...
C. Hill's user avatar
  • 11

1
2 3 4 5
123