100+ results for 'php ceil'

Not the results you expected?

tax_class.php (https://bitbucket.org/mjalajel/opencart.git) PHP · 413 lines

1 <?php

2 class ControllerLocalisationTaxClass extends Controller {

3 private $error = array();

244 $this->data['pagination'] = $pagination->render();

245

246 $this->data['results'] = sprintf($this->language->get('text_pagination'), ($tax_class_total) ? (($page - 1) * $this->config->get('config_admin_limit')) + 1 : 0, ((($page - 1) * $this->config->get('config_admin_limit')) > ($tax_class_total - $this->config->get('config_admin_limit'))) ? $tax_class_total : ((($page - 1) * $this->config->get('config_admin_limit')) + $this->config->get('config_admin_limit')), $tax_class_total, ceil($tax_class_total / $this->config->get('config_admin_limit')));

247

248 $this->data['sort'] = $sort;

PaginatedList.php (https://github.com/sminnee/silverstripe-framework.git) PHP · 420 lines

1 <?php

2 /**

3 * A decorator that wraps around a data list in order to provide pagination.

329 */

330 public function TotalPages() {

331 return ceil($this->getTotalItems() / $this->pageLength);

332 }

333

BaseDrawing.php (https://github.com/markn86/moodle.git) PHP · 532 lines

1 <?php

2

3 namespace PhpOffice\PhpSpreadsheet\Worksheet;

4

5 use PhpOffice\PhpSpreadsheet\Cell\Hyperlink;

6 use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException;

7 use PhpOffice\PhpSpreadsheet\IComparable;

209 {

210 if ($this->worksheet === null) {

211 // Add drawing to \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

212 $this->worksheet = $pValue;

213 $this->worksheet->getCell($this->coordinates);

230 $this->setWorksheet($pValue);

231 } else {

232 throw new PhpSpreadsheetException('A Worksheet has already been assigned. Drawings can only exist on one \\PhpOffice\\PhpSpreadsheet\\Worksheet.');

233 }

234 }

CreationMinerais.php (https://github.com/albeneth/braldahim.git) PHP · 340 lines

1 <?php

2

3 /**

231 if ($z["id_fk_environnement_zone"] == $c["id_fk_environnement_creation_minerais"]) {

232 $tmp = "";

233 $nbCreation = ceil($t["nb_creation_type_minerai"] * ($superficieZones[$z["id_zone"]] / $superficieTotale[$c["id_fk_type_minerai_creation_minerais"]]));

234 $nbActuel = $filonTable->countVue($z["x_min_zone"], $z["y_min_zone"], $z["x_max_zone"], $z["y_max_zone"], $zposition, $t["id_type_minerai"]);

235

weight_class.php (https://gitlab.com/dadangnh/sb1-bon) PHP · 401 lines

1 <?php

2 class ControllerLocalisationWeightClass extends Controller {

3 private $error = array();

251 $data['pagination'] = $pagination->render();

252

253 $data['results'] = sprintf($this->language->get('text_pagination'), ($weight_class_total) ? (($page - 1) * $this->config->get('config_limit_admin')) + 1 : 0, ((($page - 1) * $this->config->get('config_limit_admin')) > ($weight_class_total - $this->config->get('config_limit_admin'))) ? $weight_class_total : ((($page - 1) * $this->config->get('config_limit_admin')) + $this->config->get('config_limit_admin')), $weight_class_total, ceil($weight_class_total / $this->config->get('config_limit_admin')));

254

255 $data['sort'] = $sort;

message.php (https://github.com/4260/OpenPNE2.git) PHP · 1044 lines

1 <?php

2 /**

3 * @copyright 2005-2008 OpenPNE Project

4 * @license http://www.php.net/license/3_01.txt PHP License 3.01

5 */

6

109

110 if ($total_num != 0) {

111 $total_page_num = ceil($total_num / $page_size);

112 if ($page >= $total_page_num) {

113 $next = false;

165

166 if ($total_num != 0) {

167 $total_page_num = ceil($total_num / $page_size);

168 if ($page >= $total_page_num) {

169 $next = false;

contact.modul.php (https://github.com/pschichtel/Infected-CMS.git) PHP · 302 lines

1 <?php

2 realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME']) and die('<strong>Access denied!</strong>');

3 if (!user::loggedIn())

244 $result = $db->GetData($query);

245 $rows = $db->CountTable('contact');

246 $pages_count = ceil($rows / PAGELEN);

247 $pages_count = ($pages_count == 0 ? 1 : $pages_count);

248

glsl.std450.comp (https://gitlab.com/JFT/Irrlicht_extended) GLSL · 282 lines

201 _19.ires = sign(_19.s32.x);

202 _19.res = floor(_19.f32.x);

203 _19.res = ceil(_19.f32.x);

204 _19.res = fract(_19.f32.x);

205 _19.res = radians(_19.f32.x);

class-wp-walker.php (https://gitlab.com/sihabudinahmad/asppi) PHP · 425 lines

1 <?php

2 /**

3 * A class for displaying various tree-like structures.

301 $end = $start + $per_page;

302 if ( -1 == $max_depth )

303 $this->max_pages = ceil($total_top / $per_page);

304 }

305

341 $total_top = count( $top_level_elements );

342 if ( $paging )

343 $this->max_pages = ceil($total_top / $per_page);

344 else

345 $end = $total_top;

string.lisp (https://github.com/froggey/Mezzano.git) Lisp · 219 lines

48 new-tag

49 len

50 (ceiling (* len elt-size) 8)

51 (if (wiredp old-storage) :wired nil))))

52 (dotimes (i len)

129 tag

130 len

131 (ceiling (* len elt-size) 8)

132 area))

133 (new-header (mezzano.runtime::%allocate-object

169 tag

170 len

171 (ceiling (* len elt-size) 8)

172 :wired))

173 (header (mezzano.runtime::%allocate-object

stack-modified.2asm.js (https://github.com/strongcourage/fuzzing-corpus.git) JavaScript · 396 lines

16 var Math_max = global.Math.max;

17 var Math_floor = global.Math.floor;

18 var Math_ceil = global.Math.ceil;

19 var Math_sqrt = global.Math.sqrt;

20 var abort = env.abort;

tsp.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 270 lines

263 <KEYWORD2>miss</KEYWORD2>

264 <KEYWORD2>int</KEYWORD2>

265 <KEYWORD2>ceil</KEYWORD2>

266 <KEYWORD2>round</KEYWORD2>

267 </KEYWORDS>

IntlAttribute.cs (https://github.com/ServiceStack/ServiceStack.git) C# · 216 lines

130 public enum CurrencySign { Undefined=0, Accounting, Standard, }

131 public enum SignDisplay { Undefined=0, Always, Auto, ExceptZero, Negative, Never, }

132 public enum RoundingMode { Undefined=0, Ceil, Floor, Expand, Trunc, HalfCeil, HalfFloor, HalfExpand, HalfTrunc, HalfEven, }

133

134 public static class NumberCurrency

163 public const string ILS = nameof(ILS);

164 public const string CLP = nameof(CLP);

165 public const string PHP = nameof(PHP);

166 public const string AED = nameof(AED);

167 public const string COP = nameof(COP);

item.php (https://github.com/lysender/simplestore.git) PHP · 418 lines

1 <?php defined('SYSPATH') or die('No direct script access.');

2

3 /**

28 * Initialize

29 *

30 * (non-PHPdoc)

31 * @see modules/sprig/classes/sprig/Sprig_Core::_init()

32 */

78 * Creates a new category

79 *

80 * (non-PHPdoc)

81 * @see modules/sprig/classes/sprig/Sprig_Core::create()

82 */

101 * Updates category

102 *

103 * (non-PHPdoc)

104 * @see modules/sprig/classes/sprig/Sprig_Core::update()

105 */

helpers.php (https://gitlab.com/ahmad.jamal/sally) PHP · 174 lines

1 <?php // Code within app\Helpers\Helper.php

2

3 namespace App\Helpers;

43 ];

44

45 // if any key missing of array from custom.php file it will be merge and set a default value from dataDefault array and store in data variable

46 $data = array_merge($DefaultData, $data);

47

68 ];

69

70 //if mainLayoutType value empty or not match with default options in custom.php config file then set a default value

71 foreach ($allOptions as $key => $value) {

72 if (array_key_exists($key, $DefaultData)) {

166

167 $fullStarCount = (int)$rating;

168 $halfStarCount = ceil($rating) - $fullStarCount;

169 $emptyStarCount = $maxRating - $fullStarCount - $halfStarCount;

170

category.tpl (https://github.com/justinmarsan/opencart-blank-theme.git) Smarty Template · 227 lines

7 <?php foreach ($breadcrumbs as $breadcrumb) { ?>

8 <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>

9 <?php } ?>

110 <?php } ?>

111 <div class="cart">

112 <a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><?php echo $button_cart; ?></a>

113 </div>

114 <div class="wishlist">

174 });

175

176 $('.display').html('<b><?php echo $text_display; ?></b> <?php echo $text_list; ?> <b>/</b> <a onclick="display(\'grid\');"><?php echo $text_grid; ?></a>');

177

178 $.cookie('display', 'list');

211 });

212

213 $('.display').html('<b><?php echo $text_display; ?></b> <a onclick="display(\'list\');"><?php echo $text_list; ?></a> <b>/</b> <?php echo $text_grid; ?>');

214

215 $.cookie('display', 'grid');

Paginator.php (https://github.com/jitamin/jitamin.git) PHP · 496 lines

1 <?php

2

3 /*

244 public function getPageTotal()

245 {

246 return ceil($this->getTotal() / $this->getMax());

247 }

248

LdapIdentityDelegateServiceImpl.java (https://github.com/sbower/kuali-rice-1.git) Java · 196 lines

6 * You may obtain a copy of the License at

7 *

8 * http://www.opensource.org/licenses/ecl2.php

9 *

10 * Unless required by applicable law or agreed to in writing, software

22 import org.apache.commons.collections.CollectionUtils;

23 import org.apache.commons.lang.StringUtils;

24 import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;

25 import org.kuali.rice.kim.api.identity.entity.Entity;

26 import org.kuali.rice.kim.api.identity.entity.EntityDefault;

46 public Entity getEntity(String entityId) {

47 if (StringUtils.isBlank(entityId)) {

48 throw new RiceIllegalArgumentException("entityId is blank");

49 }

50

ada95.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 225 lines

49 <SEQ TYPE="KEYWORD3">'callable</SEQ>

50 <SEQ TYPE="KEYWORD3">'caller</SEQ>

51 <SEQ TYPE="KEYWORD3">'ceiling</SEQ>

52 <SEQ TYPE="KEYWORD3">'class</SEQ>

53 <SEQ TYPE="KEYWORD3">'component_size</SEQ>

return_status.php (https://gitlab.com/reclamare/mao) PHP · 375 lines

1 <?php

2 class ControllerLocalisationReturnStatus extends Controller {

3 private $error = array();

245 $data['pagination'] = $pagination->render();

246

247 $data['results'] = sprintf($this->language->get('text_pagination'), ($return_status_total) ? (($page - 1) * $this->config->get('config_limit_admin')) + 1 : 0, ((($page - 1) * $this->config->get('config_limit_admin')) > ($return_status_total - $this->config->get('config_limit_admin'))) ? $return_status_total : ((($page - 1) * $this->config->get('config_limit_admin')) + $this->config->get('config_limit_admin')), $return_status_total, ceil($return_status_total / $this->config->get('config_limit_admin')));

248

249 $data['sort'] = $sort;

BufferQueue.js (https://gitlab.com/zhidazhang/webActivity) JavaScript · 430 lines

154 if (ret == 0) {

155 if(pack.getTs() == 0)

156 pack.setTs(Math.ceil((new Date()).getTime()/1000));

157

158 if(this._callback)

mailDelivery.js (https://github.com/doramart/DoraCMS.git) JavaScript · 369 lines

117 }

118

119 let sendNum = Math.ceil(allUserCount / skipCount);

120 let allUserIdArr = [];

121 let allEmailArr = [];

admin_frm_sanpham.php (https://gitlab.com/Johnxim/ptdapm) PHP · 147 lines

1 <?php

2 require_once("server.php");

98 $row=mysqli_fetch_array($rs);//Cấu trúc mysqli_fetch_array(result,resulttype)

99 $jsonData['total'] =(int)$row['total'];

100 $jsonData['totalpage'] =ceil($row['total']/$record);

101 $jsonData['page'] =(int)$page;

102 $jsonData['items'] =$mang;

2011-12-05-big-graph.html (https://bitbucket.org/angelcabo/dfilm_ui.git) HTML · 196 lines

95 groupLen = group.length;

96 // make groups look nice, by limiting rows, makes for blockier blocks

97 groupMaxRows = groupLen / Math.ceil( groupLen / bigGraphOpts.maxRows );

98

99 $.each( group, function( i, elem ) {

145

146 while (i--) {

147 projects.push( makeBigGraphProject() );

148 }

149

split_page_results.php (https://github.com/yama/zencart1302-ja-yama.git) PHP · 158 lines

1 <?php

2 /**

3 * split_page_results Class.

7 * @copyright Portions Copyright 2003 osCommerce

8 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

9 * @version $Id: split_page_results.php 3041 2006-02-15 21:56:45Z wilt $

10 */

11 if (!defined('IS_ADMIN_FLAG')) {

74 $this->number_of_rows = $count->fields['total'];

75

76 $this->number_of_pages = ceil($this->number_of_rows / $this->number_of_rows_per_page);

77

78 if ($this->current_page_number > $this->number_of_pages) {

uservip.php (https://bitbucket.org/kanetnguyen/aan.provider.git) PHP · 186 lines

1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

2

3 class Uservip extends CI_Controller {

96 if($total>0)

97 {

98 $count_page = ceil($total / $numrow);

99 if($page_tamp < 0) $page = 1;

100 else if($page_tamp > $count_page) $page =$count_page;

137 $total = $this->Modelusers->sumif("publish < 2 and vip = 1");

138 if($total > 0)

139 $count_page = ceil($total / $numrow); // Lay so Nguyen Lam tron

140 $data = array();

141 if($_POST['page'] < 0) $page = 1;

150 $total=$this->Modelusers->sumif($str);

151 if($total > 0)

152 $count_page = ceil($total / $numrow); // Lay so Nguyen Lam tron

153 $data = array();

154 if($_POST['page'] < 0) $page = 1;

Core.php (https://gitlab.com/billyprice1/bdApi) PHP · 181 lines

1 <?php

2

3 class bdApi_Data_Helper_Core

76 }

77

78 $pageNav['pages'] = ceil($totalItems / $perPage);

79

80 if ($pageNav['pages'] <= 1) {

SPageSelector.php (https://bitbucket.org/gbili/gfw.git) PHP · 313 lines

1 <?php

2 namespace Gbili\Navigation;

3

250 $html = '';

251

252 $totalAmountOfPages = ceil($this->getNumberItemsInBook() / $this->getNumberOfItemsPerPage());

253

254 /*

NodePathIteratorTest.php (https://github.com/wjzijderveld/jackalope.git) PHP · 176 lines

1 <?php

2

3 namespace Jackalope;

6 {

7 /**

8 * @var ObjectManager|\PHPUnit_Framework_MockObject_MockObject

9 */

10 private $objectManager;

31 {

32 $me = $this;

33 $nbBatches = (integer) ceil(count($paths) / $batchSize);

34 $this->objectManager->expects($this->exactly($nbBatches))

35 ->method('getNodesByPathAsArray')

logarithmic.php (https://bitbucket.org/ericsagnes/ezpublish-multisite.git) PHP · 341 lines

1 <?php

2 /**

3 * File containing the ezcGraphChartElementLogarithmicalAxis class

218 if ( $this->properties['max'] === null )

219 {

220 $this->properties['max'] = ceil( log( $this->properties['maxValue'], $this->properties['base'] ) );

221 }

222

224 if ( ( $modifier = ( ( $this->properties['max'] - $this->properties['min'] ) / self::MAX_STEPS ) ) > 1 )

225 {

226 $this->properties['majorStep'] = $modifier = ceil( $modifier );

227 $this->properties['min'] = floor( $this->properties['min'] / $modifier ) * $modifier;

228 $this->properties['max'] = floor( $this->properties['max'] / $modifier ) * $modifier;

BigFloatTest.class.php (https://github.com/ghiata/xp-framework.git) PHP · 325 lines

1 <?php namespace net\xp_framework\unittest\math;

2

3 use unittest\TestCase;

220

221 #[@test]

222 public function ceil() {

223 $this->assertEquals(new BigFloat(5.0), create(new BigFloat(4.5))->ceil());

225

226 #[@test]

227 public function ceilInt() {

228 $this->assertEquals(new BigFloat(4.0), create(new BigFloat(4.0))->ceil());

230

231 #[@test]

232 public function ceilClose() {

233 $this->assertEquals(new BigFloat(10.0), create(new BigFloat(9.999))->ceil());

Model-suite.js (git://github.com/petermichaux/maria.git) JavaScript · 408 lines

330

331

332 "test maria.mixinNumberAttribute ceil": function () {

333 var m = new maria.Model();

334 maria.mixinNumberAttribute(m, 'height', {

335 'default': 123,

336 ceil: true,

337 integer: true

338 });

materials.php (https://gitlab.com/kidaa/quantum.git) PHP · 193 lines

1 <?php

2

3 class Materials extends QModule {

149 $all_vals = 0;

150 }

151 return ceil($all_vals / $limit);

152 }

153

Paginator.php (https://bitbucket.org/ndj/piecrust.git) PHP · 350 lines

1 <?php

2

3 namespace PieCrust\Page;

165 $postsPerPage = $this->posts_per_page();

166 if (is_int($postsPerPage) && $postsPerPage > 0)

167 return ceil($totalPostCount / $postsPerPage);

168 return $totalPostCount;

169 }

montage.c (https://github.com/trevor/ImageMagick.git) C · 139 lines

24 % obtain a copy of the License at %

25 % %

26 % http://www.imagemagick.org/script/license.php %

27 % %

28 % Unless required by applicable law or agreed to in writing, software %

132 (void) fprintf(stderr,"Performance: %lui %gips %0.3fu %ld:%02ld\n",

133 iterations,1.0*iterations/elapsed_time,user_time,(long)

134 (elapsed_time/60.0+0.5),(long) ceil(fmod(elapsed_time,60.0)));

135 }

136 exception=DestroyExceptionInfo(exception);

IndexAction.class.php (https://gitlab.com/llwhois/woaimm) PHP · 227 lines

1 <?php

2 class IndexAction extends Action {

3 protected function _initialize(){

63 $pageSize = 40;

64 $DataCount = $db->where($where)->count();

65 $maxPage = ceil($DataCount/$pageSize);

66 $page = $page>$maxPage?1:$page;

67

110

111 if($DataCount){

112 $maxPage = ceil($DataCount/$pageSize);

113 $page = $page>$maxPage?1:$page;

114 $pageLink = get_url_search($keyword,'[page]');

154 $where = array('tid'=>array('eq',$tags['id']));

155 $DataCount = $db->where($where)->count();

156 $maxPage = ceil($DataCount/$pageSize);

157 $page = $page>$maxPage?1:$page;

158

customer_group.php (https://gitlab.com/hazelnuts23/unitedfoodstuff) PHP · 406 lines

1 <?php

2 class ControllerSaleCustomerGroup extends Controller {

3 private $error = array();

248 $data['pagination'] = $pagination->render();

249

250 $data['results'] = sprintf($this->language->get('text_pagination'), ($customer_group_total) ? (($page - 1) * $this->config->get('config_limit_admin')) + 1 : 0, ((($page - 1) * $this->config->get('config_limit_admin')) > ($customer_group_total - $this->config->get('config_limit_admin'))) ? $customer_group_total : ((($page - 1) * $this->config->get('config_limit_admin')) + $this->config->get('config_limit_admin')), $customer_group_total, ceil($customer_group_total / $this->config->get('config_limit_admin')));

251

252 $data['sort'] = $sort;

Pager.php (https://gitlab.com/crazybutterfly815/magento2) PHP · 279 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

153 *

154 * @return bool

155 * @SuppressWarnings(PHPMD.BooleanGetMethodName)

156 */

157 public function getLastPageNum()

158 {

159 if (null === $this->_lastPage) {

160 $this->_lastPage = ceil($this->getCollectionSize() / $this->getLimit());

161 if ($this->_lastPage <= 0) {

162 $this->_lastPage = 1;

197 $pages = range(1, $this->getLastPageNum());

198 } else {

199 $half = ceil($this->_displayPages / 2);

200 if ($this->getCurrentPage() >= $half && $this->getCurrentPage() <= $this->getLastPageNum() - $half) {

201 $start = $this->getCurrentPage() - $half + 1;

AzureStorage.php (https://code.google.com/p/celebrio/) PHP · 252 lines

1 <?php

2

3 namespace Celebrio\FileSystem\Drivers;

106 try {

107 AzureStorageBLOB::connection()->createContainerIfNotExists($container);

108 $numOfBlocks = ceil (\strlen($dataFile->getData()) / self::MAX_BLOCK_SIZE);

109 $indexes = $this->getIndexes($numOfBlocks);

110

BaseDrawing.php (https://bitbucket.org/kudutest1/moodlegit.git) PHP · 485 lines

22 * @package PHPExcel_Worksheet

23 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version ##VERSION##, ##DATE##

34 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

35 */

36 class PHPExcel_Worksheet_BaseDrawing implements PHPExcel_IComparable

37 {

38 /**

216 * @return PHPExcel_Worksheet_BaseDrawing

217 */

218 public function setWorksheet(PHPExcel_Worksheet $pValue = null, $pOverrideOld = false) {

219 if (is_null($this->_worksheet)) {

220 // Add drawing to PHPExcel_Worksheet

238 $this->setWorksheet($pValue);

239 } else {

240 throw new Exception("A PHPExcel_Worksheet has already been assigned. Drawings can only exist on one PHPExcel_Worksheet.");

241 }

242 }

s-taprob.adb (https://gitlab.com/adotout/gcc) Ada · 267 lines

122 Write_Lock (Object.L'Access, Ceiling_Violation);

123

124 if Ceiling_Violation then

125 raise Program_Error;

126 end if;

246 -- priority if it has been changed.

247

248 if Object.New_Ceiling /= Object.Ceiling then

249 if Locking_Policy = 'C' then

250 System.Task_Primitives.Operations.Set_Ceiling

252 end if;

253

254 Object.Ceiling := Object.New_Ceiling;

255 end if;

256

category.php (https://gitlab.com/nezam.technovista/news-project-php) PHP · 103 lines

40 <div class="row">

41 <div class="col-md-4">

42 <a class="post-img" href="single.php?id=<?php echo $row["post_id"]; ?>"><img src="admin/upload/<?php echo $row["post_img"]; ?>" alt="" /></a>

43 </div>

44 <div class="col-md-8">

45 <div class="inner-content clearfix">

46 <h3><a href='single.php?id=<?php echo $row["post_id"]; ?>'><?php echo $row["title"]; ?></a></h3>

47 <div class="post-information">

48 <span>

52 <span>

53 <i class="fa fa-user" aria-hidden="true"></i>

54 <a href='author.php?aid=<?php echo $row["author"]; ?>'><?php echo $row["user_name"]; ?></a>

55 </span>

56 <span>

ObjectStaticTest.php (https://github.com/markjames/sapphire.git) PHP · 132 lines

1 <?php

2 /**

3 * Tests various static getter and setter methods on {@link Object}

64 );

65

66 // test the $ceiling param

67 $this->assertEquals (

68 array('test_2', 'test_3'), Object::combined_static('ObjectStaticTest_Combined3', 'first', 'ObjectStaticTest_Combined2')

pagination.php (https://github.com/pjwiseman/joomla-cms.git) PHP · 229 lines

1 <?php

2 /**

3 * @package Joomla.Site

105 if ($currentPage % $step == 0)

106 {

107 $range = ceil($currentPage / $step) + 1;

108 }

109 else

110 {

111 $range = ceil($currentPage / $step);

112 }

113 }

regs.h (https://github.com/KanjiMonster/bcm63xx.git) C Header · 196 lines

10 #define SYSCFG __REG_2700G(0x00000000)

11 #define PFBASE __REG_2700G(0x00000004)

12 #define PFCEIL __REG_2700G(0x00000008)

13 #define POLLFLAG __REG_2700G(0x0000000c)

14 #define SYSRST __REG_2700G(0x00000010)

PasoonDate.php (https://gitlab.com/ataiemajid_63/pasoon-date) PHP · 1275 lines

1 <?php

2

3 namespace Pasoon;

421 {

422 return ($day +

423 ceil(29.5 * ($month - 1)) +

424 ($year - 1) * 354 +

425 floor((3 + (11 * $year)) / 30) +

432 $jd = floor($jd) + 0.5;

433 $year = floor(((30 * ($jd - $this->ISLAMIC_EPOCH)) + 10646) / 10631);

434 $month = min(12, ceil(($jd - (29 + $this->toJulianDayNumber($year, 1, 1))) / 29.5) + 1);

435 $day = $jd - $this->toJulianDayNumber($year, $month, 1) + 1;

436 return [$year, $month, $day];

800 }

801 $yday = ($jd - $this->toJulianDayNumber($year, 1, 1)) + 1;

802 $month = ($yday <= 186) ? ceil($yday / 31) : ceil(($yday - 6) / 30);

803 $day = ($jd - $this->toJulianDayNumber($year, $month, 1)) + 1;

804 return [$year, $month, $day];

RoleTypeServiceBase.java (https://github.com/sbower/kuali-rice-1.git) Java · 249 lines

6 * You may obtain a copy of the License at

7 *

8 * http://www.opensource.org/licenses/ecl2.php

9 *

10 * Unless required by applicable law or agreed to in writing, software

17

18 import org.apache.commons.lang.StringUtils;

19 import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;

20 import org.kuali.rice.kim.api.role.Role;

21 import org.kuali.rice.kim.api.role.RoleMembership;

43 public boolean doesRoleQualifierMatchQualification(Map<String, String> qualification, Map<String, String> roleQualifier) {

44 if (qualification == null) {

45 throw new RiceIllegalArgumentException("qualification was null or blank");

46 }

47

math_functions.php (https://github.com/kamarulismail/kamarul-playground.git) PHP · 154 lines

1 <?php

2 /**

3 * File containing the ezcTemplateMathFunctions class

18 {

19 /**

20 * Translates a function used in the Template language to a PHP function call.

21 * The function call is represented by an array with three elements:

22 *

48 self::functionCall( "abs", array( "%val" ) ) );

49

50 // ceil( $v )::

51 // ceil( $v )

52 case "math_ceil": return array( array( "%val" ),

53 self::functionCall( "ceil", array( "%val" ) ) );

PgCacheFlush.php (https://github.com/sharpmachine/wakeupmedia.com.git) PHP · 440 lines

1 <?php

2

3 /**

5 */

6

7 require_once W3TC_LIB_W3_DIR . '/PgCache.php';

8

9 /**

12 class W3_PgCacheFlush extends W3_PgCache {

13 /**

14 * PHP5 Constructor

15 */

16 function __construct() {

19

20 /**

21 * PHP4 Constructor

22 */

23 function W3_PgCacheFlush() {

handlerJSONFacebook.js (https://github.com/davidsonfellipe/facebook-like-check.git) JavaScript · 181 lines

47 "use strict";

48 urls = encodeURIComponent(urls);

49 return "http://api.facebook.com/restserver.php?method=links.getStats&urls=%20" +

50 urls +

51 "&format=json&callback=handlerJSONFacebook";

67 getTableBaseOfLike();

68

69 var maxInterations = Math.ceil(response.query.results.urlset.url.length / URLS_PER_REQUESTS);

70 var totalResults = response.query.results.urlset.url.length;

71 var actualRange = 1;

141 getTableBaseOfLike();

142

143 var url = "http://api.facebook.com/restserver.php?method=links.getStats&urls=%20" + urls + "&format=json&callback=handlerJSONFacebook";

144

145 $(".loading").show();

P.hs (https://bitbucket.org/jmelo_lyncode/thesis.git) Haskell · 151 lines

111 toints rs = concatMap (\r -> [numerator r,denominator r]) rs

112 allints = (toints rps) ++ (toints rns)

113 logint x = ceiling(logBase 2 (1 + x))

114 logsum = sum $ map (\y -> logint (fromIntegral(y))) allints

115 in 20*n*n*(1+n) + 10*n*n*logsum

BaseDrawing.php (https://github.com/greevex/mzz-framework-blank-application.git) PHP · 485 lines

22 * @package PHPExcel_Worksheet

23 * @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.7.4, 2010-08-26

34 * @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)

35 */

36 class PHPExcel_Worksheet_BaseDrawing implements PHPExcel_IComparable

37 {

38 /**

216 * @return PHPExcel_Worksheet_BaseDrawing

217 */

218 public function setWorksheet(PHPExcel_Worksheet $pValue = null, $pOverrideOld = false) {

219 if (is_null($this->_worksheet)) {

220 // Add drawing to PHPExcel_Worksheet

238 $this->setWorksheet($pValue);

239 } else {

240 throw new Exception("A PHPExcel_Worksheet has already been assigned. Drawings can only exist on one PHPExcel_Worksheet.");

241 }

242 }

BaseDrawing.php (https://github.com/ashwanthkumar/webnaplo.git) PHP · 485 lines

22 * @package PHPExcel_Worksheet

23 * @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.7.6, 2011-02-27

34 * @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

35 */

36 class PHPExcel_Worksheet_BaseDrawing implements PHPExcel_IComparable

37 {

38 /**

216 * @return PHPExcel_Worksheet_BaseDrawing

217 */

218 public function setWorksheet(PHPExcel_Worksheet $pValue = null, $pOverrideOld = false) {

219 if (is_null($this->_worksheet)) {

220 // Add drawing to PHPExcel_Worksheet

238 $this->setWorksheet($pValue);

239 } else {

240 throw new Exception("A PHPExcel_Worksheet has already been assigned. Drawings can only exist on one PHPExcel_Worksheet.");

241 }

242 }

BaseDrawing.php (https://gitlab.com/rsilveira1987/Expresso) PHP · 485 lines

22 * @package PHPExcel_Worksheet

23 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.7.8, 2012-10-12

34 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

35 */

36 class PHPExcel_Worksheet_BaseDrawing implements PHPExcel_IComparable

37 {

38 /**

216 * @return PHPExcel_Worksheet_BaseDrawing

217 */

218 public function setWorksheet(PHPExcel_Worksheet $pValue = null, $pOverrideOld = false) {

219 if (is_null($this->_worksheet)) {

220 // Add drawing to PHPExcel_Worksheet

238 $this->setWorksheet($pValue);

239 } else {

240 throw new Exception("A PHPExcel_Worksheet has already been assigned. Drawings can only exist on one PHPExcel_Worksheet.");

241 }

242 }

BaseDrawing.php (https://github.com/andrerezende/SIE.git) PHP · 485 lines

22 * @package PHPExcel_Worksheet

23 * @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.7.5, 2010-12-10

34 * @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)

35 */

36 class PHPExcel_Worksheet_BaseDrawing implements PHPExcel_IComparable

37 {

38 /**

216 * @return PHPExcel_Worksheet_BaseDrawing

217 */

218 public function setWorksheet(PHPExcel_Worksheet $pValue = null, $pOverrideOld = false) {

219 if (is_null($this->_worksheet)) {

220 // Add drawing to PHPExcel_Worksheet

238 $this->setWorksheet($pValue);

239 } else {

240 throw new Exception("A PHPExcel_Worksheet has already been assigned. Drawings can only exist on one PHPExcel_Worksheet.");

241 }

242 }

marketing.php (https://gitlab.com/reclamare/mao) PHP · 156 lines

1 <?php

2 class ControllerReportMarketing extends Controller {

3 public function index() {

142 $data['pagination'] = $pagination->render();

143

144 $data['results'] = sprintf($this->language->get('text_pagination'), ($marketing_total) ? (($page - 1) * $this->config->get('config_limit_admin')) + 1 : 0, ((($page - 1) * $this->config->get('config_limit_admin')) > ($marketing_total - $this->config->get('config_limit_admin'))) ? $marketing_total : ((($page - 1) * $this->config->get('config_limit_admin')) + $this->config->get('config_limit_admin')), $marketing_total, ceil($marketing_total / $this->config->get('config_limit_admin')));

145

146 $data['filter_date_start'] = $filter_date_start;

smarty_internal_compile_for.php (https://gitlab.com/staging06/myproject) PHP · 145 lines

1 <?php

2 /**

3 * Smarty Internal Plugin Compile For

45 $_attr = $this->getAttributes($compiler, $args);

46

47 $output = "<?php ";

48 if ($parameter == 1) {

49 foreach ($_attr['start'] as $_statement) {

61 }

62 if (isset($_attr['max'])) {

63 $output .= "\$_smarty_tpl->tpl_vars[$_statement[var]]->total = (int) min(ceil((\$_smarty_tpl->tpl_vars[$_statement[var]]->step > 0 ? $_attr[to]+1 - ($_statement[value]) : $_statement[value]-($_attr[to])+1)/abs(\$_smarty_tpl->tpl_vars[$_statement[var]]->step)),$_attr[max]);\n";

64 } else {

65 $output .= "\$_smarty_tpl->tpl_vars[$_statement[var]]->total = (int) ceil((\$_smarty_tpl->tpl_vars[$_statement[var]]->step > 0 ? $_attr[to]+1 - ($_statement[value]) : $_statement[value]-($_attr[to])+1)/abs(\$_smarty_tpl->tpl_vars[$_statement[var]]->step));\n";

105 $this->openTag($compiler, 'forelse', array('forelse', $nocache));

106

107 return "<?php }} else { ?>";

108 }

109 }

Paginator.php (https://github.com/jqhph/swoft-admin.git) PHP · 427 lines

1 <?php

2

3 namespace Swoft\Admin\Widgets;

170 public function lastPage()

171 {

172 return ceil($this->total / $this->perPage);

173 }

174

198 $this->totalPages = $this->lastPage(); //总页数

199 $this->currentPage = $this->currentPage();

200 $this->coolPages = ceil($this->totalPages / $this->pageButtonNumber);

201

202 if ($this->currentPage > $this->totalPages) {

marketing.php (https://github.com/arastta/arastta.git) PHP · 204 lines

1 <?php

2 /**

3 * @package Arastta eCommerce

155 $data['pagination'] = $pagination->render();

156

157 $data['results'] = sprintf($this->language->get('text_pagination'), ($marketing_total) ? (($page - 1) * $this->config->get('config_limit_admin')) + 1 : 0, ((($page - 1) * $this->config->get('config_limit_admin')) > ($marketing_total - $this->config->get('config_limit_admin'))) ? $marketing_total : ((($page - 1) * $this->config->get('config_limit_admin')) + $this->config->get('config_limit_admin')), $marketing_total, ceil($marketing_total / $this->config->get('config_limit_admin')));

158

159 $data['filter_date_start'] = $filter_date_start;

dengon.php (https://github.com/usagi-project/mynets1.git) PHP · 298 lines

1 <?php

2 /* ========================================================================

3 *

4 * @license This source file is subject to version 3.01 of the PHP license,

5 * that is available at http://www.php.net/license/3_01.txt

6 * If you did not receive a copy of the PHP license and are unable

7 * to obtain it through the world-wide-web, please send a note to

8 * license@php.net so we can mail you a copy immediately.

97

98 if($total_num != 0){

99 $total_page_num = ceil($total_num / $page_size);

100 if($page >= $total_page_num){

101 $next = false;

BaseDrawing.php (https://github.com/real-chocopanda/PHPExcel.git) PHP · 485 lines

22 * @package PHPExcel_Worksheet

23 * @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version ##VERSION##, ##DATE##

34 * @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

35 */

36 class PHPExcel_Worksheet_BaseDrawing implements PHPExcel_IComparable

37 {

38 /**

216 * @return PHPExcel_Worksheet_BaseDrawing

217 */

218 public function setWorksheet(PHPExcel_Worksheet $pValue = null, $pOverrideOld = false) {

219 if (is_null($this->_worksheet)) {

220 // Add drawing to PHPExcel_Worksheet

238 $this->setWorksheet($pValue);

239 } else {

240 throw new Exception("A PHPExcel_Worksheet has already been assigned. Drawings can only exist on one PHPExcel_Worksheet.");

241 }

242 }

BaseDrawing.php (https://bitbucket.org/thomashii/vtigercrm-6-for-postgresql.git) PHP · 485 lines

22 * @package PHPExcel_Worksheet

23 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.7.7, 2012-05-19

34 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

35 */

36 class PHPExcel_Worksheet_BaseDrawing implements PHPExcel_IComparable

37 {

38 /**

216 * @return PHPExcel_Worksheet_BaseDrawing

217 */

218 public function setWorksheet(PHPExcel_Worksheet $pValue = null, $pOverrideOld = false) {

219 if (is_null($this->_worksheet)) {

220 // Add drawing to PHPExcel_Worksheet

238 $this->setWorksheet($pValue);

239 } else {

240 throw new Exception("A PHPExcel_Worksheet has already been assigned. Drawings can only exist on one PHPExcel_Worksheet.");

241 }

242 }

BaseDrawing.php (https://github.com/a07061625/swooleyaf.git) PHP · 535 lines

4 use PhpOffice\PhpSpreadsheet\Cell\Hyperlink;

5 use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException;

6 use PhpOffice\PhpSpreadsheet\IComparable;

226 {

227 if ($this->worksheet === null) {

228 // Add drawing to \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

229 $this->worksheet = $pValue;

230 $this->worksheet->getCell($this->coordinates);

244 }

245

246 // Set new \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

247 $this->setWorksheet($pValue);

248 } else {

249 throw new PhpSpreadsheetException('A Worksheet has already been assigned. Drawings can only exist on one \\PhpOffice\\PhpSpreadsheet\\Worksheet.');

250 }

251 }

MY_Pagination.php (git://github.com/imagecms/ImageCMS.git) PHP · 348 lines

1 <?php

2

3 if (!defined('BASEPATH')) {

28

29 // Calculate the total number of pages

30 $num_pages = ceil($this->total_rows / $this->per_page);

31

32 // Is there only one page? Hm... nothing more to do here then.

207

208 // Calculate the total number of pages

209 $num_pages = ceil($this->total_rows / $this->per_page);

210

211 // Is there only one page? Hm... nothing more to do here then.

class-wp-walker.php (https://gitlab.com/VTTE/sitios-vtte) PHP · 447 lines

1 <?php

2 /**

3 * A class for displaying various tree-like structures.

308 $end = $start + $per_page;

309 if ( -1 == $max_depth ) {

310 $this->max_pages = ceil( $total_top / $per_page );

311 }

312 }

352 $total_top = count( $top_level_elements );

353 if ( $paging ) {

354 $this->max_pages = ceil( $total_top / $per_page );

355 } else {

356 $end = $total_top;

polyline_generator.py (https://gitlab.com/falcao.mateus1998/PokemonGo-Bot) Python · 109 lines

1 import time

2 from itertools import chain

3 from math import ceil

4

5 import haversine

107

108 def get_total_distance(self):

109 return ceil(sum([haversine.haversine(*x)*1000 for x in self.walk_steps()]))

110

AbTestHelper.php (https://gitlab.com/mautic-master/mautic) PHP · 119 lines

1 <?php

2 /**

3 * @package Mautic

91 }

92 $top = max($maxes);

93 $support['step_width'] = (ceil($top / 10) * 10);

94

95 //put in order from least to greatest just because

106 'support' => $support,

107 'basedOn' => 'form.submissions',

108 'supportTemplate' => 'MauticPageBundle:SubscribedEvents\AbTest:bargraph.html.php'

109 );

110 }

vector2_tests.cpp (https://github.com/doyubkim/fluid-engine-dev.git) C++ · 343 lines

288 TEST(Vector2, CeilFloorFunction) {

289 Vector2F vec(2.2f, 4.7f);

290 Vector2F ceilVec = ceil(vec);

291 EXPECT_EQ(Vector2F(3.f, 5.f), ceilVec);

Paginator.php (https://bitbucket.org/helfreire/tccsite.git) PHP · 460 lines

1 <?php namespace Illuminate\Pagination;

2

3 use Countable;

112 protected function calculateCurrentAndLastPages()

113 {

114 $this->lastPage = ceil($this->total / $this->perPage);

115

116 $this->currentPage = $this->calculateCurrentPage($this->lastPage);

252 else

253 {

254 return min($this->currentPage, ceil($total / $this->perPage));

255 }

256 }

Rand.php (https://github.com/christeredvartsen/zf2.git) PHP · 175 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

41 // PHP bug #55169

42 // @see https://bugs.php.net/bug.php?id=55169

43 if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN' ||

44 version_compare(PHP_VERSION, '5.3.7') >= 0) {

45 $rand = mcrypt_create_iv($length, MCRYPT_DEV_URANDOM);

46 if ($rand !== false && strlen($rand) === $length) {

51 if ($strong) {

52 throw new Exception\RuntimeException(

53 'This PHP environment doesn\'t support secure random number generation. ' .

54 'Please consider to install the OpenSSL and/or Mcrypt extensions'

55 );

Furnace.php (https://gitlab.com/Skull3x/ClearSky) PHP · 287 lines

1 <?php

2 namespace pocketmine\tile;

3

206 if($this->namedtag["BurnTime"] > 0){

207 $this->namedtag->BurnTime = new Short("BurnTime", $this->namedtag["BurnTime"] - 1);

208 $this->namedtag->BurnTicks = new Short("BurnTicks", ceil(($this->namedtag["BurnTime"] / $this->namedtag["MaxTime"] * 200)));

209

210 if($smelt instanceof FurnaceRecipe and $canSmelt){

Corner.php (https://github.com/jnewman/AHPMath.git) PHP · 211 lines

1 <?php

2

3 class Corner{

138 ///////////////////////////////////////////////////////////////////////////////

139 //// What follows was created by Brent Kesler for an earlier project and later

140 //// ported to PHP by @author Josh Newman

141 ///////////////////////////////////////////////////////////////////////////////

142

163 */

164 final private static function widthFromResults($results) {

165 $min = ceil(sqrt(2 * $results));

166 $max = floor(sqrt(3 * $results));

167 // Test resultsFromWidth for values between $min and $max

package.module.nextgen_pagination.php (https://github.com/livinglab/openlab.git) PHP · 118 lines

1 <?php

2 /**

3 * Contains function(s) to generate a basic pagination widget

38 // Construct array of page urls

39 $ending_ellipsis = $starting_ellipsis = FALSE;

40 $number_of_pages = ceil($number_of_entities / $entities_per_page);

41 $pages = [];

42 for ($i = 1; $i <= $number_of_pages; $i++) {

Rectangle.cs (https://github.com/t-ashula/mono.git) C# · 631 lines

57

58 /// <summary>

59 /// Ceiling Shared Method

60 /// </summary>

61 ///

62 /// <remarks>

63 /// Produces a Rectangle structure from a RectangleF

64 /// structure by taking the ceiling of the X, Y, Width,

65 /// and Height properties.

66 /// </remarks>

67

68 public static Rectangle Ceiling (RectangleF value)

69 {

70 int x, y, w, h;

FileStore.php (https://gitlab.com/phanthanh9787/crud-user) PHP · 252 lines

1 <?php

2

3 namespace Illuminate\Cache;

83 // so that we can properly retain the time for things like the increment

84 // operation that may be performed on the cache. We'll round this out.

85 $time = ceil(($expire - time()) / 60);

86

87 return compact('data', 'time');

CmdEllipse.cs (https://github.com/cazzar/MCaznowl-Build.git) C# · 365 lines

7 obtain a copy of the Licenses at

8

9 http://www.opensource.org/licenses/ecl2.php

10 http://www.gnu.org/licenses/gpl-3.0.html

11

108 if (i == 0)

109 {

110 yc[i] = Math.Ceiling(Math.Abs(Math.Sqrt((Math.Pow(a, 2) - Math.Pow(i + 0.5, 2))) * Math.Abs(b / a)));

111 length[i] = 0;

112 limit++;

ProgressFormatter.php (https://gitlab.com/judielsm/Handora) PHP · 183 lines

1 <?php

2

3 /*

4 * This file is part of PhpSpec, A php toolset to drive emergent

5 * design by specification.

6 *

12 */

13

14 namespace PhpSpec\Formatter;

15

16 use PhpSpec\Console\IO;

17 use PhpSpec\Event\SuiteEvent;

18 use PhpSpec\Event\ExampleEvent;

AnimateDraggingMapThread.java (https://github.com/ScottHW/Osmand.git) Java · 331 lines

225 curZoom = (float) Math.floor(curZoom);

226 } else {

227 curZoom = (float) Math.ceil(curZoom);

228 }

229 tileView.zoomToAnimate(curZoom, notifyListener);

smarty_internal_compile_section.php (https://github.com/phobia/Kohana_Smarty3.git) PHP · 173 lines

1 <?php

2 /**

3 * Smarty Internal Plugin Compile Section

36 $this->compiler->nocache = $this->compiler->nocache | $this->compiler->tag_nocache;

37

38 $output = "<?php ";

39

40 $section_name = $_attr['name'];

96 $output .= " {$section_props}['total'] = {$section_props}['loop'];\n";

97 } else {

98 $output .= " {$section_props}['total'] = min(ceil(({$section_props}['step'] > 0 ? {$section_props}['loop'] - {$section_props}['start'] : {$section_props}['start']+1)/abs({$section_props}['step'])), {$section_props}['max']);\n";

99 }

100 $output .= " if ({$section_props}['total'] == 0)\n" . " {$section_props}['show'] = false;\n" . "} else\n" . " {$section_props}['total'] = 0;\n";

136 $this->_open_tag('sectionelse',array('sectionelse', $nocache));

137

138 return "<?php endfor; else: ?>";

139 }

140 }

trashed.php (https://gitlab.com/Shweta_riya/Trainer_Session30_CRUD_Pagination_Search_3rdParty) PHP · 130 lines

1 <?php

2 require_once("../../../vendor/autoload.php");

23 $_SESSION['ItemsPerPage']= $itemsPerPage;

24

25 $pages = ceil($recordCount/$itemsPerPage);

26 $someData = $objBookTitle->trashedPaginator($page,$itemsPerPage);

27

42 <body>

43 <div id="TopMenuBar">

44 <button type="button" onclick="window.location.href='../index.php'" class=" btn-primary btn-lg">Home</button>

45 <button type="button" onclick="window.location.href='index.php?Page=1'" class=" btn-success btn-lg">Active List</button>

48

49 <h1> Trashed List</h1>

50 <?php

51 echo "<table border='5px' >";

52

FloatRect.cpp (https://gitlab.com/brian0218/rk3188_r-box_android4.2.2_sdk) C++ · 208 lines

187 float left = floorf(rect.x());

188 float top = floorf(rect.y());

189 float width = ceilf(rect.maxX()) - left;

190 float height = ceilf(rect.maxY()) - top;

cocktail.html.erb (https://gitlab.com/coderbcn/online.catering) Ruby HTML · 259 lines

37 <div class="packed_meal_price_col">

38 <div class="menu_inclusions_title_div">

39 <span>Cocktail Php 190.00</span>

40 </div>

41 </div>

98 <div class="packed_meal_price_col">

99 <div class="menu_inclusions_title_div">

100 <span>Cocktail Php 170.00</span>

101 </div>

102 </div>

213 <ul>

214 <li>Additional Tents</li>

215 <li>Ceiling Decors</li>

216 <li>Floral Arrangements</li>

217 <li>Red Carpet</li>

customer_ban_ip.php (https://gitlab.com/hazelnuts23/unitedfoodstuff) PHP · 356 lines

1 <?php

2 class ControllerSaleCustomerBanIp extends Controller {

3 private $error = array();

248 $data['pagination'] = $pagination->render();

249

250 $data['results'] = sprintf($this->language->get('text_pagination'), ($customer_ban_ip_total) ? (($page - 1) * $this->config->get('config_limit_admin')) + 1 : 0, ((($page - 1) * $this->config->get('config_limit_admin')) > ($customer_ban_ip_total - $this->config->get('config_limit_admin'))) ? $customer_ban_ip_total : ((($page - 1) * $this->config->get('config_limit_admin')) + $this->config->get('config_limit_admin')), $customer_ban_ip_total, ceil($customer_ban_ip_total / $this->config->get('config_limit_admin')));

251

252 $data['sort'] = $sort;

Paginator.php (https://bitbucket.org/larryg/powerhut.git) PHP · 414 lines

1 <?php namespace Illuminate\Pagination;

2

3 use Countable;

110 protected function calculateCurrentAndLastPages()

111 {

112 $this->lastPage = ceil($this->total / $this->perPage);

113

114 $this->currentPage = $this->calculateCurrentPage($this->lastPage);

Country.php (https://bitbucket.org/acidel/buykoala.git) PHP · 170 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

92 $id = empty($id) ? '' : ' id="' . $id . '-table"';

93 $class = $this->getData('class');

94 $html = PHP_EOL . "<table class=\"countries {$class}\"{$id}>" . PHP_EOL;

95

96 $zebrine = '';

125 }

126

127 $html .= PHP_EOL . '</tr>' . PHP_EOL;

128 }

129

BaseDrawing.php (https://github.com/Borluse/ProjetOption.git) PHP · 485 lines

22 * @package PHPExcel_Worksheet

23 * @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.7.3c, 2010-06-01

34 * @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)

35 */

36 class PHPExcel_Worksheet_BaseDrawing implements PHPExcel_IComparable

37 {

38 /**

216 * @return PHPExcel_Worksheet_BaseDrawing

217 */

218 public function setWorksheet(PHPExcel_Worksheet $pValue = null, $pOverrideOld = false) {

219 if (is_null($this->_worksheet)) {

220 // Add drawing to PHPExcel_Worksheet

238 $this->setWorksheet($pValue);

239 } else {

240 throw new Exception("A PHPExcel_Worksheet has already been assigned. Drawings can only exist on one PHPExcel_Worksheet.");

241 }

242 }

finder_indexer.php (https://github.com/gnomeontherun/joomla-cms.git) PHP · 196 lines

1 <?php

2 /**

3 * @package Joomla.Cli

17

18 // Load system defines

19 if (file_exists(dirname(__DIR__) . '/defines.php'))

20 {

21 require_once dirname(__DIR__) . '/defines.php';

25 {

26 define('JPATH_BASE', dirname(__DIR__));

27 require_once JPATH_BASE . '/includes/defines.php';

28 }

29

30 // Get the framework.

31 require_once JPATH_LIBRARIES . '/import.legacy.php';

32

33 // Bootstrap the CMS libraries.

dd_inline.h (https://github.com/rudimeier/mprime.git) C Header · 598 lines

564 }

565

566 inline dd_real ceil(const dd_real &a) {

567 double hi = ceil(a.hi);

570 if (hi == a.hi) {

571 /* High word is integer already. Round the low word. */

572 lo = ceil(a.lo);

573 hi = quick_two_sum(hi, lo, lo);

574 }

578

579 inline dd_real aint(const dd_real &a) {

580 return (a.hi >= 0.0) ? floor(a) : ceil(a);

581 }

582

DraggableListBuilder.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 179 lines

1 <?php

2

3 namespace Drupal\Core\Config\Entity;

120 $count = count($this->entities);

121 if ($count > 20) {

122 $delta = ceil($count / 2);

123 }

124 }

matches.php (https://gitlab.com/Etern4l/CSBETCENTER) PHP · 188 lines

1 <?php require_once 'templates/site/header.php'; ?>

2

3 <div class="row" style="padding:15px">

13 <!-- matchOver('1', '2 hours from now', 'Fnatic', 'Navi', 'fnatic', 'navi', '50%', '50%', 'test info', 'winner'); -->

14

15 <?php

16 $conn = new mysqli($servername, $username, $password, $dbname);

17 if ($conn->connect_error)

84 $betTotal = $betOnTeam1users + $betOnTeam2users;

85 $team1Percent = floor($betOnTeam1users / $betTotal * 100);

86 $team2Percent = ceil($betOnTeam2users / $betTotal * 100);

87 }

88

186 </div>

187

188 <?php require_once 'templates/site/footer.php'; ?>

189

default.php (https://github.com/rietn/minima.git) PHP · 154 lines

33 <?php for($i=0; $i < $nPages; $i++) : ?>

34 <li <?php if($i == 0) echo "class=\"current\"" ?> id="panel-pagination-<?php echo $i;?>"></li>

35 <?php endfor; ?>

41

42 <nav id="panel-list">

43 <?php

44 // number of extensions

45 $count = 0;

115 ?>

116 <li>

117 <a href="<?php echo $item->link; ?>" class="<?php echo $class; ?>"><?php echo $title; ?>

118 <span class="ext-desc"><?php echo $description; ?></span>

124 ?>

125 <li class="ext">

126 <a href="<?php echo $item->link; ?>" class="<?php echo $class; ?>">

127 <figure>

128 <img src="<?php echo $img; ?>" alt="<?php echo $title; ?>" />

negative_binomial_example.qbk (http://hadesmem.googlecode.com/svn/trunk/) text · 0 lines

103

104 [note Since we're calculating the /minimum/ number of trials required,

105 we'll err on the safe side and take the ceiling of the result.

106 Had we been calculating the

107 /maximum/ number of trials permitted to observe less than a certain

foxpro.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 1859 lines

829 <KEYWORD3>Cd</KEYWORD3>

830 <KEYWORD3>Cdow</KEYWORD3>

831 <KEYWORD3>Ceiling</KEYWORD3>

832 <KEYWORD3>Central</KEYWORD3>

833 <KEYWORD3>Century</KEYWORD3>

jquery-ui.js (http://openvolunteer.googlecode.com/svn/trunk/) JavaScript · 1012 lines ✨ Summary

This JavaScript code defines a set of jQuery UI effects, including shake, slide, and transfer. These effects can be applied to HTML elements using the .effect() method. The effects animate the element’s position, size, or other properties over time, creating a visually appealing transition between states.

776 "",D=0;D<i[1];D++){var M=this._daylightSavingAdjust(new Date(m,g,a.selectedDay)),t=" ui-corner-all",x="";if(l){x+='<div class="ui-datepicker-group';if(i[1]>1)switch(D){case 0:x+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]-1:x+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:x+=" ui-datepicker-group-middle";t="";break}x+='">'}x+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+t+'">'+(/all|left/.test(t)&&C==0?c?

777 f:n:"")+(/all|right/.test(t)&&C==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,j,o,C>0||D>0,z,v)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var A=k?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(t=0;t<7;t++){var q=(t+h)%7;A+="<th"+((t+h+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+r[q]+'">'+s[q]+"</span></th>"}x+=A+"</tr></thead><tbody>";A=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,

778 A);t=(this._getFirstDayOfMonth(m,g)-h+7)%7;A=l?6:Math.ceil((t+A)/7);q=this._daylightSavingAdjust(new Date(m,g,1-t));for(var N=0;N<A;N++){x+="<tr>";var O=!k?"":'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(q)+"</td>";for(t=0;t<7;t++){var F=p?p.apply(a.input?a.input[0]:null,[q]):[true,""],B=q.getMonth()!=g,I=B&&!G||!F[0]||j&&q<j||o&&q>o;O+='<td class="'+((t+h+6)%7>=5?" ui-datepicker-week-end":"")+(B?" ui-datepicker-other-month":"")+(q.getTime()==M.getTime()&&g==a.selectedMonth&&

779 a._keyEvent||K.getTime()==q.getTime()&&K.getTime()==M.getTime()?" "+this._dayOverClass:"")+(I?" "+this._unselectableClass+" ui-state-disabled":"")+(B&&!w?"":" "+F[1]+(q.getTime()==u.getTime()?" "+this._currentClass:"")+(q.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!B||w)&&F[2]?' title="'+F[2]+'"':"")+(I?"":' onclick="DP_jQuery_'+y+".datepicker._selectDay('#"+a.id+"',"+q.getMonth()+","+q.getFullYear()+', this);return false;"')+">"+(B&&!w?"&#xa0;":I?'<span class="ui-state-default">'+q.getDate()+

780 "</span>":'<a class="ui-state-default'+(q.getTime()==b.getTime()?" ui-state-highlight":"")+(q.getTime()==u.getTime()?" ui-state-active":"")+(B?" ui-priority-secondary":"")+'" href="#">'+q.getDate()+"</a>")+"</td>";q.setDate(q.getDate()+1);q=this._daylightSavingAdjust(q)}x+=O+"</tr>"}g++;if(g>11){g=0;m++}x+="</tbody></table>"+(l?"</div>"+(i[0]>0&&D==i[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");L+=x}H+=L}H+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':

XmlRpc.php (http://typecho.googlecode.com/svn/trunk/) PHP · 2094 lines ✨ Summary

This PHP code defines a class that implements various APIs for interacting with WordPress, Blogger, and MovableType blogs. It provides methods for creating, editing, and deleting posts, categories, comments, and users, as well as retrieving metadata such as post status lists and recent post titles. The class also handles API requests from external services like pingback extensions.

1 <?php

2 /**

3 * Typecho Blog Platform

953 if (!empty($struct['offset'])) {

954 $offset = abs(intval($struct['offset']));

955 $input['page'] = ceil($offset / $pageSize);

956 }

957

pl1.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 597 lines

377 <KEYWORD3>cast</KEYWORD3>

378 <KEYWORD3>cds</KEYWORD3>

379 <KEYWORD3>ceil</KEYWORD3>

380 <KEYWORD3>center</KEYWORD3>

381 <KEYWORD3>centre</KEYWORD3>

tcl.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 458 lines

106 <KEYWORD1>rename</KEYWORD1>

107 <KEYWORD1>info</KEYWORD1>

108 <KEYWORD1>ceil</KEYWORD1>

109 <KEYWORD1>floor</KEYWORD1>

110 <KEYWORD1>round</KEYWORD1>

glparams.py (git://github.com/apitrace/apitrace.git) Python · 3679 lines ✨ Summary

This code takes a list of function parameter tuples and adds their corresponding enum names to a GLenum.values list, effectively populating an enumeration of OpenGL functions with their respective types. The output is a collection of OpenGL function names that can be used elsewhere in the program.

845 ("", X, 1, "GL_LIST_PRIORITY_SGIX"), # 0x8182

846 ("glGet", I, 1, "GL_CALLIGRAPHIC_FRAGMENT_SGIX"), # 0x8183

847 ("", X, 1, "GL_PIXEL_TEX_GEN_Q_CEILING_SGIX"), # 0x8184

848 ("", X, 1, "GL_PIXEL_TEX_GEN_Q_ROUND_SGIX"), # 0x8185

849 ("", X, 1, "GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX"), # 0x8186

lua.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 235 lines

177 <KEYWORD2>math.atan</KEYWORD2>

178 <KEYWORD2>math.atan2</KEYWORD2>

179 <KEYWORD2>math.ceil</KEYWORD2>

180 <KEYWORD2>math.cos</KEYWORD2>

181 <KEYWORD2>math.deg</KEYWORD2>

BufferPrintable.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 418 lines ✨ Summary

This Java code is a part of an editor plugin that prints the contents of a text buffer to a printer. It handles formatting, folding, and pagination of the text, and includes options for customizing the header and footer text. The code uses a tab expansion mechanism to align text in the printed output.

248 // the +1's ensure that 99 gets 3 digits, 103 gets 4 digits,

249 // and so on.

250 int lineNumberDigits = (int)Math.ceil(Math.log(buffer.getLineCount() + 1)

251 / Math.log(10)) + 1;

252

FETurbulence.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 454 lines

289 if (m_baseFrequencyX) {

290 float lowFrequency = floorf(tileWidth * m_baseFrequencyX) / tileWidth;

291 float highFrequency = ceilf(tileWidth * m_baseFrequencyX) / tileWidth;

292 // BaseFrequency should be non-negative according to the standard.

293 if (m_baseFrequencyX / lowFrequency < highFrequency / m_baseFrequencyX)

298 if (m_baseFrequencyY) {

299 float lowFrequency = floorf(tileHeight * m_baseFrequencyY) / tileHeight;

300 float highFrequency = ceilf(tileHeight * m_baseFrequencyY) / tileHeight;

301 if (m_baseFrequencyY / lowFrequency < highFrequency / m_baseFrequencyY)

302 m_baseFrequencyY = lowFrequency;

actionscript.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 830 lines

427 <LITERAL2>atan</LITERAL2>

428 <LITERAL2>atan2</LITERAL2>

429 <LITERAL2>ceil</LITERAL2>

430 <LITERAL2>cos</LITERAL2>

431 <LITERAL2>exp</LITERAL2>

rj_barkflux_accum~.c (git://github.com/rjdj/rjlib.git) C · 372 lines ✨ Summary

This C code implements a signal processing class called rj_barkflux_accum for Max/MSP, a visual programming language. It generates a bark flux accumulator, a measure of audio spectral features, and provides methods to initialize, process, and manipulate the output. The class includes inlet and outlet objects for input and output signals, as well as DSP processing capabilities.

38

39 int freq2bin(int windowSize,int sampleRate, float freq){

40 return (int) ceil((windowSize*2*freq)/(float)sampleRate);

41 }

42

webview.lua (git://github.com/mason-larobina/luakit.git) Lua · 351 lines ✨ Summary

This Lua code defines a webview widget for a browser-like application. It sets up various methods and functions to control the webview, such as zooming, scrolling, and navigating history. The code also initializes the webview with default settings and provides a way to access its methods through a window instance.

295 -- Relative page movement

296 elseif rawget(new, axis .. "pagerel") then

297 s[axis] = s[axis] + math.ceil(s[axis.."page_size"] * new[axis.."pagerel"])

298

299 -- Absolute px movement

308 -- Absolute page movement

309 elseif rawget(new, axis.."page") then

310 s[axis] = math.ceil(s[axis.."page_size"] * new[axis.."page"])

311

312 -- Absolute percent movement

313 elseif rawget(new, axis .. "pct") then

314 s[axis] = math.ceil(s[axis.."max"] * (new[axis.."pct"]/100))

315 end

316 end