Posts

How to get and change encoding schema for a DB2 z/OS database using dynamic SQL statement -

a db2 z/os database has been setup me. want know encoding scheme of database , change unicode if database other type of encoding. how can this? can using dynamic sql statements in java application? thanks! you need specify encoding scheme unicode when creating table (and database , tablepsace) using ccsid unicode clause. according documentation: by default, encoding scheme of table same encoding scheme of table space. default, encoding scheme of table space same encoding scheme of database. can override encoding scheme ccsid clause in create tablespace or create table statement. however, tables within table space must have same ccsid. for more, see creating unicode table in db2 z/os documentation . you able create tables via java/jdbc, doubt able create databases , tablespaces way. wouldn't recommend anyway, find closest z/os dba , person you.

Rails 3 submit form with link -

how can submit form link on correct rails 3 format? thanks. <%= form_for @post |f| %> <%= f.label :title %><br> <%= f.text_field :title %> <p><%= f.submit %></p> <% end %> my code sample. "correct" tricky word in context ;) . 1 ask why you're not taking button element , make link? anyways — can't achieve plain html (at least not knowledge). javascript framework e.g. jquery this: $('a').click(function(){ $('form').submit(); return false; }); rails 2.3.x had link_to_remote helper let's specify :submit parameter (= dom element's id, default parent form). able write: link_to_remote 'submit', :url => {…}, :submit => "my_form" but rails 3's push ujs, helper gone.

How to make a div not scroll off the page using jquery -

basically have structure this: <body> <div> main content </div> <div> toolbar </div> <div> results </div> when scrolling down, want "main content" disappear off screen. 'toolbar' stay flush top of page, , 'results' scroll, disappearing 'toolbar' scroll. edit: toolbar starts off in middle of screen. want scroll top, no further, rest of page (below) keeps scrolling. i found tutorial http://www.wduffy.co.uk/blog/keep-element-in-view-while-scrolling-using-jquery/ but different. in example above, although toolbar stays near top, prevents results being scrolled. i have position:fixed; toolbar. way stay fixed in view. <body> <div> main content </div> <div style="position:fixed;"> toolbar </div> <div> results </div>

Iphone app - How to show the digital clock with current time -

hello working iphone app need show current time in watch there watch displays static time or static image . need find current time move hrs,mins ,seconds pins such tht should set time. u have ideas here code: //calculate angles: float minutesangle = (0/60)*360; float hoursangle = (10/12)*360; //begin animation block [uiview beginanimations:@"movehands" context:nil]; [uiview setanimationduration:0.5]; minsimageview.transform = cgaffinetransformrotate(minsimageview.transform, minutesangle); hoursimageview.transform = cgaffinetransformrotate(hoursimageview.transform, hoursangle); [uiview commitanimations]; where minsimageview ,hoursimageview imageviews set in xib shows static image but not effecting @ all.. once have individual time values (it sounds you've figured out already) can position hands needed. this means it's time brush on math skills. think this'll give start: a circle has 360 degrees in it. means whatever time unit g...

java - fetching values from class -

i new java. problem is i have created class database connections.now want access class methods in class.so have created object of class. when using object access methods of database class showing error "dbcon(object) cannot resolved type" i can't understand issue. please help. make valid reference. the error getting because code uses class not able reference class. if these classes in different packages, need add import line top of class you're working in import dbcon class. you should aware case matters. dbcon not same dbcon . in java, standard class names should begin uppercase letters , variables lowercase letters. so, class dbcon @ least named improperly. standard helps identify , resolve problems 1 you're having before ever happen. finally, highly suggest work sort of ide eclipse . software can make development process easier helping solve common problems these through suggested steps.

iphone - Multitouch don't work in cocos2d -

this cctouchesmoved method. whats wrong? use cocos2d framework. -(void) cctouchesmoved:(nsset *)touches withevent:(uievent *)event { ccnode *sprite = [self getchildbytag:ktagplayer]; ccnode *sprite2 = [self getchildbytag:ktagenemy]; cgpoint point; //Собрать все касания. nsset *alltouches = [event alltouches]; (uitouch *touch in alltouches) { point = [touch locationinview:[touch view]]; point = [[ccdirector shareddirector] converttogl:point]; if (point.y > 384) { if (point.x > 992) sprite2.position = ccp(992, size.height - 100); else if (point.x < 32) sprite2.position = ccp(32, size.height - 100); else sprite2.position = ccp(point.x, size.height - 100); } else { if (point.x > 992) sprite.position = ccp(992, 100); else if (point.x < 32) sprite.position = ccp(32, 100); else sprite.position = ccp(point.x, 100); } }...

ruby on rails - The scope of custom helper -

i have defined helper function in helper: module carshelper def my_helper ... end end but can neither used it(my_helper) in carscontroller nor in car model, custom helper can used in view? helpers views. can include them in controllers well. add helper :cars to controller. ( docs ) models out of scope helpers. use class or instance methods in there instead.