100+ results for 'php compact'
Not the results you expected?
vec.c (https://github.com/llucax/dmd.git) C · 656 lines
array.idl.php (https://github.com/zsj888/hiphop-php.git) PHP · 376 lines
Guard.php (https://bitbucket.org/helfreire/tccsite.git) PHP · 557 lines
RecordSetTest.php (https://github.com/ggunlugu/ornekler.git) PHP · 420 lines
1 <?php
2 /**
3 * Lithium: the most rad php framework
4 *
5 * @copyright Copyright 2010, Union of RAD (http://union-of-rad.org)
6 * @license http://opensource.org/licenses/bsd-license.php The BSD License
7 */
66 $model = $this->_model;
68 $this->_recordSet = new MockRecordSet(compact('result', 'model') + array('exists' => true));
70 $result = new MockResult();
71 $result->records = array_merge(array(false), $this->_records);
72 $this->_objectRecordSet = new MockRecordSet(compact('result', 'model') + array(
73 'exists' => true
74 ));
about.css (https://gitlab.com/webkod3r/tripolis) CSS · 481 lines
DatabaseStore.php (https://gitlab.com/ealexis.t/trends) PHP · 266 lines
Builder.php (https://gitlab.com/jjpa2018/dashboard) PHP · 433 lines
update.php (https://github.com/muskmelon/Greemo.git) PHP · 250 lines
1 <?php
2 /**
3 * Update/Install Plugin/Theme administration panel.
12 /** WordPress Administration Bootstrap */
13 require_once('./admin.php');
15 include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
35 $plugins = array_map('urldecode', $plugins);
37 $url = 'update.php?action=update-selected&plugins=' . urlencode(implode(',', $plugins));
38 $nonce = 'bulk-update-plugins';
41 iframe_header();
43 $upgrader = new Plugin_Upgrader( new Bulk_Plugin_Upgrader_Skin( compact( 'nonce', 'url' ) ) );
44 $upgrader->bulk_upgrade( $plugins );
BootstrapPaginatorHelper.php (https://bitbucket.org/reyx/p0001festivalcachorroquente.git) PHP · 254 lines
59 $title = ($which == 'Prev') ? '‹' : '›';
60 unset($options['rel']);
61 return $this->Html->tag($tag, $this->link($title, $url, array_merge($options, compact('escape'))), compact('class'));
62 }
149 $options += array('rel' => 'last');
150 $out = $before . $this->Html->tag(
151 $tag, $this->link($last, array('page' => $params['pageCount']), $options), compact('class')
152 );
153 }
208 $out .= $before;
209 for ($i = $start; $i < $params['page']; $i++) {
210 $out .= $this->Html->tag($tag, $this->link($i, array('page' => $i), $options), compact('class'))
211 . $separator;
212 }
about.css (https://gitlab.com/kath.de/cibedo_cibedo.de) CSS · 537 lines
CodeTest.php (https://github.com/k2052/arthur.git) PHP · 231 lines
1 <?php
3 namespace arthur\tests\cases\g11n\catalog\adapter;
17 $this->skipIf(!is_writable($this->_path), "{$this->_path} is not writable.");
19 $this->adapter = new Code(compact('path'));
21 $file = "{$this->_path}/a.php";
22 $data = <<<'EOD'
23 <?php
24 $t('simple 1');
54 file_put_contents($file, $data);
56 $file = "{$this->_path}/a.html.php";
57 $data = <<<'EOD'
58 <?=$t('simple 1 short'); ?>
n2bv_12.c (https://github.com/triciatricia/SIMPLE.git) C · 301 lines
26 #ifdef HAVE_FMA
28 /* Generated by: ../../../genfft/gen_notw_c.native -fma -reorder-insns -schedule-for-pipeline -simd -compact -variables 4 -pipeline-latency 8 -sign 1 -n 12 -name n2bv_12 -with-ostride 2 -include n2b.h -store-multiple 2 */
30 /*
162 #else /* HAVE_FMA */
164 /* Generated by: ../../../genfft/gen_notw_c.native -simd -compact -variables 4 -pipeline-latency 8 -sign 1 -n 12 -name n2bv_12 -with-ostride 2 -include n2b.h -store-multiple 2 */
166 /*
DispatcherFilterTest.php (https://github.com/LubosRemplik/cakephp.git) PHP · 245 lines
1 <?php
2 /**
3 * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
4 * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
5 *
9 *
10 * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
11 * @link https://cakephp.org CakePHP(tm) Project
12 * @since 3.0.0
13 * @license https://opensource.org/licenses/mit-license.php MIT License
111 *
112 * @return void
113 * @triggers Dispatcher.beforeDispatch $this, compact('response', 'request')
114 */
115 public function testMatchesWithWhen()
ResourceRegistrar.php (https://gitlab.com/phanthanh9787/crud-user) PHP · 359 lines
adminController.php (https://gitlab.com/higordaniell/SIN-352) PHP · 403 lines
1 <?php
2 class adminController extends Controller {
22 if($venda_id) {
23 $venda = $vt->getById($venda_id);
24 $this->_page->adminView('admin/vendas/detalhes', compact('venda'));
25 }
26 else {
27 $vendas = $vt->getAll();
28 $this->_page->adminView('admin/vendas/view', compact('vendas'));
29 }
30 }
37 if($usuario_id) {
38 $usuario = $ut->getById($usuario_id);
39 $this->_page->adminView('admin/clientes/detalhes', compact('usuario'));
40 }
41 else {
plugin.php (https://github.com/StandbyTaskForce/Ushahidi_Web.git) PHP · 292 lines
1 <?php
2 /**
3 * Plugins helper
177 }
179 $file_data = compact( array_keys( $plugin_headers ) );
181 return $file_data;
196 {
197 // Determine if readme.txt (Case Insensitive) exists
198 $file = PLUGINPATH.$plugin."/controllers/admin/".$plugin."_settings.php";
199 if ( file::file_exists_i($file) )
200 {
271 $configuration = array();
273 $file = PLUGINPATH.$name.'/config/'.$name.'.php';
274 if ( file_exists($file) )
275 {
HttpTest.php (https://github.com/mackstar/lithium.git) PHP · 380 lines
1 <?php
2 /**
3 * Lithium: the most rad php framework
4 *
5 * @copyright Copyright 2012, Union of RAD (http://union-of-rad.org)
6 * @license http://opensource.org/licenses/bsd-license.php The BSD License
7 */
210 $model::config(array('key' => 'id'));
211 $http = new Http($this->_testConfig);
212 $query = new Query(compact('model') + array('data' => array('title' => 'Test Title')));
213 $result = $http->create($query);
Render.php (https://github.com/ThiloWitt/core.git) PHP · 199 lines
declare.js (https://github.com/bcurren/agent_smith.git) JavaScript · 408 lines
plugin.php (https://github.com/JamieLomas/pyrocms.git) PHP · 300 lines
enumstringerpb_test.go (https://github.com/gogo/protobuf.git) Go · 440 lines
258 }
260 func TestNidOptEnumProtoCompactText(t *testing.T) {
261 seed := time.Now().UnixNano()
262 popr := math_rand.New(math_rand.NewSource(seed))
263 p := NewPopulatedNidOptEnum(popr, true)
264 dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
265 msg := &NidOptEnum{}
266 if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
292 }
294 func TestNinOptEnumProtoCompactText(t *testing.T) {
295 seed := time.Now().UnixNano()
296 popr := math_rand.New(math_rand.NewSource(seed))
IntlAttribute.cs (https://github.com/ServiceStack/ServiceStack.git) C# · 216 lines
126 public enum DateText { Undefined=0, Narrow, Short, Long }
127 public enum UnitDisplay { Undefined=0, Long, Short, Narrow }
128 public enum Notation { Undefined=0, Standard, Scientific, Engineering, Compact, }
129 public enum CurrencyDisplay { Undefined=0, Symbol, NarrowSymbol, Code, Name, }
130 public enum CurrencySign { Undefined=0, Accounting, Standard, }
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);
jsoneditor.css (https://gitlab.com/Blueprint-Marketing/cdnjs) CSS · 597 lines
DashboardController.php (https://gitlab.com/Ankit77/motiv8) PHP · 249 lines
1 <?php
3 namespace App\Http\Controllers\Backend;
22 {
23 $themes=DB::table("themes")->get();
24 return view('backend.pages.themes', compact('themes'));
25 }
26 public function addtheme()
97 {
98 $userdetail=DB::table('users')->where('id', $id)->get();
99 return view('backend.pages.viewuser', compact('userdetail'));
100 }
101 public function edittheme($id=NULL)
102 {
103 $themes=DB::table('themes')->where('id',$id)->get();
104 return view('backend.pages.edittheme', compact('themes'));
105 }
106 public function editthemesave()
SessionComponent.php (https://github.com/masihnewbie/cakephp.git) PHP · 186 lines
5 * PHP 5
6 *
7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
8 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
9 *
12 *
13 * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link http://cakephp.org CakePHP(tm) Project
15 * @package Cake.Controller.Component
16 * @since CakePHP(tm) v 0.10.0.1232
17 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
18 */
27 *
28 * @package Cake.Controller.Component
29 * @link http://book.cakephp.org/2.0/en/core-libraries/components/sessions.html
30 * @link http://book.cakephp.org/2.0/en/development/sessions.html
environment.rb (https://github.com/mecolin/middleman.git) Ruby · 177 lines
153 def _combine_only(only)
154 return @only unless only
155 only = [only].flatten.compact.uniq.map { |o| o.to_s }
156 only &= @only if @only
157 only
159 def _combine_except(except)
160 return @except unless except
161 except = [except].flatten.compact.uniq.map { |o| o.to_s }
162 except |= @except if @except
163 except
ParameterTest.php (https://github.com/vicfryzel/zf.git) PHP · 201 lines
1 <?php
2 /**
3 * Zend Framework
23 // Call Zend_Server_Method_ParameterTest::main() if this source file is executed directly.
24 if (!defined("PHPUnit_MAIN_METHOD")) {
25 define("PHPUnit_MAIN_METHOD", "Zend_Server_Method_ParameterTest::main");
26 }
28 require_once dirname(__FILE__) . '/../../../TestHelper.php';
30 /** Zend_Server_Method_Parameter */
31 require_once 'Zend/Server/Method/Parameter.php';
33 /**
onepb_test.go (https://github.com/gogo/protobuf.git) Go · 372 lines
149 }
151 func TestSubbyProtoCompactText(t *testing.T) {
152 seed := time.Now().UnixNano()
153 popr := math_rand.New(math_rand.NewSource(seed))
154 p := NewPopulatedSubby(popr, true)
155 dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
156 msg := &Subby{}
157 if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
183 }
185 func TestSampleOneOfProtoCompactText(t *testing.T) {
186 seed := time.Now().UnixNano()
187 popr := math_rand.New(math_rand.NewSource(seed))
top_level.rb (https://gitlab.com/Renatafsouza/EP3OO) Ruby · 282 lines
thrift.idl.php (https://github.com/kevlund/hiphop-php.git) PHP · 195 lines
1 <?php
2 /**
3 * Automatically generated by running "php schema.php thrift".
4 *
5 * You may modify the file, but re-running schema.php against this file will
33 // 'name' => name of the function
34 // 'desc' => description of the function's purpose
35 // 'flags' => attributes of the function, see base.php for possible values
36 // 'opt' => optimization callback function's name for compiler
37 // 'note' => additional note about this function's schema
112 DefineFunction(
113 array(
114 'name' => "thrift_protocol_write_compact",
115 'flags' => HasDocComment,
116 'return' => array(
AuthRbac.php (https://github.com/Howard3/li3_access.git) PHP · 196 lines
1 <?php
3 namespace li3_access\extensions\adapter\security\access;
71 }
73 return !$accessable ? compact('message', 'redirect') : array();
74 }
101 if (preg_match('/^[A-Za-z0-9_\*]+::[A-Za-z0-9_\*]+$/', $param, $regexMatches)) {
102 list($controller, $action) = explode('::', reset($regexMatches));
103 $params += compact('controller', 'action');
104 continue;
105 }
outbound-handling.php (https://bitbucket.org/cyberhobo/easy-subscribe.git) PHP · 252 lines
1 <?php
3 /**
74 $blogname = get_option( 'blogname' );
76 $template_data = compact( 'blogname', 'user', 'password' );
78 $encoded_subject = sprintf( __( '[%s] Your username and password', 'EasySubscribe' ), $blogname );
162 if ( $un ) {
163 $mail->subject = sprintf( __( '[%s] You\'re unsubscribed from %s', 'EasySubscribe' ), $blogname, $subscribed_to );
164 $template = 'unsubscribed-email.php';
165 $action = 'es_unsubscribed_email';
166 } else {
167 $mail->subject = sprintf( __( '[%s] You\'re subscribed to %s', 'EasySubscribe' ), $blogname, $subscribed_to );
168 $template = 'subscribed-email.php';
169 $action = 'es_subscribed_email';
170 }
mapsproto2pb_test.go (https://github.com/mesosphere/mesos-dns.git) Go · 458 lines
239 }
241 func TestFloatingPointProtoCompactText(t *testing.T) {
242 seed := time.Now().UnixNano()
243 popr := math_rand.New(math_rand.NewSource(seed))
244 p := NewPopulatedFloatingPoint(popr, true)
245 data := github_com_gogo_protobuf_proto.CompactTextString(p)
246 msg := &FloatingPoint{}
247 if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil {
273 }
275 func TestAllMapsProtoCompactText(t *testing.T) {
276 seed := time.Now().UnixNano()
277 popr := math_rand.New(math_rand.NewSource(seed))
TableTest.php (https://github.com/deviantintegral/symfony.git) PHP · 854 lines
1 <?php
3 /*
12 namespace Symfony\Component\Console\Tests\Helper;
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\Console\Helper\Table;
16 use Symfony\Component\Console\Helper\TableStyle;
25 protected function setUp()
26 {
27 $this->stream = fopen('php://memory', 'r+');
28 }
113 array('ISBN', 'Title', 'Author'),
114 $books,
115 'compact',
116 <<<'TABLE'
117 ISBN Title Author
EventTicketsController.php (https://github.com/Attendize/Attendize.git) PHP · 296 lines
Writer.php (https://gitlab.com/judielsm/Handora) PHP · 375 lines
FileStore.php (https://gitlab.com/milton2913/myBlog) PHP · 255 lines
APICustomSerializers.scala (https://github.com/robsc/scala-foursquare-toy.git) Scala · 201 lines
60 val v = obj.obj.find(_.name == "object").map(_.value)
61 (t,v) match {
62 case (Some(JString("user")), Some(obj: JObject)) => UserUpdateTarget(obj.extract[UserCompact])
63 case (Some(JString("checkin")), Some(obj: JObject)) => CheckinUpdateTarget(obj.extract[CheckinForFeed])
64 case (Some(JString("venue")), Some(obj: JObject)) => VenueUpdateTarget(obj.extract[VenueCompact])
PageManagementController.php (https://gitlab.com/buildcode/cms) PHP · 257 lines
1 <?php
3 namespace Buildcode\Cms\Controllers\Admin;
76 {
77 if (! $block->hasChildTemplate() && ! $request->has('template')) {
78 return view('cms::admin.page_management.pick_template', compact('block'));
79 }
84 );
86 return view('cms::admin.page_management.form', compact('form', 'block'));
87 }
100 );
102 return view('cms::admin.page_management.form', compact('form', 'block'));
103 }
DLFixedPrepare.class.php (https://github.com/dmi3yy/modx.evo.custom.git) PHP · 126 lines
1 <?php
3 if (!class_exists("DLFixedPrepare", false)) {
112 $total = $modx->db->getValue($q);
113 $data['OnNewChar'] = $_DocLister->parseChunk($_DocLister->getCFGDef('tplOnNewChar'),
114 compact("char", "total"));
115 $_extDocLister->setStore('char', $char);
117 if ($oldChar !== null) {
118 $data['CharSeparator'] = $_DocLister->parseChunk($_DocLister->getCFGDef('tplCharSeparator'),
119 compact("char", "total"));
120 }
121 }
contacts_controller.php (https://github.com/makies/croogo.git) PHP · 206 lines
1 <?php
2 /**
3 * Contacts Controller
4 *
5 * PHP version 5
6 *
7 * @category Controller
9 * @version 1.0
10 * @author Fahad Ibnay Heylaal <contact@fahad19.com>
11 * @license http://www.opensource.org/licenses/mit-license.php The MIT License
12 * @link http://www.croogo.org
13 */
140 $this->set('title_for_layout', $contact['Contact']['title']);
141 $this->set(compact('continue'));
142 }
other.php (https://github.com/quadcodes/wp-front-end-editor.git) PHP · 329 lines
1 <?php
3 // Handles comment_text field
70 function wrap( $content, $term_id, $taxonomy ) {
71 $data = compact( 'term_id', 'taxonomy' );
73 if ( !$this->check( $data ) )
133 $author_id = $GLOBALS['authordata']->ID;
135 if ( !$this->check( compact( 'author_id' ) ) )
136 return $content;
138 $content = $this->placehold( $content );
140 return parent::wrap( $content, compact( 'author_id' ) );
141 }
UserController.php (https://github.com/kutaloweb/spala.git) PHP · 379 lines
1 <?php
3 namespace App\Http\Controllers;
75 $roles = generateSelectVue($this->role->listExceptName([config('system.default_role.admin')]));
77 return $this->success(compact('countries', 'roles', 'genders'));
78 }
142 $roles = $user->roles()->pluck('id')->all();
144 return $this->success(compact('user', 'selected_roles', 'roles'));
145 }
FLACDLL.cs (https://github.com/gchudov/cuetools.net.git) C# · 180 lines
comp_expand.c (https://github.com/0xffea/haiku.git) C · 184 lines
NotificationCompatImplBase.java (https://gitlab.com/Soundar028/mahendra_result_app) Java · 165 lines
16 public class NotificationCompatImplBase {
17 static final int MAX_MEDIA_BUTTONS = 5;
18 static final int MAX_MEDIA_BUTTONS_IN_COMPACT = 3;
20 public static <T extends Action> void overrideContentView(NotificationBuilderWithBuilderAccessor builder, Context context, CharSequence contentTitle, CharSequence contentText, CharSequence contentInfo, int number, Bitmap largeIcon, CharSequence subText, boolean useChronometer, long when, List<T> actions, int[] actionsToShowInCompact, boolean showCancelButton, PendingIntent cancelButtonIntent) {
21 builder.getBuilder().setContent(generateContentView(context, contentTitle, contentText, contentInfo, number, largeIcon, subText, useChronometer, when, actions, actionsToShowInCompact, showCancelButton, cancelButtonIntent));
22 if (showCancelButton) {
23 builder.getBuilder().setOngoing(true);
25 }
27 private static <T extends Action> RemoteViews generateContentView(Context context, CharSequence contentTitle, CharSequence contentText, CharSequence contentInfo, int number, Bitmap largeIcon, CharSequence subText, boolean useChronometer, long when, List<T> actions, int[] actionsToShowInCompact, boolean showCancelButton, PendingIntent cancelButtonIntent) {
28 int N;
29 RemoteViews view = applyStandardTemplate(context, contentTitle, contentText, contentInfo, number, largeIcon, subText, useChronometer, when, C0111R.layout.notification_template_media, true);
32 N = 0;
33 } else {
34 N = Math.min(actionsToShowInCompact.length, MAX_MEDIA_BUTTONS_IN_COMPACT);
35 }
36 view.removeAllViews(C0111R.id.media_actions);
create_tables.sql (https://gitlab.com/albert925/lading-ach) SQL · 194 lines
8 -- up with having the same password for the controluser.
9 --
10 -- This user "pma" must be defined in config.inc.php (controluser/controlpass)
11 --
12 -- Please don't forget to set up the tablenames in config.inc.php
18 --
19 -- Database : `phpmyadmin`
20 --
21 CREATE DATABASE IF NOT EXISTS `phpmyadmin`
22 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
23 USE phpmyadmin;
25 -- --------------------------------------------------------
MemcacheTest.php (https://github.com/kiranatama/sagalaya.git) PHP · 392 lines
1 <?php
2 /**
3 * Lithium: the most rad php framework
4 *
5 * @copyright Copyright 2012, Union of RAD (http://union-of-rad.org)
6 * @license http://opensource.org/licenses/bsd-license.php The BSD License
7 */
57 $closure = $this->memcache->write($key, $data, $expiry);
58 $this->assertEqual($data, $closure($this->memcache, compact('key', 'data', 'expiry')));
59 $this->assertEqual($data, $this->_conn->get($key));
70 $this->assertTrue(is_callable($closure));
72 $params = compact('key', 'data', 'expiry');
73 $result = $closure($this->memcache, $params);
74 $expected = $data;
Writer.php (https://gitlab.com/xolotsoft/pumasruiz) PHP · 311 lines
IncomeController.php (https://gitlab.com/laher01/factu40) PHP · 181 lines
FormRequest.php (https://gitlab.com/Pasantias/pasantiasASLG) PHP · 227 lines
ext_fb.h (https://bitbucket.org/gnanakeethan/hiphop-php.git) C Header · 101 lines
1 /*
2 +----------------------------------------------------------------------+
3 | HipHop for PHP |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010- Facebook, Inc. (http://www.facebook.com) |
6 | Copyright (c) 1997-2010 The PHP Group |
7 +----------------------------------------------------------------------+
8 | This source file is subject to version 3.01 of the PHP license, |
9 | that is bundled with this package in the file LICENSE, and is |
10 | available through the world-wide-web at the following url: |
11 | http://www.php.net/license/3_01.txt |
12 | If you did not receive a copy of the PHP license and are unable to |
13 | obtain it through the world-wide-web, please send a note to |
14 | license@php.net so we can mail you a copy immediately. |
15 +----------------------------------------------------------------------+
16 */
castvaluepb_test.go (https://gitlab.com/unofficial-mirrors/openshift-origin) Go · 474 lines
247 }
249 func TestCastawayProtoCompactText(t *testing.T) {
250 seed := time.Now().UnixNano()
251 popr := math_rand.New(math_rand.NewSource(seed))
252 p := NewPopulatedCastaway(popr, true)
253 dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
254 msg := &Castaway{}
255 if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
281 }
283 func TestWilsonProtoCompactText(t *testing.T) {
284 seed := time.Now().UnixNano()
285 popr := math_rand.New(math_rand.NewSource(seed))
user.php (https://bitbucket.org/cyberhobo/easy-subscribe.git) PHP · 211 lines
1 <?php
3 /**
59 $subscribed_term_signatures = $es_user->get_subscribed_term_signatures();
61 $template = EasySubscribe::locate_template( 'profile-term-form.php' );
62 $template_data = compact( 'taxonomies', 'user', 'subscribed_term_signatures' );
172 public function get_subscribed_posts() {
173 // Here we decide how to deal with querying serialized data
174 // Choosing to depend on PHP's serial format
175 $posts = get_posts( array(
176 'post_type' => 'any',
197 // Here we decide how to deal with querying serialized data
198 // Choosing to depend on PHP's serial format
199 $sql = "SELECT user_id FROM {$wpdb->usermeta} WHERE meta_key='" . EasySubscribe::SUBSCRIBED_META_KEY .
200 "' and meta_value LIKE '%i:" . $this->_id . ";%'";
Tidy.php (https://bitbucket.org/kudutest1/moodlegit.git) PHP · 207 lines
LegacyTableHelperTest.php (https://gitlab.com/judielsm/Handora) PHP · 324 lines
1 <?php
3 /*
18 * @group legacy
19 */
20 class LegacyTableHelperTest extends \PHPUnit_Framework_TestCase
21 {
22 protected $stream;
24 protected function setUp()
25 {
26 $this->stream = fopen('php://memory', 'r+');
27 }
112 array('ISBN', 'Title', 'Author'),
113 $books,
114 TableHelper::LAYOUT_COMPACT,
115 <<<TABLE
116 ISBN Title Author
secp256k1.c (https://gitlab.com/Ltaimao/bitcoin) C · 328 lines
2 * Copyright (c) 2013, 2014 Pieter Wuille *
3 * Distributed under the MIT software license, see the accompanying *
4 * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
5 **********************************************************************/
106 }
108 int secp256k1_ecdsa_sign_compact(const unsigned char *message, int messagelen, unsigned char *sig64, const unsigned char *seckey, const unsigned char *nonce, int *recid) {
109 DEBUG_CHECK(secp256k1_ecmult_gen_consts != NULL);
110 DEBUG_CHECK(message != NULL);
139 }
141 int secp256k1_ecdsa_recover_compact(const unsigned char *msg, int msglen, const unsigned char *sig64, unsigned char *pubkey, int *pubkeylen, int compressed, int recid) {
142 DEBUG_CHECK(secp256k1_ecmult_consts != NULL);
143 DEBUG_CHECK(msg != NULL);
Language.php (https://github.com/bouthors/gallery3-contrib.git) PHP · 163 lines
1 <?php defined("SYSPATH") or die("No direct script access.");
3 /**
78 /**
79 * Retrieves a localised error name.
80 * @param $int integer error number, corresponding to PHP's error
81 * reporting
82 * @return string localised message
128 if (isset($value->name)) $subst['$'.$i.'.Name'] = $value->name;
129 if (isset($value->data)) $subst['$'.$i.'.Data'] = $value->data;
130 $subst['$'.$i.'.Compact'] =
131 $subst['$'.$i.'.Serialized'] = $generator->generateFromToken($value);
132 // a more complex algorithm for compact representation
136 $stripped_token = clone $value;
137 $stripped_token->attr = array();
138 $subst['$'.$i.'.Compact'] = $generator->generateFromToken($stripped_token);
139 }
140 $subst['$'.$i.'.Line'] = $value->line ? $value->line : 'unknown';
App.php (https://github.com/bobthecow/genghis.git) PHP · 210 lines
1 <?php
3 class Genghis_App
81 $filename = basename($_SERVER['SCRIPT_FILENAME']);
83 foreach (array('SCRIPT_NAME', 'PHP_SELF', 'ORIG_SCRIPT_NAME') as $key) {
84 if (isset($_SERVER[$key]) && basename($_SERVER[$key]) == $filename) {
85 $baseUrl = $_SERVER[$key];
90 if (!isset($baseUrl)) {
91 $path = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : '';
92 $file = isset($_SERVER['SCRIPT_FILENAME']) ? $_SERVER['SCRIPT_FILENAME'] : '';
93 $chunks = array_reverse(explode('/', trim($file, '/')));
146 return $_SERVER['PATH_INFO'];
147 } elseif (isset($_SERVER['REQUEST_URI'])) {
148 return parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
149 } else {
150 return '/';
RedisTest.php (https://github.com/kiranatama/sagalaya.git) PHP · 395 lines
1 <?php
2 /**
3 * Lithium: the most rad php framework
4 *
5 * @copyright Copyright 2012, Union of RAD (http://union-of-rad.org)
6 * @license http://opensource.org/licenses/bsd-license.php The BSD License
7 */
73 $this->assertTrue(is_callable($closure));
75 $params = compact('key', 'data', 'expiry');
76 $result = $closure($this->redis, $params, null);
77 $expected = $data;
95 $this->assertTrue(is_callable($closure));
97 $params = compact('key', 'data', 'expiry');
98 $result = $closure($this->redis, $params, null);
99 $expected = $data;
PostTest.php (https://github.com/pointlessjon/sphere.git) PHP · 423 lines
1 <?php
3 namespace app\tests\cases\models;
32 $expected = $content = 'updated content';
33 $post->save(compact('content'));
34 $post = Post::first($post->_id);
35 $this->assertEqual($expected, $post->content);
119 $post->save();
121 $data = array('content' => 'cool') + compact('user');
122 $args = null;
123 $result = $post->comment(compact('data', 'args'));
136 $this->assertEqual($expected, $result);
138 $data = array('content' => 'super cool') + compact('user');
139 $args = array('0');
140 $result = $post->comment(compact('data', 'args'));
mejoramiento_adecuaciones_controller.php (http://learning-circles.googlecode.com/svn/trunk/) PHP · 226 lines
1 <?php
2 class MejoramientoAdecuacionesController extends AppController {
36 $registros = array_unique($registros);
38 $this->set(compact('zonas','registros'));
39 }
102 $nombre_iem2 = array_unique($nombre_iem2);
104 $this->set(compact('zona', 'nombre_iem2'));
105 }
141 $registros = $this->MejoramientoAdecuacione->find('all',array('conditions'=>array('MejoramientoAdecuacione.fecha'=>$fecha, 'AND'=>array('MejoramientoAdecuacione.zona_id'=>$zona))));
142 $this->set(compact('registros'));
143 }
config.h
(git://github.com/bmeurer/ocaml.git)
C Header · 183 lines
✨ Summary
This C header file defines configuration parameters for the OCaml programming language, including integer types, memory management settings, and garbage collection parameters. It provides definitions for various data types, such as 32-bit and 64-bit integers, floats, and pointers, as well as settings for memory allocation, stack size, and garbage collection thresholds.
This C header file defines configuration parameters for the OCaml programming language, including integer types, memory management settings, and garbage collection parameters. It provides definitions for various data types, such as 32-bit and 64-bit integers, floats, and pointers, as well as settings for memory allocation, stack size, and garbage collection thresholds.
Mailable.php (https://gitlab.com/rmoshiur81/Larave-Grading) PHP · 525 lines
1 <?php
3 namespace Illuminate\Mail;
380 }
381 } else {
382 $this->{$property}[] = compact('address', 'name');
383 }
473 public function attach($file, array $options = [])
474 {
475 $this->attachments[] = compact('file', 'options');
477 return $this;
488 public function attachData($data, $name, array $options = [])
489 {
490 $this->rawAttachments[] = compact('data', 'name', 'options');
492 return $this;
mappb_test.go (https://github.com/hasura/gitkube.git) Go · 470 lines
202 }
204 func TestMapTestProtoCompactText(t *testing.T) {
205 seed := time.Now().UnixNano()
206 popr := math_rand.New(math_rand.NewSource(seed))
207 p := NewPopulatedMapTest(popr, true)
208 dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
209 msg := &MapTest{}
210 if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
236 }
238 func TestFakeMapProtoCompactText(t *testing.T) {
239 seed := time.Now().UnixNano()
240 popr := math_rand.New(math_rand.NewSource(seed))
field_sortable.php (https://github.com/Canuckaholic/Pop-Digital.git) PHP · 151 lines
1 <?php
3 // Exit if accessed directly
114 echo '<input rel="' . $this->field['id'] . '-' . $k . '-hidden" class="' . $class . '" ' . $checked . 'type="' . $this->field['mode'] . '" ' . $name . 'id="' . $this->field['id'] . '[' . $k . ']" value="' . esc_attr( $value_display ) . '" placeholder="' . $nicename . '" />';
116 echo '<span class="compact drag"><i class="el-icon-move icon-large"></i></span>';
117 if ( $this->field['mode'] == "checkbox" || ( isset( $this->field['label'] ) && $this->field['label'] == true ) ) {
118 if ( $this->field['mode'] != "checkbox" ) {
list.html.erb (https://github.com/freddyf7/jobsworth.git) Ruby HTML · 105 lines
FileLogTest.php (https://github.com/LubosRemplik/cakephp.git) PHP · 252 lines
1 <?php
2 /**
3 * FileLogTest file
4 *
5 * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
6 * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
7 *
11 *
12 * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
13 * @link https://cakephp.org CakePHP(tm) Project
14 * @since 1.3.0
15 * @license https://opensource.org/licenses/mit-license.php MIT License
117 $this->_deleteLogs($path);
119 $log = new FileLog(compact('path'));
120 $log->log('warning', 'Test warning');
121 $this->assertFileExists($path . 'error.log');
view.php (https://github.com/brookinsconsulting/ezpublish.git) PHP · 209 lines
ProgramsController.php (https://bitbucket.org/projectangelfaces/project-angel-faces.git) PHP · 254 lines
1 <?php
2 App::uses('AppController', 'Controller');
3 /**
6 * PHP 5
7 *
8 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
9 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
10 *
73 }
74 $profiles = $this->Program->Profile->find('list');
75 $this->set(compact('profiles'));
76 }
107 }
108 $profiles = $this->Program->Profile->find('list');
109 $this->set(compact('profiles'));
110 }
ProviderRepository.php (https://gitlab.com/daniruizcamacho/pfcascensores) PHP · 231 lines
ContentController.php (https://gitlab.com/jafari/resana) PHP · 220 lines
1 <?php
3 namespace frontend\controllers;
88 public function actionCreate($project_id)
89 {
90 $model = new Content(compact('project_id'));
91 $model->scenario = Content::SCENARIO_CREATE;
212 protected function findModel($id, $project_id)
213 {
214 if (($model = Content::findOne(compact('id', 'project_id'))) !== null) {
215 return $model;
216 } else {
MoFileLoader.php (https://gitlab.com/ealexis.t/trends) PHP · 154 lines
FileTest.php (https://bitbucket.org/thesyncim/admin-biarq.git) PHP · 193 lines
1 <?php
2 /**
3 * Lithium: the most rad php framework
4 *
5 * @copyright Copyright 2011, Union of RAD (http://union-of-rad.org)
6 * @license http://opensource.org/licenses/bsd-license.php The BSD License
7 */
63 $this->assertTrue(is_callable($closure));
65 $params = compact('key', 'data', 'expiry');
66 $result = $closure($this->File, $params, null);
67 $expected = 25;
87 $this->assertTrue(is_callable($closure));
89 $params = compact('key', 'data');
90 $result = $closure($File, $params, null);
91 $expected = 25;
wp-comments-post.php (https://gitlab.com/Blueprint-Marketing/WordPress-1) PHP · 154 lines
1 <?php
2 /**
3 * Handles Comment Post to WordPress and prevents duplicate comment posting.
15 /** Sets up the WordPress Environment. */
16 require( dirname(__FILE__) . '/wp-load.php' );
18 nocache_headers();
124 $comment_parent = isset($_POST['comment_parent']) ? absint($_POST['comment_parent']) : 0;
126 $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID');
128 $comment_id = wp_new_comment( $commentdata );
gc.lisp (https://github.com/mathematical-systems/manardb.git) Lisp · 130 lines
1 (in-package #:manardb)
3 (defun gc-compact (offsets-table)
4 (loop for mtagmap across *mtagmaps*
5 for offsets across offsets-table
30 offsets)))
32 (defun gc-rewrite-pointers-and-compact (refs-table)
33 (clear-caches)
34 (let ((offsets-table (map 'vector 'gc-calc-new-offsets *mtagmaps* refs-table)))
60 (t
61 (up refs))))))
62 (gc-compact offsets-table)))
64 (defun gc (root-objects-sequence &key verbose (collect-and-compact t))
TranslationRepository.php (https://github.com/x3ak/zly.git) PHP · 180 lines
1 <?php
3 namespace Zly\Doctrine\Translatable\Entity\Repository;
16 * @subpackage TranslationRepository
17 * @link http://www.gediminasm.org
18 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
19 */
20 class TranslationRepository extends EntityRepository
72 $q = $qb->getQuery();
73 $data = $q->execute(
74 compact('entityId', 'entityClass'),
75 Query::HYDRATE_ARRAY
76 );
107 $dql .= ' AND trans.content = :value';
108 $q = $this->_em->createQuery($dql);
109 $q->setParameters(compact('class', 'field', 'value'));
110 $q->setMaxResults(1);
111 $result = $q->getArrayResult();
BWGViewWidget.php (https://gitlab.com/edgarze188/sunrise) PHP · 175 lines
107 </p>
108 <p>
109 <input type="radio" name="<?php echo $name_type; ?>" id="<?php echo $id_type . "_1"; ?>" value="gallery" class="sel_gallery" onclick="bwg_change_type(event, this)" <?php if ($instance['type'] == "gallery") echo 'checked="checked"'; ?> /><label for="<?php echo $id_type . "_1"; ?>">Gallery</label>
110 <input type="radio" name="<?php echo $name_type; ?>" id="<?php echo $id_type . "_2"; ?>" value="album" class="sel_album" onclick="bwg_change_type(event, this)" <?php if ($instance['type'] == "album") echo 'checked="checked"'; ?> /><label for="<?php echo $id_type . "_2"; ?>">Album</label>
136 </p>
137 <p>
138 <input type="radio" name="<?php echo $name_show; ?>" id="<?php echo $id_show . "_1"; ?>" value="random" <?php if ($instance['show'] == "random") echo 'checked="checked"'; ?> onclick='jQuery(this).nextAll(".bwg_hidden").first().attr("value", "random");' /><label for="<?php echo $id_show . "_1"; ?>">Random</label>
139 <input type="radio" name="<?php echo $name_show; ?>" id="<?php echo $id_show . "_2"; ?>" value="first" <?php if ($instance['show'] == "first") echo 'checked="checked"'; ?> onclick='jQuery(this).nextAll(".bwg_hidden").first().attr("value", "first");' /><label for="<?php echo $id_show . "_2"; ?>">First</label>
140 <input type="radio" name="<?php echo $name_show; ?>" id="<?php echo $id_show . "_3"; ?>" value="last" <?php if ($instance['show'] == "last") echo 'checked="checked"'; ?> onclick='jQuery(this).nextAll(".bwg_hidden").first().attr("value", "last");' /><label for="<?php echo $id_show . "_3"; ?>">Last</label>
141 <input type="hidden" name="<?php echo $name_show; ?>" id="<?php echo $id_show; ?>" value="<?php echo $instance['show']; ?>" class="bwg_hidden" />
144 <label for="<?php echo $id_count; ?>">Count:</label>
145 <input class="widefat" style="width:25%;" id="<?php echo $id_count; ?>" name="<?php echo $name_count; ?>'" type="text" value="<?php echo $instance['count']; ?>"/>
146 </p>
147 <p>
Session.php (https://github.com/k2052/arthur.git) PHP · 196 lines
1 <?php
3 namespace arthur\storage;
37 }
38 $filters = $settings['filters'] ?: array();
39 $result = static::_filter(__FUNCTION__, compact('key', 'options'), $method, $filters);
41 if($options['strategies'])
74 $value = static::applyStrategies(__FUNCTION__, $name, $value, $options);
75 }
76 $params = compact('key', 'value', 'options');
78 foreach($methods as $name => $method) {
107 $key = static::applyStrategies(__FUNCTION__, $name, $key, $options);
108 }
109 $params = compact('key', 'options');
111 foreach($methods as $name => $method)
Util.php (https://gitlab.com/ealexis.t/trends) PHP · 289 lines
CHANGELOG (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 915 lines
138 not automatic, though, actions have to be manually added to the
139 actions.xml file.
140 - added CompactView mode contributed by Francis Dobi
141 - projects now are active in a view even if no dockable is visible if
142 the user uses the plugin menu. This means that the user doesn't need
228 - there's now code in place to enable clipping of the node strings
229 when they don't fit in the tree viewport. It's only enabled for the
230 compact view mode, though, since it doesn't make a lot of sense for
231 the other modes and it also doesn't work perfectly.
232 - updated a lot of developer documentation in the javadocs.
Patch.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 395 lines
✨ Summary
This Java code implements a patch editor that applies changes to a text file by applying chunks of text, known as “patches”, to the original file. It supports three types of patches: add (insertion), change (replacement), and delete (removal). The code uses an offset-based system to apply patches to the original file, allowing for precise control over where in the file each patch is applied.
This Java code implements a patch editor that applies changes to a text file by applying chunks of text, known as “patches”, to the original file. It supports three types of patches: add (insertion), change (replacement), and delete (removal). The code uses an offset-based system to apply patches to the original file, allowing for precise control over where in the file each patch is applied.
69 fct
70 Replace the lines in range f of the first file with lines in range t of the
71 second file. This is like a combined add and delete, but more compact. For
72 example, 5,7c8,10 means change lines 5-7 of file 1 to read as lines 8-10 of
73 file 2; or, if changing file 2 into file 1, change lines 8-10 of file 2 to
attributes.html (https://bitbucket.org/nbargnesi/idea.git) HTML · 2683 lines
649 <tr>
650 <td title="Name"><a href="../struct/lists.html#adef-compact">compact</a></td>
651 <td align="center" title="Related Elements"><a href=
652 "../struct/lists.html#edef-DIR" class="noxref">DIR</a>, <a href=
655 "../struct/lists.html#edef-OL" class="noxref">OL</a>, <a href=
656 "../struct/lists.html#edef-UL" class="noxref">UL</a></td>
657 <td align="center" title="Type">(compact)</td>
658 <td align="center" title="Default">#IMPLIED</td>
659 <td align="center" title="Depr.">D</td>
FIXES (https://bitbucket.org/freebsd/freebsd-head/) Unknown · 1011 lines
g_i_l_0094.html
(http://hadesmem.googlecode.com/svn/trunk/)
HTML · 0 lines
✨ Summary
This HTML code is a documentation page for a C++ library, specifically the Generic Image Library (GIL). It displays information about the gil_config.hpp
file, including its purpose, authorship, and defines related to the library’s configuration. The page also includes links to other documentation pages and a generated timestamp.
This HTML code is a documentation page for a C++ library, specifically the Generic Image Library (GIL). It displays information about the gil_config.hpp
file, including its purpose, authorship, and defines related to the library’s configuration. The page also includes links to other documentation pages and a generated timestamp.
LexLua.cxx
(https://bitbucket.org/ZCube/ogre-android/)
C++ · 358 lines
✨ Summary
This C++ code defines a lexer module for parsing Lua programming language syntax. It includes functions to tokenize and colorize Lua source code, as well as a function to fold (indent) documentation comments. The LexerModule
class is used to create a lexer that can be integrated with an editor or IDE.
This C++ code defines a lexer module for parsing Lua programming language syntax. It includes functions to tokenize and colorize Lua source code, as well as a function to fold (indent) documentation comments. The LexerModule
class is used to create a lexer that can be integrated with an editor or IDE.
277 int levelCurrent = levelPrev;
278 char chNext = styler[startPos];
279 bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
280 int styleNext = styler.StyleAt(startPos);
281 char s[10];
320 if (atEOL) {
321 int lev = levelPrev;
322 if (visibleChars == 0 && foldCompact) {
323 lev |= SC_FOLDLEVELWHITEFLAG;
324 }
g_i_l_0243.html
(http://hadesmem.googlecode.com/svn/trunk/)
HTML · 0 lines
✨ Summary
This is an HTML documentation page for a C++ library, specifically the Generic Image Library (GIL). It displays information about the library’s functions and classes, including function templates, member functions, and constants. The output provides a detailed overview of the library’s functionality, making it easier to understand and use the library in code.
This is an HTML documentation page for a C++ library, specifically the Generic Image Library (GIL). It displays information about the library’s functions and classes, including function templates, member functions, and constants. The output provides a detailed overview of the library’s functionality, making it easier to understand and use the library in code.
uberon-bridge-to-tao.obo (git://github.com/cmungall/uberon.git) text · 0 lines
ftcache.h
(http://angel-engine.googlecode.com/svn/trunk/)
C++ Header · 1122 lines
✨ Summary
This is a C++ header file that defines various data structures and functions for font management, caching, and optimization. It provides classes and functions for managing fonts, faces, sizes, and bitmaps, as well as caching and lookup functionality. The code appears to be part of the FreeType library, which is used for rendering and manipulating fonts in graphics applications.
This is a C++ header file that defines various data structures and functions for font management, caching, and optimization. It provides classes and functions for managing fonts, faces, sizes, and bitmaps, as well as caching and lookup functionality. The code appears to be part of the FreeType library, which is used for rendering and manipulating fonts in graphics applications.
CHANGES.txt (https://jedit.svn.sourceforge.net/svnroot/jedit) Plain Text · 2241 lines
87 - Updated BibTeX and LaTeX syntax highlighting (Thomas Alspaugh).
89 - PHP mode now recognizes <script language="PHP">...</script>.
91 - Updated Omnimark syntax highlighting (Lionel Fiol).
599 - Added MoinMoin syntax highlighting (Ollie Rutherfurd).
601 - Added Relax NG compact syntax highlighting (Randy Hudson).
603 - Minor fix to Perl heredoc syntax highlighting (Chris Petersen).
892 modes.
894 - SCRIPT tags in HTML files no longer recognize <?php ... ?>.
896 }}}
gtkrc (http://gnome-colors.googlecode.com/svn/trunk/) Unknown · 555 lines
12 #########
13 gtk-icon-sizes = "gtk-button=16,16" # This makes button icons smaller.
14 #gtk-icon-sizes = "gtk-large-toolbar=16,16:gtk-small-toolbar=16,16:panel-menu=16,16:gtk-button=16,16" # This enables "compact-mode".
15 #gtk-button-images = 0 # Enables or disables icons on buttons (OS X-like).
16 #gtk-menu-popup-delay = 1 # Makes menus pop up faster! Set to 1 instead of 0 to avoid any bugs.
76 GtkEntry::progress-border = { 2, 2, 2, 2 } # Border of GtkEntry progressbars.
78 # GtkWidget::focus-padding = 0 # This can give you a more compact appearance.
79 GtkScrolledWindow::scrollbar-spacing = 1 # This sets the spacing between scrollbars.
css.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 674 lines
BinaryDictionary.java
(http://softkeyboard.googlecode.com/svn/)
Java · 163 lines
✨ Summary
This Java class, BinaryDictionary
, implements a static binary dictionary of standard words for an Android application. It loads and compiles a raw resource file into a native library, allowing for efficient word suggestions and validation. The class provides methods to load the dictionary, get words from input codes, validate words, and close the dictionary.
This Java class, BinaryDictionary
, implements a static binary dictionary of standard words for an Android application. It loads and compiles a raw resource file into a native library, allowing for efficient word suggestions and validation. The class provides methods to load the dictionary, get words from input codes, validate words, and close the dictionary.
CSSValueKeywords.h (https://bitbucket.org/ultra_iter/qt-vtl.git) C Header · 687 lines
catalog (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 546 lines
zone.hh
(git://github.com/ticking/self.git)
C++ Header · 270 lines
✨ Summary
This C++ header file defines a memory management system for a compiler, specifically for handling nmethods (optimized methods). It provides classes and functions for managing memory allocation, deallocation, and usage tracking, as well as features like LRU caching and frame chaining. The code is designed to be used in a compiler environment, with various zones (memory regions) and objects (nmethods) that interact with each other.
This C++ header file defines a memory management system for a compiler, specifically for handling nmethods (optimized methods). It provides classes and functions for managing memory allocation, deallocation, and usage tracking, as well as features like LRU caching and frame chaining. The code is designed to be used in a compiler environment, with various zones (memory regions) and objects (nmethods) that interact with each other.
31 nmethod* LRUhand; // for LRU algorithm; sweeps through iZone
33 bool needsICompaction;// need compaction of iZone
34 bool needsSCompaction;// need compaction of dZone
35 bool needsDCompaction;// need compaction of sZone
36 bool _needsSweep; // need LRU sweep
37 int32 compactDuration;// duration of last compaction
80 nmethod* lookup(MethodLookupKey &k, bool needDebug = false);
82 void compact(bool forced = false);
83 void compactAll() {
84 needsICompaction = needsSCompaction = needsDCompaction = true;
85 compact(true); }
86 bool needsCompaction() {
87 return needsICompaction || needsSCompaction || needsDCompaction; }
88 bool needsWork() { return needsCompaction() || _needsSweep; }
emit.cxx
(https://swig.svn.sourceforge.net/svnroot/swig)
C++ · 525 lines
✨ Summary
This C++ code is part of a Python-to-C++ compiler, specifically responsible for generating wrapper code and exception handling for Python functions. It processes Python function definitions, including contracts (pre- and post-conditions), exceptions, and return types, to produce efficient C++ code that can be compiled into native binaries.
This C++ code is part of a Python-to-C++ compiler, specifically responsible for generating wrapper code and exception handling for Python functions. It processes Python function definitions, including contracts (pre- and post-conditions), exceptions, and return types, to produce efficient C++ code that can be compiled into native binaries.
239 * use with multi-argument typemaps and knows how to skip over everything
240 * properly. Note that parameters with default values are counted unless
241 * the compact default args option is on.
242 * ----------------------------------------------------------------------------- */
246 int nargs = 0;
247 Parm *first_default_arg = 0;
248 int compactdefargs = ParmList_is_compactdefargs(p);
250 while (p) {
257 if (!first_default_arg)
258 first_default_arg = p;
259 if (compactdefargs)
260 break;
261 }
Modules.html
(https://swig.svn.sourceforge.net/svnroot/swig)
HTML · 350 lines
✨ Summary
This HTML code outputs a documentation page for SWIG, a software development tool that generates wrappers for C and C++ code to interface with multiple programming languages. The page explains various aspects of using SWIG, including importing modules, generating wrapper files, and optimizing their size. It also provides references and cautions about working with shared libraries and dynamically loaded modules.
This HTML code outputs a documentation page for SWIG, a software development tool that generates wrappers for C and C++ code to interface with multiple programming languages. The page explains various aspects of using SWIG, including importing modules, generating wrapper files, and optimizing their size. It also provides references and cautions about working with shared libraries and dynamically loaded modules.
310 <p>
311 <b>-fcompact</b><br>
312 This command line option will compact the size of the wrapper file without changing the code generated into the wrapper file.
343 <p>
344 <b>%feature("compactdefaultargs")</b><br>
345 This feature can reduce the number of wrapper methods when wrapping methods with default arguments. The section on <a href="SWIGPlus.html#SWIGPlus_default_args">default arguments</a> discusses the feature and its limitations.
346 </p>
wrapfunc.c
(https://swig.svn.sourceforge.net/svnroot/swig)
C · 512 lines
✨ Summary
This C code is part of a compiler or interpreter for a programming language, specifically designed to handle function wrappers and local variable declarations. It provides functions to print out wrapper functions, add new local variables, check if a local name has already been declared, and create unique names for new locals. The code uses a combination of strings, arrays, and hash tables to manage the data.
This C code is part of a compiler or interpreter for a programming language, specifically designed to handle function wrappers and local variable declarations. It provides functions to print out wrapper functions, add new local variables, check if a local name has already been declared, and create unique names for new locals. The code uses a combination of strings, arrays, and hash tables to manage the data.
20 #include <ctype.h>
22 static int Compact_mode = 0; /* set to 0 on default */
23 static int Max_line_size = 128;
57 /* -----------------------------------------------------------------------------
58 * Wrapper_compact_print_mode_set()
59 *
60 * Set compact_mode.
189 *
190 * Formats a wrapper function and fixes up the indentation.
191 * Print out in compact format, with Compact enabled.
192 * ----------------------------------------------------------------------------- */
magic (git://github.com/apache/httpd.git) Unknown · 386 lines
114 # compress: file(1) magic for pure-compression formats (no archives)
115 #
116 # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, whap, etc.
117 #
118 # Formats for various forms of compressed data
133 0 short 017437 application/octet-stream
135 # XXX - why *two* entries for "compacted data", one of which is
136 # byte-order independent, and one of which is byte-order dependent?
137 #
138 # compacted data
139 0 short 0x1fff application/octet-stream
140 0 string \377\037 application/octet-stream
zo-parse.rkt
(git://github.com/gmarceau/PLT.git)
Racket · 1065 lines
✨ Summary
This Racket code is a bytecode parser and compiler for Scheme. It reads a compiled Scheme file, parses its contents, and returns the parsed data as a vector of bytes. The zo-parse
function takes a byte array representing a compiled Scheme file and returns the parsed data, which can be used to execute or manipulate the compiled code.
This Racket code is a bytecode parser and compiler for Scheme. It reads a compiled Scheme file, parses its contents, and returns the parsed data as a vector of bytes. The zo-parse
function takes a byte array representing a compiled Scheme file and returns the parsed data, which can be used to execute or manipulate the compiled code.
786 (loop l ppr)))]
787 [(let-one let-one-flonum let-one-unused)
788 (make-let-one (read-compact cp) (read-compact cp)
789 (eq? cpt-tag 'let-one-flonum)
790 (eq? cpt-tag 'let-one-unused))]
791 [(branch)
792 (make-branch (read-compact cp) (read-compact cp) (read-compact cp))]
793 [(module-index) (module-path-index-join (read-compact cp) (read-compact cp))]
908 (let ([uninterned (read-compact-number cp)]
909 [str (read-compact-chars cp (read-compact-number cp))])
910 (if (= 1 uninterned)
911 ; uninterned is equivalent to weird in the C implementation
944 [else 'closure])))))]
945 [(svector)
946 (read-compact-svector cp (read-compact-number cp))]
947 [(small-svector)
948 (read-compact-svector cp (- ch cpt-start))]