Posts

html - How can I eliminate the bad anti-aliasing or blending on the left side of my SVG layers? -

Image
sorry garish colors, shows bad blending combination. on left side of inner circle, there dark line blue meets red. on right half of inner circle, there not. happening in chrome, ff, , ie11. any idea why? <svg viewbox="0 0 500 500" width="500" height="500"> <circle fill="red" cx="250" cy="215" r="165"/> <circle fill="#2994ff" cx="250" cy="215" r="100"/> </svg> picture version: what think seeing not real. optical illusion caused contrast change between 2 colours. dark light , light dark. the layout of subpixels on monitor may contributing - i'm not sure on that. if create magnified version of 2 edges next 1 another, should see strong dark , light borders not there.

javascript - D3 Update Graph -

really stucked on issue days. trying update d3 graph show how long takes run function on calculator. info get, show time taken , display on graph drew. issue here can't graph update. codes graph: var margin = {top: 20, right: 20, bottom: 30, left: 50}, width = 400 - margin.left - margin.right, height = 300 - margin.top - margin.bottom; var x = d3.scale.linear() .range([0, width]) var y = d3.scale.linear() .range([height, 0]); var xaxis = d3.svg.axis() .scale(x) .orient("bottom"); var yaxis = d3.svg.axis() .scale(y) .orient("left"); var line = d3.svg.line() .x(function(d) { return x(d.date); }) .y(function(d) { return y(d.close); }); var svg = d3.select("body").append("svg") .attr("width", width + margin.left + margin.right) .attr("height", height + margin.top + margin.bottom) .append(...

c# - DataContext in Style is not available on the DataTrigger -

i have userdefined control call segmentview (derived contentcontrol). additionally have segmentmodel implements inotifypropertychanged. segmentmodel has property called statuscontroller , there statuscontrollerviewmodel. for of views create view models automatically in xaml , attach models. viewmodel automatically set datacontext of view. it works well, except following. modeltoviewmodelconverter creates viewmodel, attaches model , sets viewmodel datacontext of control. how works several other things. additionally in style, have datatrigger changes opacity of dockpanel. datacontext of dockpanel indeed set instance of statuscontrollerviewmodel, but, binding in datatrigger not found. btw: statuscontroller property of larger model, not shown here brevity. should correct shown datacontext set correctly, statuscontrollerviewmodel. binding tells different story. seems doesn't "see" datacontext of dockpanel, sees datacontext of levels above. the model property of sta...

mysql - SQL Query Joins not working properly -

Image
for project needed create db small olympics. er diagram shown... link better picture: https://i.imgur.com/xgfurwo.png?1 i need create query includes competitors competing in more 1 event (that's 2 competitors) , list name, event, venue, , result. the query below works should producing 70 (# of competitors) records count @ 2 competitors competing in 2 events... select c.firstname, c.lastname, count(r.competitorid) competitor c left outer join ( registration r left outer join event e on r.eventid = e.eventid ) on r.competitorid = c.competitorid group c.firstname, c.lastname order c.firstname; ----------------------------------------- norris holmwood 1 octavio martinez 1 orfeo silva 2 etc... after including event name in query produces 72 results competitors competing in 2 events listed twice count() 1 everything. select c.firstname, c.lastname, e.eventname, count(r.competitorid) competitor c left outer join ( registration r left outer...

javascript - jQuery if/else statement to change css on click -

$('#submitbtn').on("click", function() { $('.message-box').val(); var message = $(".message-box").val(); $('#visible-comment').html(message); $('.message-box').hide(); return false; }); i want above code in if/else condition if value of .message-box empty string change border color of .message-box red. could please guide me in right direction? i've tried following, changes border red, doesn't fire rest of code. $('#submitbtn').on("click", function() { if ($(".message-box").val("")) { $(".message-box").css("border","2px solid red"); } else { $('.message-box').val(); var message = $(".message-box").val(); $('#visible-comment').html(message); $('.message-box').hide(); return false; } }); sample here : https://jsfiddle.net/wf69c7uu/2/ the idea check conditi...

ios - Find path for local video in Xcode Project -

i need play locally stored videos in ios app. the videos located in directory: app/resources/videos/ when try path with: nsbundle.mainbundle().pathforresource("myfile", oftype: "mp4", indirectory: "app/resources/videos/") i nil. advice? problem solved: error didn't add target-membership videos.

java - Redirect interface method calls -

i have interface1 , 2 implementations of it, classa , classb . want redirect method calls classa classb. i'm doing this: class classa implements interface1{ method1(){ b.method1(); } method2(){ b.method2(); } method3(){ b.method3(); } //and on... } is there more easy way this? have considered using abstract class instead of interface? can put common implementations in abstract class, , in classa , classb implement methods 2 classes differ. abstract class abstract { void method1() { //do stuff... } abstract void method2(); } class classa extends abstract { @override void method2() { // something... } } class classb extends abstract { @override void method2() { // else... } }