Posts

html - Responsive video banner on Safari has huge gaps top and bottom -

i'm trying implement simple video banner on website using html5 tags. need full width , responsive, appears work in chrome , firefox, not safari. here simplified version taken more complex wordpress page using same markup , same happens. http://noisilyfestival.com/video-test.html i've set video background red, see in safari there huge gaps @ top , bottom whereas in firefox , chrome sits flush. can't figure out life of me what's going on here! i've set video display:block fixes few pixel gap @ bottom cannot resolve this. in advance! i removed display:block; #homepage-video , safari looked fine.

umbraco6 - Umbraco.TypedContentSingleAtXPath always giving wrong ID -

umbraco version 6.1, visual studio 2010 i'm trying list of newsarticles under news folder in umbraco i.e. -news --newsarticle1 --newsarticle2 my code var doctype = "documenttypename"; var parnode = umbraco.typedcontentsingleatxpath("//" + doctype); list<ipublishedcontent> child = parnode.children.tolist(); when line hit var parnode = umbraco.typedcontentsingleatxpath("//" + doctype); it gives me wrong parnode (parent node is) id. finds correct doc type (as if change name error). i've tried rebuilding, cleaning project doesnt work. other folders using same code work dont know or whats going wrong? any thoughts? if it's giving wrong content node, may have 2 or more content nodes of same contenttype (doctype). typedcontentsingleatxpath return first valid match , ignore subsequent nodes. can verify results checking required node first 1 of it's type in published cache (the ~/app_data/umbraco.config file...

multithreading - Cannot delete a wav file after it has been opened, java -

i want sound file (temp0x) of wav format edited/deleted after has been opened. i'm using thread play sound, , close streams when done. main thread should delete it, fails so. if not play sound first there no problem deleting it. this code in playsound thread plays sound: public void run() { synchronized(this){ system.out.println("play sound: " + soundfile.getname()); audioformat format; dataline.info info; try { stream = audiosystem.getaudioinputstream(soundfile); format = stream.getformat(); info = new dataline.info(clip.class, format); clip = (clip) audiosystem.getline(info); clip.open(stream); clip.start(); }catch(exception ex){ ex.printstacktrace(); } while(clip.getmicrosecondlength() != clip.getmicrosecondposition()){ //waiting sound finished } try { stream.close(); ...

node.js - Only compile sass if a file has changed using gulp -

i'm trying rebuild gulp file bit more efficient, , i'm having trouble getting styles task compile if file has changed. i found this question , answer doesn't seem working me. let's have repo organized so: /dev /assets /styles all.css /src /assets /styles all.scss _header.scss gulpfile.js package.json i want overwrite all.css if change has been made in either of sass files. so, if save _header.scss no changes had been made, , ran styles task, should realize code hasn't changed , not overwrite all.css . i looking @ gulp-cached , per question linked above, doesn't seem working me. here's task @ it's basic: var gulp = require("gulp"), cached = require("gulp-cached"), sass = require("gulp-sass"); gulp.task("styles", function() { return gulp.src(src + "/assets/styles/all.scss") .pipe(sass().on("error", sass.logerror)) .pipe...

ios - Method That Recognizes Swipes in WKWebView -

i have wkwebview working fine except 1 small detail. every time user changes page need know can run check make sure page viewing either page user has saved or not. if user clicks on url, can use didfinishnavigation() method in navigation delegate. doesn't appear recognizing when user swipes or forward , never called in scenarios (my guess because these pages loaded , popping them on/off stack). tried adding swipe gesture recognizer, doesn't seem reliable - @ least on simulator. so, question need in order recognize when user swipes go backwards or forwards inside wkwebview ? or there way recognize when url changes inside wkwebview ? if happens else, please upgrade simulator , restart computer. seemed fix problem. didfinishnavigation() being called each time swipe left or right inside wkwebview , should.

java - Understanding Spring Boot Usage and Configuration -

i trying understand how configure spring boot. these tutorials , this make reference called application.properties . i'm assuming that file , if so, go , there template set up? i see different configurations can specify , pick , choose ones need. i setup logback in program , set logging level. tutorial says spring boot provides base config so: <configuration> <include resource="org/springframework/boot/logging/logback/base.xml"/> <logger name="org.springframework.web" level="debug"/> </configuration> but have no idea put that. in application.properties? in pom.xml? stick application.properties in src/main/resources. prefer use .yml files alternative format. can find many spring boot properties (including logging properties) here: https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html spring boot auto configure dependency declare in maven sensible def...

Elasticsearch phrase suggester is suggesting me suggestions that do not exists in my index -

i have elasticsearch index have data. implemented , did-you-mean feature when user write misspelled receive suggestion right words. i used phrase suggester because need suggestions short phrases, names example, problem suggestions not exists in index. example: document in index: coding master search: codning boss suggestion: <em>coding</em> boss search result: not found my problem that, there no phrase in index match specified suggestion, it's recommending me phrases not exists , give me not found search. what can this? shouldn't phrase suggester give suggestions phrases exists in index? here i'll leave corresponding query, mapping , setting in case need it. setting , mappings { "settings": { "index": { "number_of_shards": 3, "number_of_replicas": 1, "search.slowlog.threshold.fetch.warn": "2s", "index.analysis.analyzer.default.filter.0": ...