Posts

asp.net - How to read in a Bit field to create a checkbox -

i have field in sql database bit field. i want read in field. if 1 checkbox true, else false. i started off code, getting error. advice on how this? if (myreader["tarchive"] == 1) regards tea try this: mycheckbox.checked = convert.toboolean(myreader["tarchive"]);

jsf 2 - Delete event not updating datatable rows -

in primefaces have confirm dialogue box , when confirm delete button rows in database deleted page not updated. missing not updating page. dialogue box defined below. <h:form id="searchform"> <p:commandbutton id="showdialogbutton" value="delete data" onclick="confirmation.show()" style="margin:20px" type="button" immediate="true" /> <p:confirmdialog id="confirmdialog" message="are sure want delete data submission?" header="initiating delete process" severity="alert" widgetvar="confirmation"> <p:commandbutton id="confirm" value="yes sure" update=":searchform:rowdatatable" oncomplete="confirmation.hide()" actionlistener="#{mydatabean.deletedata}" immediate="tr...

jsp - Single checkbox generated with iterator not working while it is not checked -

in 1 of struts2 test application, created multiple checkboxes using iterator tag like <s:iterator value="valueaddedservicesmap"> <s:checkbox name="reportdata.valueaddedservices" id="valueaddedservices" fieldvalue="%{key}" value="%{key in reportdata.valueaddedservices}"/>&nbsp;<s:property value="value"/><br/> </s:iterator> where valueaddedservicesmap map having key-value pairs {"1", "vas 1"}, {"2", "vas 2"} , have list<long> in action class reportdata.valueaddedservices in case of more 1 checkboxes working fine. populates list in action values associated wit selected checkboxes or keeps null if no checkbox selected. it populating single value in case of 1 checkbox dispaly , selected gives exception while 1 checkbox display , not selected. exception : [09 may 2013 10:48:45,081] [debug] unable convert value using type converter [...

android - Unexpected namespace prefix "xmlns" found for tag fragment Unexpected namespace prefix "map" found for tag fragment -

why unexpected namespace prefix "xmlns" found tag fragment unexpected namespace prefix "map" found tag fragment? <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".main"> <fragment xmlns:android="http://schemas.android.com/apk/res/android" xmlns:map="http://schemas.android.com/apk/res-auto" android:id="@+id/map" android:name="com.google.android.gms.maps.mapfragment" map:maptype="satellite"/> </relativelayout> why unexpected namespace prefix "xmlns" found tag fragment unexpected namespace prefix "map" found tag fragment ? remove xmlns:android="http://schemas.android.com/apk/res/andr...

uuid - How unique are the ids generated with CFUUID , in iOS? -

the title question actually. apple doesnt allow more use of uuid decided go cfuuid. however have questions regarding it. is unique every device? if yes how different uuid? is random generator? if yes how it? can sure in 10000 devices there wont duplicate? i between in solution of using cfuuid , , having server generating random unique identifier can sure of. need unnecessary coding , http requests between server , devices. any ideas? when apple doesn't allow use of uuid, must referring udid, or unique device id. a uuid unique every time generate one. it's not udid. uuids unique globally. is unique every device? if yes how different udid? yes, it's unique every device because part of uuid devide id, though it's not entire udid. udid same. each time create uuid, it's different last, need store uuid if wanted use device id. is random generator? if yes how it? can sure in 10000 devices there wont duplicate? a uuid computed, not...

javascript - Add function to prototype of $(this) -

i'm extending jquery.contentcarousel plugin , , i've reached specific point i'm defining new functions via __prototype__ . shrunk code down demonstrate essential part: (function($) { var aux = { navigate : function(){ //... }, } methods = { init : function( options ) { return this.each(function() { var $el = $(this); //this slippery line: $el.__proto__.scrolloneleft = function() { aux.navigate( -1, $el, $wrapper, $.extend(settings, {sliderspeed: 10, slidereasing: ''}), cache ); }; }); } } $.fn.contentcarousel = function(method) { if ( methods[method] ) { return methods[method].apply( this, array.prototype.slice.call( arguments, 1 )); } else if ( typeof method === 'object' || ! method ) { return methods.init.apply( this, arguments )...

java - Why my JDBC call is consuming memory 4 times more that actual size of data -

i wrote small java program loads data db2 database using simple jdbc call. using select query data , using java statement purpose. have closed statement , connection objects. using 64 bit jvm compilation , running program. the query returning 52 million records, each row having 24 columns, takes me around 4 minutes load complete data in unix (having multiprocessor environment). using hashmap data-structure load data: map<string, map<string, gridtradestatus>> . bean gridtradestatus simple getter/setter bean 24 properties in it. the memory required program alarmingly high. java heap size goes 5.8 - 6gb load complete data while actual used heap size remains between 4.7 - 4.9gb. know should not load data memory business requirements in way only. the question when put whole data of table in flat file comes out equivalent ~1.2gb. want know why java program consuming memory 4 times more actual size. there nothing surprising here (to me @ least). a.) strings i...