This will create a new, empty list. You can create the list
        explicitly, or by giving it a list template id to base the new list
        off of.
773097
def create_todo_list(self, project_id, milestone_id=None, private=None,
        tracked=False, name=None, description=None, template_id=None):
        
        path = '/projects/%u/todos/create_list' % project_id
        req = ET.Element('request')
        if milestone_id is not None:
            ET.SubElement('milestone-id').text = str(milestone_id)
        if private is not None:
            ET.SubElement('private').text = str(bool(private)).lower()
        ET.SubElement('tracked').text = str(bool(tracked)).lower()
        if name is not None:
            ET.SubElement('name').text = str(name)
            ET.SubElement('description').text = str(description)
        if template_id is not None:
            ET.SubElement('use-template').text = 'true'
            ET.SubElement('template-id').text = str(int(template_id))
        return self._request(path, req)
78745
public static <InnerT> PagedList<InnerT> convertToPagedList(List<InnerT> list) {
        PageImpl<InnerT> page = new PageImpl<>();
        page.setItems(list);
        page.setNextPageLink(null);
        return new PagedList<InnerT>(page) {
            @Override
            public Page<InnerT> nextPage(String nextPageLink) {
                return null;
            }
        };
    }
259538
def create(self, name, description='', template=100):
        
        try:
            template = int(template)
        except ValueError:
            template = LIST_TEMPLATES[template]
        if name in self:
            raise ValueError("List already exists: '{0}".format(name))
        if uuid_re.match(name):
            raise ValueError("Cannot create a list with a UUID as a name")
        xml = SP.AddList(SP.listName(name),
                         SP.description(description),
                         SP.templateID(text_type(template)))
        result = self.opener.post_soap(LIST_WEBSERVICE, xml,
                                       soapaction='http://schemas.microsoft.com/sharepoint/soap/AddList')
        list_element = result.xpath('sp:AddListResult/sp:List', namespaces=namespaces)[0]
        self._all_lists.append(SharePointList(self.opener, self, list_element))
197012
private void initializeList() {
		FavouritesCommService.getSearchFavourites(new DataCallback<List<SearchFavourite>>() {
			public void execute(List<SearchFavourite> result) {
				favouriteItems.getDataAsRecordList().removeList(favouriteItems.getRecords());
				for (SearchFavourite sf : result) {
					favouriteItems.addData(new FavouriteListRecord(sf));
				}
			}
		});
	}
1198611
function tree(list) {
  var n = list.length;
  if (n == 0) {
    return null;
  }
  var i = Math.floor(n / 2);
  return new Tree(list[i], tree(list.slice(0, i)), tree(list.slice(i + 1)));
}
771941
public static <T> List<T> createWhenNull(final List<T> list) {
        if (list == null) {
            return new ArrayList<T>();
        } else {
            return list;
        }
    }
1232157
public static List<int[]> createList( int N )
    {
        int data[] = new int[ N ];
        for( int i = 0; i < data.length; i++ ) {
            data[i] = -1;
        }

        List<int[]> ret = new ArrayList<int[]>();

        createList(data,0,-1,ret);

        return ret;
    }
958376
protected void fillList() {

        try {
            getList().setContent(getListItems());
            // initialize detail columns
            Iterator<CmsListItemDetails> itDetails = getList().getMetadata().getItemDetailDefinitions().iterator();
            while (itDetails.hasNext()) {
                initializeDetail(itDetails.next().getId());
            }
        } catch (Exception e) {
            throw new CmsRuntimeException(
                Messages.get().container(Messages.ERR_LIST_FILL_1, getList().getName().key(getLocale()), null),
                e);
        }
    }
1333801
static JSBoxedListImpl create(JSVaryingList subList, int subAccessor) {
    if (subList.getIndirection() > 0)
      return new JSIndirectBoxedListImpl(subList, subAccessor);
    else
      return new JSBoxedListImpl(subList, subAccessor);
  }
959361
def new_page(record, values = [])
      idx = @page_counter
      @page_counter += 1
      mark_page_as_modified(IDListPage.new(self, record, idx, values))
      idx
    end
251614
def new(self, items:Iterator, processor:PreProcessors=None, **kwargs)->'ItemList':
        ""
        processor = ifnone(processor, self.processor)
        copy_d = {o:getattr(self,o) for o in self.copy_new}
        kwargs = {**copy_d, **kwargs}
        return self.__class__(items=items, processor=processor, **kwargs)
1304716
@UiThread
  public List<T> create(List<S> optionsList) {
    List<T> annotationList = new ArrayList<>();
    for (S options : optionsList) {
      T annotation = options.build(currentId, this);
      annotationList.add(annotation);
      annotations.put(annotation.getId(), annotation);
      currentId++;
    }
    updateSource();
    return annotationList;
  }
1117946
def _build_new_template(self, stack, parameters):
        
        log_lines = ["New template parameters:"]
        for param in sorted(parameters,
                            key=lambda param: param['ParameterKey']):
            log_lines.append("%s = %s" % (param['ParameterKey'],
                                          param['ParameterValue']))

        log_lines.append("\nNew template contents:")
        log_lines.append("".join(stack))
        return log_lines
194502
@Override
    public INDArray create(List<INDArray> list, int[] shape) {
        return new NDArray(list, shape, Nd4j.getStrides(shape));
    }
1052103
function(ev, newList, oldList) {
                        teardownList();
                        // make an empty list if the compute returns null or undefined
                        list = newList || [];
                        // list might be a plain array
                        if (list.bind) {
                            list.bind('add', add)
                                .bind('remove', remove);
                        }
                        add({}, list, 0);
                    }
953137
def new_from_list(cls, items, **kwargs):
        
        obj = cls(**kwargs)
        for item in items:
            obj.append(ListItem(item))
        return obj
140094
private void create(final AddressTemplate addressTemplate, final String instanceName, final ModelNode newModel,
                        final List<Property> list, final Dispatcher.Channel channel) {
        operationDelegate.onCreateResource(addressTemplate, instanceName, newModel,
                new CrudOperationDelegate.Callback() {
                    @Override
                    public void onFailure(AddressTemplate template, String name, Throwable t) {
                        channel.nack(t);
                    }

                    @Override
                    public void onSuccess(AddressTemplate addressTemplate, String name) {
                        lastModifiedInstance = instanceName;
                        read(addressTemplate.getResourceType(), list, channel);
                    }
                });
    }