Completely new edition 2014-07-21
327202
function GetDetailedUsersArray()
  {
      $users_array = array();
      $result = $this->GetNextUserArray(TRUE);
      if (isset($result['user'])) {
          $users_array[$result['user']] = $result;
      }
      do {
          if ($result = $this->GetNextUserArray()) {
              if (isset($result['user'])) {
                  $users_array[$result['user']] = $result;
              }
          }
      } while (FALSE !== $result);
      return $users_array;
  }
681873
def new
      @keyword = Cmtool::Keyword.new

      respond_to do |format|
        format.html # new.html.erb
        format.xml  { render :xml => @keyword }
      end
    end
943094
def new(self, **dict):
        ''''''
        if not self._item_new_path:
            raise AttributeError('new is not available for %s' % self._item_name)

        # Remap various tag to tag_id
        for tag in self._object._remap_to_id:
            self._object._remap_tag_to_tag_id(tag, dict)

        target = self._item_new_path
        payload = json.dumps({self._item_type:dict})
        json_data = self._redmine.post(target, payload)
        data = self._redmine.unwrap_json(self._item_type, json_data)
        data['_source_path'] = target
        return self._objectify(data=data)
8133
def new(self, bootstrap_with=None, use_timer=False, incr=False,
            with_proof=False):
        

        assert not incr or not with_proof, 'Incremental mode and proof tracing cannot be set together.'

        if not self.glucose:
            self.glucose = pysolvers.glucose41_new()

            if bootstrap_with:
                for clause in bootstrap_with:
                    self.add_clause(clause)

            self.use_timer = use_timer
            self.call_time = 0.0  # time spent for the last call to oracle
            self.accu_time = 0.0  # time accumulated for all calls to oracle

            if incr:
                pysolvers.glucose41_setincr(self.glucose)

            if with_proof:
                self.prfile = tempfile.TemporaryFile()
                pysolvers.glucose41_tracepr(self.glucose, self.prfile)
1225196
def new(cls, ver_key: VerKey, sign_key: SignKey) -> 'ProofOfPossession':
        
        logger = logging.getLogger(__name__)
        logger.debug("ProofOfPossession::new: >>>")

        c_instance = c_void_p()
        do_call(cls.new_handler, ver_key.c_instance, sign_key.c_instance, byref(c_instance))

        res = cls(c_instance)

        logger.debug("ProofOfPossession::new: <<< res: %r", res)
        return res
554272
def new(cls):

        ''' 
        '''

        dT = datetime.utcnow().replace(tzinfo=pytz.utc)
        dt_kwargs = {
            'year': dT.year,
            'month': dT.month,
            'day': dT.day,
            'hour': dT.hour,
            'minute': dT.minute,
            'second': dT.second,
            'microsecond': dT.microsecond,
            'tzinfo': dT.tzinfo
        }
        return labDT(**dt_kwargs)
681658
def created(self):
        ''
        return dateutil.parser.parse(str(self.f.latestRevision.created))
684416
def new(self):
        
        ori = self.original.action
        if isinstance(ori, (
                types.ChannelAdminLogEventActionChangeAbout,
                types.ChannelAdminLogEventActionChangeTitle,
                types.ChannelAdminLogEventActionChangeUsername,
                types.ChannelAdminLogEventActionToggleInvites,
                types.ChannelAdminLogEventActionTogglePreHistoryHidden,
                types.ChannelAdminLogEventActionToggleSignatures
        )):
            return ori.new_value
        elif isinstance(ori, types.ChannelAdminLogEventActionChangePhoto):
            return ori.new_photo
        elif isinstance(ori, types.ChannelAdminLogEventActionChangeStickerSet):
            return ori.new_stickerset
        elif isinstance(ori, types.ChannelAdminLogEventActionEditMessage):
            return ori.new_message
        elif isinstance(ori, (
                types.ChannelAdminLogEventActionParticipantToggleAdmin,
                types.ChannelAdminLogEventActionParticipantToggleBan
        )):
            return ori.new_participant
        elif isinstance(ori, types.ChannelAdminLogEventActionParticipantInvite):
            return ori.participant
        elif isinstance(ori, types.ChannelAdminLogEventActionDefaultBannedRights):
            return ori.new_banned_rights
        elif isinstance(ori, types.ChannelAdminLogEventActionStopPoll):
            return ori.message
1108875
def new(options = { only: [], except: [:id, :created_at, :updated_at], required: [] })
      @thing_model = thing
      @thing = @thing_model.new
      @attrs = CEO::Iterator.filter(@thing.attributes.keys, options)
      @route_name ||= @controller_name ||= controller_name
      @index_route = send(:"admin_#{@route_name}_path")

      render 'admin/new'
    end
916638
def update(self, newinfo):
        ''''''
        self.text = newinfo.text
        if self.textctrl is not None:
            self.textctrl.Clear()
            self.textctrl.WriteText(self.text)
            self._resize()
1025286
def recent(self):
        '''
        
        '''
        kwd = {
            'pager': '',
            'title': 'Recent Pages',
        }
        self.render('wiki_page/wiki_list.html',
                    view=MWiki.query_recent(),
                    format_date=tools.format_date,
                    kwd=kwd,
                    userinfo=self.userinfo)
512741
def new
      respond_to do |format|
        format.html { render :new, locals: { circle: Circle.new } }
      end
    end
1021729
def print_new_versions(strict=False):
    """"""
    new_updates = []
    same_updates = []
    for req in everything_in(all_reqs):
        new_versions = []
        same_versions = []
        for ver_str in all_versions(req):
            if newer(ver_str_to_tuple(ver_str), min_versions[req], strict=True):
                new_versions.append(ver_str)
            elif not strict and newer(ver_str_to_tuple(ver_str), min_versions[req]):
                same_versions.append(ver_str)
        update_str = req + ": " + ver_tuple_to_str(min_versions[req]) + " -> " + ", ".join(
            new_versions + ["(" + v + ")" for v in same_versions],
        )
        if new_versions:
            new_updates.append(update_str)
        elif same_versions:
            same_updates.append(update_str)
    print("\n".join(new_updates + same_updates))
821193
function(newnode, oldnode, ids) {
		var updates = [];
		var news = this._assistant.index(newnode.childNodes);
		var olds = this._assistant.index(oldnode.childNodes);
		/*
		 * Add elements?
		 */
		var child = newnode.lastElementChild,
			topid = this._assistant.id(oldnode),
			oldid = null,
			newid = null;
		while (child) {
			newid = this._assistant.id(child);
			if (!olds[newid]) {
				if (oldid) {
					updates.push(
						new edbml.InsertUpdate(this._doc).setup(oldid, child)
					);
				} else {
					updates.push(
						new edbml.AppendUpdate(this._doc).setup(topid, child)
					);
				}
			} else {
				oldid = newid;
			}
			child = child.previousElementSibling;
		}
		/*
		 * Remove elements?
		 */
		Object.keys(olds).forEach(function(id) {
			if (!news[id]) {
				updates.push(
					new edbml.RemoveUpdate(this._doc).setup(id)
				);
				updates.push(
					new edbml.FunctionUpdate(this._doc).setup(id)
				);
			} else { // note that crawling continues here...
				var n1 = news[id];
				var n2 = olds[id];
				this._scan(n1, n2, n1, id, ids);
			}
		}, this);
		/*
		 * Register updates
		 */
		updates.reverse().forEach(function(update) {
			this._updates.collect(update, ids);
		}, this);
	}
315005
def new_content(conflict_start='<<<', conflict_switch='>>>', conflict_end='===')
      flat_map do |change|
        if change.conflict?
          version_one = change.diff_one.new_content(conflict_start, conflict_switch, conflict_end)
          version_two = change.diff_two.new_content(conflict_start, conflict_switch, conflict_end)

          [conflict_start] + version_one + [conflict_switch] + version_two + [conflict_end]
        elsif change.deleting?
          []
        else
          [change.new_element]
        end
      end
    end
739540
function updateIntoDB() {
                    //Yaaay, alle Tests bestanden gogo, insert!
                    lastQry = connection.query('UPDATE ?? SET ? WHERE ?? = ?', [req.params.table , updateJson, updateSelector.field, updateSelector.value] , function (err) {
                        if (err) return sendError(res,err.code);
                        sendSuccessAnswer(req.params.table , res, req.params.id, updateSelector.field);

                    });
                }
1186249
def new(self):
        # type: () -> None
        '''
        
        '''
        if self._initialized:
            raise pycdlibexception.PyCdlibInternalError('UDF Logical Volume Implementation Use already initialized')

        self.impl_id = UDFEntityID()
        self.impl_id.new(0, b'*pycdlib')

        self.num_files = 0
        self.num_dirs = 1
        self.min_udf_read_revision = 258
        self.min_udf_write_revision = 258
        self.max_udf_write_revision = 258

        self.impl_use = b'\x00' * 378  # FIXME: let the user set this

        self._initialized = True