Posts

asp.net mvc 4 - Bootstrap a value on two lines -

with code have menu (i should have 5 entries) in example have 3 menu, , on right want have email address of client + log off, problem email + log off on 2 lines, want on 1 line how it's possible have on 1 line thanks <body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top"> <nav class="navbar navbar-default navbar-fixed-top" role="navigation"> <div class="container"> <div class="navbar-header page-scroll"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"> <span class="sr-only">toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> ...

javascript - Give Entire D3 Map Event Listener -

i have map of featured cities plotted. states , cities have own click events. clicking state zooms state , displays more cities within state. when clicking city plots new city , draws path new city while zooming bring 2 cities in view. while being zoomed 2 cities able click anywhere on map have reset. able without removing , restoring existing click events if possible. anyone know way put invisible layer on whole svg it's own click event? add <rect> element covers whole map. if make fill="none" invisible. add click event handler reset function when <rect> clicked on. you can manipulate pointer-events property make catch or not catch events. setting pointer-events="all" make catch events while pointer-events="none" make pass through events. switch attribute around depending on whether map zoomed or not.

css - there is a white margin on the right side of my site -

there other questions regarding issue. however, each 1 seems have individual answer, because answers found not work. just scroll right on site , see white space through site: http://highcatering.wpengine.com/ not nice! any ideas? have tried following: body{width:100%;} body{margins:0 0 0 0;} thanks! the offending line in style.css: .post ol, .post ul { margin:0 0 30px 20px; padding:0;} it adding margin ol , ul within main body section. if remove it, white space disappear. i'm not sure if needed somewhere else on site.

html - Float 5 Different Size Boxes In Order And Make Fill Wrapper With CSS -

Image
i'm trying float 5 boxes in specific order, shown in first diagram. boxes same size except 1 same height 2 boxes + space between them (but seems killer): key points here are: a: each of 5 'boxes' div element, , crucially has border drawn css (we'll shortly see causes issues padding/margins) b: red circle 1 - image 3 cannot exact correct height still need bottom border of box 3 in line bottom border of box 2 my html is: <div class="hpcategorypagewrapper"> <div class="hpcategorytopwrapper"> <div class="hpcategorytopleftwrapper"> <div class="hpcategory"> <h1 class="hpcategory">title one</h1> <h3 class="hpcategory">subtitle one<br /><img src="/image1.jpg" /></h3> </div> <div class="hpcategoryspacer"> </div> ...

Looped If/Then Functions in Excel VBA -

i'm starting learn excel vba , i'm running problems particular exercise. given column of 20 randomly generated integers between 0 , 100 in column, want write vba program writes in column next "pass" if number greater or equal 50 , "fail" if number less 50. my approach involved using looping function = 1 20 if statement each cell (i,1) write pass or fail in (i,2). sub commandbutton1_click() 'declare variables dim score integer, result string, integer 'setup loop function, if/then function = 1 20 score = sheet1.cells(i, 1).value if score >= 60 result = "pass" sheet1.cells(i, 2).value = result next end if end sub could insight i'm doing wrong? thanks in advance! try this... sub commandbutton1_click() 'declare variables dim score integer, result string, integer 'setup loop function, if/then function = 1 20 score = sheets("sheet1").cells(i, 1).value if score >= 60 ...

windows - Output All SQLite3 Database Tables in Command Line Shell -

Image
i trying use sqlite3 command line shell application print out tables in database. my problem: when type command .tables nothing gets print out? unsure connecting/opening database because application doesn't print out status such 'opened db' or anything. one thing know sure database file exists , contains tables , rows. know because c# application updating , querying db fine. below commands. how can print out databases tables? doing wrong? full size picture your .open created database somewhere else. use command prompt, , run instead: sqlite3.exe "full_filename_of_your_db_file" this works me. -- edit: alternatively, .open single quote can job .open 'full_filename'

How can I calculate the mode of a floating point array in Ruby? -

i have array of floating point data, pick out probable value. called "mode" in descriptive statistics. how can calculate in ruby, or of gem. [0.0, 0.1, 0.2, 0.1, 0.3, 0.3, 0.1] .group_by{|e| e}.max_by{|k, v| v.length}.first # => 0.1

css - Adding background image in HTML5 Boilerplate -

i've downloaded html5 boilerplate , trying grasp on how incorporate css codes in side of main.css of html5 boilerplate. need know how can add background image page? html { background:url(images/laptop.jpg) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } try this: body { background-image:url(../images/laptop.jpg) no-repeat center center fixed; // rest of code } your css file should in css folder , image should in different folder. therefore, used ../ before path. here brief description of file paths: ./ means current directory ../ means parent of current directory, not root directory / root directory myfile.text in current directory, ./myfile.text ../myfile.text 1 level above , /myfile.text lives in root directory.

What is the point of "examples" in the go (golang) testing framework? -

i reading on testing , examples in go testing framework , did not understand for. see documentation says: the package runs , verifies example code. example functions may include concluding line comment begins "output:" , compared standard output of function when tests run. (the comparison ignores leading , trailing space.) however, don't appreciate reason exist. write tests, seems should more clear how use code reading unit tests , benchmarks. additional motivation example section provide? seems redundant me, however, sure inventors of go put reason, specially because seem empathizes programming practice design of language. hope understand either motivation or how part of language can used in positive way in golang project! :) in go, source code used generate documentation. examples not meant testing rather documentation. having compiled examples, can make sure working using them. examples found in standard libraries can run directly in browser whe...

html - Javascript onClick Doesnt work on Chrome -

good evening. i have following code: <script type="text/javascript"> function action1() { var x = document.getelementbyid('marcagravadapedra'); x.style.display = "inline"; document.getelementbyid('estruturasagrada').style = "display: none;" document.getelementbyid('objectosagrado').style = "display: none;" hideall(); } </script> and on html itself, have form, , buttons inside it: <input type="button" id="objectosagradobutton" value="objecto sagrado" onclick="action1();"/> though, code works on firefox, not on ie or chrome. i've tryed everything, cant seem make work. that button make divs appear, , others disappear. <div id="marcagravadapedra">testing1</div> i can't imagine code work in browser. you've couple of these odd lines overriding style object string: document.getelementby...

html - Responsive banner image -

i developing responsive website has large banner image spans edge edge. problem supposed static height regardless of screen size. when set image width:100% looks great in full size, start shrink screen image gets shorter width needs be. how can set image height appears never change , when screen size smaller image size zooms in , crops edges? http://bit.ly/1qxmzir html <div id="hd-img"> <img src="http://72.52.242.20/~camacoll/wp-content/uploads/2014/05/inner-hd.jpg"> </div> css #hd-img { max-height: 352px; } img { width: 100%; height: auto; left: 100%; margin-left: -200%; position: relative; } one way this . /* css */ #hd-img { height: auto; overflow: hidden; } #hd-img img { /* optional max width: 600px; */ display: block; margin: 0 auto; }

java - Has anyone succeeded in autocomplete ComboBox for list cell? -

as standalone element, this solution works fine. but in custom listcell (mirrored comboboxlistcell sources), gives sometimes: exception in thread "javafx application thread" java.lang.nullpointerexception @ com.sun.javafx.scene.control.skin.comboboxpopupcontrol.positionandshowpopup(comboboxpopupcontrol.java:100) @ com.sun.javafx.scene.control.skin.comboboxpopupcontrol.show(comboboxpopupcontrol.java:74) @ com.sun.javafx.scene.control.skin.comboboxbaseskin.handlecontrolpropertychanged(comboboxbaseskin.java:115) @ com.sun.javafx.scene.control.skin.comboboxlistviewskin.handlecontrolpropertychanged(comboboxlistviewskin.java:245) @ com.sun.javafx.scene.control.skin.behaviorskinbase$2.call(behaviorskinbase.java:189) @ com.sun.javafx.scene.control.skin.behaviorskinbase$2.call(behaviorskinbase.java:187) @ com.sun.javafx.scene.control.multiplepropertychangelistenerhandler$1.changed(multiplepropertychangelistenerhandler.java:55) @ javafx.beans.value.weakchangelistener.changed(w...

parsing - How to parse a string in python -

without 3rd party libraries (such beautiful soup) cleanest way parse string in python. given text below i'd content of "uber_token" parsed out ie. "123456789" .... <form id="blah" action="/p-submi.html" method="post"><input type="hidden" id="" name="uber_token" value="123456789"/><div class="container-info"> .... thanks! regular expression solution. use import re >>> import re >>> s = '<form id="blah" action="/p-submi.html" method="post"><input type="hidden" id="" name="uber_token" value="123456789"/><div class="container-info"' >>> regex=re.search(r'name="uber_token" value="([0-9]+)"',s) >>> print regex.group(1) 123456789

increment - Java Incremental operator query (++i and i++) -

this question has answer here: is java “pass-by-reference” or “pass-by-value”? 74 answers java never pass-by-reference, right?…right? [duplicate] 6 answers i have following code: public class book { private static int sample1(int i) { return i++; } private static int sample2(int j) { return ++j; } public static void main(string[] arguments){ int = 0; int j = 0; system.out.println(sample1(i++)); //0 system.out.println(sample1(++i)); //1 system.out.println(sample2(j++));//1 system.out.println(sample2(++j));//2 system.out.println(i);//2 system.out.println(j);//2 } } my expected output in comments. actual output below: 0 2 1 3 2 2 i'm getti...

javascript - how to get ng-grid in modal working? -

i tryin nggrid working in modal: $scope.open = function() { $modal.open({ templateurl: 'mymodalcontent.html', backdrop: true, windowclass: 'modal', controller: function($scope, $modalinstance) { $scope.submit = function() { $modalinstance.dismiss('cancel'); } $scope.cancel = function() { $modalinstance.dismiss('cancel'); }; } }); }; but getting error: typeerror: cannot set property 'griddim' of undefined plunkr ref: http://plnkr.co/edit/2cijicdra2k3nqew7w56?p=preview see plunker, http://plnkr.co/edit/t22v7ma8rwsqick5oimg?p=preview i believe mistake had added data , ng-grid initialisation not within scope of $modal, if @ plunkr moved scopes inside controller of $modal , worked.

Running Multiple Tor Instances in Windows from C# Application -

i'm trying start multiple tor instances via c# .net application. first instance starts great, rest exit immediately. i using different data directory each instance, , have in fact made copy of entire tor directory each instance. here code: pprocess = new process(); process.startinfo = new processstartinfo(exepath); process.startinfo.workingdirectory = path.getdirectoryname(exepath); process.startinfo.arguments = "datadirectory \"" + process.startinfo.workingdirectory + "\\data\""; process.start(); i have tried "runasdaemon 1" , "--service" arguments , made no difference. i can see unique data directories being used, tor creates state/lock/etc files in them. else missing? perhaps should note, able start 1 instance code, , 1 instance manually opening "start tor browser.exe" thanks

c++ - Is it possible to query a privileged windows service from a user mode java application? -

background i working on application need query files available on harddisk using java. performance major requirement, have written native application accesses windows master file table ($mbt) valid file entries. i planning modify native windows service (running admin privileges.. needed accessing mft) , use user mode java application contact via ipc technique (specifically shared memory or named pipe or sockets... need evaluate). the target application windows specific , java used text processing (i know python/perl @ haven't used them long time). questions now question - whether possible query privileged windows service limited user level application? if not workaround achieve this? i think sockets possible ipc mechanism other 2 fail access denied . correct in assuming that? is converting native code jni/dll , using correct on planning? in case have start java app admin privilege having custom manifest file. platform windows 7 enterprise visual studio...

java - What is the pattern for this date format? -

this question has answer here: what time format “date”: “2014-08-20 00:00:00 -0500”? 2 answers you can't parse timestamp without knowing simpledateformat pattern first , i'm not sure be: 1980/01/30 10:36:42 -0400 i think yyyy/mm/dd hh:mm:ss , i'm not sure -0400 part or if should capitalizing mm , hh . mm months, mm minutes hh 24 hour time, 0-23 hh 12 hour time z timezone, final field you're looking for in api documents here , there's lovely table listing of pattern letters.

java - Hibernate 4.3.5 is not working with Oracle10g Database -

Image
i trying out hibernate 4.3.5 oracle database. during run getting following problem(the same code working fine mysql database). org.hibernate.engine.jdbc.connections.internal.drivermanagerconnectionproviderimpl configure info: hhh000115: hibernate connection pool size: 20 (min=1) jun 26, 2014 10:35:46 org.hibernate.engine.jdbc.internal.jdbcservicesimpl configure warn: hhh000341: not obtain connection metadata : unsupported feature jun 26, 2014 10:35:46 org.hibernate.engine.jdbc.internal.lobcreatorbuilder usecontextuallobcreation info: hhh000422: disabling contextual lob creation connection null exception in thread "main" java.lang.nullpointerexception @ org.hibernate.engine.jdbc.internal.jdbcservicesimpl.configure(jdbcservicesimpl.java:244) @ org.hibernate.boot.registry.internal.standardserviceregistryimpl.configureservice(standardserviceregistryimpl.java:111) @ org.hibernate.service.internal.abstractserviceregistryimpl.initializeservice(abstractserviceregistryimpl.java...

c# - MSBUILD .NET v4 teamcity -

i have installed teamcity professional 8.1.3 (build 30101) onto clean box , trying run new build. have copied on msbuild tools local dev machine new server , placed them in x86 folder. have installed iis web role, .net feature, registered iis cmd line, , installed msbuild tools 2013. reason, still unable compile anything. following error sgen attempt made load assembly incorrect format: c:\windows\microsoft.net\assembly\gac_64\system.data\v4.0_4.0.0.0__b77a5c561934e089\system.data.dll. is familiar error? trying build app in .net v4 using msbuild tools v4. i getting error building project targeted .net framework 4.5.1. resolved issue installing microsoft .net framework 4.5.1 developer pack you can sdk (aka targeting pack, aks developer pack) other versions may want target @ .net sdks , downloads