Posts

css - Simple responsive vertical image gallery with 80% viewheight / 100% width -

or thought that easy. wanted keep simple work in browsers, no javascript. ended css works in chrome/safari/ios not in internet explorer, , seems behave weird on android well: img { max-width: 100%; max-height: 80vh; -o-object-fit: contain; /* these lines prevent distortion on chrome/safari */ object-fit: contain; width: 2000px; /* seems needed make small images bigger, creates distortion on ie */ } the basic idea have simple gallery ever works on mobile phones , in normal browser. idea images should not bigger 80% of view height, , never more 100% of width. still take space possible , still maintain aspect ratio. the idea behind 80% viewheight notices there multiple pictures. the page/content consists of <img><br/> tags images of different sizes , dimensions. nothing exiting. with simple max-width/max-height seems work, except small pictures never bigger. how work on browsers? simple question have simple css answer? edit: added reproduction we...

android - File not found exception on webview - when in real the file exists -

i trying load webpage in webview, getting following exception: java.io.filenotfoundexception: https://fonts.googleapis.com/css?family=roboto:400,300,500,700,900,700italic 02-05 18:52:44.497 5263-6265/com.rm w/system.err: @ com.android.okhttp.internal.http.httpurlconnectionimpl.getinputstream(httpurlconnectionimpl.java:206) 02-05 18:52:44.497 5263-6265/com.rm w/system.err: @ com.android.okhttp.internal.http.delegatinghttpsurlconnection.getinputstream(delegatinghttpsurlconnection.java:210) 02-05 18:52:44.497 5263-6265/com.rm w/system.err: @ com.android.okhttp.internal.http.httpsurlconnectionimpl.getinputstream(httpsurlconnectionimpl.java:25) 02-05 18:52:44.497 5263-6265/com.rm w/system.err: @ navigationfragments.fragmentwebview$1.shouldinterceptrequest(fragmentwebview.java:124) 02-05 18:52:44.497 5263-6265/com.rm w/system.err: @ android.webkit.webviewclient.shouldinterceptrequest(webviewclient.java:125) 02-05 18:52:44.498 5263-6265/com.rm w/system.err: @ com...

Jquery: prevent submit after for validation -

formvalidator plugin submits form after form validation. want prevent form submission after validation , call function offerpricepopup(), in function submit form. not happening form automatically submits after form validation. var sss = $('#submitbtn1').formvalidator({ onsuccess : function() { console.log('success!'); }, scope : '#postform', errordiv : '#errordiv1' }); $("#postform").on("submit", function(e){ e.preventdefault(); offerpricepopup(); }); thanks in advance maybe try using different function validate. looking through documentation, looks there way check , see if form validates without submitting. found description of here (second 1 down) http://www.formvalidator.net/#advanced

reactjs - React Component Image Issue -

my image component won't seem put image in, url correct can add physically adding html page. component seems failing. tried found @ http://facebook.github.io/react/docs/jsx-in-depth.html#attribute-expressions did not help. export default class mainlogo extends react.component { render() { return ( <div> <img src = {'/src/app/assets/images/home/mainlogo.png'}/> </div> ); } } the class name should start capital letter (mainlogo) , shouldn't use {} on src, because sending img url directly src. it's not variable or state. this should work: export default class mainlogo extends react.component { render() { return ( <div> <img src='/src/app/assets/images/home/mainlogo.png' /> </div> ); } }

c# - DbMigration.SqlFile generate SqlException (0x80131904): Transaction context in use by another session -

i have created database migration , in method want execute sql files sqlfile method. each of files contains 2 statements: first drop procedure if exists , second 1 create procedure. both statements finishes go. here exception, got when tried apply migration: system.data.sqlclient.sqlexception (0x80131904): transaction context in use session. @ system.data.sqlclient.sqlconnection.onerror(sqlexception exception, boolean breakconnection, action`1 wrapcloseinaction) @ system.data.sqlclient.sqlinternalconnection.onerror(sqlexception exception, boolean breakconnection, action`1 wrapcloseinaction) @ system.data.sqlclient.tdsparser.throwexceptionandwarning(tdsparserstateobject stateobj, boolean callerhasconnectionlock, boolean asyncclose) @ system.data.sqlclient.tdsparser.tryrun(runbehavior runbehavior, sqlcommand cmdhandler, sqldatareader datastream, bulkcopysimpleresultset bulkcopyhandler, tdsparserstateobject stateobj, boolean& dataready) @ system.data.sqlclient.sql...

vhdl - Unite two arrays -

i want make 1 array out of two. type character_string array (0 15) of unsigned (7 downto 0); type full_string array (0 31) of unsigned (7 downto 0); signal lcd_oben, lcd_unten : character_string; signal lcd_data : full_string; and want take 2 smaller arrays , put them togehter in big one. this: lcd_data <= lcd_oben & lcd_unten; but gives error: error (10327): vhdl error @ seqdec.vhd(55): can't determine definition of operator ""&"" -- found 0 possible definitions can help? best regards adrian you have declared these wholly unrelated array types, have told compiler not mix them without type conversions. i don't think that's wanted do. make both array types, subtypes of unconstrained array, array(<>) of unsigned(7 downto 0) . not separate types , there should predefined & operator them. type lcd_string array (natural range <>...

caching - Create cache depending on a variable stored in cookie with Varnish and Magento -

let's have variable, can either 1, 2 or 3, stored in user cookie. eg: foo=2 the first time access pagex foo=2, page shall cached. next visitors foo=2 in cookie shall see same version (hit). the first time access pagex foo=1, page shall cached (as second version). next visitors foo=1 in cookie shall see specific version (hit). same principle foo=3 in other words, pages of website have 3 versions, if same url, 1 each value of foo in visitor's cookie. is feasible? thanks, rod i think answer looking can found in varnish docs https://www.varnish-cache.org/trac/wiki/vclexamplecachingloggedinusers there example in how use cookie variable create unique hash. this used create different pages same url. careful browsercache settings of page. may page change url , browser cache set high might strange behaviour.