function test_binary_exact() { vecho("Binary, positive powers of 2\n"); $n = 1; for ($i = 0; $i < 30; $i++) { tb1($n); $n *= 2; } vecho("\nBinary, negative powers of 2\n"); $n = 1; for ($i = 0; $i < 30; $i++) { tb1($n); $n /= 2; } vecho("\n"); }
public static function echof($varName, $format = null, $default = '') { vecho($varName, $format, $default); }
</data></td> </tr></table> </div> <?php } ?> <div class="mblockwrapper"> <table class="mblock"> <td class="pp"><profpic style="background-image: url('asdf');"></profpic></td> <td><data> <form method="post" action="?id=<?php vecho('currentid'); ?> "> <textarea id="msg" name="msg" required maxlength="2000" placeholder="Write Your Message:"><?php vecho('msg'); ?> </textarea> <?php vnotice(); ?> <right><input type="submit" name="reply" value="Send" /></right> </form> </data></td> </table> </div> <?php } ?> </td> </tr></table>
foreach ($cols[1] as $blurb) { echo $blurb; } ?> </td> <td class="col"> <?php foreach ($cols[2] as $blurb) { echo $blurb; } ?> </td> </tr> </table> </div> <a href="search.php?bycompany=<?php vecho('name'); ?> "><input type="button" value="View Job Listings" /></a> <?php if (vget('isme')) { ?> <br /><br /> <a href="editcompany.php"><input type="button" value="Edit Company Profile" /></a> <?php } ?> </div> </panel>
<form method="post" enctype="multipart/form-data"> Image (< 10MB): <input type="file" name="upload" /> <input type="submit" value="Upload" /><br /> <small>(.JPG/.JPEG, .PNG, .GIF only)</small> </form> </div> <script> function up(url) { console.log(url); <?php if (isset($_GET['name'])) { $name = $_GET['name']; echo "window.parent.addImg{$name}(url, '{$name}');"; } else { echo 'window.parent.addImg(url);'; } ?> } <?php vecho('reply'); ?> function resize() { window.parent.$('iframe.S3') .width($('.container').width()) .height($('.container').height()); } $('.container').resize(resize); resize(); setTimeout(function() { resize(); }, 1000); </script>
<panel class="form"> <div class="content"> <headline>Report a Bug/Feedback Form</headline> <form method="post"> <?php vnotice(); ?> <div class="form-slider"><label for="name">Name</label><input type="text" id="name" name="name" value="<?php vecho('Lname'); ?> " required /></div> <div class="form-slider"><label for="email">Email</label><input type="email" id="email" name="email" value="<?php vecho('Lemail'); ?> " required /></div> <br /> <left>Please describe the bug (what you did, what the bug was, what were you trying to do) or write your feedback:</left> <div class="form-slider"><textarea id="feedback" name="feedback" required><?php vecho('feedback'); ?> </textarea></div> <br> <left><input type="checkbox" name="terms2" id="terms2" value="agree" required /> <label for="terms2">I have read, understand, and agree to be bound by the <a href="terms.php" style="color:#035d75">Terms of Service.</a></label></left> <?php vnotice(); ?> <input type="submit" name="send" value="Send Report" /> </form> </div> </panel>
</div> </div> <div class="icon" style="background-image: url('<?php echo $GLOBALS['dirpre']; ?> assets/gfx/salaryico.png');"> <div class="cell"> <subheadline> <?php if (vget('salarytype') != "other") { echo '$'; } vecho('salary'); if (vget('salarytype') != "other") { echo ' / '; vecho('salarytype'); } ?> </subheadline> <small>Compensation</small> </div> </div> </td> </tr> </table> </div> <?php vpartial('fb', array('route' => 'jobs/job.php?id=' . vget('_id'))); ?>
@media (max-width: 1000px) { .form-slider label { color: #fff; } } </style> <panel class="search"> <div class="content"> <div class="tagline">Select Location & Date</div> <form method="get" style="width: 300px;"> <div class="form-slider"><label for="location">Address </label><input type="text" id="location" name="location" value="<?php vecho('location'); ?> " /></div> <div class="form-slider startdate"><label for="startdate">From </label><input class="datepicker" type="text" id="startdate" name="startdate" value="<?php vecho('startdate'); ?> " /></div> <div class="form-slider enddate"><label for="enddate">To </label><input class="datepicker" type="text" id="enddate" name="enddate" value="<?php vecho('enddate'); ?> " /></div> <input type="submit" name="search" value="Search" /> </form> </div> </panel>
function vnotice() { vecho('Success', "<div class=\"success\">{var}</div>"); vecho('Error', "<div class=\"error\">{var}</div>"); }
<?php $buildingtypes = array("Apartment Building", "Student Housing (Dorm)", "Elevator Building", "Walk-Up", "Town-House", "Brownstone", "Rowhouse", "Duplex", "House", "Other"); if (!is_null(vget('any'))) { array_unshift($buildingtypes, 'Any'); } ?> <div class="form-slider"><label for="buildingtype">Building type: </label> <select id="buildingtype" name="buildingtype" required> <?php vecho('buildingtype', '<option selected="selected">{var}</option>'); foreach ($buildingtypes as $buildingtype) { echo "<option>{$buildingtype}</option>"; } ?> </select></div>
vecho('school'); ?> " /></div> <div class="form-slider"><label for="gender">Gender: </label> <select id="gender" name="gender" class="capitalize" required> <?php vecho('gender', '<option selected="selected">{var}</option>'); ?> <option value="male">Male</option> <option value="female">Female</option> <option value="other">Other</option> </select> </div> <?php vpartial('s3single', array('s3name' => 'photo', 's3title' => 'Upload a profile picture *: ', 's3link' => vget('photo'))); ?> <div class="form-slider"><label for="bio" class="fortextarea">About yourself: (max. 1000 characters)*</label><textarea id="bio" name="bio" maxlength="1000"><?php vecho('bio'); ?> </textarea></div> <?php vnotice(); ?> <input type="submit" name="edit" value="Update Profile" /> </form> </div> </panel>
} } ?> <?php if (vget('Loggedinstudent')) { ?> <br /><br /> <?php View::partial('newmessage', ['from' => View::get('L_id'), 'to' => View::get('recruiterid'), 'text' => 'Message']); ?> <?php } ?> </div> <a href="search.php?byrecruiter=<?php vecho('recruiterid'); ?> "><input type="button" value="View Job Listings" /></a> <?php if (vget('isme')) { ?> <br /><br /> <a href="editprofile.php"><input type="button" value="Edit Profile" /></a> <?php } ?> </div> </panel>
test(0, 110, 0, 110); # case C) plot_min < 0 < plot_max [----0----] test(-60, 60, -60, 60); # case D) plot_min < plot_max == 0 [-------0 test(-60, 0, -60, 0); # case E) plot_min < plot_max < 0 [-----] 0 test(-60, -20, -60, -20); vecho("=== Powers of 10 ranges\n"); for ($r = 0.01; $r <= 100; $r *= 10) { test(0, $r, 0, $r); } for ($r = 0.01; $r <= 100; $r *= 10) { test(-$r, 0, -$r, 0); } for ($r = 0.01; $r <= 100; $r *= 10) { test(-$r, $r, -$r, $r); } vecho("=== Negative vs positive ranges\n"); test(10, 100, 10, 100); test(-100, -10, -100, -10); test(-100, 10, -100, 10); test(-10, 100, -10, 100); vecho("=== Regressive cases\n"); test(0, 0, 0, 0); test(100, 100, -100, -100); test(-100, -100, 100, 100); # ======== End of test cases and error reporting ========== echo basename(__FILE__) . " results: {$n_tests} test cases, {$n_pass} pass, {$n_fail} fail\n"; if ($n_fail > 0) { exit(1); }
<div class="cell"> <div class="banner"> <div class="content"> <div class="tagline">Join the social hubs!</div> <div class="slogan"> Meet other students working in the same city as you are! </div> <?php if (vget('Loggedinstudent')) { ?> <?php if (vget('myhub')) { ?> <div id="tohub"> <a href="hub.php?id=<?php vecho('myhub'); ?> "> <input type="button" value="Take me to my hub" /> </a> <div class="whitetext"> <br /><br /> <big>— OR —</big> <br /><br /> <?php } ?> <div class="whitetext"> Select a Hub to Join!
<style>iframe { margin: 0; }</style> <div class="fb-like" data-href="https://sublite.net/<?php vecho('route'); ?> " data-layout="button_count" data-action="like" data-show-faces="false" data-share="true" style="z-index: 2;"></div>
If you are an undergraduate student, enter your class year: <div class="form-slider"><label for="class">Class Year</label><input type="text" id="class" name="class" value="<?php vecho('class'); ?> " /></div> If you are a graduate student, enter your school: <div class="form-slider"><label for="school">(eg. Law School, Business School)</label><input type="text" id="name" name="school" value="<?php vecho('school'); ?> " /></div> <div class="form-slider"><label for="gender">Gender: </label> <select id="gender" name="gender" required> <?php vecho('gender', '<option selected="selected">{var}</option>'); ?> <option value="male">Male</option> <option value="female">Female</option> <option value="other">Other</option> </select> </div> <?php vpartial('s3single', array('s3name' => 'photo', 's3title' => 'Upload a profile picture *: ', 's3link' => vget('photo'))); ?> <?php vnotice(); ?> <input type="submit" name="register" value="Register" />
margin: 0 auto; } </style> <panel> <div class="content"> <headline>Personal Profile</headline> <div class="studentinfo"> <div class="studentpic" style="background-image: url('<?php vecho('photo'); ?> ');"></div> <subheadline><?php vecho('name'); ?> </subheadline> <?php vecho('school'); ?> '<?php vecho('class'); ?> <br /><br /> <div><?php echo vlinkto('<input type="button" value="Edit Profile" />', 'editprofile'); ?> </div> </div> </div> </panel>
</subheadline> <div class="iframe"><iframe class="S3" src="S3.php?name=<?php vecho('s3name'); ?> "></iframe></div> <subheadline>Current Photos</subheadline> <div class="img" type="multiple" name="<?php vecho('s3name'); ?> ">None</div> <script> function addImg<?php vecho('s3name'); ?> (url, name) { if ($('.img[name='+name+']').html() == 'None') $('.img[name='+name+']').html(''); $('.inputs[name='+name+']') .prepend('<input class="imginput" type="hidden" name="'+name+'[]" value="' + url + '" />'); $('.img[name='+name+']') .prepend('<img class="img" src="' + url + '" />'); $('.img[name='+name+'] img[src="'+url+'"]').click(function() { $('.inputs[name='+name+'] .imginput[value="'+url+'"]').remove(); $(this).remove(); if ($('.img[name='+name+']').html() == '') $('.img[name='+name+']').html('None'); });
?> " /></div> <div class="form-slider"><label for="freeanswer2">Answer #2 (max. 500 characters)</label><textarea id="freeanswer2" name="freeanswer2" maxlength="500"><?php vecho('freeanswer2'); ?> </textarea></div> <?php vnotice(); ?> <right> <input type="submit" name="<?php vecho('submitname'); ?> " value="<?php vecho('submitvalue'); ?> " /> </right> </form> </div> </panel> <script> <?php if (vget('submitname') == 'add') { ?> formunloadfunction(function() { saveForm('#company') }); <?php } else { ?>
?> ../housing/Manage.php">Manage</a>, clicking a listing to access its editing page, and unchecking the Publish? option. Next year when you’re ready to sublet again, simply check Publish? again to reactivate. You can also make edits to your listings anytime. <subheadline>What legal issues should I consider before hosting on SubLite?</subheadline> Make sure you have permission from your landlord or owner of your space to sublet. Before you list, you will have to agree that you can legally sublet according to our Terms of Use. Please also ensure all information in your listing is accurate and not misleading. For more guidance, refer to our Terms of Use. <subheadline>When should I contact a host?</subheadline> As soon as you find a space that interests you. Don’t wait until the last-minute, or it may be gone! <br /> Legitimate reasons to contact another user are to ask questions about the amenities and to inquire about price. Please contact hosts in good-faith. Spamming is expressly prohibited. For more guidance, refer to our <a href="<?php vecho('dirpre'); ?> ../terms.php">Terms of Use</a>. <subheadline>What will my listing and profile information be used for?</subheadline> We will use this solely to enhance the search functionality of SubLite to make it easier to connect hosts and guests. We require your property’s address so other users can estimate proximity to their workplace. Your exact address will not be disclosed. <br /> We will not sell your information. You may see targeted advertising from sponsors based solely on non-identifying information such as your university and class year. We will not pass any of your information along to your universities, unless you violate the Terms of Use. <br /> For more information, read our <a href="<?php vecho('dirpre'); ?> ../privacy.php">Privacy Policy</a>. <subheadline>Where can I leave feedback?</subheadline> Whether you like our website or not, we want to hear what you have to say. If you have a funny or horrific summer housing experience, we also want to hear from you. Email us at <a href="mailto: info@sublite.net">info@sublite.net</a>. </left> </div> </panel>
<panel class="form"> <div class="content"> <headline>Student Log In</headline> <form method="post"> <div class="form-slider"><label for="email">Email</label><input type="email" id="email" name="email" value="<?php vecho('email'); ?> " required /></div> <div class="form-slider"><label for="pass">Password</label><input type="password" id="pass" name="pass" required /></div> <?php vnotice(); ?> <input type="submit" name="login" value="Log In" /> <div style="font-size: 0.8em"><a href="register.php">Don't Have an Account?</a></div> <div style="font-size: 0.8em"><a href="forgotpass.php">Forgot Your Password?</a></div> <div style="font-size: 0.8em"><a href="../employers/login.php">Log In As Recruiter</a></div> </form> </div> </panel>
} } $('#industry') .change(function() { changeIndustryLabel($(this).val().length > 0); }) .ready(function() { changeIndustryLabel(<?php if (strlen(vget('industry')) > 0) { echo 'true'; } else { echo 'false'; } ?> ) }); </script> <div class="form-slider"><label for="city">City:</label><input type="text" id="city" name="city" value="<?php vecho('city'); ?> " /></div> <div class="form-slider"><label for="company">Company:</label><input type="text" id="company" name="company" value="<?php vecho('company'); ?> " /></div> <?php vnotice(); ?> <input type="submit" name="search" value="Search" /> </form> </div> </panel>
<?php vpartial('hubs/controllers/views'); vpartial('hubs/controllers/tabs'); ?> <?php vpartial('hubs/controllers/afterrender'); vpartial('hubs/controllers/comm'); ?> <script> // Actual code to set everything up for the first time // Config var myid = null, thishub = '<?php vecho('hub'); ?> ', thishubname = ''; Views.setup(); Posts.setup(); Meetups.setup(); Members.setup(); // Get current hub Comm.retrieve('hub', thishub, function () {}); </script>
</tr> </table> </div> <?php vpartial('fb', array('route' => 'jobs/job.php?id=' . vget('_id'))); ?> <br /><br /> <?php if (vget('Loggedinstudent') || vget('Loggedin')) { ?> <a href="../redirect.php?<?php echo "id="; echo $_GET['id']; echo "&url="; vecho('link'); ?> " onClick="return confirm('You have clicked on an external link and are leaving the pages of SubLite.net. We are not responsible for the accuracy or effectiveness of any content outside of SubLite.net.')"><input type="button" value=<?php if (filter_var(vget('link'), FILTER_VALIDATE_EMAIL)) { ?> "Apply by Email"<?php } else { ?> "Apply Now"<?php } ?> /></a> <?php } else { echo vlinkto('<input type="button" class="button" value="Login or register to apply for this opening!" />', 'login'); }
vecho('delay', '<div style="text-align: center;"><i>Results returned in {var} ms</div><br />'); } foreach ($sublets as $sublet) { echo subletBlock($sublet); } if (count($sublets) == 0) { echo "No sublets matching your query. But don't fret! New sublets are being added regularly."; } ?> </div> <?php if (!is_null(vget('recent'))) { ?> <a href="?showMore">Show More</a> <?php if (vget('showMore')) { ?> <script>scrollTo('.subletblock', <?php vecho('showMore'); ?> -7);</script> <?php } ?> </div> <?php } ?> </panel> <div class="clear"></div>
<div id="map-canvas"></div> </panel> <div class="pop"> <div class="poptable"> <div class="popphoto"><img src="" /></div> </div> </div> <div class="popshare"> <div class="poptable"> <div class="popcell"> <div class="popsharetext"> Share your listing on social media such as Facebook groups to advertise your listing! <br />Copy and paste the link below into posts: <br /><br /> <copy>www.sublite.net/housing/sublet.php?id=<?php vecho('_id'); ?> </copy> <br /> or Like and Share below: <br /><br /> <?php vpartial('fb', array('route' => 'housing/sublet.php?id=' . vget('_id'))); ?> <br /><br /><br /> <input type="button" id="soundsgood" value="Sounds good!" /> <input type="button" id="hideshare" style="background: #999;" value="Don't show this again." /> </div> </div> </div> </div>
?> </num><type>users</type></div> <div class="stat"><num><?php vecho('universities'); ?> </num><type>universities</type></div> <div class="stat"><num><?php vecho('jobs'); ?> </num><type>jobs</type></div> <div class="stat"><num><?php vecho('sublets'); ?> </num><type>sublets</type></div> <div class="stat"><num><?php vecho('companies'); ?> </num><type>companies</type></div> </div> </panel> <panel class="why"> <div class="content"> <headline style="color: #035d75;">Why SubLite?</headline> <div style="font-size: 1em; margin-top: -20px; margin-bottom: 20px;"> We know you are working hard to network and get top grades for the best summer experience.<br /> Finding jobs and housing can be a painstaking process.<br /> Living in a foreign city over the summer by yourself can be daunting.<br /> But it doesn't have to be. </div> <table class="whys"><tr> <td class="whycell"><incell>
" required /></div> <div class="form-slider"><label for="phone">Phone number:</label><input type="text" id="phone" name="phone" value="<?php vecho('phone'); ?> " /></div> <input type="hidden" name="photo" value="<?php vecho('photo'); ?> " /> <subheadline>Upload Photo</subheadline> <div class="iframe"><iframe class="S3" src="S3.php"></iframe></div> <subheadline>Current Photo</subheadline> <div class="img"><img src="<?php vecho('photo'); ?> " /></div> <?php vnotice(); ?> <right><input type="submit" name="edit" value="Save Profile" /></right> </form> </div> </panel> <script> function addImg(url) { $('.img').html('<img class="img" src="' + url + '" />'); $('input[name=photo]').val(url);
?> " /> <label for="looking">Summer 2016</label><input type="checkbox" id="housingSummer2016" name="housingSummer2016" value="<?php vecho('housingSummer2016'); ?> " /> <label for="looking">Fall 2016</label><input type="checkbox" id="housingFall2016" name="housingFall2016" value="<?php vecho('housingFall2016'); ?> " /> <label for="looking">Winter 2017</label><input type="checkbox" id="housingWinter2017" name="housingWinter2017" value="<?php vecho('housingWinter2017'); ?> " /> <label for="looking">Spring 2017</label><input type="checkbox" id="housingSpring2017" name="housingSpring2017" value="<?php vecho('housingSpring2017'); ?> " /> <br> </div> <input type="submit" name="register" value="Register" /> </form> </div> </panel> <script type="text/javascript"> function educationValueChanged() { if($('.undergraduate').is(":checked")) $(".undergraduateShow").show(); else
?> <?php vpartial('buildingtype', array('any' => true)); ?> <?php vpartial('amenities'); ?> <div class="form-slider"><label for="sortby">Sort By: </label> <select id="sortby" name="sortby" required> <?php $sortby = array('priceIncreasing' => 'Cheapest', 'priceDecreasing' => 'Most Expensive', 'proximityIncreasing' => 'Closest'); if (isset($sortby[vget('sortby')])) { vecho('sortby', '<option selected="selected" value="{var}">' . $sortby[vget('sortby')] . '</option>'); } foreach ($sortby as $val => $in) { echo "<option value=\"{$val}\">{$in}</option>"; } ?> </select> </div> <?php vnotice(); ?> <input type="submit" name="search" value="Search" /> </form> <input type="button" class="collapse" value="Show Filters" /> </panel>