Posts

ios - Image doesn't fit web view -

Image
am displaying image on web view , doesn't fit web view , shows blank white space around border.how can fit or scale image size of web view? nsurl *url = [nsurl fileurlwithpath:path]; nsurlrequest *request = [nsurlrequest requestwithurl:url]; [self.webview loadrequest:request]; self.webview.backgroundcolor=[uicolor blackcolor]; self.webview.delegate = self; [self.webview setscalespagetofit:yes]; try html code snippet <html><body><img src='%@' width='100%' height='100%'></body></html> it fill web view without white space.

ruby on rails - Correct number for each item in will_paginate list? -

i'm using will_paginate gem in rails app , loop through array of model instances rendered on page , limited 5 per page. before added will_paginate numbered each item simple <% += 1 %> of course went +1 each loop through array, , worked fine. but i'm using will_paginate count restarts on each page, page 1 items go 1, 2, 3, 4, 5, , on second page starts over... 1, 2, 3, 4, 5 obviously isn't ideal. how count continue go previous pages? i think following should work: <% @collection.each_with_index |item, index| %> <%= @collection.offset + index + 1 %> ... <% end %>

git - Automatically merge from trunk to branches -

if there multiple branches 1.1_dev , 1.2_dev , , trunk , let's dev guy checks in bug in trunk , should automatically change in other 2 dev branches also. is there version control tool can this?

mysql - deleting file with unlink function php -

this script working deleting mysql database, it's not unlinking local directory files. can fix script? here's script <?php include "../config/database.php"; if(isset($_get['kode'])){ $id = (int) $_get['kode']; $sql = "select * anidata id='$id'"; $query = mysql_query($sql); if(mysql_num_rows($query) > 0 ){ $data = mysql_fetch_array($query); //delete file $path = 'upload/'.$data['image']; @unlink($path); //delete database mysql_query("delete anidata id='$id'"); } } header("location: view.php"); ?> and helping anyway! :) first try check if file deleted directory if( @unlink($path) ) { mysql_query("delete `anidata` id='$id'"); } if not deleted database, check assigned path in php code !!

javascript - Issue in opening two dropdown at same time -

here id dropdown fiddle http://jsfiddle.net/ym8t7lhj/ the issue facing having 2 dropdowns, if click on 1 dropdown dropdown opening. can 1 me out in this. script $(document).ready(function() { $(".dropdown dt a").click(function() { $(this).toggleclass("myclass"); $(".dropdown dd ul").toggle(); }); $(".dropdown dd ul li a").click(function() { var text = $(this).html(); $('.dropdown dt a').toggleclass('myclass'); $(".dropdown dt span").html(text); $(".dropdown dd ul").hide(); $("#result").html("selected value is: " + getselectedvalue("sample")); }); }); try this $(document).ready(function() { $(".dropdown dt a").click(function() { $(this).toggleclass("myclass"); $(this).closest('dl').find...

html - putting a div below an absolute positioned element -

i've got problem putting div below absolute positioned element doesn't have fixed height. codes long paste here, i'm posting link html file instead; http://infomailer.kotra.or.kr/20141127/oisy.html i need move 'dd' bottom of document, not using margin or absolute-positioning because document read mobile devices well. should keep main structure of tab module , fix problem?

c# - not able to redirect users to another page with hyper link -

i have requirement users redirected youtube.com using hyperlink control using below i want change url dynamically based on drop down list selected item using below code. protected void ddlptype_selectedindexchanged(object sender, eventargs e) { int x = ddlptype.selectedindex; if (x == 0) { activatecerts.navigateurl = "http://www.youtube.com/watch?v=3ayoipyqokq"; activatecerts.text = "activatecerts"; activatecerts.target = "_blank"; //activatecerts.href = "http://www.youtube.com/watch?v=3ayoipyqokq"; } else if (x == 1) { //activatecerts.target = "_blank"; //activatecerts.href = "http://www.youtube.com/watch?v=hk3hxuuwg0w"; activatecerts.text = "activatecerts"; activatecerts.navigateurl = "http://www.youtube.com/watch?v=3ayoipyqokq"; } and 1 aspx code <asp:label runat="server" style="pa...