Saturday, 15 June 2013

css - Centering menu nav-bar items in center of newvar twitter bootstrap -



css - Centering menu nav-bar items in center of newvar twitter bootstrap -

this have. how center these 3 navbar items center of page without messing in mobile view? thanks.

any css tricks?

<div class ="container" id = "main"> <div class="navbar navbar-fixed-top"> <div class="container"> <!-- .btn-navbar used toggle collapsed navbar content --> <button class="navbar-toggle" data-target=".navbar-responsive-collapse" data-toggle="collapse" type="button"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <div class="nav-collapse collapse navbar-responsive-collapse"> <ul class="nav navbar-nav"> <li class="active"> <a href="#"> </a> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">services <strong class="caret"></strong></a> <li> <ul class="nav navbar-nav"> <li class="active"> <a href="#"> contact </a> </li> </div><!-- end nav-collapse --> </div><!-- end container --> </div><!-- end navbar -->

css twitter-bootstrap

security - Hide groovy stack trace in xwiki macros -



security - Hide groovy stack trace in xwiki macros -

i'm developing groovy macro in xwiki, , @ nowadays stack trace generated when macro fails invaluable debugging. seem security hole when others utilize it. there way turn stack traces off, perhaps users without programming rights?

first if security hole mean user can see groovy code user have view right on document can view code technically anyway hiding stack trace not going completly hide it.

now reply question, error not configurable way can think of patch either script macro (https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-macros/xwiki-platform-rendering-macro-script/src/main/java/org/xwiki/rendering/macro/script/abstractscriptmacro.java#l286) or more generic macroerrormanager (https://github.com/xwiki/xwiki-rendering/blob/master/xwiki-rendering-transformations/xwiki-rendering-transformation-macro/src/main/java/org/xwiki/rendering/internal/transformation/macro/macroerrormanager.java).

security groovy xwiki

excel - Payweek calculation ending each Sunday -



excel - Payweek calculation ending each Sunday -

i using next formula find week ends of sunday.

=ceiling.math(a5,7)+1

i had add together "+1" because getting saturday. problem happens on final sunday should have same pay week instead iterates next sunday.

12 oct resulting in 19 oct payweek. should end payweek.

formula:

=a5+(7-weekday(a5,2))

this formula convert date date of next sunday sunday returning spanning years , months.

excel

javascript - Link button with video time -



javascript - Link button with video time -

i'm trying show button when user reaches @ time of video, button appear when user has seen 20 minutes of video. have no thought it, appreciate inputs. thanks

well if video playing through html5 (a video tag) not embedded next code 1 route take.

// video element var video = document.getelementsbytagname('video')[0]; // add together event listener 'timeupdate' video.addeventlistener('timeupdate', function() { // 20 mins in seconds if ( this.currenttime == 1200) { // code add together button here... } }, false);

you should check out html5 audio/video api

javascript video video-streaming html5-video

c# - Possible to check if Key V is pressed in AddingNewItem event in WPF Datagrid -



c# - Possible to check if Key V is pressed in AddingNewItem event in WPF Datagrid -

is possible check if key v pressed in addingnewitem event in wpf datagrid similar how done in previewkeydown event

private void grd_previewkeydown(object sender, keyeventargs e) { if (e.key == key.v && (keyboard.modifiers & modifierkeys.control) == modifierkeys.control) { //todo } }

i checking if ctrl+v pressed, possible same check in addingnewitem event?

you can utilize keyboard.iskeydown() this:

if (((keyboard.iskeydown(key.leftctrl) || keyboard.iskeydown(key.rightctrl)) && keyboard.iskeydown(key.v))) { // ctrl + v pressed }

c# wpf xaml datagrid

What is the "m=" attribute in a html tag? (Plus tons of other attributes found in bing result source) -



What is the "m=" attribute in a html <a> tag? (Plus tons of other attributes found in bing result source) -

so looking through source bing images search result, , seems html each hyperlink each returned image similar to:

<a href="#" ihk="hn.607992005913609849" m="{ns:&quot;images&quot;,k:&quot;5064&quot;,mid:&quot;3d11808868db7b3bd88719756eece65700723f87&quot;,surl:&quot;http://www.absoluteanime.com/naruto/kakashi.htm&quot;,imgurl:&quot;http://www.absoluteanime.com/naruto/kakashi.jpg&quot;,oh:&quot;225&quot;,tft:&quot;43&quot;,dls:&quot;images,5431&quot;,oi:&quot;http://www.absoluteanime.com/naruto/kakashi.jpg&quot;}" mid="3d11808868db7b3bd88719756eece65700723f87" onclick="return false;" t1="kakashi hatake" t2="640 x 480 · 32 kb · jpeg" t3="www.absoluteanime.com/naruto/kakashi.htm" h="id=images,5064.1" >

now, looking @ w3schools documentation <a> tag here, there doesn't seem documentation of these attributes, , after decently extensive googling , irc lurking can't find info on them.

am misunderstanding these things, i.e not attributes? (i relatively new html) or there somehow ton more attributes out there commonly documented?

i interested in m attribute because seems part of the <a> tag contains url of original image (as opposed bing's thumbnail).

in short, these custom attributes.

html tags allow set custom attributes on them , browsers ignore ones not understand.

some sample usages of feature in current utilize are:

to store meta-data libraries angularjs utilize them create directives

html

jquery - Add onClick to an input being built by JavaScript -



jquery - Add onClick to an input being built by JavaScript -

i have file type input button needing clear if user chooses , safe solution have found destroy input , rebuild it. have right works "harp gun" solution in works once.

basically, user has file input so:

<input type="file" name="filestoupload" id="filestoupload" onchange="makefilelist();" /> <ul id="filelist"><li>no files selected</li></ul>

and when select file, may need clear completely.

so have beingness built via appending on filelist:

function makefilelist() { var input = document.getelementbyid("filestoupload"); var ul = document.getelementbyid("filelist"); while (ul.haschildnodes()) { ul.removechild(ul.firstchild); } (var = 0; < input.files.length; i++) { var li = document.createelement("li"); var filesize = input.files[i].size; li.innerhtml = input.files[i].name +"&nbsp;"+ "<span id=\"lblsize\"></span><input onclick=\"clearfileinput()\" type=\"button\" value=\"clear\" \/>"; ul.appendchild(li); } if(!ul.haschildnodes()) { var li = document.createelement("li"); li.innerhtml = 'no files selected'; ul.appendchild(li); } };

and destroy file, function rebuilds input so:

function clearfileinput(){ var oldinput = document.getelementbyid("filestoupload"); var newinput = document.createelement("input"); newinput.type = "file"; newinput.id = oldinput.id; newinput.name = oldinput.name; newinput.classname = oldinput.classname; newinput.style.csstext = oldinput.style.csstext; // re-create other relevant attributes oldinput.parentnode.replacechild(newinput, oldinput); };

so can create element, add together file type, , utilize old input id, class , name. need have same onchange="makefilelist(); behavior well.

here fiddle. help appreciated.

simply add together attribute.

function clearfileinput(){ var oldinput = document.getelementbyid("filestoupload"); var newinput = document.createelement("input"); newinput.type = "file"; newinput.id = oldinput.id; newinput.name = oldinput.name; newinput.classname = oldinput.classname; newinput.style.csstext = oldinput.style.csstext; newinput.setattribute("onclick", "makefilelist()"); // re-create other relevant attributes oldinput.parentnode.replacechild(newinput, oldinput); };

javascript jquery file-io