Posts

android - Optimizing icon usage? -

i got new requirement present image instead of error text if there no items show , image have 440 kb (png) in size given ui/ux designer. don't think it's fair use straightforward. it's transparent background image it's not possible reduce size converting jpg format. got 4 resolutions of image placing in different resolution resource folder. if keep of them in apk, take near 1 mb, had taken 1 image drawable-xhdpi folder , kept in drawable-nodpi . okay, queries follows 1) how can efficiently use image ? 2) worries if use jpg icons substitute of png ? 3) keeping images these in drawable-nodpi , setting size in different dimension file ? 1) convert png webp if need support api level 13+, otherwise use zopflipng optimize png. 2) jpg not support alpha channel , it's lossy. 3) put in drawable-xhdpi , let android scale image you. put images in drawable-nodpi if don't want image scaled.

WildFly + java Preferences cannot find custom preferences class in classpath -

i deploying ear below structure wildfly 9.0.2 my.ear |-my.sar (it sar archive) |-lib |-mypreferencesimpl.jar i able load classes in lib/mypreferencesimpl.jar my.sar (like class.forname(com.my.preferencesfactory) directly. however, java.util.prefs.preferences.factory not able load com.my.preferencesfactory. passing djava.util.prefs.preferencesfactory=com.my.preferencesfactory command line parameter during wildfly startup. below exception thrown. caused by: java.lang.classnotfoundexception: com.my.preferencesfactory [module "org.jboss.as.jmx:main" local module loader @76a3e297 (finder: local module finder @4d3167f4 (roots: /csa_wildfly/wildfly/modules,/csa_wildfly/wildfly/modules/system/layers/base))] @ org.jboss.modules.moduleclassloader.findclass(moduleclassloader.java:205) @ org.jboss.modules.concurrentclassloader.performloadclassunchecked(concurrentclassloader.java:455) @ org.jboss.modules.concurrentclassloader.performloadclasschec...

sql - PostgreSQL : CAST column only if exists -

os linux debian 5.3.1 if helps. i have bunch of csv files managed import tables in postgresql. have same general layout (i.e. globally same columns), of them vary (i.e. of them may miss columns). clearer, general layout supposed columns a, b, c, d, e, table have colums a, b, d, e, other columns b, c, d, e... i'd make general sql query changing type of columns (using cast) , import them in 1 single global table (t_import) columns a, b, c, d, e. insert t_import (a, b, c, d, e) select ( (cast integer) a, (cast b character varying(14)) b, (cast c integer) c, (cast d character varying) d, (cast e character varying) e t_csv; however tables miss columns, should creating query each table want import, tiresome number of tables have. is there way check if column exists in table want import, if exists, cast it, else use default value ? way allow me use same query different tables without getting errors. globally i'd : check if colum...

video - html5 player does not show in IE 11 when src is base 64 string -

the page referred here: http://www.rtbaileyphd.com/src/testjunk/html5videoproblem.out.html there should 2 html5 video players showing there. both play same video, first 1 src file has been base 64 encoded , embedded html. source specified src="data:video/mp4;base64,aaa...". approach mandatory application. in 2nd video standard approach of using src="http://..." used. if view page in chrome, firefox, or opera both players show. however, ie 11 1st video player not show unless hover mouse on supposed be. can video play if that. problem resolved if autoplay option added, not want videos automatically play. there way put image of player underneath actual, invisible player? tried poster attribute, poster image not show either. after posting, answer came me. since video show if autoplay turned on, add autoplay video tag, , since have javascript page initialization function anyway, add javascript pause videos after page first shown. see pause multi...

swift - Alamofire number of requests one after another -

i have number of requests witch call 1 after without having nested spaghetti code. i tried serial dispatch queue let queue = dispatch_queue_create("label", dispatch_queue_serial) alamofire.request(router.countries).responsestring { (response:response<string, nserror>) in print(1) } alamofire.request(router.countries).responsestring { (response:response<string, nserror>) in print(2) } alamofire.request(router.countries).responsestring { (response:response<string, nserror>) in print(3) } but unfortunately not work. output of can 1,3,2 or 3,1,2 or other combination. what best approach output 1,2,3 1 after other. ok ended writing own implementation. i created class requestchain wich takes alamofire.request parameter class requestchain { typealias completionhandler = (success:bool, errorresult:errorresult?) -> void struct errorresult { let request:request...

devops - Multiple applications in one IIS website with MS Release Management -

Image
i using iis web app deployment using winrm extension ms release management vnext template (tfs 2015 update 2). can deploy simple website think permissions , must set-up properly. my issue have multiple web applications hosted in single website , deploy automatically. the winrm - iis web app management task not seem have option doing this. how can it? i have tried adding / website name gives me exception: exception calling "setright" "2" argument(s): "could not obtain user information.". i found issue on github.com/microsoft/vsts-rm-extensions says should following: add manage iis task creates website add deploy iis task deploys website\app , set override parameters name="iis web application name", value="$(webappname)" webappname=website\app. it lot better if deploy task had option add website application or something.

angular material - Adding $watchGroup for selectboxes using angularjs -

i have problem $watchgroup multiple selectboxes. have 2 select boxes want add $watchers. i tried in following way not working watchers select boxes, controller.js $scope.authorization = ''; $scope.authentication = ''; $scope.authorizationmodel = ''; $scope.authenticationmodel = ''; $scope.authenticationobj = [ {id: 1, authtype: 'authentication' }, {id: 2, authtype: 'e-kyc' } ]; $scope.authorizationobj = [ {id: 1, authtype: 'best finger detection' }, {id: 2, authtype: 'one time password' } ]; $scope.$watchgroup(['authorizationmodel', 'authenticationmodel'], function(newvalues, oldvalues, scope) { console.log(newvalues[0]+'--'+newvalues[1]); if(newvalues[0].id !== undefined && new...