Posts

unity3d - Unity Android Debugging Tips -

today managed build first android application in unity. works nice in editor doesn't work on real android devices used adb logcat try find root of problem. here log: http://pastebin.com/uhae3btb . i'm rather noobish in unity, don't know android java specific functions, i'm quite fond of debugging , don't know start need one. how find app fails adb logcat? possible or should start commenting lines of code, rebuild , see if fails every time? there way of doing this? you have smart reading logs. (i'm sure know though) problem: e/androidruntime( 4994): java.lang.runtimeexception: unable start activity componentinfo{com.vali.atomic/com.unity3d.player.unityplayernativeactivity}: java.lang.illegalargumentexception: unable find native library: main looks me unity not building it's jar file correctly you. ensure android sdk installed correctly , setup within unity. also, ensure 32 bit version of jdk installed , being used unity when compiling ...

ios - Constraints aren't being added through updateViewConstraints -

i making custom keyboard , have function named setbuttonconstraints() . when insert function viewdidload() , run app constraints set. when move function call override func updateviewconstraints() (which supposed called after subviews have been layed out) no constraints set. cause of this? this simple updateviewconstraints() looks like: override func updateviewconstraints() { super.updateviewconstraints() // add custom view sizing constraints here setbuttonconstraints() } per apple's documentation, updateviewconstraints() gets called if constraints need updated. also, believe need call super.updateviewconstraints() after change constraints. the following link helpful. where should setting autolayout constraints when creating views programmatically

vba - Bringing an Excel window to foreground from Access -

i trying open excel file access , work, excel window pops in background (behind access window), not user friendly. here code use: private function openexcelattachment() dim myxl object set myxl = createobject("excel.application") myxl dim fullpath string, name string name = "\excelfile.xlsx" fullpath = currentproject.path & name .workbooks.open fullpath .visible = true end how can make excel window appear in foreground (on top of opened windows) instead? thank you! i first check open instance of excel. if must allow multiple instances of application, trickier. if ok using 1 instance of excel, think should work using appactivate statement. private function openexcelattachment() dim myxl object on error resume next set myxl = getobject(,"excel.application") if err.number <> 0 set myxl = createobject("excel.application") on error goto 0 myxl dim fullpath string, name string name = "\ex...

apache - PHP code is not being executed, instead code shows on the page -

Image
i'm trying execute php code on project (using dreamweaver) code isn't being run. when check source code, php code appears html tags (i can see in source code). apache running (i'm working xampp), php pages being opened php code isn't being executed. does have suggestion happening? note: file named filename.php edit: code..: <? include_once("/code/configs.php"); ?> sounds there wrong configuration, here few things can check: make sure php installed , running correctly. may sound silly, never know. easy way check run php -v command line , see if returns version information or errors. make sure php module listed and uncommented inside of apache's httpd.conf should loadmodule php5_module "c:/php/php5apache2_2.dll" in file. search loadmodule php , , make sure there no comment ( ; ) in front of it. make sure apache's httpd.conf file has php mime type in it. should addtype application/x-httpd-php .php . tells...

php - Prepared statement with and without "on duplicate key update" -

i trying remove on duplicate key update because have duplicates. statement work , inserts data not duplicates. please help. $sql = "insert projectselect (id_proj, project, role, id_agent) values ( ?,?,?, ( select idagency agentsinfo email = ?)) on duplicate key update `id_agent` = values(`id_agent`), `project` = values(`project`), `role` = values(`role`) "; if (($stmt = $con->prepare($sql)) === false) { trigger_error($con->error, e_user_error); } $result2= mysqli_query($con, $idq); $row_number = 1; while ($row = mysqli_fetch_array($result2)) { $id_proj= $row["id_proj"]; $project= $row["project"]; $role= $row["role"]; $id_proj++; } if ($stmt->bind_param("ssss", $id_proj, $postproj, $postrole, $_session["email"]) === false) { trigger_error($stmt->error, e_user_error); } if (($stmt->execute()) === false) { trigger_error($stmt->error, e_user_error); } you have understand on duplicate ke...

mongodb - How to convert this map reduce in aggregate framework? -

i've still done map/reduce/finalize function using mongodb. this how need mongodb executes aggregation: db.house_results.mapreduce(function(){ emit(this.house_name.tolowercase(),this); },function(key,values){ var house = {name:key,address:"",description:"",photo:[],lat:0,lng:0,rooms:[]}; values.foreach(function(house_val) { /*address*/ if(house.address=="") house.address = house_val.house_address; /*photo*/ if(!house_val.photo in house.photo) house.photo.push(house_val.house_photo); /*description*/ if(house.description=="") house.description = house_val.house_description; /*lat - lng*/ if(house.lat==0 || house.lng==0){ var house_position = house_val.house_position; if(house_position && house_position.lat && house_position.lng){ ...

Grails Reverse Url Mapping: Is there a way to build links based on the currently matched route? -

i'm trying build dynamic url mappings based on domain classes of grails project. goal use single generic controller, url decides domain being used processing. problem now, don't desired urls when using <g:link /> tag. i tried following variants create url mappings: static mappings = { holders.grailsapplication.domainclasses.each { "/admin/${it.propertyname}/$action?/$id?"(controller: "admin") } } static mappings = { "/admin/$domainclass/$action?/$id?"(controller: "admin") } both variants work actual url matching. don't behavior of reverse url mapping grails. in case of variant 1, reverse mapping resolves last added url mapping admincontroller. case 2 have problem have pass domainclass-parameter every link-creating call, though theoretically not necessary, since information present in current request. i know there possibility of using named url mappings , using <g:link mapping="mapping_n...