Posts

Showing posts from May, 2015

iphone - weird issue when downloading from the app store -

i getting following error after doing upgrade app store. tried simulating in xcode installing previous version , running new update via xcode , didn't error. going on? 1 of apple app store drm issues? <error>: libmobilegestalt copyinternationalmobileequipmentidentity: no imei in ct mobile equipment info dictionary - <cfbasichash 0xee6c450 [0x3f004650]>{type = mutable dict, count = 3, entries => 2 : <cfstring 0xee6c400 [0x3f004650]>{contents = "kctmobileequipmentinfomeid"} = <cfstring 0xee6c430 [0x3f004650]>{contents = "a100001cb0e219"} 3 : <cfstring 0xee6c500 [0x3f004650]>{contents = "kctmobileequipmentinfomin"} = <cfstring 0xee6bcd0 [0x3f004650]>{contents = "5204299292"} 7 : <cfstring 0xee6bd10 [0x3f004650]>{contents = "kctmobileequipmentinfoprlversion"} = <cfnumber 0xee68de0 [0x3f004650]>{value = +52333, type = kcfnumbersint64type} } jul 6 14:38:31 unknown lockdownd[26] <not...

algorithm - Floyd-Warshall: all shortest paths -

i've implemented floyd warshall return distance of shortest path between every pair of nodes/vertices , return me (but one) shortest path between each of these pairs. there anyway return every shortest path (when there multiple tied shortest) every pair of nodes? (just want know if i'm wasting time trying) if need count of how many different shortest path exist, can keep count array in addition shortestpath array. here's quick modification of pseudocode wiki . procedure floydwarshall () k := 1 n := 1 n j := 1 n if path[i][j] == path[i][k]+path[k][j] , k != j , k != count[i][j] += 1; else if path[i][j] > path[i][k] + path[k][j] path[i][j] = path[i][k] + path[k][j] count[i][j] = 1 if need way find paths, can store vector/arraylist structure each pair expand , collapse. here modification of pseudocode same wiki . procedure floydwarshallwithpathreconstruction () k := 1 n := 1 n j := 1 n if path[i][k] + path[k][j] < path[i][j] path[i][j] := path[i][k]+path[k][j]...

Python Regex, Finding what is in between two substrings -

the regex have right is: string="hello (fdd()()()()(()(())()))" re.match("%s\s*\((.*?)\)$"%re.escape("hello"), string) and work well, goal of whatever inside brackets. in case: "fdd()()()()(()(())())" i make alteration, regex should work test case "hello (hihihi(((())))hihi) { " there curly-brace @ end of it. there should curly-brace @ end of given string therefore first test case showed not work anymore (with new regex want). try looking @ this hello[any amount of space]([get whatever inside here])[any amount of space]{[any amount of space] i think using dollar sign causing me problems. not familiar using regex, if can me great. open solution including not limited other python modules, built in python string features, ect. thanks help, i think use "hello\s*\((.+)\)\s*{" import re text = "hello (hihihi(((())))hihi) { " print re.match(r'hello\s*\((.+)\)\s*{', text).group(1) gives me hihihi((((...

javascript - How do browsers determine what time setInterval should use? -

it seem in general, browsers in cases modify, beyond minimum clamp, actual time interval setinterval uses. instance, have following code: function start() { window.setinterval(function() { update(); }, 1); } lasttime = new date; numframes = 0; lastframes = 0; function update() { numframes++; if (new date - lasttime >= 1000) { lastframes = numframes; numframes = 0; lasttime = new date; } } here, lastframes give number of frames on approximately past second. when used in chrome, firefox, , safari, code doesn't run @ 1 millisecond. of course, each browser has arbitrary minimum time between setinterval calls, expected. however, page continues run, frame rate continue decrease, if tab still focused. way i've found fix make browser something. along these lines seems make browser run setinterval fast can: function start() { window.setinterval(function() { update(); }, 1); } lasttime = new date; numframes = 0; lastframes = 0; function update() { numframes++; if (new date - l...

backbone.js - jQuery plugin raty.js within Backbone view keeps reloading same star images from server -

whenever hover on wbotelhos/raty.js plugin on page repeatedly fetch star-on.png , star-off.png server stars go on , off. there way use local client cache of images? i'm testing in chrome. use following backbone.view render code insert plugin item element. render: function(manage) { this.collection.each(function(user) { this.insertview("ul", new user.views.item({ model: user })); }, this); return manage(this).render().then(function(el) { // re-focus if invalid this.$("input.invalid").focus(); this.$(".raty-test").raty(); }); } to solve wrote github: charlesjshort / raty forked wbotelhos/raty replace code setting image source setsource function sets images object in localstorage array. use github: doomhz/jquery-image-cache preload images localstorage array.

javascript - Newly added dom elements not being selected -

i have image list has ability load more content via ajax. on default there images loaded list. when user scrolls 4 items added list. list refreshed via ajax every 15 seconds , replaces top 7 items in list. problem when 4 new items added list selector seems ignore items, doesn't select 0 index. i know sounds confusing i'll try , demo simple example. ex $(function () { // update channelstats settimeout(function () { var refresh = setinterval(updatechannels, 15000); updatechannels(); }, 15000); function updatechannels() { $.ajax({ type: "post", url: "ajax/imagelist.aspx/updateimages", data: "{}", contenttype: "application/json; charset=utf-8", datatype: "json", success: function (data) { // newest var $newestresults = $('#newest .pcvideomaincontainer:lt(7)'); $newestresults.fadeout('slow'), function () { remove() }; $.each($newestresults, function (index, value) { $(this).delay(index * 250).animate({ opacity: 0 ...

CSS/html horizontal list with image -

Image
i trying have text display right of image using simple css , text displaying below image rather right. works okay text. here jsfiddle - http://jsfiddle.net/ejn7u/ -which not seem show images--and text go right of alt text in img tag. can't figure out way display images in jsfiddle on own server, text displaying below image, not right. would appreciate suggestions. thanks. here code: .hlist li { display: inline-block; margin-left: auto; margin-right: auto; } <ul class="hlist"> <li><img src = "pic.jpg" alt="picture"></li><li>some text</li><li>some more text</li></ul> edited remove ul tag css/html horizontal list image - stack overflow stack overflow questions developer jobs documentation beta tags users current community help chat stack overflow meta stack overflow communities sign up or log in customize list. more stack excha...

variadic functions - C++ - va_list Bad Pointer -

i getting exception of bad pointer (0xcccccccc ) temp below under case 's': string logger::format(const char *str, va_list args) { ostringstream output; for(int = 0; < strlen(str); ++i) { if(str[i] == '%' && str[i+1] != '%' && i+1 < strlen(str)) { switch(str[i+1]) { case 's': { char *temp = va_arg(args, char*); output << temp; break; } case 'i': { int temp = va_arg(args, int); output << temp; break; } case 'd': { double temp = va_arg(args, double); output << temp; break; } case 'f': { float temp = va_arg(args, float); output << temp; break; } default: output << str[i]; } i++; } else { output << str[i]; } } return output.str(); } the above function called this: void logger::debugformat(string message, ...) { const char* cstr = message.c_str(); va_list args; va_start(args, cstr); record(debugging, format(cstr, args)); va_end(args); } i calling above way in code logger::...