Saves URI to tracker file if one was passed to constructor.
329453
def _save_tracker_uri_to_file(self):
        
        if not self.tracker_file_name:
            return
        f = None
        try:
            f = open(self.tracker_file_name, 'w')
            f.write(self.tracker_uri)
        except IOError, e:
            raise ResumableUploadException(
                'Couldn\'t write URI tracker file (%s): %s.\nThis can happen'
                'if you\'re using an incorrectly configured upload tool\n'
                '(e.g., gsutil configured to save tracker files to an '
                'unwritable directory)' %
                (self.tracker_file_name, e.strerror),
                ResumableTransferDisposition.ABORT)
        finally:
            if f:
                f.close()
496155
public static void track(Window window) {
        Preferences prefs = node().node("Windows");

        String bounds = prefs.get(window.getName() + ".bounds", null);
        if (bounds != null) {
            Rectangle rect = (Rectangle) ConverterRegistry.instance().convert(
                    Rectangle.class, bounds);
            window.setBounds(rect);
        }

        window.addComponentListener(WINDOW_DIMENSIONS);
    }
211972
def tracking_save(sender, instance, raw, using, update_fields, **kwargs):
    
    if _has_changed(instance):
        if instance._original_fields['pk'] is None:
            # Create
            _create_create_tracking_event(instance)
        else:
            # Update
            _create_update_tracking_event(instance)
    if _has_changed_related(instance):
        # Because an object need to be saved before being related,
        # it can only be an update
        _create_update_tracking_related_event(instance)
    if _has_changed(instance) or _has_changed_related(instance):
        _set_original_fields(instance)
1316950
private String buildFileUrl(String fileId) {

    if (RequestContextHolder.getRequestAttributes() != null) {
      ServletUriComponentsBuilder currentRequest = ServletUriComponentsBuilder.fromCurrentRequest();
      UriComponents downloadUri =
          currentRequest
              .replacePath(FileDownloadController.URI + '/' + fileId)
              .replaceQuery(null)
              .build();
      return downloadUri.toUriString();
    } else {
      // TODO this is a workaround for the situation where the File url needs to be created without
      // a request
      // context, in order to fix the properly we would need to add a deploy time property
      // defining the file download server location
      return FileDownloadController.URI + '/' + fileId;
    }
  }
524511
def _set_uri_from_bound_model(self):
        """"""
        value = self._uri_template.format(self._bound_model.id)
        self.elm.set(self._uri_attr, value)
493995
def save(self) -> None:
        
        if self._output_dir is None:
            raise ValueError('Can not save TrainingTrace without output dir.')
        yaml_to_file(self._trace, self._output_dir, CXF_TRACE_FILE)
1069122
def save(self):
        ""
        with open(self.state_file, "w") as fh:
            json.dump({
                "hosts": self.hosts,
                "stats": self.stats,
            }, fh)
1365964
def save(self, filename):
        """"""
        proxies = {'http': [], 'https': []}
        for protocol in ['http', 'https']:
            for proxy in self.proxies[protocol]:
                serializable_proxy = self.proxies[protocol][proxy].to_dict()
                proxies[protocol].append(serializable_proxy)
        with open(filename, 'w') as fout:
            json.dump(proxies, fout)
1309077
def save_data(self, idx):
        """"""
        for name in self:
            actual = getattr(self, name)
            diskflag = getattr(self, '_%s_diskflag' % name)
            ramflag = getattr(self, '_%s_ramflag' % name)
            if diskflag:
                file_ = getattr(self, '_%s_file' % name)
                ndim = getattr(self, '_%s_ndim' % name)
                length_tot = 1
                for jdx in range(ndim):
                    length = getattr(self, '_%s_length_%s' % (name, jdx))
                    length_tot *= length
                if ndim:
                    raw = struct.pack(length_tot*'d', *actual.flatten())
                else:
                    raw = struct.pack('d', actual)
                file_.write(raw)
            elif ramflag:
                array = getattr(self, '_%s_array' % name)
                array[idx] = actual
990337
def save(self, filename, wildcard='*', verbose=False):
        ''''''
        f = open(filename, mode='w')
        k = list(self.keys())
        k.sort()
        count = 0
        for p in k:
            if p and fnmatch.fnmatch(str(p).upper(), wildcard.upper()):
                f.write("%-16.16s %f\n" % (p, self.__getitem__(p)))
                count += 1
        f.close()
        if verbose:
            print("Saved %u parameters to %s" % (count, filename))
751848
public void urlCheckAndSave(BasicCheckInfo basicCheckInfo, ParamType paramType, ReqUrl reqUrl, Class<?> type) {
        if (!this.validationConfig.isFreshUrlSave() || !basicCheckInfo.isUrlMapping()) {
            return;
        }

        List<ValidationData> datas = this.validationDataRepository.findByParamTypeAndMethodAndUrl(paramType, reqUrl.getMethod(), reqUrl.getUrl());
        if (datas.isEmpty()) {
            this.saveParameter(basicCheckInfo.getDetailParam(), paramType, reqUrl, null, type, 0, this.validationConfig.getMaxDeepLevel());
            this.validationDataRepository.flush();
            this.validationStore.refresh();
        }
    }
1342950
def track(*fields):
    
    def inner(cls):
        _track_class(cls, fields)
        _add_get_tracking_url(cls)
        return cls
    return inner
878839
static void writeTracker(JSONWriter writer, Tracker tracker)
			throws JSONException {
		writer.key("id");
		writer.value(tracker.getId());
		writer.key("name");
		writer.value(tracker.getName());
	}
567129
def trackable?(uri)
      uri && uri.absolute? && %w(http https).include?(uri.scheme)
    end
400064
def _save_if_needed(request, response_content):
    
    if request.save_response:
        file_path = request.get_file_path()
        create_parent_folder(file_path)
        with open(file_path, 'wb') as file:
            file.write(response_content)
        LOGGER.debug('Saved data from %s to %s', request.url, file_path)
494642
function saveUrl(url) {
  fs.writeFile('serve-url.log', url, error => {
    if (error) {
      return console.log(error)
    }

    console.log('serve-url.log updated!')
  })
}
829434
private void trackWelcomeFiles(final BundleContext bundleContext) {
		final ServiceTracker<WelcomeFileMapping, WelcomeFileWebElement> welcomeFileTracker = WelcomeFileMappingTracker
				.createTracker(extenderContext, bundleContext);

		welcomeFileTracker.open();
		trackers.add(0, welcomeFileTracker);
	}