Posts

Sphinx query/settings similar to Like '%string%' SQL query -

i want search string in sphinx , documents contains string example: search "bot" , documents contain "xbot", "robot", "botanic", etc basically want search have same effects running select * table column_name '%bot%' how can that? note : tried use min_infix_len seems extends search little bit not fully. if set conf-min-prefix-len = 2 match 'xbot' not "botanic" try using wildcard in extended query syntax , min_infix_len enabled select * myindex match("bot | bot* | *bot*")

javascript - How do you get two divs have the same borderRadius? -

is right way match 2 divs? var div2 = document.getelementsbyclassname("div2"); div2.style.borderradius = "100px" document.getelementbyid("div1").style.borderradius = div2.style.borderradius; just newbie @ javascript. just comment on code, document.getelementsbyclassname() returns htmlcollection, not single dom element. should use document.getelementbyid() or document.queryselector() if you're trying 1 element. and don't want use js add styling, unless styling want use dynamic. case, should use css file , add class: .round-border { border-radius: 100px; } if still want use js add class instead of putting in html, can following: document.getelementbyid("div1").classlist.add('round-border'); document.getelementbyid("div2").classlist.add('round-border'); this assuming gave html elements correct id names. but said, because using static value of 100px , make more sense add class eleme...

javascript - Playing animation to a specific time -

i creating backend animating progress bar. // default easing. tweenlite.defaultease = power0.easenone; // timeline. var tl = new timelinelite({ onupdate : function() { console.log(progress.progress); } }); // initial state. var progress = { progress : 0 }; // finalized state. tl.to(progress, 1, { progress : 100 }); // length of animation. tl.totalduration(15); // play. tl.play(); this works expected, there way animate current playhead specific one ? tl.playto(0.5) , afterwards tl.playto(0.2) revert 20%. i aware of seek , progress , optional variable play methods, let me specify starting position, not end position. how achieve such behavior? if understand question correctly, here propose. you can animate progress property of timelinelite . like: tweenlite.to(tl, 1, {progress: .5, ease: linear.easenone}); . also, have seen tweento() , tweenfromto available in timelinemax , know using timelinelite still wondering if aware of th...

python - In wxPython Grid, creating event handler for Cell Selection disables moving the GridCursor -

in program i'm writing, user needs able select cell in grid , edit value. program shows value of selected value in hexadecimal (so (0,0) 0x00 , (1,3) 0x19 , etc.) had display updated through binding wx.grd.evt_grid_select_cell event. however, upon doing this, gridcursor no longer move, stay on (0,0). so, added setgridcursor statement handler have move cursor when handler called. however, generated infinite loop, apparently setgridcursor generates evt_grid_select_cell command when called. my question is, how have code executes when new cell selected while still maintaining old cell selection functionality? adding event.skip() @ end of custom handler passes event default handler.

phonegap plugins - 'cordova' is not recognized as an internal or external command -

i trying install cordova 5.1.1 version using node.js, command line interface. cordova got installed on machine, not able use cordova command. when list packages, can able see installed cordova cordova, can not run command create project. system config : os : windows 8, npm version : 1.3.21, cordova version : 5.1. error message c:>cordova 'cordova' not recognized internal or external command, operable program or batch file. need set environment variable. start -> control panel -> system , security -> system -> environment variables or mycomputer -> right click -> properties -> advance system settings -> environment variables under user variables youruser: path: %systemroot%\system32;%systemroot%;%systemroot%\system32\wbem;%systemroot% \system32\windowspowershell\v1.0\;c:\users\user1\appdata\roaming\npm` temp: %userprofile%\appdata\local\temp simple copy pasting wont work. if still not getting need reset/create...

windows - cygwin: can't execute PHP script via PATH -

i have written php script "toalpha" (purpose not relevant question). script in $home/bin. if cwd $home/bin, can execute typing "./toalpha". if type "toalpha", message: not open input file: /c/barry/bin/toalpha some information may relevant: . upgraded desktop winxp win7. . first time have made own userid ordinary user instead of admin. (i tried on xp, ran problems , went having normal userid admin. don't need solution because i'm no longer running xp , besides own fault.) . $home /c/barry did adding following .bashrc created when installed cygwin: mount c: /c home=/c/barry cd . .bashrc . first 2 lines of php script are: #!/c/xampp/php/php <?php . yes, copy of php want use in c:\xampp\php\php.exe . have another, similar script wrote on winxp. starts same 2 lines. worked fine under xp, doesn't work on win7. my best guesses @ source of problem: a difference between xp , win7 i fumbled home directory ch...

php - wordpress setup given forbidden error -

installing fresh wordpress-4.2.2 setup on server after fill form of database details next given error of forbidden don't have permission access /wp/wp-admin/install.php on server. additionally, 404 not found error encountered while trying use errordocument handle request. i have check permission of folder , .htaccess same wordpress setup working on local server. is suggestion thanks. i solve issue goes in parent wordpress install plugin of 'all in 1 wp security' effected. thanks.