Posts

javascript - How to calculate angle between two planes? -

i have 2 planes, how can calculate angle between them? possible calculate angle between 2 object3d points in case of planes? heres example fiddle: https://jsfiddle.net/rsu842v8/1/ const scene = new three.scene(); const camera = new three.perspectivecamera(45, window.innerwidth / window.innerheight, 1, 1000); camera.position.set(25, 25, 12); var material = new three.meshbasicmaterial({ color: 0x00fff0, side: three.doubleside }); window.plane1 = new three.mesh(new three.planegeometry(10, 10), material); scene.add(plane1); plane1.position.set(0.3, 1, -2); plane1.rotation.set(math.pi / 3, math.pi / 2, 1); window.plane2 = new three.mesh(new three.planegeometry(10, 10), new three.meshbasicmaterial({ color: 0x0fff00, side: three.doubleside })); scene.add(plane2); // setup rest var pointlight = new three.pointlight(0xffffff); pointlight.position.x = 10; pointlight.position.y = 50; pointlight.position.z ...

sql - MonetDB - Table added to merge table multiple times, can't remove or drop it -

i have monetdb merge table 620 million rows of data in it, let's call merge_table . has 14 member tables, each containing monthly data (e.g. data1701 january 2017). java program handles loading data database , adding/removing member tables somehow managed add same table merge table multiple times. problem can't remove these duplicated tables merge table, though monetdb says operation successful: alter table myschema.merge_table drop table data1708; operation successful (0.608ms) then, when try drop table: drop table myschema.data1708; drop table: unable drop table data1708 (there database objects depend on it) of course, when list members of merge_table , data1708 still there. is there other method use remove these duplicates? edit: monetdb version 11.25.23 (monetdbd[21491] 1.7 (dec2016-sp5)). jdbc version 2.19. running drop table command multiple times yields same results. trying add of tables again doesn't work, works expected without j...

java - Hibernate doesn't include schema into query -

this question has answer here: how set default schema name in jpa configuration? 4 answers according configuration, hibernate dao repository should send query this: insert some_schema.some_table (...) values (...) instead, hibernate sends this: insert some_table (...) values (...) it omits schema prefix. without prefix getting ora-00942, table not exist oracle database error. how force hibernate send schema prefix? p.s. question similar this question , adding default schema doesn't work me, because using more of them. configuration of entity this: <hibernate-mapping> <class name="com.somepackage.someclass" table="some_table" schema="some_schema"> <id name="someid" type="int" column="some_table_id"> <generator class="increment"/> </id> <...

openerp - what should I add to display the value of fields correctly? -

what should add display user_id , cat correctly @api.model def create(self, vals): record=super(test, self).create(vals) if vals['total'] > 0: vals['date'] = fields.datetime.now() self.env['journal'].create({ 'user_id': record.patient_id, 'cat': record.cat,}) .... ..... on tree view (journal): user_id displayed test.user(6,) cat displayed cat1 edits: class test(models.model): _name = 'test' cat = fields.selection( required=true, related='test_type_cat.name', store=true, ) user_id = fields.many2one('res.users', string='user', readonly=true,) ..... @api.model def create(self, vals): record=super(test, self).create(vals) if vals['to...

ios - Swift : ARKit Save ARPlaneAnchor for next session -

arkit quite new , quite new in swift... i'm having troubles... i'd save arplaneanchor detected during session , reload them when relaunch app. phone @ same place , i'd scan room 1 time. , remembering anchor found in room everytime launch app. i tried several solutions : solution1 : save arplaneanchor using : nskeyedarchiver.archiverootobject(plane, tofile: filepath) i got error : terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[arplaneanchor encodewithcoder:]: unrecognized selector sent instance i think maybe can't save kind of data locally solution2 : store datas of arplaneanchor intantiate them when launch app. datas float. creat aranchor easily, cast them arplaneanchor , not modify "center" , "extend" parameter of arplaneanchor because have getter , not setter. can't create anchors. i open anysolution. think need store aranchor object, not find way without crash! if can ...

Compiling MariaDB C/C++ Connector on Windows -

i trying use mariadb in visual studio project, after looking @ documentation, installed mariadb , downloaded source code c/c++ connector. i got include folder linked project, able make calls functions there, won't build because linker fails find function definitions (obviously). have looked on , cannot find solid directions on building .lib files need. have found 2 sources need build mariadb_connector_c.sln, file not exist in source code got, nor exist on git repo: https://github.com/mariadb/mariadb-connector-c the closest thing have found appveyor.yml file provided, contains following: contents of yml file is there out there has done before? can't find online or in files provided pertaining this. update: i found answer of replies. needed run source code through cmake in order .sln build .lib files need link project. the answer generic answer cmake project install cmake. make sure cmake.exe in path (windows installer offers option). install visual ...

java - How many strings are produced in a .toString.split(","); call? -

suppose have following code: stringbuilder sb = new stringbuilder("521,214"); string[] result = sb.tostring().split(","); my question is: tostring().split(",") generate 2 strings or 3 strings? know result string array have 2 strings - tostring() call generate string - isn't returned? basically, i'm trying limit number of strings created performance purposes , want know if tostring() call brings total number of strings created 3? there 5 string object created in total these 2 lines: "521,214" object passed stringbuilder 's constructor. object in interned pool of strings, "," string object passed split . object in interned pool of strings, an equivalent "521,214" object produced tostring . each call of tostring produces new string object. there no optimization see if in identical string object has been requested before. two string objects "521" , "214" produc...