::
        
            POST /:login/machines/:id?action=resize
        
        Initiate resizing of the remote machine to a new package.
506702
def resize(self, package):
        
        if isinstance(package, dict):
            package = package['name']
        action = {'action': 'resize',
                  'package': package}
        j, r = self.datacenter.request('POST', self.path, params=action)
        r.raise_for_status()
236509
def _get_preset_id(package, size):
    """"""
    for preset in package['activePresets'] + package['accountRestrictedActivePresets']:
        if preset['keyName'] == size or preset['id'] == size:
            return preset['id']

    raise SoftLayer.SoftLayerError("Could not find valid size for: '%s'" % size)
238759
def resize_volume(self, size):
        """"""
        curr_size = self.volume.size
        if size <= curr_size:
            raise exc.InvalidVolumeResize("The new volume size must be larger "
                    "than the current volume size of '%s'." % curr_size)
        body = {"volume": {"size": size}}
        self.manager.action(self, "resize", body=body)
1183402
def create_volume(self, project_id, plan, size, facility, label=""):
        
        try:
            return self.manager.create_volume(project_id, label, plan, size, facility)
        except packet.baseapi.Error as msg:
            raise PacketManagerException(msg)
1115560
def resize(self, height, width, **kwargs):
        
        self.client.exec_resize(self.exec_id, height=height, width=width)
544336
def _handle_resize(self, signum=None, frame=None):
        ''

        w, h = utils.get_terminal_size()
        self.term_width = w
343785
@Override
  protected final void increaseNewListSize() throws IOException {
    // register old situation
    int tmpOldSize = newKeyList.length;
    int tmpNewPosition = newPosition;
    // increase
    super.increaseNewListSize();
    // reconstruct
    T1[][] tmpNewFullValueList = newFullValueList;
    newFullValueList = operations.createMatrix1(newSize);
    newPosition = tmpNewPosition;
    System.arraycopy(tmpNewFullValueList, 0, newFullValueList, 0, tmpOldSize);
  }
1337573
def update!
      ensure_remotes_directory
      dirty_remotes.each do |_name, remote|
        dir = workspace_of(remote)
        if remote[:path] || path_enabled?(remote)
          if symlink?(dir)
            delete_symlink(dir)
          else
            FileUtils.rm_rf(dir) if File.exist?(dir)
          end
        end
        if remote[:path]
          create_symlink(remote[:path], dir)
        else
          rc_url = remote[:rc_url] || remote[:vault]
          tag = remote[:tag].nil? ? Origen::VersionString.new(remote[:version]) : Origen::VersionString.new(remote[:tag])
          version_file = dir.to_s + '/.current_version'
          begin
            if File.exist?("#{dir}/.initial_populate_successful")
              FileUtils.rm_f(version_file) if File.exist?(version_file)
              rc = RevisionControl.new remote: rc_url, local: dir
              rc.send rc.remotes_method, version: prefix_tag(tag), force: true
              File.open(version_file, 'w') do |f|
                f.write tag
              end
            else
              rc = RevisionControl.new remote: rc_url, local: dir
              rc.send rc.remotes_method, version: prefix_tag(tag), force: true
              FileUtils.touch "#{dir}/.initial_populate_successful"
              File.open(version_file, 'w') do |f|
                f.write tag
              end
            end
          rescue Origen::GitError, Origen::DesignSyncError, Origen::PerforceError  => e
            # If Git failed in the remote, its usually easy to see what the problem is, but now *where* it is.
            # This will prepend the failing remote along with the error from the revision control system,
            # then rethrow the error
            e.message.prepend "When updating remotes for #{remote[:importer].name}: "
            raise e
          end
        end
      end
    end
214384
function(oriImg,newImg,size){
        var width = size.width;
        var height = size.height;
        gm(oriImg).resize(width,height)
        .write(newImg,function(error){
            if(error){
                gutil.log(gutil.colors.red(error));
            }
        })
    }
101193
@PostLoad
    @PostPersist
    @PostUpdate
    @PostRemove
    private void init() {
        if (this.internalPortletDefinitionId != -1
                && (this.portletDefinitionId == null
                        || this.portletDefinitionId.getLongId()
                                != this.internalPortletDefinitionId)) {
            this.portletDefinitionId =
                    PortletDefinitionIdImpl.create(this.internalPortletDefinitionId);
        }
    }
133182
def resize_bytes(self, size):
        
        self._nbytes = size
        self._glir.command('SIZE', self._id, size)
        # Invalidate any view on this buffer
        for view in self._views:
            if view() is not None:
                view()._valid = False
        self._views = []
1138940
def on_resize(self, event):
        
        self._update_transforms()
        
        if self._central_widget is not None:
            self._central_widget.size = self.size
            
        if len(self._vp_stack) == 0:
            self.context.set_viewport(0, 0, *self.physical_size)
117809
def init_remote(self):
        '''
        
        '''
        new = False
        if not os.listdir(self.cachedir):
            # Repo cachedir is empty, initialize a new repo there
            self.repo = git.Repo.init(self.cachedir)
            new = True
        else:
            # Repo cachedir exists, try to attach
            try:
                self.repo = git.Repo(self.cachedir)
            except git.exc.InvalidGitRepositoryError:
                log.error(_INVALID_REPO, self.cachedir, self.url, self.role)
                return new

        self.gitdir = salt.utils.path.join(self.repo.working_dir, '.git')
        self.enforce_git_config()

        return new
1327543
def _post_create(self, auto_refresh=False):

		'''
		
		'''

		# set PCDM triple as Object
		self.add_triple(self.rdf.prefixes.rdf.type, self.rdf.prefixes.pcdm.Object)
		self.update(auto_refresh=auto_refresh)

		# create /files child resource
		files_child = PCDMFilesContainer(
			self.repo,
			'%s/files' % self.uri_as_string(),
			membershipResource=self.uri,
			hasMemberRelation=self.rdf.prefixes.pcdm.hasFile)
		files_child.create(specify_uri=True)

		# create /members child resource
		members_child = PCDMMembersContainer(
			self.repo,
			'%s/members' % self.uri_as_string(),
			membershipResource=self.uri,
			hasMemberRelation=self.rdf.prefixes.pcdm.hasMember,
			insertedContentRelation=self.rdf.prefixes.ore.proxyFor)
		members_child.create(specify_uri=True)

		# create /related child resource
		related_child = PCDMRelatedContainer(
			self.repo,
			'%s/related' % self.uri_as_string(),
			membershipResource=self.uri,
			hasMemberRelation=self.rdf.prefixes.ore.aggregates,
			insertedContentRelation=self.rdf.prefixes.ore.proxyFor)
		related_child.create(specify_uri=True)

		# create /associated child resource
		associated_child = PCDMAssociatedContainer(
			self.repo,
			'%s/associated' % self.uri_as_string(),
			membershipResource=self.uri,
			hasMemberRelation=self.rdf.prefixes.pcdm.hasRelatedFile)
		associated_child.create(specify_uri=True)
1299233
def prepare!(env)
      @env      = env
      @request  = Rack::Request.new(env)
      @response = Rack::Response.new
      @headers  = @response.header
      @params   = @request.GET.merge(@request.POST)
      @params.default_proc = proc do |hash, key|
        hash[key.to_s] if Symbol === key
      end
    end
769358
def activate_(self, n_buffer, image_dimensions, shmem_name):
        
        self.active = True
        self.image_dimensions = image_dimensions
        self.client = ShmemRGBClient(
            name            =shmem_name,
            n_ringbuffer    =n_buffer,   # size of ring buffer
            width           =image_dimensions[0],
            height          =image_dimensions[1],
            # client timeouts if nothing has been received in 1000 milliseconds
            mstimeout   =1000,
            verbose     =False
        )
        self.postActivate_()
613579
function resolvePackageId(id) {
        each(
            packagesIndex,
            function (packageConf) {
                var name = packageConf.name;
                if (name === id) {
                    id = name + '/' + packageConf.main;
                    return false;
                }
            }
        );

        return id;
    }