Posts

Disable output for namespaces when running tests in clojure with boot -

i using boot-clj watch test task adzerk.boot-test . it prints testing my.namespace.here console every namespace have in project. even if namespace not contain tests. no fun, since have scroll every time test fails. how disable output?

javascript - Format code in Razor section visual studio -

i have project asp.net mvc in visual studio 2017 (enterprise edition) in layout page have 3 sections <script type="text/javascript"> $(document).ready(function () { if(checkuserhavemobilephone) { @rendersection("scriptsphone", false) } else { @rendersection("scriptspc", false) } @rendersection("scripts", false) }); </script> and in view have code (and work) <script type="text/javascript"> @section scripts { $(window).resize(function () { }); } </script> http://imgur.com/ks8olfq but when add if-statement section don't work <script type="text/javascript"> @section scripts { $(window).resize(function () { if (parseint($(window).width()) <= 800) { alert("alert"); } }); } </script> http://imgur.com/a/zqiwj after syntax e...

visual c++ - context::Context(void) - cs_ctx_alloc() failed -

i trying run application in debugging mode. logon screen appears , when try login "context::context(void) - cs_ctx_alloc() failed" error encountered. on debugging using break point , selecting continue when code crashes, following database access error message displayed ":ct_con_props(cs_userdata)failure". following environment setup in finding error. os: windows 10 ide: visual studio 2013, vc++ code access: elevated database: sybase ocs 15_0 the application working on following environment:- os: windows 7 ide: visual studio 2013, vc++ code access: admin database: sybase ocs 12_5

Redux / Reselect - selector reusing -

i new selectors. have created following ones: import { createselector } 'reselect'; const getvalues = (state) => state.grid; // [3, 4, 7, 3, 2, 7, 3,...] const gettiles = (state) => state.tiles; // [0, 1, 0, 1, 0, 0, 1,...] // counts selected tiles (ie. adds 1s) export const getselected = createselector( [gettiles], tiles => tiles.reduce((acc, elem) => acc + elem, 0) ); // displays values of selected tiles, rest shows 0 export const showselected = createselector( [gettiles, getvalues], (tiles, grid) => tiles.map((idx, i) => (idx === 1 ? grid[i] : 0)) ); export const addselected = createselector( [showselected] ..... ); /* export const addselected = createselector( [showselected], coun => coun.reduce((acc, elem) => acc + elem, 0) ); */ the third selector (addselected - last bottom, commented-out version) same thing first 1 (with different inputs). how can make more generic can reuse instead of writing whole 'reduce...

angularjs - md-chips deletion by clicking the chip -

i'm new angularjs. i'm using md-chips create chips based on drop down selection. mobile view, delete md-chips clicking chip instead of making user click small 'x' on chip. if make read-only can't delete chip. ideas appreciated. thanks. html: <div ng-repeat="filter in sc.filters"> <md-chips ng-model="filter.value" ng-if="sc.isarray(filter.value)" md-on-remove="sc.filter()"> </md-chips> </div> you can use md-on-select="ctrl.remove($chip)" callback $chip contains element of ng-mode array has been clicked on. in remove function can remove element array. according example like follows: $scope.remove = function($chip) { var idx = self.fruitnames.indexof($chip) $scope.filters.splice(idx, 1) } a working fiddle can found here: jsfiddle

javascript - How I change a value of hidden file according which radio selected -

i have in file html.twig : 1- hidden file should take 3 values according radio selected, 1 database , 2 others hiden files values number 10, this: <input type="hidden" name="lt" value="{{ price.getlt }}"> <input type="hidden" name="lt" value="10"> <input type="hidden" name="lt" value="10"> 2- , have 3 radiobox: <input id="spa-price" name="price" class="w3-radio" value="spare {{ price.getspareprice }}" type="radio"> <input id="rep-price" name="price" class="w3-radio" value="repair{{ price.getrepairprice }}" type="radio"> <input id="rep-price" name="price" class="w3-radio" value="test {{ price.gettestprice }}" type="radio"> 3- did block javascript in same file html.twig created function value of each r...

http status code 404 - jhipster - war deployed on jboss server -

i'm trying deploy jhipster .war on jboss 6.4. can access main page cannot log in. have message "failed sign in! please check credentials , try again". on chrome console have error : http://localhost:8080/myapp/api/authenticate?cachebuster=1492172408521 404 (not found) works fine mvnw command on embedded server(tomcat). what problem jboss ? edit: jhipster version : 3.12.2. monolithic application. jwt authentication. mysql database. ok started new fresh project, deployed on jboss 6.4 , still have problem, cannot authenticate. have on console when go main page : localhost:8080/myapp/api/profile-info?cachebuster=1492674235‌​919 404 (not found) , localhost:8080/myapp/api/account?cachebuster=1492674235931 404 (not found).