Posts

maven - What is the best way to read in gradle repository credentials from a properties file? -

it's not clear me logging repository happens in gradle execution/configuration chain i have task loadmyproperties { properties props = new properties() props.load(new fileinputstream(mypropertiesfilename)) myusername = props.getproperty('user') mypassword = props.getproperty('password') } and make compile depend on compilejava.dependson loadproperties however, not @ sure when repositories block repositories { maven { credentials { username myusername password mypassword } url myurl } } is 'executed' compared other tasks, nor when attempts gain authorization specified repository provided credentials. when run gradle build sometimes credentials work, , don't (i 401 authorization error maven server), makes me think not ordering tasks. my thinking loadproperties code happens inside configuration phase (since it's no...

xml layout - Android pass parent view's 'pressed' state to child views -

there many question here on asking way prevent child view copying parents pressed or selected states. however, i'm asking other way around here :) - i've seen weird behavior in 1 of apps: when running app on 4.0.4 device (api 15) behavior saw matched apparent default, is: parent forwards state down of child views. when running same app without changes on higher api level (android 4.4) behavior changes: parent not forward state. i introduced duplicateparentstate in xml layout relevant child views, not seem here. is known 'issue' or planned change in behavior api 15 api >> 15? how can make sure states forwarded across api levels? if of / relevance here: subview want duplicate parents state custom imageview adds tintcolors - since behavior correct on 4.0.4 there should not mistakes in class? public class incimageview extends imageview { private int _tintcolor; private int _highlightedtintcolor; private int _selectedtintcolor; pub...

Javascript comparisons -

i know why following comparisons in javascript give me different results. (1==true==1) true (2==true==2) false (0==false==0) false (0==false) true i can not figure out why. the tests equivalent these: (true==1) true (false==2) false (true==0) false which equivalent these: (1==1) true (0==2) false (1==0) false in each case == converts boolean number 1 or 0 . first == in each 1 gives initial true/false value, used first operand second == . or put inline: ((1==true)==1) ((1==1) ==1) ((true) ==1) ((1) ==1) true ((2==true)==2) ((2==1) ==2) ((false) ==2) ((0) ==2) false ((0==false)==0) ((0==0) ==0) ((false) ==0) ((0) ==0) false

html - PHP Image from url src returns 403 error and application/octet-stream -

pulling images url when ran never had before. header check returned 403 error , although images extensions listed .jpg returned application/octet-stream, , checking content type returned text/html. i have read 403 "typically" prevent screen scrapping, on images. i found odd view source of web page, see image src, , click on , return image browser, not via code. is there way convert image url actual image? want pull height, width, size info images , save them folder on server. $html = file_get_contents($url); $doc = new domdocument(); $doc->loadhtml($html); $tags = $doc->getelementsbytagname('img'); foreach ($tags $tag){ $image_src = $tag->getattribute('src'); echo get_headers($image_src, 1); //returns 403 forbidden error echo image_type_to_mime_type(exif_imagetype($image_src)); //returns application/octet-stream $i = getimagesize($image_src); var_dump($i); //returns bool(false) $c = curl_init(); curl_setopt($c, curlopt_returntransfer...

jQuery Button to check all checkboxes disappers on start -

why button disappearing on start ? want check , uncheck alls checkboxes 1 button. can't solution. <!doctype html> <html> <head> <meta charset="utf-8"> <title>unbenanntes dokument</title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> </head> <body> <script type="text/javascript"> $(document).ready(function(){ $('.check:button').toggle(function(){ $('input:checkbox').attr('checked','checked'); },function(){ $('input:checkbox').removeattr('checked'); }) }) </script> <div id="button"> <input type="button" class="check" value="check all" /> </div> <div id="check"> <input type="checkbox" /> checkbox 1 <input type="che...

Unread marks in Xpages views are indented ? Any fix -

Image
put in unread marks in view in xpages , column indented very oddly. searched google , found document: http://www-01.ibm.com/support/docview.wss?crawler=1&uid=swg1lo78976 however, when try log in , see document, can never document open. ibm doesn't have unreads working in xpages??? my apologies. code here: <xp:viewpanel rows="99" id="projectsworking" viewstyle="width:99.0%" rowclasses="oddrow, evenrow" var="viewentry" showunreadmarks="true"> <xp:this.facets> <xp:pager partialrefresh="true" layout="previous group next" xp:key="headerpager" id="pager1"> </xp:pager> </xp:this.facets> <xp:this.data> <xp:dominoview var="projectsw...

xml - How to select a value using Xpath -

i new xml , struggling find answer problem. have following code (see below) , extract value 3400.0000000000 it. how do using xpath? <spindlespeed dataitemid="c2" name="sspeed" sequence="351828725" subtype="actual" timestamp="2014-12-01t21:51:32.834494">3400.0000000000</spindlespeed> try : //spindlespeed/text()