Posts

Featured post

php - Hide output during test execution -

i have var_dumps in php code (i understand there must none in end, still), , while tests running outputs non necessary information console, there method ignore code execution? i've tried /** * @codecoverageignore */ and // @codecoverageignorestart print '*'; // @codecoverageignoreend but ignores coverage, , still executes code. you can set setoutputcallback nothing function. effect suppress output printed in test or in tested class. as example: namespace acme\demobundle\tests; class nooutputtest extends \phpunit_framework_testcase { public function testsuppressedoutput() { // suppress output console $this->setoutputcallback(function() {}); print '*'; $this->assertfalse(false, "don't see *"); } } you can find reference in doc hope help

javascript - Migrate custom AngularJS filter from 1.2.28 to 1.4.x -

i have complex json response iterated on using ng-repeat. relatively small subset of attributes within result set displayed on screen, filtering of results should restricted values user can see, otherwise filtering behavior confusing end-user. since 1 of attributes wish filter on nested array, custom filter needed since built-in angularjs filterfilter not iterate on array elements best of knowledge. i able working time in angularjs v1.2.28, unfortunately appears break during migration v1.4.3. have not spent time isolate in release cadence functionality broke however. i have not found helpful information in migration guides indicate has changed. know actual/expected parameters filter receive different values in latest major version of angularjs, leads failure. ng-repeat filter expression: <li ng-repeat="user in users | list_filter:{establishment: {id: filtertext, names: [{name: filtertext}], locations: [{streetaddress1: filtertext, streetaddress2: filtertext, city:...

objective c - Call precedence for method overridden in category and again in subclass -

i'm working on project in objective-c , i'm facing situation. let's have class named foo . implement category class named foo+bar , override foo 's method foomethod: . then create subclass foo , named baz , override same foomethod: in class. when use method foomethod: on baz object, implementation called? 1 inside foo+bar or 1 inside baz ? how objective-c handle situation , why? i'm open explanation and/or documentation. behaviour if override method in category explicitly undefined . please don't: if name of method declared in category same method in original class, or method in category on same class (or superclass), behavior undefined method implementation used @ runtime. if overriding method defined once in category of superclass of course subclass implementation called. but here override method defined twice in superclass. behaviour undefined, because override undefined implementation. if worked, bad code anyway. re...

php - values in database not inserted in codeIgniter? -

i new php framework have created simple form , want inserts value in database failed don't know wrong!!! every time getting mysql returned empty result set (i.e. 0 rows). using codeigniter 3 , mysqli drivers controller <?php //display_errors(on); error_reporting(e_all); class register extends ci_controller { public function index () { //validations $rules=array ( "username"=> array( "field"=>"username", "label"=>"username", "rules"=>"required|max_length[20]|min_length[5]|callback_username_is_taken" ), "password"=> array( "field"=>"password", "label"=>"password", "rules"=>"required|max_length[20]|min_lengt...

osx - NSAttributedString in NSTextView not showing up unless you scroll -

i'm trying set attributed string in nstextview, , if text taller text view, text doesn't show @ unless scroll text box. there aren't many posts attributed strings in nstextview, maybe i'm doing wrong. here's how i'm setting text: [[self.textview textstorage] appendattributedstring:attributedstring]; you have programmatically tell nstextview has make new string visible: nsuinteger length = [[self.textview string] length]; [self.textview scrollrangetovisible:nsmakerange(length,0)]; this should work independent of if appended string "simple" string or attributed string.

Using a self signed SSL certificate just for a web service -

i have web service clients have , want data that's sent server encrypted. test used self signed ssl certificate. know when use self signed cert , when navigate whatever address using web browser warn it's unsafe etc. i wondering if i'm going run problems if used certificate instead of verified 1 when web service goes live? also don't have domain name server, going use ip address given isp, ok certificate, because everywhere read them people talking using them domain names? an ssl certificate issued domain , signed issuing authority. when browser connects server server presents certificate client. client verifies certificate checking if domain accessing same 1 mentioned in certificate. also, verifies trust chain. means issuer's certificate should valid. if issuer not root signing authority issuer's issuer's certificate verified. and, root signing authority should trusted means root signing authority should in truststore. major signing author...

Update Magento products with multiple images -

Image
i'm developing magento store , imported products, in these products there more 1 image , when imported products 1 came with, need update products images left, knows how in quick mode? thanks! step 1: export products before begin, make sure changes product data have been saved. on admin menu, select system > import/export > dataflow - profiles. in list of profiles, select export products. in panel on left, click run profile. to begin process, click run profile in popup button. wait few moments profile begin execution. length of time takes complete process depends on size of database. not close window. when process complete,you can find exported csv file in following location on server: [magento-install-dir]/var/export/export_all_products.csv the csv data appears in spreadsheet rows of product records organized columns of attributes, attribute code in header of each column. step 2: copy product images server the csv file contains path each prod...