Posts

onclick - using c# in unity3D to open a window once the user clicked on a specific object -

i want write code in unity3d using c# whenever user clicked on object inside game window appears contain brief information (that retrieved database) object? can please me? i'm beginner =( here go, add script gameobject click using unityengine; using system.collections; public class onclick : monobehaviour { // use initialization private bool popup; public string info; void onmousedown() { popup = true; } void drawinfo() { rect rect = new rect (20,20, 300, 200); rect close = new rect (300,20,20,20); if (popup) { gui.box(rect, info); if (gui.button(close,"x")) { popup = false; } } } void ongui() { drawinfo(); } } this code should start.

serialization - Java can you make a predefined class in java serializable? -

i want send image object on network in java. im getting error. java.io.writeabortedexception: writing aborted; java.io.notserializableexception: sun.awt.image.offscreenimage the java image object doesn't implement serializable. there way around this? ive tried making subclass of image , implement got errors when using createimage method. help. edit* ok here code there kinda lot. idea of program pictionary game. can draw using basic tools , send on network , draw image on other clients screen. this basic draw area user , draw using line tool. on mouse released try , send image object on server. class paddraw extends jcomponent { image image; graphics2d graphics2d; int currentx, currenty, oldx, oldy; int linesize = 1; public paddraw() { setdoublebuffered(false); addmouselistener(new mouseadapter() { @override public void mousepressed(mouseevent e) { oldx = e.getx(); oldy =...

regex - htaccess link redirect adds parameter -

i trying redirect old menu item new htaccess. works adds parameter not want. code is: redirect 301 /menu_cars_old.html http://www.domain.com/menu_cars_new.html rewriterule ^/?(menu_+[a-za-z._-]+)$ index.php?menu=$1 [nc,l] i not familiar htaccess asking help. redirect 301 statement should trick think has rewrite rule. redirected link looks http://www.domain.com/menu_cars_new.html?menu=menu_cars_old.html . if change redirect 301 /menu_cars_old.html http://www.domain.com/?menu=menu_cars_new.html it works don't want parameter in url. don't mix mod_alias , mod_rewrite rules. here how should have it: rewriteengine on rewriterule ^/?menu_cars_old\.html$ http://www.domain.com/menu_cars_new.html [r=301,nc,l] rewriterule ^/?(menu_+[\w.-]+)$ index.php?menu=$1 [nc,l,qsa] make sure place code in document_root/.htaccess

jsf 2 - JSF&primefaces after dialog closed background buttons don't work -

i have button open dialog: <p:commandbutton id="addbutton" value="Новая контрольная точка" oncomplete="dlg_add.show();" rendered="#{controlpointbean.selectedsubject != null}"/> and dialog wizard in it: <p:dialog widgetvar="dlg_add"> <p:wizard id="wizard" widgetvar="wizard"> <p:tab title="Тип контрольной точки"> <p:datatable id="cptypes" var="cptype" value="#{controlpointbean.cptypeslist}" rows="10" rowkey="#{cptype.id}" selection="#{controlpointbean.selectedcptype}" selectionmode="single" filteredvalue="#{controlpointbean.filteredcptypeslist}"> <p:column headertext="Тип контрольной точки" filterby="type" filtermatchmode="contains"> #{cptype.type} </p:column> </p:datatabl...

Magento pass billing and shipping info to Sagepay module from IWD cart -

i using magento 1.7 iwd onepage checkout sagepay payment module. ( http://www.interiorwebdesign.com/magento/magento-one-step-checkout-module.html & http://www.magentocommerce.com/magento-connect/ebizmarts-sage-pay-suite-ce-sage-pay-approved.html ) the sagepay module works fine standard checkout, onepage checkout shipping , billing not pass , there enter shipping info error, or enter billing info. the validation script looks shipping 1st, shipping 1st error. shipping can passed unchecking ship address, , rechecking it. there error enter billing address. the billing address gets passed if page loads fields filled, cache etc. so seems data can passed, if there in right order/time. is there code add duplicate check/uncheck ship address or code pass billing info? best place out code? find checkout button , add: billing.save(); to onclick="checkout.save(); return false;" to onclick="billing.save(); checkout.save(); return false;...

Sencha touch nested navigation view -

Image
in app, have home page has following menu buttons: 1. button1 2. button2 3. button3 4. button4 now when tap button1 , app navigates page1 . (page1 navigation view). problem here is, default page1 not have button move home page. have manually add button. question 1 : there way push page1 view home view button auto generated? ok, manually added button on page1 . page1 navigation view having list. on clicking list item, moves subpage1 . now problem here is, there default button generated + manual button added. 2 buttons !! to solve this, hide manually added button on push. , show button on pop. again issue is, there slight delay in hide/show , visible in app. problem is, in older models of blackberry, manually added button not hidden !!! question 2 : better way handle !? finally, if want nested navigation view? say, have store 10 records. in page 1, display 3 records list - record1 - on tap of this, show detailed view record2 - on tap of this, show detail...

android - closing sqlite in listview database with onclick method -

first of new developer of android learing please bear me. making app related book chapters , displaying content, got working listview populated database, facing bugs :- on leaving application having force close see log cat. in list view getting new data being appended in database. want 1 time only. chapter names constant book on chapter click, selected chapter list should open. please let me know how correct them mainactivity public class mainactivity extends activity { dbadchapter mydb; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); opendb(); registerlistclickcallback(); } @override protected void ondestroy() { super.ondestroy(); closedb(); mydb.deleteall(); } private void opendb() { mydb = new dbadchapter(this); mydb.open(); mydb.insertrow(999, "title 1...