如何close issue
指令有createIssue,但卻沒有close issue這指令
看了官網提的,應該是用progressWorkflowAction中的參數action將設為close
以下是官網的範例,用ruby寫的 # Close the issue with a resolution of "Fixed".
action = "2" # 2 = "Close". Note how this is actually a string, not an integer.
resolution_type = "1" # 1 = "Fixed". Also a string.
issue = soap.progressWorkflowAction(token, issue.key, action, [{ :id => "resolution", :values => resolution_type }])
判斷是否正確 $captcha = $request->getPost('captcha');
$captchaId = $captcha['id'];
// And here's the user submitted word...
$captchaInput = $captcha['input'];
// We are accessing the session with the corresponding namespace
// Try overwriting this, hah!
$captchaSession = new Zend_Session_Namespace('Zend_Form_Captcha_'.$captchaId);
// To access what's inside the session, we need the Iterator
// So we get one...
$captchaIterator = $captchaSession->getIterator();
// And here's the correct word which is on the image...
$captchaWord = $captchaIterator['word'] ;
// Now just compare them...
if ($captchaInput == $captchaWord)
echo "valid";
else
echo "invalid";
圖文表示
ex.
注意事項
要給ttf字型檔
$this->view->captcha = new Zend_Form_Element_Captcha(
'captcha', // This is the name of the input field
array('label' => 'Write the chars to the field',
'captcha' => array( // Here comes the magic...
// First the type...
'captcha' => 'Image',
// Length of the word...
'wordLen' => 4,
// Captcha timeout, 5 mins
'timeout' => 300,
// What font to use...
'font' => 'captcha/arial.ttf',
// Where to put the image
'imgDir' => 'captcha/tmp/',
//<img src="?" > 的位置
'imgUrl' => 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl() . '/captcha/tmp/'
)
)
);
不要點及線只要在建構子下... $captcha = new Zend_Form_Element_Captcha(
'captcha', // This is the name of the input field
array(
...
'lineNoiseLevel' => 0,
'dotNoiseLevel' => 0,
...
)
)
);
如果不要扭曲的字型,那就把_generateImage方法的內容改成以下程式碼 protected function _generateImage($id, $word)
{
if (!extension_loaded("gd")) {
require_once 'Zend/Captcha/Exception.php';
throw new Zend_Captcha_Exception("Image CAPTCHA requires GD extension");
}
if (!function_exists("imagepng")) {
require_once 'Zend/Captcha/Exception.php';
throw new Zend_Captcha_Exception("Image CAPTCHA requires PNG support");
}
if (!function_exists("imageftbbox")) {
require_once 'Zend/Captcha/Exception.php';
throw new Zend_Captcha_Exception("Image CAPTCHA requires FT fonts support");
}
$font = $this->getFont();
if (empty($font)) {
require_once 'Zend/Captcha/Exception.php';
throw new Zend_Captcha_Exception("Image CAPTCHA requires font");
}
Every day, a small ant arrives at work very early and starts work immediately.
每天,小螞蟻很早來上工,並且一來就開始做事。
She produces a lot was happy.
她的生產力很高,並且工作愉快。
The Chief, a lion,
was surprised to see that the ant was working without supervision.
身為老闆的獅子,非常驚奇螞蟻能自行工作而不須監督。
He thought if the ant can produce so much without supervision, wouldn’t she produce even more if she had a supervisor!
他認為在沒有監督下的螞蟻生產力是如此的好,如果有人監督的話她的生產力應該會更好才對!
So he recruited a cockroach
who had extensive experience as supervisor and who was famous for writing excellent reports.
因此他招募了有豐富經驗的蟑螂作為監督員,蟑螂以擅長撰寫優良報告而聞名。
The cockroach’s first decision was to set up a clocking in attendance system.
蟑螂的第一個決定是設立了打卡計時系統。
He also needed a secretary to help him write and type his reports and …
他也需要一個秘書幫助他繕寫和鍵入報告和……
... he recruited a spider, who managed the archives and monitored all phone calls.
他招募了蜘蛛,負責管理檔案和監管所有電話。
The lion was delighted with the cockroach's reports
and asked him to produce graphs to describe production rates and to analyse trends, so that he could use them for presentations at Board‘s meetings.
獅子對蟑螂的報告非常高興並要求他用圖表描述生產率和分析趨勢變化,因而他能在董事會上用這些資料來報告。
So the cockroach had to buy a new computer and a laser printer and ...
因此蟑螂必須買一臺新的電腦和雷射印表機和…
... recruited a fly
to manage the IT department.
.. 並招募蒼蠅來管理資訊部門。
The ant, who had once been so productive and relaxed, hated this new plethora of paperwork and meetings which used up most of her time…!
曾經是很有生產力和輕鬆的螞蟻,恨透了這些耗盡她大多數時間的過多文書作業和會議…!
The lion came to the conclusion that it was high time to nominate a person in charge of the department where the ant worked.
獅子做出結論這是提名螞蟻工作部門負責人的時候了。
The position was given to the cicada, whose first decision was to buy a carpet and an ergonomic chair for his office.
這個位置被賦予給了蟬,蟬的第一個決定是為他的辦公室買一張地毯和一把符合人體工學的椅子。
The new person in charge, the cicada, also needed a computer and a personal assistant, who he brought from his previous department, to help him prepare a Work and Budget Control Strategic Optimisation Plan …
新的人負責,蟬,也需要一部電腦和一位從他原先部門帶來的個人助理,來幫助他準備工作和預算控制策略優化計劃…
The Department where the ant works is now a sad place, where nobody laughs anymore and everybody has become upset...
螞蟻工作的部門現在是一個哀傷的地方,不再有人會笑,而且大家變得抓狂…
It was at that time that the cicada convinced the boss , the lion, of the absolute necessity to start a climatic study of the environment .
就是那時蟬說服獅子上司,強調要開始進行組織氣候調查的绝對必要性。
Having reviewed the charges for running the ant’s department , the lion found out that the production was much less than before.
在審查了螞蟻的部門運作費用後,獅子發現生產力比以前大幅減少。
So he recruited the owl , a prestigious and renowned consultant to carry out an audit and suggest solutions.
所以他招募了貓頭鷹,一位有名望和顯耀的顧問來執行稽核工作並建議解決之道。
The owl spent three months in the department and came up with an enormous report , in several volumes,
that concluded :
“ The department is overstaffed ...”
貓頭鷹在部門待了三個月並且產生了一份有數冊之多的巨大的報告,結論是:「部門成員人數過多…」
Guess who the lion fires first?
猜猜獅子首先解雇誰?
The ant , of course, because she
“showed lack of motivation and had a negative attitude".
當然,是螞蟻,因為她「顯現出缺乏做事的動機並且態度消極」。
The characters in this fable are fictitious; any resemblance to real people or facts within the Corporation is pure coincidence…
這個寓言裡的人物是虛擬的; 若與公司內部任何的人物或情事雷同係純屬巧合
dynamically load jquery if 'jQuery' does not exist function initJQuery() { //if the jQuery object isn't available
if (typeof(jQuery) == 'undefined') {
if (typeof initJQuery.jQueryScriptOutputted == 'undefined') { //only output the script once..
initJQuery.jQueryScriptOutputted = true; //output the script (load it from google api)
document.write("");
}
setTimeout("initJQuery()", 50);
} else {
(function($){ // CLOSURE -> save to use $
$.fn.foo = function(input) {
alert("foo:" + input) ;
} ;
})(jQuery) ;
}
window.onload = function() {
$('body').foo("bar") ; // won't necessarily fire if jQuery loads after document load
}
}
initJQuery();
PHP is a _____ scripting language based on the ____ engine. It is primarily used to
develop dynamic _____ content, although it can be used to generate ____ documents
(among others) as well.
A.Dynamic, PHP, Database, HTML
B.Embedded, Zend, HTML, XML
C.Perl-based, PHP, Web, Static
D.Embedded, Zend, Docbook, MySQL
E.Zend-based, PHP, Image, HTML
Result: B
Looking at the answers, the only one that makes sense for every blank is B. PHP is a
scripting language based on the Zend Engine that is usually embedded in HTML code. As
such, it is primarily used to develop HTML documents, although it can be used just as nicely to develop other types of documents, such as XML.
16.Under what circumstance is it impossible to assign a default value to a parameter while declaring a function?
A.When the parameter is Boolean
B.When the function is being declared as a member of a class
C.When the parameter is being declared as passed by reference
D.When the function contains only one parameter
E.Never
Answer:
When a parameter is declared as being passed by reference you cannot specify a default
value for it, since the interpreter will expect a variable that can be modified from within the
function itself. Therefore, Answer C is correct.
17.The ____ operator returns True if either of its operands can be evaluated as True, but not both.
Answer: xor
用法$result = ($A xor $B);
19. Which of the following expressions multiply the value of the integer variable $a by 4?
(Choose 2)
$a *= pow (2, 2);
$a >>= 2;
$a <<= 2;
$a += $a + $a;
None of the above
Result: A,C 嗯 是往左... 我怎麼會想成往右...