Posts

Showing posts from September, 2011

java - String.split() not working as intended -

i'm trying split string, however, i'm not getting expected output. string 1 = "hello 0xa0xagoodbye"; string two[] = one.split(" |0xa"); system.out.println(arrays.tostring(two)); expected output: [hello, goodbye] what got: [hello, , , goodbye] why happening , how can fix it? thanks in advance! ^-^ this result caused multiple consecutive matches in string. may wrap pattern grouping construct , apply + quantifier match multiple matches: string 1 = "hello 0xa0xagoodbye"; string two[] = one.split("(?:\\s|0xa)+"); system.out.println(arrays.tostring(two)); a (?:\s|0xa)+ regex matches 1 or more whitespace symbols or 0xa literal character sequences. see java online demo . however , still empty value first item in resulting array if 0xa or whitespaces appear @ start of string. then, have remove them first: string two[] = one.replacefirst("^(?:\\s|0xa)+", "").split("(?:\\s+|0xa)+");

git ended up completely diverged branch -

after trying merge branches, realized ended unrelated history. so i'm wondering how possible in git!, didn't used --orphan create branch , it's used local repository(no remotes used), although used hooks dump database working directory git status made hooks run git add db.sql; git commit --amend --no-edit many times. edit: diff result between first commits of each branch (e51b4a2 , 6cf7d37) lies in db.sql!. commit's log: * commit 75c0c57 (head -> database) | date: 3 days ago | | somechanges | * commit b4e667d | date: 3 days ago | | initial database | * commit 6cf7d37 date: 3 days ago initial * commit 6507785 (master) | date: 3 days ago | | update module | * commit e51b4a2 date: 3 days ago initial git reflog: 75c0c57 head@{0}: checkout: moving master database 6507785 head@{1}: checkout: moving database master 75c0c57 head@{2}: commit: changes b4e667d head@{3}: commit (amend): initial database 202717a head@{4}

How to detect if Karaf is ready to accept commands via 'client'? -

i'm trying automate setup of karaf server issuing commands through bin/client. have following issues: after starting bin/start, have no idea how long need wait before karaf can start accepting commands after each command via bin/client, subsequent bin/client commands fail message 'failed acquire session' time, looks previous command still executed , must wait unpredictable amount of time finish. after issuing commands, need stop karaf. long don't know if last command has finished, can't that. is there way ask if bin/client ready accept next command, or, best, wait in script until happens?

javascript - js doesnot get applied to appended html -

i having slick slide effect on divs using .js file shown below. <div id="thumblist" class="lazy slider"> <div> <img /> </div> <div> <img /> </div> </div> so, on initial load applies slide effect images. after call ajax , append data in 'thumblist' div, shows html .js effect doesn't apllied it. how solve issue? i solved issue. reinitialize of script required. @ same time first have destroy slick effect , whole data apply slick. $(".lazy").slick('unslick'); ..... append data ..... $(".lazy").slick({ lazyload: 'ondemand', // ondemand progressive anticipated infinite: true, slidestoshow: 1, arrows: false, slidestoscroll: 1, autoplay: true, autoplayspeed: 2000, });

amazon web services - AWS/Cloudformation: How to export/import parameter value to another stack (YAML) -

i have simple question. testing export/import of values in cloud formation. question is: how create resources based on linked conditions stack? i think should import value other stack, don't know how.... this "export-test-stack" awstemplateformatversion: '2010-09-09' description: export parameters: envtype: description: how many instances want deploy? default: 2 type: string allowedvalues: - 2 - 3 constraintdescription: must specify number of deployed instances conditions: deploy3ec2: !equals [ !ref envtype, 3 ] resources: ec2instance1: type: aws::ec2::instance properties: instancetype: t2.micro securitygroupids: - sg-5d011027 imageid: ami-0b33d91d ec2instance2: type: aws::ec2::instance properties: instancetype: t2.micro securitygroupids: - sg-5d011027 imageid: ami-0b33d91d ec2instance3: type

arrays - Return of a if using empty() function in PHP -

i have following if in code check if array empty, if (!empty($data['id']) && (empty($data['student_no']) || empty($data['batch']) ) ) { print_r("inside if "); } $data['id'] , $data['student_no'] , $data['batch'] arrays. array values below, 1. $data['id'] -> array ( [0] => 1 [1] => [2] => ) 2. $data['student_no'] -> array ( [0] => [1] => [2] => ) 3. $data['batch'] -> array ( [0] => ) but not got inside if , print "inside if" string. please tell me wrong ? you forgot ! in if !empty($data['student_no']

JavaScript - Google Maps: Total Distance function returning undefined -

i'm trying use directionsservice find total distance of route waypoints, whenever try use function, keeps returning undefined, although displays correct answer. here's code: function addhexwaypts() firstpoint_1 = new google.maps.geometry.spherical.computeoffset(tempwaypt, distanceside*1000, (directions[0]+90)); secondpoint_1 = new google.maps.geometry.spherical.computeoffset(firstfirstpoint, onethird*1000, directions [0]); firstpoint_2 = new google.maps.geometry.spherical.computeoffset(tempwaypt, distanceside*1000, (directions[0]-90)); secondpoint_2 = new google.maps.geometry.spherical.computeoffset(secondfirstpoint, onethird*1000, directions [0]); var firstroute = checkthishex(firstpoint_1, secondpoint_1,0); var secondroute = checkthishex(firstpoint_2, secondpoint_2,1); //checkthishex function in question var bool = comparehex(firstroute, secondroute); if (bool = true) { fillwaypts(firstfirstpoint, firstsecondpoint); } else { fillw

javascript - How to create mesh with Three.js -

i have .obj file v 1 2 3 v 4 5 6 v 7 8 9 vt 0 1 vt 1 0 vn 0 0 1 vn 0 1 0 vn 0 0 1 f 1/1/1 2/2/2 3/3/3 f 1/1/2 2/2/3 1/2/3 and need create three.mesh. var geometry = new three.buffergeometry(); geometry.addattribute('position', new three.bufferattribute(vertices, 3)); geometry.addattribute('normal', new three.bufferattribute(normals, 3)); geometry.addattribute('uv', new three.bufferattribute(uvs, 2)); geometry.setindex(new three.bufferattribute(indices, 1)); var mesh = new three.mesh(geometry, material); i suppose need have follow data in arrays: var vertices = [1, 2, 3, 4, 5, 6, 7, 8, 9]; var normals = [0, 0, 1, 0, 1, 0, 0, 0, 1]; var uvs = [0, 1, 1, 0] var indices = // ... ? i don't understand need store in indices array? here example on how should like. definition of faces shows, there no vertices, have same texture , normals indices. so, other in normal geometry , cannot reuse vertices, because in buffergeometry index defined

angular - Subscribe in angular2 -

in project have service call use in multiple components.is there way have separate method in service save data , call method data.the first method below service call reusable data , second method 1 call data.but returns undefined each time use it.help please!!! getuserroles(): observable<loggedinuserdetails> { return this.http.get(baseurl + getuserrole).map((res: response) => { var data = res.json(); this.loggedinuser = data; return this.loggedinuser; }) } getuserdetails() { return this.loggedinuser; } component using above methods export class intiatedtravelsummarycomponent implements oninit { public loggedinuser: loggedinuserdetails; public id:number intiatedtravelrequestdetail: travelreqform; test:travelreqform[]; test2:travelreqform[]; constructor(private neutravelservice: neutravelservice,private route:activatedroute) { this.id =route.snapshot.params['travellerid']; } ngoninit() { this.logg

php - My page won't answer the Messenger call -

i'm developing code answers via facebook messenger , use piece of code handle answer , answer back: if(isset($_request['hub_verify_token'])) { if ($_request['hub_verify_token'] === a::verify_token) { echo $_request['hub_challenge']; exit; } } $input = json_decode(file_get_contents('php://input'), true); $sender_id = $input['entry'][0]['messaging'][0]['sender']['id']; $message_text = $input['entry'][0]['messaging'][0]['message']['text']; $fb_handler = new fbhandler($sender_id); /*$to_send = array( 'recipient' => array('id' => $sender_id ), 'message' => array('text' => "hi" ) );*/ $to_send = $fb_handler->talk($message_text); $ch = curl_init('https://graph.facebook.com/v2.6/me/messages?access_token='

html5 - column and row layout using CSS3 -

Image
i trying achieve column style bootstrap. want label , field value in column. ideally looking 5 columns , each column contain label , field value. have commented out label , fields quite close still not got it. have attached output of code. show me going wrong. css <style> .requestdetail { font-size: 9px; font-family: helvetica, sans-serif, sans-serif; } </style> <div class="requestdetail"> <div class="row"> <div>@html.label("country number", htmlattributes: new { @class = "editor-label col-sm-1" })</div><div class="col-sm-1 editor-field">gb</div> <div>@html.label("company code", htmlattributes: new { @class = "editor-label col-sm-1" })</div><div class="col-sm-1">8100</div> <div>@html.label("project name", htmlattributes: new { @class = "editor-label col-sm-1" })

javascript - how to use react-springy-parallax -

how use scrollto in react-springy-parallax ? i'm trying use react-springy-parallax in simple portfolio page, can click springy parallax scroll next page want able use nav links well, here how app laid out: app.js class app extends react.component { constructor() { super() this.ref = 'parallax' } render() { return ( <div> <parallax ref={this.ref} pages={4}> <parallax.layer offset={0} speed={0.5} onclick={() => this.refs.parallax.scrollto(1)} > <nav /> <header /> </parallax.layer> ... so onclick here scrolls next page, want able in nav component click about link , scroll +1 scrollto(1) here nav component: nav.js class nav extends react.component { render() { return ( <div classname="nav"> <ul classname="links"> <li>

php - How to define a static url in app.yaml "Google App Engine"? -

i trying make ajax call in project file in root directory named abc.php . ajax call gets succeed when try on local server. on server gives 500 server error . i think problem need set static url in app.yaml . according given doc . implemented following code: handlers: - url: /abc script: abc.php # serve images static resources. - url: /(.+\.(gif|png|jpg|jpeg|css|js|pdf|woff|woff2|eot|svg|ttf|ico))$ static_files: \1 upload: .+\.(gif|png|jpg|jpeg|css|js|pdf|woff|woff2|eot|svg|ttf|ico)$ application_readable: true - url: /.* script: index.php but still not able access abc url on server. can please tell wrong it?

zsh - associative array wich name is a variable -

i have setup : typeset -a network network[interface]=eth0,eth1 typeset -a eth0 eth0[dhcp]=yes ... typeset -a eth1 eth1[dhcp]=yes ... i want dhcp value each value of network[interface], have setup : for interfacetocreate in $(echo ${network[interface]/,/ }) ; (some stuff) case ${interfacetocreate[dhcp]} in (some stuff) it's don't work normal if try with ${!interfacetocreate[dhcp]} \${${interfacetocreate}[dhcp]} i tried eval same result. by default values of parameters not interpreted further parameter names. ${${foo}} behaves ${foo} (see nested substitutions ). behavior can changed parameter expansion flag p . example ${(p)${foo}} evaluate ${foo} , use value name parameter substitution. so can achieve desired effect this: typeset -a network eth0 eth1 network[interface]=eth0,eth1 eth0[dhcp]=yes eth1[dhcp]=no interfacetocreate in ${(s:,:)network[interface]} ; case ${${(p)interfacetocreate}[dhcp]} in yes) print $interfacet

How to get data from mLab using mongoDb and display into HTML page, using javascript, node.js, express -

i developing web app stores data in mlab , want display data onto html page dropdown menu select player name... here html... <table> <tr rowspan="10"> <th ><select name="sport" required> <option value="">please choose player:</option> <option value="soccer">player1</option> <option value="football">player2</option> <option value="hurling">player3</option> <option value="running">player4</option> </select></th> </tr> </table> here .js code.. 'use strict'; var express = require('express'); var app = express(); var _ = require('lodash'); var user = require('./user_model'); var player = require('./player_model'); var config = require('../../config/'); var path = require('path'); //

sql - Using INNER JOIN in DELETE -

i'm trying following condition: if loan in loans table has outstandingamount < 0, delete relevant information in database. have in single command , hence, have tried using inner join: delete a, b, c, d, e loans t1 inner join payments t2 on t1.loanid = t2.loanid inner join repayments t3 on t1.loanid = t3.loanid inner join histories t4 on t1.loanid = t4.loanid inner join loanrequests t5 on t1.requestdate = t5.requestdate , t1.bid = t5.bid inner join commits t6 on t1.requestdate = t6.requestdate , t1.bid = t6.bid t1.outstandingamount < 0 however, command gives me syntax error @ "delete a, b," , i'm not sure work. appreciated. thank you. as gordon linoff wrote in comment, can delete 1 table in each delete statement. you have 2 options: use on delete cascade in foreign keys (that's best thing do) use delete statement each table, wrap entire delete process in transaction. adding on delete cascade foreign keys means drop , re-create them:

javascript - BeagleBone Black - Bonescript Syntax Error -

i having issues running scripts using bonescript on beaglebone black. when run scripts in web browser, executes normal. however, when try executing them terminal window, won't run. #!/bin/bash var b = require('bonescript'); var leds = ["usr0", "usr1", "usr2", "usr3", "p9_14"]; for(var in leds) { b.pinmode(leds[i], b.output); } var state = b.low; for(var in leds) { b.digitalwrite(leds[i], state); } setinterval(toggle, 1000); function toggle() { state = (state == b.low) ? b.high : b.low; for(var in leds) { b.digitalwrite(leds[i], state); } } debian@beaglebone:~$ ./blinkled.js ./blinkled.js: line 2: syntax error near unexpected token `(' ./blinkled.js: line 2: `var b = require('bonescript');'

php - Method Post in a Cronjob -

i need advice, have multistep wizard form, , in wizard, marketing purposes need save in first step (name, email, address) database, case user dont finish wizard steps. need create email notification administrator case user doesnt finish form. think example in cpanel create cronjob verifies in database records doesnt have completed multistep , send email administrator there emails. but there issue, need update column in records, in case column called "verified" boolean , when mail sent true every time cronjob fires dont send emails administrator. but looks cronjob supports method, have advice? request methods (get, post, put, delete etc) http-specific not cron jobs. but looks cronjob supports method this wrong. cron jobs call specific file(s) on specified time interval. can read here: cron jobs in case, need following things: when form partially completed, saving data in database. so, can save use 2 columns in database, 1 check users have not comp

c# - .Net MVC not sorting -

i'm trying follow microsoft's tutorials on sorting .net mvc5, , while filtering working fine, sorting not. public actionresult index(string searchstring, string currentfilter, string numberperpage, string submit, int? page) { int pagesize = string.isnullorempty(numberperpage) ? 10 : int32.parse(numberperpage); int pagenumber = (page ?? 1); var cohortlist = s in db.cohorts select s; if (((!string.isnullorempty(searchstring)) || (!string.isnullorempty(currentfilter))) && (!string.isnullorempty(submit))) { if (searchstring != null) { page = 1; } else { searchstring = currentfilter; } viewbag.currentfilter = searchstring; viewbag.numberperpage = numberperpage; switch (submit) { case "conceptsearch": var conceptresults = cohortlis

Crash when opening - neo4j 3.1.2 Community Edition -

i totally new neo4j. have downloaded de software , installed it, when open it, crashes immediately. below error get. have shorten error text because incredibly long. any ideas? tried reinstall, restart etc. no luck. thank in advance, cristina >process: javaapplicationstub [877] path: /applications/neo4j community edition 3.1.2.app/contents/macos/javaapplicationstub identifier: com.install4j.8478-6373-2628-9929.24 version: 3.1.2 (3.1.2) code type: x86-64 (native) parent process: ??? [1] responsible: javaapplicationstub [877] user id: 502 >date/time: 2017-03-28 13:43:24.705 +0200 os version: mac os x 10.10.5 (14f27) report version: 11 anonymous uuid: 9e54842f-ada5-86bd-c792-f5a255a236ce >time awake since boot: 760 seconds >crashed thread: 0 appkit thread dispatch queue: com.apple.main->thread >exception type:

javascript - How to change a variable using onclick -

i'm trying change variable 0 4 using onclick function in html. below have. javascript / html : function opentab(evt, page) { var i, pages, links; //hide pages pages = document.getelementsbyclassname("content"); (i = 0; < pages.length; i++) { pages[i].style.display = "none"; } //remove active tab links = document.getelementsbyclassname("link"); (i = 0; < links.length; i++) { links[i].classname = links[i].classname.replace(" active", ""); } //set active page , tab document.getelementbyid(page).style.display = "block"; evt.currenttarget.classname += " active"; } var y=0; var x=10; var hp=x-y var changevariable = function(){ alert("before : "+y) y = 4; alert("after : "+y); //adding result element document.getelementbyid("myresult").innerhtml = hp; } //bindin

javascript - How does error handling work in node js -

i got sample node js code using expressgenerator ,which default got error handling code follows app.use(function (req, res, next) { console.log("first callback 1"); var err = new error('not found'); err.status = 404; next(err); console.log("first callback 2"); }); app.use(function (err, req, res, next) { // set locals, providing error in development console.log("second callback"); res.locals.message = err.message; res.locals.error = req.app.get('env') === 'development' ? err : {}; // render error page res.status(err.status || 500); res.render('error'); console.log("error send"); }); i've added few console.logs in error handling callbacks.what understood callbacks since didnt provided route here these 2 call backs called routes. now in code i've added 1 route as app.get('/login', function(req, res, next) { res.sen

reactjs - React/webpack application deploy fails on heroku -

i trying deploy react starter on heroku. have written webpack file , works on localhost deploy on heroku throws run time error of: cannot find module '../lib/util/adddevserverentrypoints' my stacktrace looks like error: cannot find module '../lib/util/adddevserverentrypoints' 2017-03-28t11:56:47.036328+00:00 app[web.1]: @ function.module._resolvefilename (module.js:469:15) 2017-03-28t11:56:47.036329+00:00 app[web.1]: @ function.module._load (module.js:417:25) 2017-03-28t11:56:47.036329+00:00 app[web.1]: @ module.require (module.js:497:17) 2017-03-28t11:56:47.036330+00:00 app[web.1]: @ require (internal/module.js:20:19) 2017-03-28t11:56:47.036330+00:00 app[web.1]: @ object. (/app/node_modules/webpack-dev-server/bin/webpack-dev-server.js:9:33) 2017-03-28t11:56:47.036331+00:00 app[web.1]: @ module._compile (module.js:570:32) 2017-03-28t11:56:47.036331+00:00 app[web.1]: @ object.module._extensions..js (module.js:579:10

typescript - angular 2 file upload 401 unauthorized (CORS) -

i getting error "401 unauthorized" in chrome , firefox, when uploading files angular 2 cli apache2-server. backend of server in php. i've tried 3 different node modules, behave same. i'm getting error on options-preflight, "xmlhttprequest cannot load (uploadurl) response preflight has invalid http status code 401". this error happens, if im requesting source (e.g. "localhost:4200"). when executing project on apache server, upload works fine. so on localhost: difference is, requests before uploading have cookie in request headers. not upload-request. here's image: headers on upload-request i've tried theese 3 node modules far: ng2-file-upload angular2-http-file-upload ng2-uploader "withcredentials" on uploader (e.g. ng2-file-upload valor software ng-2-file-upload ) set true. tried setting header x-requested-with: 'xmlhttprequest' . , tried setting authorization: basic -header....still same issue. w

email - I have a working powershell script that hangs sending mail when run with the Task Scheduler -

i have paperless system mileage reimbursement sheets. have had issues people submitting multiple sheets , supervisors check created powershell script sql query , creates text file of supervisors. then, reads list , runs sql query of employees names , date ranges of submitted mileage sheets, saves csv file , emails supervisor can check when approving next set of sheets. when run script command line works great. want schedule run weekly. when test it, however, hangs. creates first file of supervisors. after doing testing, (i commented out section sends mail) hangs sending first email message. have task scheduled run same credentials used create credentials file. suggestions? here have send mail param($user,$file) $user="system_mangler@familyenrichment.cc" $password = get-content "systemmangler.txt" | convertto-securestring $credential = new-object system.management.automation.pscredential($user,$password) that @ beginning of script. in loop sends mail. te

Django inheritance: specify foreign key name -

i'm new django world, , using django rest framework, don't think relevant problem. i designed database hand , prefer not use django migrations generate it. have convention use name tablename_id foreign key. my problem when want use inheritance, django tries use name parenttablename_ptr_id instead of parenttablename_id . there way specify ? here fake code showing wanted result: class a(models.model): id = models.autofield(primary_key=true) name = models.charfield(max_length=255, unique=true) class b(a): # other stuff # a_id foreign key a, instead of a_ptr_id i hope clear, couldn't find answer elsewhere. thank in advance response !

windows - Send left square bracket using autoit -

i have plugged mac french keyboard onto windows. i have left bracket key work normally, meaning when typing alt+shift+(, left hand side modifiers. i have following code : hotkeyset("!+{(}", "leftbracket") func leftbracket() send("{asc 91}") endfunc but doesn't work. when replace hotkey "!a" , works. when replace send("{asc 91}") send("a") sends a correctly. but seems not work when have code above. you need use 1 of these possibilities. ( needs shift key :-) hotkeyset("!{(}", "leftbracket") hotkeyset("!+{9}", "leftbracket1") while 1 sleep(1000) wend func leftbracket() send("{asc 91}" & 'huhu') endfunc func leftbracket1() send("{asc 91}" & 'bla') endfunc

linux - Eclipse Subversive won't connect through proxy -

i'm trying use subversive on linux vm behind proxy. i've set eclipse proxy settings , can connect various update sites , eclipse marketplace, not svn repo. error when trying add repository svn repositories view is: location information has been specified incorrectly svn: e175002: options of '<repo path>': 502 bad gateway (http://<svn url>:<port>) svn: e175002: options request failed on '<repo path>' based on post found, tried using https:// in repository url no avail: location information has been specified incorrectly svn: e175002: connect request failed on 'http://<proxy address>:<proxy port>' svn: e175002: connect of '<repo url:port>': 502 bad gateway (<repo url:port>) i set proxy settings in ~/.subversion/servers , command-line svn tools can interact repository fine. i suspect maybe because of svn version mismatch? command line tools report version 1.9.3 svnkit 1.8.14 connector sa

validation - Angular2: Validate email address inside md-input -

i have angular2 form md-input element inside: <form novalidate (ngsubmit)="onsubmit(resetpasswfg)" [formgroup]="resetpasswfg" style="width:400px;border:1px solid black; "> <table style="width:400px;"> <tr> <td> <md-input class="input" mdinput placeholder="email" type="email" formcontrolname="email"> <md-hint class="input_error" *ngif="resetpasswfg.get('email').haserror('required') && resetpasswfg.get('email').touched"> email required </md-hint> </md-input> </td> </tr> <!-- other elements --> </form> and validator inside component: ngoninit() { this.resetpasswfg = new formgroup({ email: new formcontrol('', [validators.required, validators.required ]) }) } now, if email field not pop

jquery - Adding hashchange to Isotope v2 with search -

i have following code , i'm trying implement hashchange isotope v2. i have dropdown filter , search filter , have stumbled trying implement. do need wrap in haschange function? $(document).ready(function(){ var angle = 0; var qsregex; var buttonfilter; // old istope on /customers/ init var $iso_grid_old = $('#iso-grid'), filters = {}; // init isotope var $iso_grid = $('#iso-grid').isotope({ itemselector: '.card-wrap', layoutmode: 'fitrows', filter: function() { var $this = $(this); var searchresult = qsregex ? $this.text().match( qsregex ) : true; var buttonresult = buttonfilter ? $this.is( buttonfilter ) : true; return searchresult && buttonresult; }, }); // -------- filter function ----------// $('#iso-topic-filters li.filter-link').on( 'click', function() { buttonfilter = $(this).attr('data-filter'); console.log("clic

javascript - How can I re-render react-component when I setState using setTimeout? -

i tried write component update timeline every few seconds, use loop , use settimeout make interval more obvious: let tmp = this.state.colors; // colors array for(let = 0 ; < 4; i++){ if(tmp[i]=="blue"){ tmp[i]="green"; settimeout(function () { console.log(tmp); this.mapped.setstate({ colors: tmp }); }.bind({mapped:this}), 2000); } } but seems can't re-render component @ once,i want component update timeline every 2 seconds, re-render 1 time. and know react process setstates() after eventhandler has completed.i tried use forceupdate although know it's not discouraged, doesn't work. so what's best way re-render component? any great appreciated. update thanks @andre-lee. (let = 0; < 4; i++) { settimeout(function () { tmp[i] = "green"; this.setstate({ colors: tmp });

c# - How to Convert Decimal to 2 fraction -

how convert decimal 2 fraction. example want convert 10.5234 10.52 , if fraction 0 disappear fraction , 4.3014 convert 4.3 you can use string.format("{0:0.##}", mynumber); you can have @ custom numeric format strings documentation. if use c#6.0 or above, can use string interpolation this: $"{mynumber:0.##}" as suggested jeppe stig nielsen

trying to import data in pimcore from xml file -

we trying import xml file having objects in pimcore. file having around 4000 records , size around 4mb. want know how import data in pimcore xml file? you need write cli importer own handle it. pimcore don't have feature right import xml files. anyway, there not possible automatically, cause of data complex.

Viewing current Spring (Boot) properties -

i run spring boot application .jar file partly takes properties application.yml residing inside jar while other part of properties being provided application.yml residing outside jar. of properties outside overwrite properties inside. in order test whether properties overwritten see active ones. achieveable @ out of box? or solution extend application property output logic? if add spring boot actuator dependencies, can view lot of configuration , other info @ actuator endpoints . can view properties @ /configprops endpoint.

javascript - Croppie: dynamically set option like enforceBoundary? -

using croppie want dynamically set option, can make toggle enabling , disabling enforceboundary . initial code: var basic = $('#demo-basic').croppie({ viewport: { width: 150, height: 200 }, enforceboundary: true, }); basic.croppie('bind', { url: 'demo/cat.jpg', points: [77,469,280,739] }); //on button click basic.croppie('result', 'html').then(function(html) { // ... }); how can change enforceboundary after has been instantiated?

git - How to keep local topic (feature) branches from being pushed to the remote -

suppose pull branch develop remote repo , create local branch feature_xxx work on feature a---b---c---d develop \ x feature_xxx i make commits feature_xxx branch , merge local develop branch. a---b---c---d---e develop \ / x---y---z feature_xxx finally push develop branch remote repo git push my_remote develop the problem commits pushed remote, including x, y, z commits, branches on remote this: a---b---c---d---e develop \ / x---y---z actually used x, y, z commits during development , not want them show on remote. i'd branch on remote this: a---b---c---d---e develop i suppose there several ways achieve in git, solution simplest? the simpler short-hand rebase operation others outlining, if want one commit represent work branch, use --squash option git merge : git checkout develop git merge --squash feature_xxx this leaves with a---b---c---d---xyz develop \ x--

wso2is - WSO2 IS 5.0.0 SP1 After restart there is authentication error -

i have configured service provider sso saml2 web sso configuration. the single sign on & logout working fine, when logout , leave browser on login page of wso2 is, , restart wso2 is, when type username/password login in page left open in wso2 is, following error occurs: tid: [0] [is] [2017-03-28 08:03:29,462] debug {org.wso2.carbon.identity.application.authentication.framework.util.frameworkutils} - authentication context null {org.wso2.carbon.identity.application.authentication.framework.util.frameworkutils} tid: [0] [is] [2017-03-28 08:03:29,462] debug {org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.defaultrequestcoordinator} - session data key : cbd70356-49e3-423d-8542-3d4a0c7ad2c6 {org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.defaultrequestcoordinator} tid: [0] [is] [2017-03-28 08:03:29,462] error {org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.defaultreques

Disabling certain months in bootstrap dateTIMEpicker in MONTH view -

i trying disable months in datetimepicker, not datepicker, in month mode (and need stay in mode). months need disable ones before in datepickerfrom. here code: $('#newdialog #datepickerfrom').datetimepicker({ format: 'dd.mm.yyyy', viewmode: 'months', minviewmode: 'months', picktime: false }); $('#newdialog #datepickerto').datetimepicker({ format: 'dd.mm.yyyy', viewmode: 'months', minviewmode: 'months', picktime: false }); $('#newbutton').click(function() { var dialog = $('#newdialog'); $('#dialogheader').text("new monthly fee"); resetvalue($("#id", dialog), ''); resetvalue($("#countryid", dialog), ''); resetvalue($("#typeid", dialog), ''); resetvalue($("#currencyid", dialog), '');

PrimeFaces Datatable CellEditor - Different values for facet input and output -

i have editable datatable entity user. table has field called username has unique constraint <h:form id="form"> <p:datatable id="usertable" value="#{users}" var="entity" editable="true" editmode="cell" tablestyle="width:auto"> <p:ajax event="celledit" listener="#{usercontroller.oncelledit}" update="form:msgs form:display form:usertable" /> <p:column headertext="userid"> <p:outputlabel value="#{entity.id}" /> </p:column> <p:column headertext="username"> <p:celleditor> <f:facet name="output"><p:outputlabel for="username" value="#{entity.username}" /></f:facet> <f:facet name="input"> <p:inputtext id="username" value="#{entity.username}" > <f:validaterequired /> <f:validatelength maximum="50" />

java - Fragment backstack with children fragments -

i have app has main activity drawer. every item on drawer sends me fragment. when press button fragments, want taken main activity. the problem have child fragment in 1 of fragments. want button in child take me parent fragment. actually need same thing different parents. how do that? here mainactivity : package com.example.matancohen.sg50; import android.content.dialoginterface; import android.os.bundle; import android.os.handler; import android.support.v4.app.fragmentmanager; import android.support.v7.app.alertdialog; import android.text.html; import android.view.gravity; import android.support.design.widget.navigationview; import android.support.v4.view.gravitycompat; import android.support.v4.widget.drawerlayout; import android.support.v7.app.actionbardrawertoggle; import android.support.v7.app.appcompatactivity; import android.support.v7.widget.toolbar; import android.support.v4.app.fragment; import android.view.menuitem; import android.widget.toast; public cla

javascript - Change uib-modal size dynamically -

Image
i wondering best way, if possible change size of uibootsrap modal on fly. have implemented paging of sorts within same modal body, if user presses 'next' button in footer of modal, load in template, so: <div id="rule-values-page" ng-show="rcw.page ==='rule values'"> <first-template-values ng-show="rcw.provider=== 'first template'" rule-fields="rcw.fields"></first-template-values> <second-template-values ng-show="rcw.provider === 'second template'" rule-fields="rcw.fields"></second-template-values> <third-template-values ng-show="rcw.provider=== 'third template'" rule-fields="rcw.fields"></third-template-values> </div> there javascript behind scenes determines happens when next button clicked (above approximation of looks like). when launch original modal contains previo