Object id unique.
This function will corrupt the original array.
Correct usage: a=idUnique(a);
@param {[Object]} NonPrimitive Array
6675
function idUnique(a) {
  var i,j,l=a.length,p,
      guid=(Math.random()*1E10).toString(32)+(+new Date).toString(32);
  for (i=j=0;i<l;i++) {
    p = a[i];
    if (p==null) continue;
    if (p.hasOwnProperty(guid)) continue;
    Object.defineProperty(p,guid,{
      value:1,enumerable:false
    });
    a[j++]=p;
  }
  i=j;
  while (i--) {//clean guid
    a[i][guid]=undefined;
  }
  a.length=j;
  return a;
}
1334274
function array_unique(l){
			var i=0,n=l.length,k={},a=[];
			while(i<n) {
				k[l[i]] || (k[l[i]] = 1 && a.push(l[i]));
				i++;
			}
			return a;
		}
896724
function(obj) {

            this.guid.id = this.guid.id || 1;
            obj.id = (obj.id === undefined ? 'j_' + this.guid.id++ : obj.id);
            return obj.id;
        }
1026226
def get_not_unique_values(array):
    '''
    '''
    s = np.sort(array, axis=None)
    s = s[s[1:] == s[:-1]]
    return np.unique(s)
803831
function getUniqueItemId(selector) {

            var base_id = selectorToId(selector),
                id = base_id,
                numeric_suffix = 0;

            while (used_item_ids.indexOf(id) !== -1) {
                id = base_id + "_" + ++numeric_suffix;
            }

            used_item_ids.push(id);
            return id;
        }
265424
function unique(oldArray) {
    var nIndex,
      nLen = oldArray.length,
      aArr = [];
    for (nIndex = 0; nIndex < nLen; nIndex++) {
      if (!contains(aArr, oldArray[nIndex][1])) {
        aArr.push(oldArray[nIndex]);
      }
    }
    return aArr;
  }
561340
def uniq(input, property = nil)
      ary = InputIterator.new(input)

      if property.nil?
        ary.uniq
      elsif ary.empty? # The next two cases assume a non-empty array.
        []
      elsif ary.first.respond_to?(:[])
        begin
          ary.uniq { |a| a[property] }
        rescue TypeError
          raise_property_error(property)
        end
      end
    end
875433
protected static Object primitiveArrayPut(Object self, int idx, Object newValue) {
        Array.set(self, normaliseIndex(idx, Array.getLength(self)), newValue);
        return newValue;
    }
691070
function usernameIsUnique ( id ) {
        var deferred = q.defer();

        db.users.query( [ { key: 'identities.basic.username', cmp: '=', value: user.identities.basic.username } ] ,
            { limit: 1, skip: 0 } ).then(
                function ( payload ) {
                    if ( payload.total === 0 ) {
                        deferred.resolve();
                    }
                    else if( !_.isUndefined( id ) && payload.results[0]._id.toString() === id.toString() ) {
                        deferred.resolve();
                    }
                    else {
                        deferred.reject( new Error(messages.duplicate_username) );
                    }
                },
                function ( err ) {
                    deferred.reject( err );
                }
            );

        return deferred.promise;
    }
845891
private static String generateUniqueId(Set<String> ids, String idBase) {
		String id = idBase;
		int counter = 1;
		while (ids.contains(id)) {
			id = idBase + String.valueOf(counter++);
		}
		
		// put the newly generated one into the set
		ids.add(id);
		return id;
	}
764855
function(title_id, array) {
		var used = [title_id];

		// establish which IDs are assigned and if any appear twice, clear out successors.
		for (var i = 0; i < array.length; i++) {
			if (TL.Util.trim(array[i].unique_id)) {
				array[i].unique_id = TL.Util.slugify(array[i].unique_id); // enforce valid
				if (used.indexOf(array[i].unique_id) == -1) {
					used.push(array[i].unique_id);
				} else { // it was already used, wipe it out
					array[i].unique_id = '';
				}
			}
		};

		if (used.length != (array.length + 1)) {
			// at least some are yet to be assigned
			for (var i = 0; i < array.length; i++) {
				if (!array[i].unique_id) {
					// use the headline for the unique ID if it's available
					var slug = (array[i].text) ? TL.Util.slugify(array[i].text.headline) : null;
					if (!slug) {
						slug = TL.Util.unique_ID(6); // or generate a random ID
					}
					if (used.indexOf(slug) != -1) {
						slug = slug + '-' + i; // use the index to get a unique ID.
					}
					used.push(slug);
					array[i].unique_id = slug;
				}
			}
		}
	}
1027181
function customUnique(array) {
  const unique = uniqBy(array, 'fname');
  // we construct unique portlets array will all linked categories (reversing category and portlets child)
  unique.forEach((elem) => {
    const dupl = array.filter((e) => e.fname === elem.fname);
    const allCategories = dupl.flatMap(({categories}) => categories);
    elem.categories = [...new Set(allCategories)];
  });
  return unique;
}
233416
function SingleUniform( id, activeInfo, addr ) {

	this.id = id;
	this.addr = addr;
	this.cache = [];
	this.setValue = getSingularSetter( activeInfo.type );

	// this.path = activeInfo.name; // DEBUG

}
220381
function unique(arr) {
    return arr.filter(function (value, idx, self) {
        return self.indexOf(value) === idx;
    });
}
237341
function uniqueId() {
  var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'id_';
  var id = prefix + strRand();
  if (!store.uniqueId) store.uniqueId = {};
  var generatedIds = store.uniqueId;

  if (document.getElementById(id) || generatedIds[id]) {
    return uniqueId(prefix);
  } else {
    generatedIds[id] = true;
    return id;
  }
}
790695
def unique(iterable):
    
    """
    d = {}
    return (d.setdefault(x,x) for x in iterable if x not in d)
1283657
function unique (array) {
    var ret = [];

    array.forEach(function (val) {
        if (ret.indexOf(val) === -1) {
            ret.push(val);
        }
    });

    return ret;
}