Posts

Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

algorithm - Software Profiling Tools -

is there software/profiling tool given algorithm , set of inputs gives efficiency of algorithm in terms of o-notation big-o describes how running time (and memory space) of algorighm scales inputs of different sizes, such tool have not accept particular input. if can generate range of inputs on range of sizes, feed each input algorithm, measure execution time (and/or memory size), , plot result, can compare against various possible big-o curves. i don't know of such general symbolic algorithm, , sounds bit of ai problem. writing 1 exercise. there algorithms not analyze, might able analyze useful subset.

java - How to do carousel animation in Android? -

i have images, want rotate circularly in carousel fashion. please let me know how in android platform if knows... you can use viewflipper couple of imageviews inside.

javascript - correctness of json document for elasticsearch? -

Image
i new json document,i hava database following fileds: on basis of database field have created json document: ================================================================ {"id":["fifth","first","four","second","thrid"],"keyword":["michel","sam","jerry","john","smith"]} ================================================================ i want know prepared json document correct elastic search or not? if wrong correct document that. thanks i dont think good. should create json in following format. var data = { "fifth" : "michel", "first" : "sam", "four" : "jerry", "second" : "john", "thrid" : "smith" } so when need fourth element, can following var fourth = data["four"]; hope helps!

java - Scrollable JPanel in JTable cell -

i want create custom cell in jtable. used custom renderer , returned jpanel object. works there 1 problem. while program running jpanel draws on using paintcomponent() method. on each "tick" (usually each 100ms) panel getting wider (i m drawing kind of graph) , when becomes big rest hidden. i d resize , create scrollbar. tried several ways of putting scrollpane none of them worked. basically, want thread view in java visualvm. ideas? it hard work put scroll pane inside ordinary table cell, because 1 component used render cells in table. may remove jtable , put large set of components in ordinary jpanel grid layout? if still want use jtable: every scroll pane contain special jviewport control. jviewport control scrolling work, , jsrollpane layout scroll bars. because single viewport used cells, must store somewhere viewport scroll position , restore every painting cell (on getcellrenderer method). jsrollpane need heavy layout work slow solution. may prefera...

.net - What is the point of DBNull? -

in .net there null reference, used everywhere denote object reference empty, , there dbnull , used database drivers (and few others) denote... pretty same thing. naturally, creates lot of confusion , conversion routines have churned out, etc. so why did original .net authors decide make this? me makes no sense. documentation makes no sense either: the dbnull class represents nonexistent value. in database, example, column in row of table might not contain data whatsoever. is, column considered not exist @ instead of merely not having value. dbnull object represents nonexistent column. additionally, com interop uses dbnull class distinguish between vt_null variant, indicates nonexistent value, , vt_empty variant, indicates unspecified value. what's crap "column not existing"? column exists, doesn't have value particular row. if didn't exist, i'd exception trying access specific cell, not dbnull ! can understand need differentiate between vt_null ...

html - jQuery.toggle() extremely slow on many <TR> elements -

i have table this: <table> <tr class="a"><td></td></tr> <tr class="b"><td></td></tr> </table> there 800 rows , of them of class a. want toggle these rows this: $("#toggle_a").click(function(){ $("tr.a").toggle(); }); $("#toggle_b").click(function(){ $("tr.b").toggle(); }); but extremely slow , of time browser wants stop action. has idea how make thing faster , usable? seems because jquery searching element class name.. note: class selector among slowest selectors in jquery; in ie loops through entire dom. avoid using whenever possible. also check this article

network programming - What causes udp reception delay? -

i have noticed when sending packets @ intervals udp socket, first packet sent seems delayed. example, if sending packets every 100 ms, find delay between receiving packets distributed mean 100ms , average standard deviation of 4, on network. however, gap between receive time first , second packets around 10 40 ms - can see, that's statistically significant difference, , question is, what's causing it? i'm using sendto function c on linux. suggested delay might caused arp resolution preventing packet being sent until destination ip has been converted mac address - likely? if restart sending program first packet again takes long though, , delay inconsistent - 10 40 ms pretty big range. i need find out why first packet taking long, , how work around it. edit: further analysis pcap indicates sending program sending packets @ right interval. problem must receiver, using select() wait readable socket, calling recvfrom , printing packet. there sort of buffering going on ...