本文整理汇总了PHP中t1函数的典型用法代码示例。如果您正苦于以下问题:PHP t1函数的具体用法?PHP t1怎么用?PHP t1使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了t1函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: print_checker_results
function print_checker_results()
{
global $config, $lang;
$aspell_err = "";
if ($config['pspell'] == 'pspell') {
include 'classes/spellchecker/pspell.class.php';
} elseif ($config['pspell'] == 'mysql') {
include 'classes/spellchecker/mysql.class.php';
global $db;
$path = $db;
} else {
include 'classes/spellchecker/php.class.php';
$path = 'classes/spellchecker/dict/';
}
$sc = new spellchecker($lang->phrase('spellcheck_dict'), $config['spellcheck_ignore'], $config['spellcheck_mode'], TRUE);
if (isset($path)) {
$sc->set_path($path);
}
$sc->init();
$x = $sc->error();
if (!empty($x)) {
$aspell_err .= $sc->error();
} else {
$count = count($_POST['textinputs']);
for ($i = 0; $i < $count; $i++) {
$text = @utf8_decode(urldecode($_POST['textinputs'][$i]));
$lines = explode("\n", $text);
print_textindex_decl($i);
$index = 0;
foreach ($lines as $value) {
$b1 = t1();
$mistakes = $sc->check_text($value);
$suggestions = $sc->suggest_text($mistakes);
foreach ($mistakes as $word) {
print_words_elem($word, $index, $i);
print_suggs_elem($suggestions[$word], $index, $i);
$index++;
}
}
}
}
if (!empty($aspell_err)) {
$aspell_err = "Error executing {$config['pspell']}:\\n{$aspell_err}";
error_handler($aspell_err);
}
@file_put_contents('temp/spellchecker_benchmark.dat', $sc->benchmark());
}
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:47,代码来源:function.php
示例2: error_reporting
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
error_reporting(E_ALL);
DEFINE('SCRIPTNAME', 'images');
define('VISCACHA_CORE', '1');
include "data/config.inc.php";
include "classes/function.viscacha_frontend.php";
$zeitmessung1 = t1();
$slog = new slog();
$my = $slog->logged();
$my->p = $slog->Permissions();
$lang->init($my->language);
function ImageHexColorAllocate(&$image, $string)
{
sscanf($string, "%2x%2x%2x", $red, $green, $blue);
return ImageColorAllocate($image, $red, $green, $blue);
}
($code = $plugins->load('images_start')) ? eval($code) : null;
if ($_GET['action'] == 'vote') {
$result = $db->query('
SELECT id, topic, posts, sticky, status, last, board, vquestion, prefix
FROM ' . $db->pre . 'topics
WHERE id = ' . $_GET['id'] . '
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:30,代码来源:images.php
示例3: index
//.........这里部分代码省略.........
}
function stddev1($array)
{
//Don Knuth is the $deity of algorithms
//http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#III._On-line_algorithm
$n = 0;
$mean = 0;
$M2 = 0;
foreach ($array as $x) {
$n++;
$delta = $x - $mean;
$mean = $mean + $delta / $n;
$M2 = $M2 + $delta * ($x - $mean);
}
$variance = $M2 / ($n - 1);
return sqrt($variance);
}
function stddev2($array)
{
//Don Knuth is the $deity of algorithms
//http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#III._On-line_algorithm
$n = 0;
$mean = 0;
$M2 = 0;
foreach ($array as $x) {
$n++;
$delta = $x - $mean;
$mean = $mean + $delta / $n;
$M2 = $M2 + $delta * ($x - $mean);
}
$variance = $M2 / ($n - 1);
return sqrt($variance);
}
function t1($val, $min, $max)
{
return $val >= $min && $val <= $max;
}
function powfn($para)
{
return $para * $para;
}
function powfn4($para)
{
return $para * $para * $para * $para;
}
if (isset($this->request->data['step1']['no_runs'])) {
//$aaaaaa = array();
// Twin FOR
for ($j = 1; $j <= 15; $j++) {
$arr1 = array();
//array_unique
$summed_val_m = 0;
$array_sd_m = array();
$sd_m = 0;
$mean_m = 0;
// Data Pack
//$uncert_data_pack = datapack($this->request->data['step1']['temp'.$j],$this->request->data['step1']['uncertainty'.$j.'_val']);
for ($i = 1; $i <= 15; $i++) {
if (isset($this->request->data['step1']['m' . $j . '_' . $i . ''])) {
$summed_val_m = $summed_val_m + $this->request->data['step1']['m' . $j . '_' . $i . ''];
$array_sd_m[] = $this->request->data['step1']['m' . $j . '_' . $i . ''];
}
}
//pr($array_sd_m); exit;
$this->request->data['step1']['m' . $j . '_12'] = $sd_m = stddev($array_sd_m);
$this->request->data['step1']['m' . $j . '_13'] = $sd_m / sqrt($this->request->data['step1']['no_runs']);
开发者ID:ArunPrasaath,项目名称:bs,代码行数:67,代码来源:CertificatesController.php
示例4: t1
<?php
const a = 10;
function t1($a = 1 + 1, $b = 1 << 2, $c = "foo" . "bar", $d = a * 10)
{
var_dump($a, $b, $c, $d);
}
t1();
开发者ID:badlamer,项目名称:hhvm,代码行数:8,代码来源:function_arguments_003.php
示例5: t
echo '<br/>-#-#-#-#-#-#-#<br/>';
//026
function t($a)
{
$a += 1;
}
$b = 3;
t($b);
echo 'transfer value in function: ', $b;
echo '<br/>';
function t1(&$a)
{
$a += 1;
}
$b = 3;
t1($b);
echo 'reference value in function: ', $b;
echo '<br/>-#-#-#-#-#-#-#<br/>';
//028
$GLOBALS['var1'] = 5;
$var2 = 1;
function get_value()
{
global $var2;
$var1 = 0;
return $var2++;
}
get_value();
echo 'Display on screen: ';
echo $var1 . "\n";
echo $var2;
开发者ID:N9dZ,项目名称:www,代码行数:31,代码来源:001.php
注:本文中的t1函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论