Posts

c# - Can Poly2Tri triangulate polygons with collinear points? -

i'm trying triangulate following rectangular polygon multiple points on bottom , top edges, poly2tri c# implementation fails triangulate properly. doing wrong? thanks. [0.624999999999412,0.549725]:{3914247097} [0.624999999999412,0.0499749999999999]:{2649576031} [0.697622146677862,0.0499749999999999]:{3234442680} [0.764780181168915,0.0499749999999999]:{779801897} [0.83091206956133,0.0499749999999999]:{3290577852} [0.900187283173112,0.0499749999999999]:{965350020} [0.974812716825783,0.0499749999999999]:{4158962073} [1.04408793043765,0.0499749999999999]:{2500807069} [1.11021981883008,0.0499749999999999]:{1609890243} [1.17737785332108,0.0499749999999999]:{4031413118} [1.25,0.0499749999999999]:{1430088023} [1.25,0.549725]:{133402941} [1.17737785332114,0.549725]:{1740221683} [1.11021981883019,0.549725]:{2812201862} [1.04408793043782,0.549725]:{1792339566} [0.97481271682603,0.549725]:{2861752679} [0.900187283173419,0.549725]:{3438312411} [0.83091206956167,0.549725]:{...

Fix Labview Alt-Tab behaviour with Autohotkey -

did try fix way labview interferes normal alt-tab behaviour using autohotkey? alt-tab inside labview puts non-labview windows end of list. so if have alt-tabbed labview window browser takes (2 × number_of_currently_open_labview_projects -1) keystrokes back. great idea. find functionality annoying , there doesn't appear easy fix anywhere on web. here's script. 2 quick notes: i had lot of trouble re-mapping alt-tab. if that's critical can try starting here help. to knowledge it's not possible rid of "screen flicker" because windows requires delay between keystrokes. note: adapt code various windows - "ahk_class" using window spy tool included in autohotkey installer . code #noenv ; recommended performance , compatibility future autohotkey releases. #warn ; enable warnings assist detecting common errors. sendmode input ; recommended new scripts due superior speed , reliability. setworkingdir %a_scriptdir% ; ensur...

ruby on rails - Activerecord migration error on postgresql -

i have error without explanation. my error : g::undefinedcolumn: error: column "conjoncture_index_id" referenced in foreign key constraint not exist : alter table "reports" add constraint "fk_rails_c25ad9a112" foreign key ("conjoncture_index_id") references "conjoncture_indices" ("id") my migration : class addcolumntoreports < activerecord::migration def change add_reference :reports, :conjoncture_indice, index: true add_foreign_key :reports, :conjoncture_indices end end my create table migration : class createconjonctureindices < activerecord::migration def change create_table :conjoncture_indices |t| t.date :date t.float :value t.timestamps null: false end end end my model : class conjonctureindice < activerecord::base has_many :reports by_star_field :date end my conjonctureindice shema.rb part : create_table "conjoncture_indices...

fiware - Can't access filab instance virtual machine -

i have problem accessing our filab instance virtual machine through ssh. have created keypair pem file, instance, associate ip , create security groups without incidences can't access (always timeout). the filab cloud dashboard status active , running all appears correct can't access. know why? all questions related insfrastructure administration in fiware should sent mail fiware-lab-help@lists.fiware.org.

ecmascript 6 - Import non modular scripts (linq.js) in Aurelia -

i have question importing script define global variables aurelia using import keyword. can simple import modules scripts linq.js define global variable enumerable? possible execute script define namespace? i tried steps this blog post it's defines non static methods. can't example use enumerable.from method. this issue package manager, jspm. when have module exports global, need configure shim in jspm configuration file specify name of exported global(s). in case of linq.js, however, seems use module.exports (i looking @ this source here ), should work out of box. if doesn't, try specifying module format (cjs) in configuration. import this: import enumerable 'linq';

mysql - error with connecting to database using authentication in php -

the errors are: could not connect mysql: access denied user 'zebrahead'@'localhost' (using password: yes) warning: mysql_connect(): access denied user 'zebrahead'@'localhost' (using password: yes) in c:\wamp\www\testsite\authentication.php on line 12 db_user using computer's name. authentication.php <?php $authorized = false; if ((isset($_server['php_auth_user']) , isset($_server['php_auth_pw']))) { define ('db_user','zebrahead'); define ('db_password','password'); define ('db_host','localhost'); define ('db_name','registration'); $dbc = mysql_connect (db_host,db_user,db_password) or die ('could not connect mysql: '.mysql_error()); mysql_select_db (db_name) or die ('could not select database: '.mysql_error()); $query ="select first_name users username='{$_server['php_aut...

html - CSS: Position Dynamically Sized div to Bottom of Static Div -

Image
i'm adding chat functionality websocket based web app. in conventional chat windows, eldest message @ top of window , newest @ bottom. my implementation should share typical, top bottom element order. however, in conventional chat windows, eldest message sticks top of frame. implementation should have youngest message sticking bottom of frame. i've seen of son playing it, minecraft has ideal chat interface. in truth, minecraft chat interface appears resemble want implement. how, in css, can make chat messages stick bottom of window? this easy if calc() offered means refer current height of element being applied to, like position: relative; top: calc(240px - [current element height]); where 240px static height of chat window. thanks in advance. first, put position:relative on parent container #container{ position:relative; } then, put position:absolute on chat window #chat{ position:absolute; bottom: 0px; } this should handle dynamic heights. ...