Posts

osx - IntelliJ - does a new version overwrite -

simple question hopefully. i have mac , want install intellij 13.1. if download latest version overwrite current version , keep settings? it not override current version. automatically detects there existing version of intellij , asks whether want import settings. source : once had mac 2 versions of intellij(version 11 , 12) idea running on same machine.

Ansible: is it possible to feed a remote task with local files (avoid first uploading the file) -

suppose have ansible task : - name: run etl 2 shell: psql -u {{dbuser}} -d {{dbname}} -f /tmp/data-cleansing2.sql sudo_user: postgres i have many of them these, , first have upload file - name: upload etl script copy: src=../data-cleansing2.sql /tmp/data-cleansing2.sql it nice if there way tell ansible must first upload file, ex: - name: run etl 2 shell: psql -u {{dbuser}} -d {{dbname}} -f {{/abc/xyz.sql | upload_file}} sudo_user: postgres you might want check out script module. module runs local script on remote node after transferring it. the script module takes script name followed list of space-delimited arguments. local script @ path transferred remote node , executed. given script processed through shell environment on remote node. using module, however, you'd have first add calls psql script files. see here more info .

javascript - Bootbox modal scrolls to top of page before opening -

i using bootstrap 3 , bootbox.js filterable portfolio, , want able scroll down when modal longer browser window, should not able scroll past modal. by default when click portfolio item modal scroll top of page open it. used javascript:void(0); on portfolio links fix this. position:absolute on .modal breaks that. but position:absolute , overflow:auto allows me scroll modal way need (just dont know how limit scrolling till end of modal) check out css: .modal { top: 10%; left: 50%; margin-left: -280px; -webkit-background-clip: padding-box; -moz-background-clip: padding-box; background-clip: padding-box; outline: none; display: table; position: absolute; } .modal-open { overflow: auto; } you can @ live version of site here (scroll portfolio , click project) i have set fiddle make easier everyone: http://jsfiddle.net/p4yw2/ so need: another way fix "scroll top before alert opened" issue besides javascript:void(0); a way limit scrolling until little b...

java - Closing unused modules in intellij idea like in eclipse -

Image
as know there no feature in intellij idea. dont know why dont support that, @ least result found researching. maybe of manage problem different ways. how work multiple modules in intellij? how should increase performance while working multiple projects? closing unused modules in intellij idea in eclipse? you can make module directory excluded project. right clicked on directory, goto mark directory as -> click excluded it to add module back, click on project structure button, goto modules section, can add them back

PHP .zip file download error when opening in windows explorer -

Image
i'm getting weird error while trying open php, created .zip file in windows explorer. it works fine in winrar. what creating sds sheet download site can checkbox kinds of pdf documents want , zip them. the procedure works fine , have no errors file creation. when opening windows explorer error occurs. error message : "windows cannot open folder. compressed (zipped) folder 'filename' invalid." error opening in windows explorer." the site http://www.premiere-produkter.no/pp/datablad/index.php if want test out yourselves. heres code: <?php $error = ""; //error holder if(isset($_post['createpdf'])){ $post = $_post; $file_folder = "files/"; // folder load files if(extension_loaded('zip')){ // checking zip extension available if(isset($post['files']) , count($post['files']) > 0){ // checking files selected $zi...

Javascript for loop doing bad math -

this question has answer here: is floating point math broken? 20 answers does know how core, fundamental functionality of programming language can lose ability calculations properly/precisely? http://jsfiddle.net/krazyjakee/v3xcq/ var html = ''; for(var = 0; <= 1; += 0.01){ html += + '<br />'; } document.body.innerhtml = html; my question why happen , how can stop happening? 0 0.01 0.02 0.03 0.04 0.05 0.060000000000000005 0.07 0.08 0.09 0.09999999999999999 0.10999999999999999 why don’t numbers, 0.1 + 0.2 add nice round 0.3, , instead weird result 0.30000000000000004? because internally, computers use format (binary floating-point) cannot accurately represent number 0.1, 0.2 or 0.3 @ all. when code compiled or interpreted, “0.1” rounded nearest number in format, results in small rounding error before calculation happe...

unity3d - Objects not colliding in 2D project -

i've set 2d project in unity (4.3.4). has ball , ground. ball in air. to ball i've added box collider 2d , rigidbody 2d, standard values. to ground i've added box collider 2d. when run game, ball falls, instead of stopping when hitting ground, continues , keep falling. where did go wrong? tutorials should work? check if 1 of 2 colliders has checkbox istrigger checked. should both unchecked collisions work. first time happened me took me whole day figure out xd