Posts

angularjs - Angular: How to perform search on button click -

this sample code user write data in textbox , result filter accordingly how can filter data clicking button? <div ng-app="myapp" ng-controller="mycontroller"> <label>field: <select ng-model="selectedfieldname"> <option value="">--select account--</option> <option ng-repeat="(fieldname,fieldvalue) in customer[0]" ng-value="fieldname | uppercase">{{fieldname | uppercase}}</option> </select> </label> <label>data: <input ng-model="searchtext"></label> <table class="table table-striped table-bordered"> <tr> <td>id</td> <td>first name</td> <td>last name</td> <td>salary</td> <td>date of birth</td> <td>city</td> <td>phone</td> ...

Android GridView not responding to OnItemClickListener -

i found people had problem well, none of existing solutions worked me. have fragment (called headlinesfragment), assigns onitemclicklistener gridview containing images. images appear fine, touch/click event never fired. tried multiple combinations of android:clickable="false"/android:focusable="false", etc nothings works me public static class headlinesfragment extends fragment { @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view rootview = inflater.inflate(r.layout.menufragment, container, false); return rootview; } public class imageadapter extends baseadapter { private context context; integer[] imageids = { r.drawable.pasta05, r.drawable.pasta05, r.drawable.pasta05, r.drawable.pasta05, r.drawable.pasta05, r.drawable.pasta05, r.drawa...

javascript - Save canvas as jpg to desktop -

this question has answer here: html5 canvas png file 4 answers i trying save image (jpeg) desktop html5canvas. can open in new window window.open(canvas.todataurl('png'), ""); , how can save desktop? thanks. download attribute there new download attribute in html5 allow specify file-name links. i made saving canvas. has link ("download image") - <a id="downloadlnk" download="yourfilename.jpg">download image</a> and function: function download() { var dt = canvas.todataurl('image/jpeg'); this.href = dt; }; downloadlnk.addeventlistener('click', download, false); you can change file-name dynamically setting attribute downloadlnk.download = 'myfilename.jpg' . demo archives.

java - JSP pages not loading on loaclhost while working with Tomcat7 on Eclipse IDE -

i working on project using java servlets , jsp. earlier project running fine, when running project, server setup jsp pages not running , others not show css applied it. also console shows warning. apr 19, 2016 8:24:57 pm org.apache.catalina.core.aprlifecyclelistener init info: loaded apr based apache tomcat native library 1.1.33 using apr version 1.5.2. apr 19, 2016 8:24:57 pm org.apache.catalina.core.aprlifecyclelistener init info: apr capabilities: ipv6 [true], sendfile [true], accept filters [false], random [true]. apr 19, 2016 8:24:58 pm org.apache.tomcat.util.digester.setpropertiesrule begin warning: [setpropertiesrule]{server/service/engine/host/context} setting property 'source' 'org.eclipse.jst.jee.server:tpc' did not find matching property. apr 19, 2016 8:24:58 pm org.apache.catalina.core.aprlifecyclelistener initializessl info: openssl initialized (openssl 1.0.1f 6 jan 2014) apr 19, 2016 8:24:58 pm org.apache.coyote.abstractprotocol init info: initial...

plsql - Oracle: Capturing Specific Oracle Message with EXCEPTION_INIT -

i want handle exception ora-000942 , following manual , discussion . since ora- error no predefined name, want use exception_init. when run code, continue ora-000942 message, not expected via procedure level handler. create table foobar (foobar_id varchar(1)); declare procedure p_add_to_foobar p_missing_table exception; pragma exception_init(p_missing_table, -00942); begin insert foobaz select '1' dual; exception when p_missing_table dbms_output.put_line('missing table'); end p_add_to_foobar; begin p_add_to_foobar; dbms_output.put_line('done'); end; question: how procedure level exception handle -942 error? the error you're getting being thrown pl/sql compiler when tries compile statement insert foobaz select 1 dual because of course foobaz table doesn't exist. in-line sql statements have valid @ compile time, , compiler throws exception. to around you'll have use dynamic sql, in: ...

java - How to maintain the focus point in a Pan/Zoom Android Layout while zooming? -

i have custom layout extends framelayout , supports need. scrolling , zooming child view or layout works well. 1 thing having trouble maintaining focus point while zooming. center point between pinching fingers moves off screen, work google maps app focus(center) point maintained. here's code. public class betterzoomlayout extends framelayout { // state objects , values related gesture tracking. private scalegesturedetector mscalegesturedetector; private gesturedetectorcompat mgesturedetector; private static final float min_zoom = 1.0f; private static final float max_zoom = 4.0f; private float scale = 1.0f; private float lastscalefactor = 0f; // how translate canvas private float distancex = 0f; private float distancey = 0f; public betterzoomlayout(context context) { super(context); init(context); } public betterzoomlayout(context context, attributeset attrs) { super(context, attrs); init(context); } public betterzoomlayout(context conte...

html - img auto width height and max-height -

i have code here: <table class="media imgtable" border="1" width="auto" height="auto" style=""><tbody> <tr><td class="xclick" width="auto" height="auto" align="left" valign="center"> <div class="xclick" style="position: relative; left: -1px; top: 3px; width: 200px; padding: 0px 1%; border: 1px solid silver; border-bottom: none; background-color: #add8e6;"><?php echo $label; ?></div> </td></tr> <tr><td class="xclick" width="auto" height="auto" align="center" valign="center" style="position: relative;"> <img id="img" src="<?php echo $src; ?>" style="width: auto; height: auto;" /> </td></tr></tbody></table> and looks this it perfect. want. images large , overflow scree...