Posts

Spring Integration: how to make the SecurityContext propagation working? -

i'm trying integrate 2 simple spring web applications spring integration, , want propagate spring securitycontext between 2 applications, i've not yet found working solution. the 2 applications similar between each other, there few differences in configuration: 1 of them has "caller", other 1 has "receiver". in order getting expected result, i'm using spring security , i've configured both applications following spring security configuration: <beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.1.xsd"> <http au...

windows - Crash when calling getOpenFileName from QItemDelegate's custom editor -

prerequisites: i have custom qitemdelegate creates custom editor treeview items. editor consists of qlineedit , qtoolbutton. button used open file dialog selecting file , placing it's path line edit. use call qfiledialog::getopenfilename open file dialog. dialog native windows file dialog (this important). when editor created first time, works ok no matter how press button. after editor closed , reopened again first press on button results in crash. reason of crash custom editor gets deleted. here code: void ccustomeditor::on_runsetupbtn_clicked() { auto qfilename = qfiledialog::getopenfilename(this, "select application run", qstring(), "executable files (*.exe)"); if (qfilename.isempty()) return; setcommandline(qdir::tonativeseparators(qfilename), m_qparameters); } i have made digging , found out calling winapi function getopenfilename results in same way: editor gets deleted (although crash doe...

SYMFONY FORM isClicked() issue (depending Browser) when mixed with JavaScript - JQuery: event.preventDefault() and event.target.submit() -

Image
the goal: i want on symfony form have two submit buttons . 1st 1 used validate form, 2nd submit button used away form . by default fields of form use required check before submitting, means prior use 2nd submit, required attributes need turned off on dom <input> . using jquery, event.preventdefault() , turn off required on each <input> , event.target.submit() . then on symfony side expect catch button had been clicked using $form->has([button name])->isclicked() function. the issue: i have noticed depending on browser, $form->has([button name])->isclicked() doesn't work if javascript event.preventdefault() , event.target.submit() had been used. on chrome (version 51.0.2704.103 m) (isclicked = 1 or true): on firefox (version 47.0) or microsoft edge 25.* (isclicked = false): the code: the full code @ following github . emphasis on code: in /src/appbundle/form/formtype.php you'll find, code manages javascript hold on submit...

sql server - SSDT/ VS2015 Database deployment -- publishing is ignoring nested views -

i attempting gain knowledge , use cases on ssdt database development , deployments , strugling deployment issues. specifically when using nested views. unknown reason when attempting deploy / publish files in project local / live db seems mess references in views. in project have following views (example): view1 view2 view3 view1 references view2 , view3 referencing view1. building project works fine. hoewever when try publish database either generating dacpac snapshot , publish database or let visual studio generate update script after (or not) comparing schemas end update script tries create views in seems logical order in stored in project. in case view1 -> view2 -> view3. means publish fails because of reference issues. can't create view if referenced view not exist. i have tried several options adding dacpac reference in project in various ways (same database, same server different database w/ w/o database parameter) in many cases end sql71561 / sql...

Angular 2 multiple components -

it seemed confused angular 2 concept. i'd have 3 components on page defined way in app.component.html (this should entry point): <bp-header></bp-header> <bp-home></bp-home> <bp-footer></bp-footer> and main component (app.component.ts): import { component } '@angular/core'; import { router_directives } '@angular/router'; import {headercomponent} "./header.component" import {footercomponent} "./footer.component" import {homecomponent} "./home.component" @component({ selector: 'bp-app', templateurl: 'app.component.html', styleurls: ['app/app.component.css'], directives: [headercomponent, footercomponent, homecomponent] }) export class appcomponent {} bu there nothing when open home page no errors in console. well, final solution put header , footer directives inside template way bp-header , bp-footer separate components. import { component ...

javascript - JSON to JSON mapping using Mustache -

i want map input json json using mustache . my input json like: { "data": [ { "catalogid": "1850", "productid": "elec004a"}, { "catalogid": "1851", "productid": "png679"} ] } i want template in combine mustache tags output json. var template = json.stringify( { product: [ {{#data}} { productid:'{{productid}}', parentproductid:'{{catalogid}}' } {{/data}} ] } ); i tried using mustache tag json giving me errors. tried defining template without using json.stringify no luck! have use mustache requirement, actual input json quite large , can't map using traditional way. my desired output json mentioned in template mustache tags replaced relevant data input json you don't need moustache here. var input = { "data": [ { "catalogid": "1850", ...

Nested CSS counter does not show increment -

this question has answer here: how stop <div> tags interfering counters? 2 answers i trying use css counters applied series of elements , miserably fail right. the html code simple: <html> <head> <style> body { counter-reset: objgen; } span.general:before { content: counter(objgen) ; counter-increment: objgen; } span.general { counter-reset: objesp; font-weight: bold; } span.esp:before { content: counter(objgen) "." counter(objesp); counter-increment: objesp; } span.esp { font-weight: bold; } </style> </head> <body> <p>inputs:...