Posts

javascript - jquery - how to continue the execution of one function once another function has returned a value -

i have function called showauthorinfo performs animation, , executes other code logic once animation finished: self.showauthorinfo = function(){ var authorid = $authorlink.attr('data-author-id'); //pl-int - determine info needs captured here var isactive = $modalinfowindow.hasclass('active'); self.$modalinfowindow.animate({ 'bottom': '0px' },200,function(){ self.$modalinfowindow.addclass('active'); self.loadauthorinfo(authorid); }) } however, because want show , hide modal window via various function calls, executing different callbacks each time animation completed, i'd wrap animation function. question is, can use above function call custom function animation happens, , have animation function return value function, whereon can proceed? i break function multiple functions, feel complicated, because have pass on function-specific parameters wouldn't apply cases (for example, in code above, if going call anima...

ios - Develop for iPhone 4 or 5 First -

Image
i've searched every combination can try , find answer this, i'm sure it's been asked somewhere....so forgive me if can point me in right direction. if you're developing new ios app, setup layout in ib iphone 5 or 4 screen size first? i've found plenty of articles on using autolayout move iphone 4 apps iphone 5, not vice versa....which makes me think desired workflow apps aren't going have separate interface 2 create interface in ib 3.5" screen size , use autolayout adapt iphone 5's 4" screen. can clarify best practice me? kendall geln makes points. better build smaller screen , resize - because shrinking elements provide bad , cramped experience user. on note need make sure graphics (images , videos) sized both screen sizes. when creating graphics, may best create them @ large scale first , size them down needed. another design consideration creating different interfaces 4-inch , 3.5-inch screens. 4-inch screen taller , provid...

eclipse - Editor similar to Compare Editor -

is there example showing editor similar eclipse compare editor (simplified)? looking way create editor split in 2 parts top part dsl , bottom ast of dsl. the best place start org.eclipse.compare.compareconfiguration class. after that, can review usage in org.eclipse.ltk.internal.ui.refactoring.texteditchangepreviewviewer.comparepreviewer, org.eclipse.compare.internal.compareeditor/org.eclipse.compare.compareeditorinput ... there lot editors/views in eclipse use stuff.

How to get PC-Lint to print fully qualified function name in message? -

i'm using pc-lint generate xml file contains warnings generated run. the process works almost flawlessly, rather annoying exception. can't message format print qualified function name warning found. prints stripped down function name. no namespace, no class name. here format string use (i've included relevant format info documentation @ end of post): -"format=<message> <file>%f</file> <func>%i</func> <line>%l</line> <type>%t</type> <code>%n</code> <desc>%m</desc> </message>" so, example, this: class bar { void foo(int bar) { } }; the error (lines broken easier reading): <message> <file>d:\code\cpptest\cpptest.cpp</file> <func>foo</func> <line>3</line> <type>info</type> <code>715</code> <desc>symbol 'bar' (line 2) not referenced</desc> </message> as c...

iOS App crashes on facebook sdk login button -

i have facebook login button on main screen. can log in , log out using button many times want, , work fine. on layer, there button share score on facebook. there 2 cases: case1 if logged in, shares score. , case2 if not logged in, tells user need log in. share button code: [fbrequestconnection startforpoststatusupdate:message completionhandler:^(fbrequestconnection *connection, id result, nserror *error) { uialertview *alert; nslog(@"%@",error); if (!error) { alert = [[uialertview alloc] initwithtitle:@"you score" message:@"has been published" delegate:self cancelbuttontitle:@"ok" otherbuttontitles: nil]; } else{ alert = [[uialertview alloc] initwit...

php - Insert HTML input using ajax. Something wrong with code -

if click on submit button using php, data recorded in mysql. through ajax _autosave.php update works. insert not work. going crazy.... can not understand ajax code in first.php <script type="text/javascript"> $(document).ready(function() { setinterval(function (){ var date_day1=$("#date_day1").val(); var amount1=$("#amount1").val(); data = 'date_day1=' + date_day1 + '&amount1=' + amount1; $.ajax({ type: "post", url: "_autosave.php", data: data, cache: false, /*success: function(){ $(".done").show().html("saved draft!"); }*/ }); settimeout(function(){ $(".done").hide(); }, 1000);// 15 seconds }, 3000);// 1 minute }); </script> html input <td><input type="text" name="date_day1" id="date_day1" value="<?php echo $_post['date_day1']?>" size="1"></td> <td><input type="text...

c# - How to programmatically switch between SlideMaster and Default view? -

i need switch in slidemaster mode selected main parent slide button click. need return default mode , select last selected in mode slide. does know how (for pp2007 / pp2010 / pp2013)? thanks i in way in vba: sub switch_to_slidemaster() dim cursld long cursld = activewindow.view.slide.slideindex 'switch slidemaster application.windows(1).viewtype = ppviewslidemaster 'return default application.windows(1).viewtype = ppviewnormal 'set slide activewindow.presentation.slides(cursld).select end sub i hope cope converting. (tested pp 2010)