Posts

php - Arrow key and mouse navigation for AJAX Live search -

i using below code autocomplete feature in webpage. problem not able navigate through suggestion using mouse pointer. if up/down key pressed once after list item refreshed mouse pointer navigation working fine. could please suggest code change make mouse pointer , keyboard navigation work navigation in html select option? how can improve scrolling of suggestion list using up/down key? html: <div class="field-wrap"> <input type="text" id="college" placeholder="college name" required autocomplete="off"/> <ul id="college_list"></ul> </div> css: .field-wrap ul { width: 93%; margin-top: 1px; border: 1px solid #3498db; position: absolute; z-index: 9; background: #0f0f0f; list-style: none; max-height: 100px; overflow-y:auto; } .field-wrap ul li { padding: 2px; border: solid grey; border-width: 0 0 2px 0; } #college_list { display:...

css - Simplifying/combining nested LESS -

i have following less: ul.dropdown-menu { padding-top: 0; z-index: 2010; li:first-child { a.disabled.heading { &.availableaction { border-top: none; margin: 0; } } } } is there way combine li:first-child , a.disabled.heading , , &.availableaction selectors? do mean this? ul.dropdown-menu { padding-top: 0; z-index: 2010; li:first-child a.disabled.heading.availableaction { border-top: none; margin: 0; } } less supports nesting never requires use it. unasked notes :) hope z-index arbitrary-looking , huge reason if possible, design selector names can .dropdown-menu rather ul.dropdown-menu - browser process first 1 more second if possible, it's practice use less specific selector ul.dropdown-menu li:first-child a.disabled.heading.availableaction . again, browsers process .dropdown li:first-child .availableaction more (and li:first-child .availableaction quicker, can imagine might targe...

google chrome - how can I get browser profile path with extension -

how can browser (from chrome://version/) executable file , profile path params extension ?? because malicious programs changed chrome profile path (e.g. c:\program files (x86)\eastmy\application\chrome.exe\ instead of c:\program files (x86)\google\chrome\application\chrome.exe)

android - paddingStart/Left and paddingEnd/Right -

in recent code writing times i've seen single element contain paddingleft/right, paddingstart/end, , both. can't seem find on better , why. have insight / when use 1 or other or both? you need new start/end properties create nice right-to-left layout, used in countrys people read right left. there no better version, newer version. if want support android versions prior android 4.2, should use old , new properties together. if want support android 4.2 , newer versions, it's ok use new properties paddingstart (instead of paddingleft ). there nice explanation available on android developers blog : to take advantage of rtl layout mirroring, make following changes app: declare in app manifest app supports rtl mirroring. specifically, add android:supportsrtl="true" element in manifest file. change of app's "left/right" layout properties new "start/end" equivalents. if targeting app and...

javascript - Only allowing form to be submitted if from a certain URL? (iframe, Laravel) -

i'm building service in need people able submit form, through iframe they'd have on own site, need domain listed in user model. i know possible, need solution whereby users cannot edit js allow work on domain shouldn't (through inspect element etc.). anyone got solutions? @ appreciated. you can't access parent page iframe unless both iframe , parent on same domain.

windows - How to build video thumbnails sheet using pipe (ffmpeg + imagemagick)? -

Image
how can build video thumbnails sheet using pipe (ffmpeg + imagemagick) on windows without using temporary files? update: here update version of post wrote. the script bellow creates folder named .\thumbnails , store in video thumbnails, same name of video file. fully configurable! no temporary files used! (uses pipe!) requires: ffmpeg , imagemagick. set impath=c:\programs\imagemagick set folder=c:\my videos set frame=320x180 set tile=10x1 set vframes=10 set fps=1/20 rem 1/60 -> 1 shot every 60s set filesize=300 rem max file size in kb set filetypes=*.mp4 pushd "%folder%" if not exist thumbnails md thumbnails /f "usebackq delims=" %%f in (`dir /b %filetypes%`) ( if not exist "thumbnails\%%~nf.jpg" ( ffmpeg.exe -threads 2 -y -i "%%f" -an -qscale:v 1 -vf fps=%fps% -vframes %vframes% -f image2pipe -vcodec ppm - ^ | %impath%\convert - -resize %frame% -background transparent -gravity center -extent %fr...

Javascript document.getElementById("name") returning -

this question has answer here: why jquery or dom method such getelementbyid not find element? 6 answers i've searched answer question , haven't been able find hits it, far saw. i have 2 chunks of javascript here using create simple 2d game in web browser. var mygamepiece; var game = { canvas : document.getelementbyid("game-screen"), start : function(){ this.context = this.canvas.getcontext("2d"); } } function startgame(){ game.start(); } and one: var mygamepiece; var game = { start : function(){ this.canvas = document.getelementbyid("game-screen"); this.context = this.canvas.getcontext("2d"); } } function startgame(){ game.start(); } the first code snippet not work. canvas null when try context. i'm wondering why? realize why works in second one...