Posts

java - Unable to make sub reports with Jasper -

i using jaspersoft studio create reports. having sub report in jasper main report. problem unable make work, because if add sub report detail band of main report, sub report generated number of times, row row, entire sub report repeated in number of pages. can't put in summery band due same reason. i unable put in column footer band or other footers because displays below error net.sf.jasperreports.engine.jrexception: net.sf.jasperreports.engine.jrruntimeexception: subreport overflowed on band not support overflow. @ com.jaspersoft.studio.editor.preview.view.control.reportcontroler.fillreport(reportcontroler.java:467) @ com.jaspersoft.studio.editor.preview.view.control.reportcontroler.access$18(reportcontroler.java:442) @ com.jaspersoft.studio.editor.preview.view.control.reportcontroler$4.run(reportcontroler.java:334) @ org.eclipse.core.internal.jobs.worker.run(worker.java:54) caused by: net.sf.jasperreports.engine.jrruntimeexception: subreport overflowe...

APEX - Parsing a recursive JSON -

i programming salesforce (apex). input complex , recursive json. { "id":"0", "children":[ { "id":"1", "children":[...] }, { "id":"2", "children":[...] } ] } i need way iterate complex , recursive json (in apex). anyone can help? thanks, hagai if know names of attributes in json object, can create classes represent them , deserialize. instance: public class myobject { public string id; public list<myobject> children; } then write method returns children static list<myobject> getchildren(myobject parent){ list<myobject> children = new list<myobject>(); ( myobject c : parent.children ){ children.addall( getchildren(c) ); children.add(c); } return children; } and put 2 together: myobject parent = (myobject)json.deseria...

mysql - What is the correct syntax for a Regex find-and-replace using REGEXP_REPLACE in MariaDB? -

i need run regex find-and-replace against column named message in mysql table named post . my database running mariadb 10. according docs , mariadb 10 has new regexp_replace function designed this, can't seem figure out actual syntax. it affect 280,000 rows, ideally there's way limit changing 1 specific row @ time while i'm testing it, or doing select rather update until i'm sure want. the regex want run: \[quote\sauthor=(.+)\slink=[^\]]+] the replacement string: [quote="$1"] the following tried, throws sql error: update post set message = regexp_replace(message, '\[quote\sauthor=(.+)\slink=[^\]]+]', '[quote="$1"]') post_id = 12 in case, original message was: [quote author=jon_doe link=board=2;threadid=125;start=40#msg1206 date=1065088] , end result should [quote="jon_doe"] what proper syntax make regexp_replace work? you have lot of escaping here: regexp_replace(message, "\\[qu...

php - Converting my web app to SSL -

i have server host web app requires log in. log in very insecure. has prompted me want switch on https. if switch on ssl android app, uses http posting website,not allowed work? your android app work ssl. update android app use new https api address on webserver should forward every request going http://example.com/login https://example.com/login this way, current android version continue work, , new android version use https default.

ember.js - ember-cli / ember-data model unit tests using http-mocks -

i using ember-cli / ember-cli-mocha testing. have generated http-mock work when run app via ember serve . however, when run tests -- (e.g. see below...), error: sheet calculates exported fields ✘ assertion failed: unable find fixtures model type (subclass of ds.model). if you're defining fixtures using `model.fixtures = ...`, please change `model.reopenclass({ fixtures: ... })`. i presume unit test setup must set store use fixtures. there configuration somewhere use http-mocks instead? start of test ... 'calculates exported fields', -> # now, exported fields fields , variables expected = `new set()` sheet = null store = @store() ember.run -> store.find('sheet', '1').then( (sheet_)-> sheet = sheet_ promise.all([ sheet.get('fields'), sheet.get('formulas')]) ).then((args)-> [fields, formulas] = args fields.foreach (f)->expected.add(f) ... ...

java - Submitting a form using html unit -

i want login https://pacer.login.uscourts.gov/csologin/login.jsf . have used html unit submitting login form. here code: public void submittingform() throws exception { final webclient webclient = new webclient(); // first page final htmlpage page1 = webclient.getpage("https://pacer.login.uscourts.gov/csologin/login.jsf"); // form dealing , within form, // find submit button , field want change. final htmlform form = page1.getformbyname("login"); // final htmlsubmitbutton button = form.getbuttonbyname("login:j_idt184"); final htmltextinput textfield = form.getinputbyname("login:loginname"); final htmltextinput textfield1 = form.getinputbyname("login:password"); // change value of text field textfield.setvalueattribute("xxx"); textfield1.setvalueattribute("xxx"); // submit form clicking button , second page. final htmlpage page2 = form.getbuttonbyname(...

java - How to retrieve field values by passing field name using JPOS ISO8583 message format -

i want retrieve field values passing filed name .in order achieve have implemented method loop through isomsg object , if found match passed filed name returns .my requirement read .xml file once , have static map using on next time retrieve corresponding value passing field name in order achieve there way retrieve field in config xml. protected static void getiso8583valuebyfieldname(isomsg isomsg, string fieldname) { (int = 1; <= isomsg.getmaxfield(); i++) { if (isomsg.hasfield(i)) { if (isomsg.getpackager().getfielddescription(isomsg, i).equalsignorecase(fieldname)) { system.out.println( " found field -" + + " : " + isomsg.getstring(i) + " " + isomsg.getpackager() .getfielddescription(isomsg, i)); break; } } } } you can define enum field names, mapped field numbers. please note field names may vary packager packager, solution kind of brittle, it's better use enum, or const...

jquery - Saxon-CE progressbar while processing, rendering blocked? -

Image
i'm using saxon-ce transform xml file. want set progressbar while xslt processor running. somehow seems view blocked. can't set button's value "transforming...". console.log tells me html value of button changed, somehow it's not rendering. here have far: function xslt(selected){ $('#transform-button').html('transforming ...'); console.log($('#transform-button').html()); var xsltdata = saxon.requestxml("xslt.xsl"); var xmldata = saxon.parsexml("xml.xml"); var xsltprocessor = saxon.newxslt20processor(xsltdata); (i = 0; < selected.length; i++) { var percentage = 100 / selected.length * i; xsltprocessor.setparameter(null, "selected", selected[i]); var result = xsltprocessor.transformtodocument(xmlfile); var resdoc = xsltprocessor.getresultdocuments(); progress(math.round(percentage)); } } i'm using bootstrap's "progre...

Unable to invoke method in mocked service from mocked controller using mockito with spring web mvc -

i trying create junit test case spring mvc rest controller , service accessed controller. using mockito doing above. i'm able invoke mock injected controller test case , when debug see mocked userservice available in mocked contoller, method within service object not getting invoked. while debugging observe steps on service method call. i not see kind of exception too. i using maven 3 spring 4.1.1 release version junit 4.11 java version 1.6 i have pasted code below: 1. test class package controller; import java.io.ioexception; import org.junit.before; import org.junit.test; import org.junit.runner.runwith; import org.mockito.injectmocks; import org.mockito.mock; import org.mockito.mockitoannotations; import org.springframework.http.mediatype; import org.springframework.test.context.contextconfiguration; import org.springframework.test.context.junit4.springjunit4classrunner; import org.springframework.test.web.se...

How to get node id in drupal 7 -

i developing drupal 7 module. , have added 2 field "teaser" , "doc" custom content type. when user create node using content type, he/she adds doc , save node. after saving node image created first page of doc(creating teaser doc) , saved folder using imagemagick lib. and want node ids link images node. how can node id. please help! you should have used node_save($node) method save node. can node id $node object doing this: $nid = $node->nid;

java - How can i format a decimal value into hours and minutes? -

for example if user input 1.71 (1 hour , 71 minutes), want convert 2.11 (2 hours , 11 minutes) decimalformat time = new decimalformat("##.## p.m"); int userinput = 1.71; system.out.print(time.format(userinput)); parse input date , format date output format: scanner sc = new scanner(system.in); dateformat df = new simpledateformat("hh.mm"); dateformat dfout = new simpledateformat("h.mm a"); date date = df.parse(sc.next()); system.out.println(dfout.format(date));

html - Update bootstrap wysiHTML5 editor textarea in cursor position? -

i using bootstrap wysiwyg editor text area should updated in cursor position when ever adding data pop up. i have done getting old value editor , append new value set in editor. but not right since new values appended in end of old value. should updated cursor located in editor. any suggestions appreciated.

class - How do you import files into the Python shell? -

i made sample file uses class called names . has initialization function , few methods. when create instance of class retrieves instance's first name , last name. other methods greet instance , departure message. question is: how import file python shell without having run module itself? the name of file classnames.py , location c:\users\darian\desktop\python_programs\experimenting here code looks like: class names(object): #first function called when creating instance of class def __init__(self, first_name, last_name): self.first_name = first_name self.last_name = last_name #class method greets instance of class. def intro(self): print "hello {} {}!".format(self.first_name, self.last_name) def departure(self): print "goodbye {} {}!".format(self.first_name, self.last_name) but error: traceback (most recent call last): file "<pyshell#0>", line 1, in <module...

xml - Pass namespace to an included xslt -

i work 2 file transformations. main file contains import statement in second transformation file. second transform file contains several templates generic transformations. problem transformations not same data namespace. wish namespace use in second transform. xslt1 : <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/xsl/transform" xmlns:fo="http://www.w3.org/1999/xsl/format" xmlns:n="http://novamap.fr/xml/data/v1/xmlmodelbondecommande" version="1.0"> <xsl:include href="common.xslt"/> <xsl:template match="/n:xmlmodelbondecommande"> ...... </xsl:template> </xsl:stylesheet> xslt2 : <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/xsl/transform" xmlns:fo="http://www.w3.org/1999/xsl/format" xmlns:n="http://novamap.fr/xml/data/v1/xmlmodeletatdeslieux" version="1.0"> <xsl:include href="common.xslt"/> <xsl:templ...

javafx - Calling Fxml file using Start Method which extends Application Class -

i want make new fxml file has few controls label. when run application times not showing , sometime when form showing label not showing. i have written following code: dashboard.fxml: <?xml version="1.0" encoding="utf-8"?> <?import javafx.scene.text.*?> <?import java.lang.*?> <?import java.net.*?> <?import java.util.*?> <?import javafx.scene.*?> <?import javafx.scene.control.*?> <?import javafx.scene.layout.*?> <anchorpane id="anchorpane" prefheight="603.0" prefwidth="1063.0" styleclass="mainfxmlclass" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.dashboard.dashboardcontroller"> <stylesheets> <url value="@dashboard.css" /> </stylesheets> <children> <label fx:id="welcome" layoutx="403.0" layouty="52.0...

Show system bar(title bar) in AppCompat Theme Android -

i using appcompat them support v7. trying make 1 screen full screen notification bar visible(solid color or transparent). in styles.xml have this: <style name="theme.myapptheme" parent="@style/theme.appcompat"> <item name="android:windowactionbaroverlay">false</item> <item name="android:windowfullscreen">false</item> <item name="android:windownotitle">false</item> </style> and in class, in oncreate() have this: super.oncreate(bundle); getwindow().addflags( windowmanager.layoutparams.flag_force_not_fullscreen); getwindow().clearflags(windowmanager.layoutparams.flag_fullscreen); still, curious enough, nativation bar still not appear on it's own. there property should using in styles make correct? thank you. style.xml <resources> <style name="appbasetheme" parent="theme.appcompat.light"> </...

c++ - Invalid use of template-name 'BigNumber' without an argument list -

hi keep having error message part "bignumber b1,b2,res;" @ button, can any1 me out please, here code. tried adding class, none of them worked, know t might simple alot of guys here,but starting c++, still trying hang of it, please help, many thanks. template <class t> class bignumber { public: bignumber(); ~bignumber(); }; template <class t> bignumber<t>::bignumber(){ front = null; current = null; } template <class t> bignumber<t>::~bignumber(){ } bignumber b1,b2,res; } bignumber template class. so, have provide arguments substitute template parameters. bignumber<int> b1; here int template argument replace template parameter t .

spring - Build url with 'sec:authentication="name"' -

i know if there possibility build url. what use: spring boot + spring security thymeleaf with following expression, username sec:authentication="name" if following, current username display <span id="username" sec:authentication="name">testuser</span> but build url following: <a th:href="@{'~/' + __${{sec.authentication='name'}}__ + '/edit'}" class="text-left">settings</a> with following error: org.springframework.expression.spel.spelevaluationexception: el1009e:(pos 4): property or field 'authentication' cannot set on null any suggestions? thanks in advance. as it's described in docs here: https://github.com/thymeleaf/thymeleaf-extras-springsecurity3 your url should be: <a th:href="@{|~/${#authentication.name}/edit|}" class="text-left">settings</a>

java - Performance issue in Hibernate while using session.merge -

i have method : // method session session = context.gethibernatesession(); transaction tx = session.begintransaction(); private void method(tablealist alist) { for(a : alist) { session.merge(a); } tx.commit(); } when alist contains more 40 50 objects of table a, it's becoming slow , taking lots of time complete. how resolve issue? entity a: /** * persistent class database table. * */ @entity @table(name="a") public class implements serializable { private static final long serialversionuid = 1l; @embeddedid private apk id; @column(name="action_cd") private string actioncd; @column(name="ad_lmt") private bigdecimal adlmt; @temporal( temporaltype.date) @column(name="beg_dt") private date begdt; @column(name="beg_time") private string begtime; @column(name="cst_rma") private bigdecimal cstrma; private string deal; @temporal( temporaltype.date) @column(name="end_dt") private date enddt; @colum...

ios - Adobe AppMeasurement Library Changed -

i using appmesurement library adobe tracking application. when tring convert application 64bit architecture found appmeasurement library outdated. tried searching adobe site catalyst download library instead found adbmobile . has adobe changed appmeasurement class , instead have implement adbmobile classes or there still repo can find appmeasurement file , libappmeasurement.a file support 64 bit architecture. any appreciated i've been looking in anticipation of having same upgrade you're working on. i'm afraid don't have practical solution haven't started upgrade yet, i've been looking @ guide starting point estimate effort involved: https://marketing.adobe.com/resources/help/en_us/mobile/ios/migration_v3.html taking @ source code on github looks though have indeed changed namespace of files. as painful it's going both of perform upgrade, it's better commit time , code latest version, try find older version reduces effort. edit ...