Posts

objective c - UITabBar Controller and UITableView Controller - would one effect the other? -

perhaps simple or stupid question. have tested 3 separate apps, each simple uitableviewcontroller apps detail view controllers pushed onto stack. work no problems. i've decided build new app uses 3 tab uitabbar controller rootviewcontroller , have these 3 separate tableviewcontrollers running off tabbar controller. can fire first level tableviews can't push respective childviewcontrollers onto stack. i'm using same class code each uitableviewcontroller in tabbar app tested in tableview app. am missing obvious here? why wouldn't work because of tabbar controller? thanks insights in advance. if closer @ 3 separate apps, you'll see have uitableviewcontrollers inside of uinavigationcontrollers. left navigation controllers out of version uitabbarcontroller. the hierarchy should this: uitabbarcontroller ┣ uinavigationcontroller ┃ ┗ uitableviewcontroller ┣ uinavigationcontroller ┃ ┗ uitableviewcontroller ┗ uinavigationcontroller ┗ uitablev...

.net - Setting the size of char datacolumn -

i add new column datatable. column of type char length of 10. datacolumn d = new datacolumn(fieldname, typeof(char)); dt.columns.add(d); my question how add "size" column? thanks lot. note in c#, char always 1 character. try this: datacolumn d = new datacolumn(fieldname, typeof(string)); d.maxlength = 10; dt.columns.add(d);

javascript - Expose socket via web sockets -

i have server creates socket on port 8181. access socket web page opened in google chrome 14. suppose not possible in straight manner. chrome provides support web sockets not standard sockets. right? is possible somehow create intermediary expose socket server listening on port 8181 web socket server running on other port? websockify generic websockets tcp socket proxy/bridge. created websockify allow novnc (html5 vnc client) able connect unpatched vnc server. generically useful (not vnc specific) spun off separate project. on unix/linux system run websockify this: ./websockify 8080 my_server:8181 port 8080 in above example port listen websocket connections. my_server name/ip of system have server listening on port 8181. if running websockify on same system server can use localhost in place of 'my_server'. the websockify project comes javascript wrapper library called websock.js. websockify supports new protocol versions (used chrome 14+ , firefox 6+) ...

c - remove newline characters from text file while writing data -

i getting newline character text file while writing content text file using code below sprintf(str,"godownname,lorrynumber,invoicenumber,cementcompanyname,rcvdprsnname,rcvdprsndsgnation,entityqty,date\0"); write(fd,str,strlen(str)); the text writing 2nd row , unwanted newline writing @ 1st row. want text written 1st row. please 1 me remove newline characters or spaces text file thanks in advance my guess have function writes in fd before call of function. besides, writing "\0" @ end of string litteral useless, there's one.

c# - How to eliminate duplicates from a list? -

class infocontact { private string contacts_first_namefield; private string contacts_middle_namefield; private string contacts_last_namefield; private phonenumber[] phone_numbersfield; private emailaddress[] emailfield; } i have list<infocontact> list contains 7000 other program. in list out of 7000, 6500 duplicates. looking way how eliminate duplicates. a infocontact duplicate if first_name, last_name, emailaddresses, phone numbers same. i thought of using hashset<infocontact> , override gethashcode() of infocontact. i curious know if best way do. if not way better way? firstly think of extracting unique values. use distinct() linq method comparer like: public class infocontactcomparer : iequalitycomparer<infocontact> { public bool equals(infocontact x, infocontact y) { return x.contacts_first_namefield == y.contacts_first_namefield && x.contacts_last_namefield == y.conta...

How would you use a Distributed Version Control System like Mercurial or Bazaar to manage large binary files? -

specifically situation i'm thinking of have large asset .psd 200 mb. artist goes , changes few pixels , checks in. assuming deltas not kept thats 200 mbs updates clone/branch have history off. given full development cycle lot of information pull each client. what ability mark files these "keep history on server", traditional centralized vcss svn or perforce. may lose benefits of dvcs these files willing accept long can use 1 vcs (as opposed 1 assets , 1 code). any suggestions on how (if possible) appreciated. for mercurial, can use bfiles extension (or 1 of others listed on page). file metadata stored inside repo, , content of big files kept on central server. haven't used of extensions, though, can't tell 1 best choice.

onclick - Possible to track a div click with google analytics -

i have video playing within div on site. video requires click play. i'm wondering if possible apply analytic event tracking parent div tracks anytime there click within div. i know can use onclick event analytics, not quite sure if applied div rather than, say, outbound link this: <a href="#" onclick="_gaq.push(['_trackevent', 'videos', 'play', 'vid 1']);">click here</a> has body ever done this? realize there downfalls (user repeatedly clicking play/pause) etc. thanks. *edit - should have mentioned unclear of how turn div clickable event. say div . need make whole div onclick event? you can this: <div onclick="_gaq.push(['_trackevent', 'videos', 'play', 'vid 1'])" style="cursor: pointer;"> content here </div> however : when place flash inside, there issues click propagation, depending on browser. better give library try...