Posts

internet explorer - IE11 insecure content warning show even there are all https request -

i web developer, our site https://jianguoyun.com . browser prompt insecure content warning while 1 of colleagues visit our site using ie11 (it works in ie11 browser). using https protocol in our site. else encounter situation? how fix this?

osx - Stop git commit in pre-commit hook with exit -

i'm trying stop git commit continuing pre-commit hook. reading manual, should stop when return exit code other 0. i'm testing see if csscomb command returns error, , if break loop , exit, git commit still continues on entering message via git commit (-a) . i've forked , modified script below https://github.com/filtercake/git-pre-commit-csscomb #!/bin/bash # pre-commit hook comb staged .sass , .scss files # save .git/hooks/pre-commit # make executable: chmod +x .git/hooks/pre-commit # sources: # http://www.hagenburger.net/blog/using-git-commit-hooks-to-autocompile-sass-to-css.html # http://stackoverflow.com/questions/8470755/git-pre-commit-hook-add-file-into-index/8471009#8471009 # http://stackoverflow.com/questions/592620/how-to-check-if-a-program-exists-from-a-bash-script/677212#677212 # https://gist.github.com/openam/8406343 # check if sass/scss files staged commit # diff-lines http://stackoverflow.com/a/12179492/3019532 # takes line function diff-lines() { ...

html - searchbox and submit button are appearing without borders -

Image
very stupid question, cant solve it... in php project searchbox , submit button looking weird, ones on .jpg picture below, why , how fix this? (search = otsi:). on simple html form same lines of code appearing normally, upper searchbox (with borders / otsi: ) checked css , doesn´t seem affect borders or boxes. code on .php subpage simple: <header id="header"> <div id="logo"><img src="images/logobmw.png"></div> <div id="searchbox"> <form action="search.php" method="get" enctype="multipart/form-data"> <input type="search" name="value" size="25" > <input type="submit" name="search" value=" otsi " > </form> </div> </header> (grey background on search-field set me in css, white, ergo, invisible because header´s background color white. css *, body, wrapper , header pretty s...

swift - Displaying Artwork for .MP3 file -

Image
i trying display album artwork locally stored .mp3 track in imageview. know how fetch artwork in swift in order accomplish this? i have found solution ( ios avfoundation: how fetch artwork mp3 file? ) code written in objective c. want grab image embedded in mp3 , display in imageview. i've looked @ api documentation mpmediaitemartwork , found example accomplishes trying accomplish in objective c here( http://www.codeitive.com/0zhjkujuwx/not-able-to-get-the-uiimage-from-mpmediaitempropertyartwork.html ) cannot come solution. code follows: import uikit import avfoundation import mediaplayer class viewcontroller: uiviewcontroller { let audiopath:nsurl! = nsbundle.mainbundle().urlforresource("sippinonfire", withextension: "mp3") @iboutlet var artistimage: uiimageview! @iboutlet var tracklabel: uilabel! @iboutlet var artistlabel: uilabel! @iboutlet var slidervalue: uislider! var player:avaudioplayer = avaudioplayer() @ibaction func play(sender: anyobjec...

javascript - Use non-specification attribute in React JSX? Such as ng-href -

i'm getting familiar react , thinking of gradually moving angular app on it. now, have 1 react component on site. however, need have element ui-href attribute in react component. tried putting in string, so: <a { "ui-href='" + this.props.statelink + "'" } >...</a> but no joy, says error unexpected string. i read can prefix custom attributes data- make make them work, , that's true, keeps data- attached, e.g. data-ui-href actual final attribute creates. any known workaround? i think unexpected string error occurring because mixing angular & react syntax. try instead: <a data-ui-href={this.props.statelink} >...</a> it keep data- prefix in attribute though. not sure workaround is.

objective c - Searching and Auto-Scrolling UIScrollview with UILabel inside -

i have uiscrollview uilabel inside of populated non-english text. i search scrollview/uilabel word/phrase , auto-scroll point. i know theres no simple way because theres no function uilabel. can't use uitextview because reason regular scrolling on uitextview choppy makes bad user experience (reviews users). uilabel on uiscrollview scrolls extremely smoothly lacks ability of uitextview. ideas? i got answer luke rogers answered so question - (cgrect)boundingrectforcharacterrange:(nsrange)range { nstextstorage *textstorage = [[nstextstorage alloc] initwithattributedstring:[self attributedtext]]; nslayoutmanager *layoutmanager = [[nslayoutmanager alloc] init]; [textstorage addlayoutmanager:layoutmanager]; nstextcontainer *textcontainer = [[nstextcontainer alloc] initwithsize:[self bounds].size]; textcontainer.linefragmentpadding = 0; [layoutmanager addtextcontainer:textcontainer]; nsrange glyphrange; // convert range glyphs. [l...

java - How to force browser to expire cache of a specific page? -

i confused caching. know there different types of caching follows, question how have separate dynamic pages. public - may cached in public shared caches (proxies , users) private - may cached in private cache (users only) no-cache - may not cached no-store - may cached not archived lets have specified 'public cache' , have following 2 addresses , need remove cache user 908. should pass meta new attribute of model? whats best approach? www.example.com/users?id=100 www.example.com/users?id=908 expire cache if(user.cacheexpire){ model.addattribute("meta","<meta name="expires" content=" + user.cachedate + "> "; } model.addattribute("user",user); return "userpage"; does force user's browser remove cache user 908 id only? best approach?