xxxxx.xxxxx.campaign.update
        ===================================
        更新一个推广计划，可以设置推广计划名字、是否平滑消耗，只有在设置了日限额后平滑消耗才会产生作用。
358091
def update(self, campaign_id, title, is_smooth, online_status, nick=None):
        ''''''
        request = TOPRequest('xxxxx.xxxxx.campaign.update')
        request['campaign_id'] = campaign_id
        request['title'] = title
        request['is_smooth'] = is_smooth
        request['online_status'] = online_status
        if nick!=None: request['nick'] = nick
        self.create(self.execute(request), fields=['success','result','success','result_code','result_message'], models={'result':Campaign})
        return self.result
590076
function onDialogUpdate() {
  var pushOccupants  = [];
  $('#add_new_occupant .users_form.active').each(function(index) {
    pushOccupants[index] = $(this).attr('id').slice(0, -4);
  });

  var dialogName  = $('#dialog-name-input').val().trim();

  var toUpdate = {
      name:     dialogName,
      push_all: {occupants_ids: pushOccupants}
    };

  console.log("Updating the dialog with params: " + JSON.stringify(toUpdate));

  QB.chat.dialog.update(currentDialog._id, toUpdate, function(err, res) {
    if (err) {
      console.log(err);
    } else {
      console.log("Dialog updated");

      var dialogId = res._id;
      dialogs[dialogId] = res;

      currentDialog = res;

      $('#'+res._id).remove();

      showOrUpdateDialogInUI(res, true);

      notifyOccupants(res.occupants_ids, dialogId, 2);

      $('#'+res._id).removeClass('inactive').addClass('active');
    }
  });

  $("#update_dialog").modal("hide");
  $('#dialog-name-input').val('');
  $('.users_form').removeClass("active");
}
156328
public static void main(String[] args) throws Exception {
		
		NERTagger tag = new NERTagger("../models/seg.m","../models/pos.m");
		String str = " 新浪体育讯　北京时间4月15日03:00(英国当地时间14日20:00)，2009/10赛季英格兰足球超级联赛第34轮一场焦点战在白鹿巷球场展开角逐，阿森纳客场1比2不敌托特纳姆热刺，丹尼-罗斯和拜尔先入两球，本特纳扳回一城。阿森纳仍落后切尔西6分(净胜球少15个)，夺冠几成泡影。热刺近 7轮联赛取得6胜，继续以1分之差紧逼曼城。";
		HashMap<String, String> map = new HashMap<String, String>();
		tag.tag(str,map);
		System.out.println(map);
		map = tag.tagFile("../example-data/data-tag.txt");
		System.out.println(map);
		System.out.println("Done!");
	}
733878
@Override
	public Response update(String CorpNum, String MgtKey, Cashbill cashbill,
			String UserID) throws PopbillException {
		if (MgtKey == null || MgtKey.isEmpty())
			throw new PopbillException(-99999999, "관리번호가 입력되지 않았습니다.");

		String PostData = toJsonString(cashbill);

		return httppost("/Cashbill/"+MgtKey, CorpNum,
				PostData, UserID, "PATCH", Response.class);
	}
826885
private static function updateCampaignDsaSetting(
        AdWordsServices $adWordsServices,
        AdWordsSession $session,
        $campaignId,
        DSAFeedDetails $feedDetails
    ) {
        $campaignService = $adWordsServices->get($session, CampaignService::class);

        // Create selector.
        $selector = new Selector();
        $selector->setFields(['Id', 'Settings']);
        $selector->setPredicates(
            [new Predicate('CampaignId', PredicateOperator::IN, [$campaignId])]
        );

        $result = $campaignService->get($selector);
        if (empty($result->getEntries()) || $result->getTotalNumEntries() === 0) {
            throw new InvalidArgumentException(
                'No campaign found with ID: ' . $campaignId
            );
        }
        $campaign = $result->getEntries()[0];

        if ($campaign->getSettings() === null) {
            throw new InvalidArgumentException(
                'Campaign with ID ' . $campaignId . ' is not a DSA campaign.'
            );
        }

        $dsaSetting = null;
        foreach ($campaign->getSettings() as $setting) {
            if ($setting instanceof DynamicSearchAdsSetting) {
                $dsaSetting = $setting;
                break;
            }
        }

        if ($dsaSetting === null) {
            throw new InvalidArgumentException(
                'Campaign with ID ' . $campaignId . ' is not a DSA campaign.'
            );
        }

        // Use a page feed to specify precisely which URLs to use with your
        // Dynamic Search Ads.
        $pageFeed = new PageFeed();
        $pageFeed->setFeedIds([$feedDetails->feedId]);
        $dsaSetting->setPageFeed($pageFeed);

        // Optional: Specify whether only the supplied URLs should be used with your
        // Dynamic Search Ads.
        $dsaSetting->setUseSuppliedUrlsOnly(true);

        $updatedCampaign = new Campaign();
        $updatedCampaign->setId($campaignId);
        $updatedCampaign->setSettings($campaign->getSettings());

        $operation = new CampaignOperation();
        $operation->setOperand($updatedCampaign);
        $operation->setOperator(Operator::SET);

        // Update the campaign on the server and print out some information.
        $result = $campaignService->mutate([$operation]);
        $updatedCampaign = $result->getValue()[0];
        printf(
            "DSA page feed for campaign ID %d was updated with feed ID %d.\n",
            $updatedCampaign->getId(),
            $feedDetails->feedId
        );
    }
774742
private void updateIndexName() {
        this.logIndexName = this.logIndexPrefix + "_" + SIMPLE_DATE_FORMAT.format(new Date());

        try {
            addIndex(logIndexName);
        } catch (IOException e) {
            logger.error("Failed to update log index name: {}", logIndexName, e);
        }
    }
108702
public void update(TestSuiteStartedEvent event) {
        if (isTitleAnnotationPresent()) {
            event.setTitle(getTitle());
        }

        if (isDescriptionAnnotationPresent()) {
            event.setDescription(getDescription());
        }

        if (isIssueAnnotationPresent()) {
            event.getLabels().add(createIssueLabel(getIssueKey()));
        }

        if (isIssuesAnnotationPresent()) {
            for (String issueKey : getIssueKeys()) {
                event.getLabels().add(createIssueLabel(issueKey));
            }
        }

        event.getLabels().addAll(getStoryLabels());
        event.getLabels().addAll(getFeatureLabels());
    }
945969
public void update(int[] goldIndex, int[] predictIndex)
    {
        for (int i = 0; i < goldIndex.length; ++i)
        {
            if (goldIndex[i] == predictIndex[i])
                continue;
            else // 预测与答案不一致
            {
                parameter[goldIndex[i]]++; // 奖励正确的特征函数（将它的权值加一）
                if (predictIndex[i] >= 0 && predictIndex[i] < parameter.length)
                    parameter[predictIndex[i]]--; // 惩罚招致错误的特征函数（将它的权值减一）
                else
                {
                    throw new IllegalArgumentException("更新参数时传入了非法的下标");
                }
            }
        }
    }
1121663
def update_todo_item(self, item_id, content, party_id=None, notify=False):
        
        path = '/todos/update_item/%u' % item_id
        req = ET.Element('request')
        item = ET.Element('request')
        ET.SubElement(item, 'content').text = str(content)
        if party_id is not None:
            ET.SubElement(req, 'responsible-party').text = str(party_id)
            ET.SubElement(req, 'notify').text = str(bool(notify)).lower()
        return self._request(path, req)
197912
function updateLog(name, opt) {
  const ulog = log[opt.level || 'success'];
  const intl = new Intl(message);
  let pre = '';
  let localVersion = '';
  const lastVersion = opt.lastPkg.version;

  if (opt.localPkg && opt.localPkg.version !== lastVersion) {
    localVersion = opt.localPkg.version;
    pre = intl.get('updateTo', { localVersion, lastVersion });
  } else {
    pre = intl.get('updateVersion', { lastVersion });
    localVersion = lastVersion;
  }

  if (opt.lastPkg.changeLog) {
    const changeLog = opt.lastPkg.changeLog.sort(
      (a, b) => (semver.lt(a.version, b.version) ? 1 : -1)
    );

    // 在警告模式下加重提示样式
    if (opt.level === 'warn') {
      const tool = getFieBin();
      const localVTip = localVersion ? intl.get('localVersion', { localVersion }) : '';
      const installTip = `${tool} install ${opt.lastPkg.name}`;

      console.log('\n');
      ulog(
        `******************** ${emoji.get('warning')} ${emoji.get('warning')}   ${intl.get(
          'updateTips'
        )}  ${emoji.get('warning')} ${emoji.get('warning')} **********************`
      );
      ulog(
        `${intl.get('recommendVersion', { name, version: chalk.green(lastVersion) })}${localVTip}`
      );
      ulog(
        intl.get('recommendInstall', {
          icon: emoji.get('point_right'),
          installTip: chalk.bgRed.bold(installTip),
        })
      );
    }

    ulog(`${name} ${pre}, ${intl.get('includeUpdate')}`);
    changeLog.forEach(item => {
      if (!item.log || !item.log.length) {
        return;
      }
      if (lastVersion === localVersion) {
        if (item.version !== lastVersion) {
          return;
        }
      } else if (!semver.lte(item.version, lastVersion) || !semver.gt(item.version, localVersion)) {
        return;
      }

      // 显示未更新的这几个版本log
      item.log.forEach(itemLog => {
        ulog(` --${itemLog}`);
      });
    });

    // 在警告模式下加重提示样式
    if (opt.level === 'warn') {
      ulog(
        `******************************${emoji.get('point_up_2')} ${emoji.get(
          'point_up_2'
        )} ******************************`
      );
      console.log('\n');
    }
  }
}
876361
public static <T> String getCustomUpdateSQL(T t, List<Object> values, String setSql) {
		StringBuilder sql = new StringBuilder();
		sql.append("UPDATE ");
		
		Table table = DOInfoReader.getTable(t.getClass());
		List<Field> fields = DOInfoReader.getColumns(t.getClass());
		List<Field> keyFields = DOInfoReader.getKeyColumns(t.getClass());
		
		sql.append(getTableName(table)).append(" ");
		
		if(setSql.trim().toLowerCase().startsWith("set ")) {
			sql.append(setSql);
		} else {
			sql.append("SET ").append(setSql);
		}
		
		// 加上更新时间和casVersion字段
		for(Field field : fields) {
			Column column = field.getAnnotation(Column.class);
			if(column.setTimeWhenUpdate() && Date.class.isAssignableFrom(field.getType())) {
				sql.append(",").append(getColumnName(column))
				   .append("=").append(getDateString(new Date()));
			}
			if(column.casVersion()) {
				Object value = DOInfoReader.getValue(field, t);
				if(value == null) {
					throw new CasVersionNotMatchException("casVersion column value is null");
				}
				Long _v = null;
				if(value instanceof Long) {
					_v = (Long) value;
				} else if (value instanceof Integer) {
					_v = ((Integer) value).longValue();
				} else {
					throw new CasVersionNotMatchException("casVersion column value type must be Integer or Long");
				}
				sql.append(",").append(getColumnName(column)).append("=").append(_v + 1);
			}
		}
		
		List<Object> whereValues = new ArrayList<Object>();
		String where = "WHERE " + joinWhereAndGetValue(keyFields, "AND", whereValues, t);
		
		for(Object value : whereValues) {
			if(value == null) {
				throw new NullKeyValueException();
			}
		}
		values.addAll(whereValues);

		Field casVersionField = DOInfoReader.getCasVersionColumn(t.getClass());
		if(casVersionField != null) {
			List<Field> casVersionFields = new ArrayList<Field>();
			casVersionFields.add(casVersionField);
			List<Object> casValues = new ArrayList<Object>();
			String casWhere = joinWhereAndGetValue(casVersionFields, "AND", casValues, t);
			if(casValues.size() != 1 || casValues.get(0) == null) {
				throw new CasVersionNotMatchException("casVersion column value is null");
			}
			values.add(casValues.get(0));
			where = where + " AND " + casWhere;
		}
		
		sql.append(autoSetSoftDeleted(where, t.getClass()));
		
		return sql.toString();
	}
938562
@Override
	public Response update(String CorpNum, int ItemCode, String MgtKey,
			Statement statement, String UserID) throws PopbillException {
		if (MgtKey == null || MgtKey.isEmpty())
			throw new PopbillException(-99999999, "관리번호가 입력되지 않았습니다.");
		
		String PostData = toJsonString(statement);
		
		return httppost("/Statement/" + ItemCode + "/" + MgtKey, CorpNum, 
				PostData, UserID, "PATCH", Response.class);
	}
54215
function requestNew()
    {
        $db = new Db;

        //Search from first register with [article.status] 5 and [article.editdate] <= datetime - 24 hours.
        $result = $db->query('SELECT MIN(id)id, (SELECT MAX(id+1) FROM article)nid
                              FROM article
                              WHERE status = 6
                              OR (status = 5 AND editdate <=  STR_TO_DATE(\''.date('Y-m-d H:i:s', time()-86400).'\', \'%Y-%m-%d %H:%i:%s\'))');

        if (isset($result[0])) {
            $this->editdate = date('Y-m-d H:i:s');
            $this->pubdate = $this->editdate;


            //Criando novo registro
            if ($result[0]->get('id') == null) {
                $this->id = $result[0]->get('nid');

                $db->query('INSERT INTO articlecontent
                           SET article = '.$this->id.',
                           	   content = "",
            				   editdate = "'.$this->editdate.'"');

                $db->query('INSERT INTO article
                           SET id = '.$this->id.',
                               status = 5,
                               editdate = \''.$this->editdate.'\'');

            //Atualizando o registro
            } else {
                $this->id = $result[0]->get('id');

                $db->query('UPDATE article
                           SET status = 5,
                               pubdate = \''.$this->pubdate.'\',
            				   editdate = \''.$this->editdate.'\',
            				   rateup = 0,
            				   ratedown = 0,
            				   access = 0,
            				   link = "",
            				   tags = "",
            				   title = "",
            				   media = "{}",
            				   resume = ""
            				   
            			 WHERE id = '.$this->id.'');

                $db->query('UPDATE articlecontent
                           SET content = "",
            				   editdate = \''.$this->editdate.'\'
            			 WHERE article = '.$this->id.'');
            }

                //Make dir clean (delete all files)
                $this->clearDir();
                return $this;
        }

            return false;
    }
265162
public function reportDailyStatistics($campaign_id, $start_date, $end_date)
		{
			$form_data = array(
				'campaign_id' => $campaign_id,
				'from_date' => $start_date,
				'to_date' => $end_date
			);
			$xml = $this->call('rpt_daily_stats', $form_data);

			$reports = array();

			foreach ($xml->Data as $daily_report)
			{
				$report = new Report();
				$report
					->setCampaignId((int)$daily_report->Campaign_ID)
					->setEventDate(\DateTime::createFromFormat('m/d/Y', $daily_report->event_date))
					->setTotalSent((int)$daily_report->Total_sent)
					->setTotalOpened((int)$daily_report->Total_opened)
					->setTotalOpenedUnique((int)$daily_report->Unique_opened)
					->setTotalClicks((int)$daily_report->Total_clickthroughs)
					->setTotalClicksUnique((int)$daily_report->Unique_clickthroughs)
					->setSoftBounces((int)$daily_report->Total_soft_bounced)
					->setHardBounces((int)$daily_report->Total_hard_bounced)
					->setUnsubscribes((int)$daily_report->Total_unsubscribed)
					->setComplaintBounces((int)$daily_report->Total_complaints_bounced)
					->setBlockedBounces((int)$daily_report->Total_blocked_bounced);
				$reports[] = $report;
			}

			return $reports;
		}
919178
def update(self, campaign_id, search_channels, nonsearch_channels, outside_discount, nick=None):
        ''''''
        request = TOPRequest('xxxxx.xxxxx.campaign.platform.update')
        request['campaign_id'] = campaign_id
        request['search_channels'] = search_channels
        request['nonsearch_channels'] = nonsearch_channels
        request['outside_discount'] = outside_discount
        if nick!=None: request['nick'] = nick
        self.create(self.execute(request), fields=['success','result','success','result_code','result_message'], models={'result':CampaignPlatform})
        return self.result
1075699
@Override
    public Response update(String CorpNum, MgtKeyType KeyType, String MgtKey,
                           Taxinvoice taxinvoice, String UserID) throws PopbillException {
        if (KeyType == null)
            throw new PopbillException(-99999999, "관리번호형태가 입력되지 않았습니다.");
        if (MgtKey == null || MgtKey.isEmpty())
            throw new PopbillException(-99999999, "관리번호가 입력되지 않았습니다.");
        if (taxinvoice == null)
            throw new PopbillException(-99999999, "세금계산서 정보가 입력되지 않았습니다.");

        String PostData = toJsonString(taxinvoice);

        return httppost("/Taxinvoice/" + KeyType.name() + "/" + MgtKey,
                CorpNum, PostData, UserID, "PATCH", Response.class);
    }
1372377
def _AddCampaignsToGroup(client, campaign_group_id, campaign_ids):
  
  # Get the CampaignService.
  campaign_service = client.GetService('CampaignService', version='v201809')

  # Create the operations.
  operations = [{
      'operator': 'SET',
      'operand': {
          'id': campaign_id,
          'campaignGroupId': campaign_group_id
      }
  } for campaign_id in campaign_ids]

  campaign_service.mutate(operations)

  # Display the results.
  print ('The following campaign IDs were added to the campaign group with ID '
         '"%d":\n\t%s' % (campaign_group_id, campaign_ids))