Posts

ios - Setting Corner Radius on ImageView is imperfect in iPhone 6 and 6 Plus -

Image
i using imageview s in app set cornerradius make them circular. works fine, when verify in iphone 6 , 6 plus, parts @ edge seem cut off, eg. top part in image below: note haven't added 3x launch image, app displayed scaled version of original. assuming issue happens because of scaling factor. i.e. width specify in code not see in device. also, assume fixed if use autolayout. are assumptions correct? if not, please provide explanation , solution same. :) ! edit1: my imageview of 35 x 35 size. set corner radius follows: [commentcell.profileimageview.layer setcornerradius:17.5]; [commentcell.profileimageview.layer setmaskstobounds:yes]; edit2: floating points doesn't seem it, because tried same frame size 36 x 36 , corner radius 18 . your assumptions correct, there solution : [commentcell.profileimageview.layer setcornerradius:profileimageview.frame.size.width/2];

javascript - D3 chart Y axis line is not visible in some resolutions -

i have stacked bar chart similar link , graph plotted correctly problem y axis line invisible. if increase browser page size in example chart, can see @ resolution x, y axis lines , horizontal tick lines appear. x, y axis lines , horizontal tick lines appearing , disappearing subjected resolution of page. how solve this? i defining x , y axis below var yaxis = d3.svg.axis() .scale(y) .orient("left") .ticks(5) .ticksize(-width - 180, 0, 0) .tickformat(d3.format("$")); var xaxis = d3.svg.axis() .scale(x) .orient("bottom") .tickformat(d3.time.format("%b")); svg.append("g") .attr("class", "y axis") .attr("transform", "translate(0,0)") .call(yaxis); svg.selectall('.axis line, .axis path') .style({ 'stroke': '#ddd', 'fill': 'none', 'stroke-width': '1px' }); svg.append("g") .attr("class", ...

recursion - Recursive Insertion in a Binary Tree C# -

why reason member variables left , right never change when make recursive call? here's source code: public class c_nodo { int dato; c_nodo left; c_nodo right; public int dato { { return dato; } set { dato = value; } } public c_nodo left { { return this.left; } set { this.left= value; } } public c_nodo right { { return this.right; } set { this.right = value; } } public c_nodo(int inf) { this.dato = inf; this.left = null; this.right = null; } } public class c_arbol_bin { c_nodo root; public c_arbol_bin() { root = null; } simple insertion in root or make recursive call public void inserta(int dat) { if (root == null) { root = new c_nodo(dat); } else { insert_order(this.root, dat); } } here make recursive insertion in ordered w...

java - How to initialize initial context in JMS -

i create message queue in standalone application using jms queue. not using kind of container tomcat , jboss. should arguments passed initial context object.? s standalone application.. note: if wishes give down vote question, please give reason in comment , give down vote. thanks! initialcontext ctx = new initialcontext(?????); queue queue = (queue) ctx.lookup("queue/queue1"); queueconnectionfactory connfactory = (queueconnectionfactory) ctx.lookup("queue/connectionfactory"); queueconnection queueconn = connfactory.createqueueconnection(); queuesession queuesession = queueconn.createqueuesession(false,session.auto_acknowledge); queuesender queuesender = queuesession.createsender(queue); queuesender.setdeliverymode(deliverymode.non_persistent); textmessage message = queuesession.createtextmessage("hello"); queuesender.send(message); system.out.println("sent: " + messag...

javascript - $location.search() makes angular-ui-bootstrap's tooltip disappearing -

when implemented in code mechanism change url's query in background (using $location.search ), caused disappearing tooltips have option tooltip-append-to-body , @ moment of changing url value. need tooltip-append-to-body attribute because of reasons (the simplest solution remove that's not solution me). my code looks this: js: angular.module('mapp', ['ui.router', 'ui.bootstrap']) config(['$stateprovider', '$urlrouterprovider', function($stateprovider, $urlrouterprovider) { $urlrouterprovider.when('', '/'); $stateprovider .state('home', { url: '/', reloadonsearch: false, templateurl: 'home.html' }); } ]) .controller('myctrl', ['$scope', '$timeout', '$location',function($scope, $timeout, $location) { var value = 0; var runtimeout = function() { $timeout(function() { $location.search('start', value++); ...

ftp - How to specify destination path using mget command -

i trying copy multiple files linux machine windows using mget . files getting downloaded, i'm not able specify destination directory (windows directory) the mget not allow explicitly specify target local directory. it downloads files current local working directory. though, can change local working directory using lcd command: ftp> lcd c:\path local directory c:\path. ftp> mget *.*

android - Activity in stack -

ointent.setflags(intent.flag_activity_clear_top | intent.flag_activity_clear_task | intent.flag_activity_new_task|intent.flag_activity_no_user_action); //ointent.setflags(intent.flag_activity_no_history|intent.flag_activity_no_user_action); ointent.putextra("exit", true); startactivity(ointent); finish(); i have use following set of code clear activiites...it works fine...in scenario...the blank activity started...i think because of starting new task in flag...i dont want empty activity/...how solve this? api 21++ activitymanager =(activitymanager) this.getsystemservice(activity_service); list<apptask> ap = am.getapptasks(); ap.get(0).finishandremovetask(); api 21-- from sir @david wasser pointed, use , mantain putextra code , in oncreate of target activity check if has key of exit , call finish() immedi...