Posts

c# - Bad user control scaling for higher screen DPI -

Image
i have user control called labeledcombobox consist of tablelayoutpanel ( tlp ) contains 2 columns - in first column there label control, in second - combobox . generally have done make control dpi-aware still behaves bad dpi > 96. ok when font size control not changed (the same in design / runtime, here 9.75). when increase font size 9.75 11 or 12, user control not scaled , gets cropped @ bottom when displayed on dpi > 96. below screen of 3 examples different font size, starting left: 9.75 (same in design), 11, , 12. here how code designer looks like: private void initializecomponent() { this.tlp = new system.windows.forms.tablelayoutpanel(); this.combobox = new system.windows.forms.combobox(); this.label = new system.windows.forms.label(); this.tlp.suspendlayout(); this.suspendlayout(); // // tlp // this.tlp.autosize = true; this.tlp.autosizemode = system.windows.forms.auto...

class - Java : If A extends B and B extends Object, is that multiple inheritance -

Image
i had interview, , asked question. interviewer - java support multiple inheritance? me - no interviewer - each class in java extends class object (except class object) , if externally extend 1 class like class extends b{ // code here } then can class extend class b , class object, means multiple inheritance. how can java not support multiple inheritance? me - class b extends class object, when extend class b in class class extends class object indirectly. multi-level inheritance, not multiple inheritance. but answer did not satisfy him. is answer correct? or wrong? happens internally? my answer correct? yes, mostly, , in context describe. not multiple inheritance: it's said is, single inheritance multiple levels. this multiple inheritance: inheriting 2 or more bases don't have "is a" relationship each other; inheriting unrelated lines, or lines had diverged (in java, since object base, latter): (image credits: http:/...

p value - Manual t-test in R, Tail test -

i've been trying make manual t test of statistic calculated in r. i've seen people recommend use function dt had not worked. know because i'm comparing results of r results in stata (the last ones i'm sure i've got them correct). code i'm trying this pvalue<-dt(3.141523, df=8) where 3.141523 calculated t statistic , df degrees of freedom. thank help! i think want use pt() function instead of dt() . dt() density while pt() distribution. > pt(3.141523, df = 8) [1] 0.9931132

websocket - Does socket.io queue messages to disconnected clients? -

if client socket disconnected during middle of multiplayer game. socket.io queue events emitted server after has client disconnected? if mean when client socket reconnected, updated events server tried emit if while disconnected. no, need sort of data structure on server-side holds record of whatever data client needs, able update client if connect again. when user disconnects socket.io connects again, socket id never same, need sort of unique identifier can let server know client (i.e. username, userid, etc)

ios - How to constrain stack view between two objects -

i need imageview halfway between 2 other objects in view. way tried resolve putting imageview in stack view, , trying constrain stack view top , bottom spacing 0 objects. however, stack view not change size top , bottom touch objects, error. what's best way of going doing this? just use view instead of stack view. can resize size want based on constraints.

ios - 'init' is unavailable: use 'withMemoryRebound(to:capacity to temporarily view memory as another layout-compatible type -

Image
learning , migrating code swift 3 , facing following error in glimpsexml. can please ? in advance. [![enter image description here][1]][1] [1]: https://i.stack.imgur.com/vjo2b.png sorry posting screenshot only. here actual code. version of xcode 8.3.1. in method stringfromfixedcstring getting error "fromcstringrepairingillformedutf8" unavailable. private func stringfromfixedcstring(_ cs: unsafebufferpointer<cchar>) -> string? { let buf = unsafemutablepointer<cchar>.allocate(capacity: cs.count + 1) buf.initialize(from: cs + [0]) // tack on 0 make valid c string let (s, _) = string.fromcstringrepairingillformedutf8(buf) buf.deallocate(capacity: cs.count + 1) return s } public func serialize(_ indent: bool = false, encoding: string? = "utf8") -> string { var buf: unsafemutablepointer<xmlchar>? = nil var buflen: int32 = 0 let format: int32 = indent ? 1 : 0 if let encoding = ...

excel - How do I extract the month number from a date and return the month name? -

Image
i have table contains column of dates in following format: m/d/yyyy. below picture, shows dates in column c: goal: know how create function in vba extracts month number dates in column c , return month name in column e, shown in picture below: i can enter month names manually looking in column c, wondering if there function can task automatically. yup, text() it: =text(c2,"mmmm")