Posts

javascript - progressbar not appearing -

i have jquery ui progressbar acts timer. when open page, has "loading..." (added in html) , nothing else. links files html file: http://pastebin.com/re0zkvny javascript file: http://pastebin.com/zyna5mny i can't seem find wrong code. tried copy & pasting code jquery ui demos, nothing seems make work (with code.). it seems you're doing few things wrong: you're trying use jquery ui progressbar widget yet you're setting progress bar's width using css (which manipulates usual html div element some of code executes , on ready event this simplified example doesn't use jquery ui progress bar rather custom solution way use. but let me modify code , move belongs: // progressbar stuff $(function() { /* don't need $( "#loading" ).progressbar({ value: 0 }); */ //increment progressbar var loading = $('#loading'); width = 0; //loading.width(); var interval ...

Xcode save text -

how can save label, then, if close app , open again still there? you can use nsuserdefaults if data general preferences type data won't cripple app if user prefs wiped reason. it depends on how vital data , how permanent need make persistence.

Java splash screen not working when using a shortcut -

i have created exe jar file launch4j. have splash screen in png loaded executing parameter -splash:logo.png when execute exe file, works properly. if execute program shortcut, doesn't work (i mean splash image, rest of program works ok). why happen? how can fix problem? set working directory in shortcut. one of shortcut properties should "start in" or "working directory". make sure have set same directory shortcut in. when double-click on exe start it, happens automatically. when create shortcut, set anything. the problem here isn't shortcut losing parameter. impossible since it's compiled exe file. problem here application cannot find logo.png, expecting in subfolder of working directory.

c# - htmlunit .net MVC Views unit testing -

i using htmlunit java (converted run in .net) details here using same logic example, using web client , works mvc3 razor code/views. problem occurs when have [authorize] above views webclient can't access page. there way around this? how (if possible) set automatically log on? if parse login page , submit admin/password.. carry on every page visited in "session" i have tried: [setup] public void setup() { //initiate webclient webclient = new webclient(); //login var loginpage = (htmlpage)webclient.getpage(properties.domainnametotest + "account/logon/"); ((htmlinput)loginpage.getelementbyname("username")).setvalueattribute(properties.adminusername); ((htmlinput)loginpage.getelementbyname("password")).setvalueattribute(properties.adminpassword); var action = (htmlpage)loginpage.getelementbyname("loginbutton").click(); ...

python - Are urllib2 and httplib thread safe? -

i'm looking information on thread safety of urllib2 , httplib. official documentation ( http://docs.python.org/library/urllib2.html , http://docs.python.org/library/httplib.html ) lacks information on subject; word thread not mentioned there... update ok, not thread-safe out of box. what's required make them thread-safe or there scenario in can thread-safe? i'm asking because it's seems that using separate openerdirector in each thread not sharing http connection among threads would suffice safely use these libs in threads. similar usage scenario proposed in question urllib2 , cookielib thread safety httplib , urllib2 not thread-safe. urllib2 not provide serialized access global (shared) openerdirector object, used urllib2.urlopen() . similarly, httplib not provide serialized access httpconnection objects (i.e. using thread-safe connection pool), sharing httpconnection objects between threads not safe. i suggest using httplib2 o...

javascript - Find the <th> of a clicked <td> in a table when <th> has span greater than 1 -

i'm trying find td's associated th cell, having trouble using jquery's index() , eq() functions since th's in table have spans of greater one. i know can retrieve td's cellindex property, use find th? or there more appropriate way? intended functionality click cell , have give me name of heading it's under. code sample: http://jsfiddle.net/kytda/ if want find corresponding table header given index of table cell can use following jquery (this assuming have table cell's index): var th = td.closest('table').find('th').eq($td.index());

java - Code color styling in Eclipse -

a nice simple question: there similar http://studiostyl.es/ eclipse? update : since used link figure out how use plugin, figured i'd put here. http://www.eclipsecolorthemes.org/?view=plugin that site looking for. have @ http://www.eclipsecolorthemes.org/ , directly available in marketplace.