Posts

javascript - Automatically Add Class To Subchild & Parent LI With jQuery -

i have been searching hours solution problem , none of them seem work way like. need jquery automatically add class "active" main li , child li if on page. first code block simple structure, second code block how needs if on "billing_forecast.php" page. <aside id="sidebar"> <!--| main menu |--> <ul id="side-menu" class="side-menu"> <li> <a href="index.php"> <i class="zmdi zmdi-home"></i> <span>home</span> </a> </li> <li class="sm-sub sms-bottom"> <a href=""> <i class="zmdi zmdi-money zmdi-hc-fw"></i> <span>billing</span> </a> <ul> ...

xcode - How to call a method defined in a UIView controller from a UIView placed within the ViewController -

how call method defined in uiview controller uiview placed within viewcontroller. if isn't possible how make button placed within uiview call segue? spent hours trying figure out. so took me day managed find simple workaround. in uiview.h create uiviewcontroller property , in viewcontroller set uiviews property .self . having done within uiview can access property , there call prepare segue.

android - Multiple SQLite Tables not working correctly -

i attempting create 2 sqlite tables. 1 holds "todoitem"s , other holds "detailitem"s. when creating them , logging them this: i/todos: [todoitem [id=1, todoitemname=1], todoitem [id=2,todoitemname=2]] i/detailitems: [todoitem [id=1, todoitemname=["1.1","1.2","1.3"]], todoitem [id=2, todoitemname=[]]] as may notice, seems both tables contain todoitems 1 supposed holding "detailitem"s. here code of databasehelper: public class sqlitehelper extends sqliteopenhelper { private static final int database_version = 1; private static final string database_name = "productdb.db"; public static final string table_products = "products"; public static final string table_details = "details"; //common columns public static final string column_id = "_id"; //todoitem columns public static final string column_productname = "productname"; //detailitem columns public sta...

jquery - CSS with background image and a little content -

i have background image going overlay testimonial in near lower right. having hard time work responsive design. have image 930x454 want show entire image. tried set min-width , min-height , can work when shrink window wider screen. ideally want image not exceed 100% width of screen size. content 3 sentences not come close taking 930x454. do need write resize function or there easy css solution this. two key concepts important here: positionin g (in case relative on parent , absolute on text box), , background-size . i'll leave google those. .background { background-image: url('http://lorempixel.com/930/454/nature'); background-size: cover; height: 0; padding-bottom: 56.25%; max-width: 100%; position: relative; } .text { position: absolute; right: 20px; bottom: 20px; background: rgba(255,255,255,.3); padding: 20px; } <div class="background"> <div class="text">some text.</...

Allow CORS in Wordpress getting meetup API -

im having trouble allowing cross site. adding meetup api wordpress pages. added header , .htaccess, respectively. header("access-control-allow-origin: http://domain.com"); header set access-control-allow-origin: http://domain.com i have themes , other plugins installed. there particular place suppose insert headers? not sure else should look.

php - Fatal Error Exception in Laravel app -

i have problem laravel 5.1 app. php version 5.6.16. doing wrong? fatalerrorexception in d4c2ea460399317ac416d4c481ae27fb line 75: syntax error, unexpected ')', expecting identifier (t_string) or variable (t_variable) or '{' or '$' <?php $__env->startsection('content'); ?> <?php /**/ usort($tablegrid, "sitehelpers::_sort") /**/ ?> <div class="page-content row"> <!-- page header --> <div class="page-header"> <div class="page-title"> <h3> <?php echo e($pagetitle); ?> <small><?php echo e($pagenote); ?></small></h3> </div> <ul class="breadcrumb"> <li><a href="<?php echo e(url::to('dashboard')); ?>"> dashboard </a> </li> <li class="active"> <?php echo e($pagetitle); ?> </li> <...

How should HTTP server implementation handle internal errors? -

i'm implementing simple http server. since expect amount of data per request quite large, make sense me send response in smaller chunks, clients able process data continuously stream , don't need wait last bit. eager may try out, there 1 thing troubling me: should when server encounters error after portion of response has been transmitted client? there http mechanism tell client discard part of response has arrived far? thanks in advance, pete. http doesn't have here, tweak your stream's format/protocol send status/error codes on it. example, start every chunk status code.