Posts

javascript - How to check if a user likes my Facebook Page or URL using Facebook's API -

javascript - How to check if a user likes my Facebook Page or URL using Facebook's API - i think i'm going crazy. can't work. want check if user has liked page javascript in iframe app. fb.api({ method: "pages.isfan", page_id: my_page_id, }, function(response) { console.log(response); if(response){ alert('you likey'); } else { alert('you not likey :('); } } ); this returns: false i'm fan of page shouldn't homecoming true?! i tore hair out on 1 too. code works if user has granted extended permission not ideal. here's approach. in nutshell, if turn on oauth 2.0 canvas advanced option, facebook send $_request['signed_request'] along every page requested within tab app. if parse signed_request can info user including if they've liked page or not. function parsepagesignedrequest() { if (isset($_request['signed_requ...

Any idea why this piece of PHP code is making my script hang? -

Any idea why this piece of PHP code is making my script hang? - thanks time in reading this. not programmer limited skills have been able determine function called @ origin of every page making our store pos script fail. when goto our url php application blank page. when phone call function commented out, pages load fine. the interesting thing note no changes have been made our code , has been in utilize on 3 years. stopped working couple days ago , our webhost useless. haven't been able tell me if there changes made our server environment don't know start looking information. colleague suspects may have changed version of php in use, though don't know version might have preceded 1 listed here. server info -apache version 2.2.29 -php version 5.4.33 -mysql version 5.5.37-cll -architecture x86_64 -operating scheme linux // new version seo htaccess short url's function makesecure(){ if($_server['https'] != "on"){ ...

Multiplying cell data by data in other cells in Excel -

Multiplying cell data by data in other cells in Excel - i have rather big worksheet in need average out numbers big array of criteria. cells a1-452 , c1-452 need multiplied together, info different in each row. to clarify a1 multiplied c1, , on. since info different in cells i'm not sure if possible accomplish using excel macro. any thoughts? thanks! as array formula simply, =average((a1:a452)*(c1:c452)) an array formula requires ctrl+shift+enter finalize. not take business relationship discard of blanks average collection. post comment if concern. excel excel-vba automation excel-formula

javascript - ajax HTML content not rendering in bootstrap pop -

javascript - ajax HTML content not rendering in bootstrap pop - i trying html content ajax request load in twitter bootstrap (v3) popover. the popover element looks this. <a class="more-info" data-remotecontent="/tasks/moreinfo/56eb0256-1a78-483c-b053-a387011f5b97" data-original-title="task 1" data-title="task 1" data-toggle="popover" rel="popover" href="/tasks/56eb0256-1a78-483c-b053-a387011f5b97">task 1</a> and javascript looks this. $('a.more-info').each(function () { var info = $(this); info.bind('mouseenter', function () { info.popover({ html: true, title: info.html(), content: 'loading', }).popover('show'); $.get(info.attr('data-remotecontent'), function (data) { }).done(function (data) { ...

javascript - This jquery lookup is not working for some reason -

javascript - This jquery lookup is not working for some reason - $(".pagination.postpagination a").click(function(event) { // populate hidden page_number field , submit search form. event.preventdefault(); var page = $(this).attr('data-page-number'); $("#id_page_number").val(page); $("#customer-search-form").submit(); }); for reason client search not fire unless there 'console.log()' before or after line client search. ideas? not js programmer helping on our team. lookup failing reason think. thanks! javascript jquery

html - Fill SVG path element with a background-image -

html - Fill SVG path element with a background-image - is possible set backgound-image svg path element? for instance, if set element's class wall , css style .wall {fill: red;} works, .wall{background-image: url(wall.jpg)} not, neither .wall {background-color: red;} . you can making background pattern: <defs> <pattern id="img1" patternunits="userspaceonuse" width="100" height="100"> <image xlink:href="wall.jpg" x="0" y="0" width="100" height="100" /> </pattern> </defs> adjust width , height according image, reference path this: <path d="m5,50 l0,100 l100,0 l0,-100 l-100,0 m215,100 a50,50 0 1 1 -100,0 50,50 0 1 1 100,0 m265,50 l50,100 l-100,0 l50,-100 z" fill="url(#img1)" /> working example html css image svg background-image

Crop image to square - Android -

Crop image to square - Android - how can cutting rectangular image (600 x 300) left , right fit in square imageview ? don't want resize image, want crop it, 300 x 300. [solution] as @blackbelt said bitmap cropimg = bitmap.createbitmap(src, startx, starty, dstwidth, dstheight); is great cropping images. how can automatically crop images different sizes. create simple code that: // drawable bitmap src= bitmapfactory.decoderesource(context.getresources(), r.drawable.image); // url bitmap src = null; seek { string url = "http://www.example.com/image.jpg"; inputstream in = new java.net.url(url).openstream(); src = bitmapfactory.decodestream(in); } grab (exception e) { e.printstacktrace(); } int width = src.getwidth(); int height = src.getheight(); int crop = (width - height) / 2; bitmap cropimg = bitmap.createbitmap(src, crop, 0, height, height); imageview.setimagebitmap(cropimg); you can utilize bitmap dst = bitmap.createbitma...