Posts

user interface - Question about making a JAVA GUI of a certain format -

Image
i trying make gui looks this: i know how use borderlayout has space 5 buttons. north, west, center, east, , south. since need have 6 components on top line, approach can't work. i'm not sure how make can have more 1 component on top line. there other layouts can use or there way can manipulate borderlayout can put 6 components on top line? what need nest components inside of other components. example, top (north) should 1 jpanel . jpanel contain 6 components on top. the code may similar following: jpanel northpane = new jpanel(); northpane.add(new jlabel("principle: ")); northpane.add(principletextbox); ... , on mainpanel.setlayout(new borderlayout()); mainpanel.add(northpanel, borderlayout.north); the center component jpanel containing 2 center buttons. , south component jpanel containing single jlabel or jlabel . if don't have use borderlayout main panel, may easier use boxlayout .

asp.net - Error converting data type nvarchar to float -

here code: protected void button11_click(object sender, eventargs e) { string usr = membership.getuser(false).tostring(); int x, count = 0, avail_shares,num; float t_c, c_p, c_t,ret,com,t_r,pr; string comp = this.dropdownlist4.selectedvalue.tostring(); avail_shares = convert.toint32(this.textbox10.text); pr = float.parse(this.textbox15.text); t_c = float.parse(this.textbox14.text); c_p = float.parse(this.textbox12.text); c_t = float.parse(this.textbox131.text); ret = float.parse(this.textbox132.text); com = float.parse(this.textbox133.text); t_r = float.parse(this.textbox13.text); num = convert.toint32(this.textbox11.text); if (num > avail_shares) { this.label23.text = "you cannot sell more number of shares actuall have"; } else { ...

Threading excel -

can have multiple threads in excel. need counter show time elapsed. thread have loop update counter , sleep second. (hopefully) take care of excel freezing while calculating. along line, possible have excel update while calculates. updating, mean screen continue update, rather freezing. however, have not tested 2010 , have no idea whether still problem (it in 2007). the answer no.

Validation When Using MVVM (WPF) with a DDD-Based Model -

a common mvvm/wpf approach data-bind ui's controls directly underlying model object. model object may contain own validation logic (perhaps exposed via idataerrorinfo) or may validated helper class checks model object instance errors. in either case, @ times model have invalid data in , in invalid state. however, in ddd world, model never in invalid state. how suggest performing validation when using wpf , ddd? thanks, ben i don't think view in mvvm should binding directly domain model, should binding view model instead. view model can in "invalid" state can reflected through idataerrorinfo. later when user operation (e.g. save, ok, apply) applies underlying domain model should domain model enforce validity, can prevent apply not allowing operation in ui. although must i've found it's not easy without duplicating validation logic extent.

Remove Trailing Slash From String PHP -

is possible remove trailing slash / string using php? sure is, check if last character slash , nuke one. if(substr($string, -1) == '/') { $string = substr($string, 0, -1); } another (probably better) option using rtrim() - 1 removes all trailing slashes: $string = rtrim($string, '/');

Jquery or Javascript that display content based on the date HELP -

jquery or javascript displays content based on specifics date period so have 3 dates 12/3/2010 12/11/2010 12/20/2010 and div contents content 1 should displaying 12/3 12/11 content 2 should display 12/11 12/20 , content 3 should displaying 12/20 there after first, others said whole thing bad idea you're depending on client machine date/time , correct approach doing in server side. anyway, guess have reasons here jquery solution. have such html: <div class="datediv"><span class="daterange">1/1/2010 1/1/2011</span>i'll visible during 2010</div> <div class="datediv"><span class="daterange">1/1/2011 1/1/2012</span>i'll visible during 2011</div> <div class="datediv"><span class="daterange">1/1/2012 1/1/2013</span>i'll visible during 2012</div> put date range inside span inside each div class "daterange...

php - Is it possible to disable 'minify-cation' with Minify? -

within zf project i'm using minify lib merge , minify js, since it's old project, didn't wrote view helper handle minify , there no way manage zf. but it's difficult debug online because of obfuscation. i'd know if it's possible disable compression, obfuscation or whatever, , use minify merge scripts single file. any ideas ? look debug mode . if can't add &debug urls directly, temporarily add $_get['debug'] = '1'; /min/config.php file in development environment.