Posts

Showing posts from February, 2012

jsf - Using converter for custom objects in selectCheckboxMenu doesn't work -

this question has answer here: <f:selectitems> shows tostring() of model item label 1 answer i trying use converter custom objects, used in primefaces' selectcheckboxmenu . this jsf part: <p:outputlabel value="#{msg.cars}: " for="cars" /> <p:selectcheckboxmenu id="cars" value="#{controller.selected.cars}" converter="carconverter" label="#{msg.cars}" filter="true" filtermatchmode="startswith" panelstyle="width:200px"> <f:selectitems value="#{controller.available.cars}" /> <f:converter converterid="carconverter" /> </p:selectcheckboxmenu> and converter: @facesconverter("carconverter") public class carconverter implements converter { @override public object getasob

MS Access: unbound text box for dcount with date parameters -

i have 2 tables in 1-many relationship: person - application every time person meets criteria, new record created in application, , today’s date added field app_outawarddate . i want add unbound text box person form display, on selecting person’s record, number of times app_outawarddate has been populated in last 28 days, counting number of applications in last 4 weeks. in way worker warned before progressing may not eligible further award @ time. i’ve been using following, returns ‘0’: =dcount("app_perid","application","app_outawarddate" between date() , date()-28) person table per_id = primary key application table app_id = primary key app_perid = foreign key (for person) app_outawarddate i have near 0 experience of calculated fields, gratefully received. red the 3rd argument of dcount must valid sql string. for between , dates must in correct order (between earlier , later). to check date, use =dcount(&

angular - Ng2 pagination- template error with ngFor -

i doing simple pagination angular2 ng2-pagination follows: div class="col s12 m6" *ngfor="#analytic of _sessionanalyticsservice.useranalytics | paginate: { itemsperpage: 4, currentpage: p }; #i=index"> {{analytic}} </div> <pagination-controls (pagechange)="p = $event" #api></pagination-controls> here above part in div working fine , getting records according specified items per page. but pagination-controls tag throwing following error: exception: template parse errors: can't bind 'ngfor' since isn't known native property (" <li [class.current]="getcurrent() === page.value" [error ->]*ngfor="let page of pages"> <a (click)="setcurrent(page.value)" *ngif="getcurrent() !== p"): paginationcontrolscmp@16:58 can't bind 'ngforpage' since isn't known native property (" <li [class.c

powershell - Error when converting to EWSId on Exchange 2013 works ok on Exchange 2010 -

hello when run following piece of code. $service.impersonateduserid = new-object microsoft.exchange.webservices.data.impersonateduserid([microsoft.exchange.webservices.data.connectingidtype]::smtpaddress, $mailboxname) function convertid{ param ( $owaid = "$( throw 'owaid mandatory parameter' )" ) process{ $aiitem = new-object microsoft.exchange.webservices.data.alternateid $aiitem.mailbox = $mailboxname $aiitem.uniqueid = $owaid $aiitem.format = [microsoft.exchange.webservices.data.idformat]::owaid $convertedid = $service.convertid($aiitem, [microsoft.exchange.webservices.data.idformat]::ewsid) return $convertedid.uniqueid } } get folder id ems , bind folder in ews get-mailboxfolderstatistics $mailboxname | foreach-object { $folderid = new-object microsoft.exchange.webservices.data.folderid((convertid $_.folderid)) $ewsfolder = [microsoft.exchange.webs

c# - How to refactor such a big IF-ELSE statement -

i have such big if-else statement. how can refactor it? can give example how make more pretty? thanks! public enum firestate { none, nonetominor, minor, minortonone, minorrecovery, minortomajor, major, majortonone, majorrecovery } private static firestate getfirestate(int previousrespincount, int currentrespincount, bool isrecovery) { firestate fire = firestate.none; if ((isrecovery || previousrespincount == 0) && currentrespincount < minorjackpotminrange) { fire = firestate.none; } else if (previousrespincount == 0 && (currentrespincount >= minorjackpotminrange && currentrespincount < minorjackpotmaxrange)) { fire = firestate.minorrecovery; } else if (isrecovery && currentrespincount >= minorjackpotmaxrange) { fire = firestate.majorrecovery; } else if (previousrespincount == (minorjackpotminrange - 1) &&

python - QPainter::begin: Paint device returned engine == 0, type: 0 -

i started watching tutorials python , qt ( https://www.youtube.com/watch?v=eq7__6y0jwo&index=3&list=pl19dciiwvefyqxldtwlxq4lnzdpw6_r-q ) i'm getting error "qpainter::begin: paint device returned engine == 0, type: 0" , can't figure out why. idea want have window works in 3dsmax, modo , maybe standalone (both 3dsmax , modo come pyside). any ideas? here code: from pyside import qtcore, qtgui import sys class palettelistmodel (qtcore.qabstractlistmodel): def __init__(self, colors=[], parent=none): qtcore.qabstractlistmodel.__init__(self, parent) self._colors = colors if __name__ == '__main__': app = qtgui.qapplication(sys.argv) listview = qtgui.qlistview() listview.show() red = qtgui.qcolor(255, 0, 0) green = qtgui.qcolor(0, 255, 0) blue = qtgui.qcolor(0, 0, 255) model = palettelistmodel([red, green, blue]) listview.setmodel(model) sys.exit(app.exec_()) thanks, nick the

python - openpyxl loop through two spreadsheets match primary key and find differences -

is there way in python using openpyxl loop through 2 spreadsheets , link them primary key , find differences in column. example below uses "name" primary key , creates new column differences example new.xlsx: bob, 1 jim, 2 steve, 3 old.xlsx: bob, 100 steve, 200 results on new.xlsx: bob, 1, 99 jim, 2, 0 steve, 3, 197 something this wb1 = load_workbook(r'new.xlsx') wb2 = load_workbook(r'old.xlsx') ws1 = wb1.get_sheet_by_name("sheet1") ws2 = wb2.get_sheet_by_name("sheet1") rownum in range(2, ws1.max_row): ws1row = ws1.cell(row=rownum, column=1).value ws1row2 = ws1.cell(row=rownum, column=2).value rownum2 in range(2, ws2.max_row): ws2row = ws2.cell(row=rownum2, column=1).value ws2row2 = ws2.cell(row=rownum2, column=2).value print ws2row if ws2row == ws1row: ws1.cell(row=rownum, column=3).value = ws1row2 - ws2row2 wb1.save(r'new.xlsx') there 2 possibilitie

Method acceptAlert() doesn't work in Intern/Leadfoot -

i can't understand how use acceptalert() method. doesn't work me. try accept pop-up alert 2 buttons: ok , cancel. here piece of testing code. querydatasource: function (kibiurl, title, description, datasource, query) { return this.remote .get(require.tourl(kibiurl)) .setfindtimeout(3000) .sleep(3000) .findbycssselector('input[ng-model="query.title"]') .clearvalue() .type(title) .end() .findbycssselector('input[ng-model="query.description"]') .type(description) .end() .findbycssselector('option[label="'+ datasource +'"]') .click() .end() .findbyname('sqlquery') .findbyclassname('ace_text-input') .type(query) .end() .findbyxpath('//button[@class="btn btn-success"]') .click() .end() .sleep(1000) .acceptalert() .then(function (text) { console.log(text); })

windows - Trying to copy JAR file from local machine to linux server -

i trying copy jar file local machine linux(centos) server, getting error. this command: pscp watch.jar dev@10.10.40.74:/home/dev/documents watch.jar name of jar , dev user on server. trying copy file particular location(home/dev/documents) the error got is: watch.jar: network error occurred http://i.stack.imgur.com/avbij.png and when run java -jar watch.jar on linux server, says error: invalid or corrupt file. any appreciated.

telephony - How to detect conference call in Android? -

i suggestions on detecting conference call on going call. looked @ documentation didn't got hint it. https://developer.android.com/reference/android/telephony/telephonymanager.html

entity framework - UML sequence for validation before saving -

Image
i'm new uml i'm tasked draw uml diagrams describe complex parts of our system. one of these parts saving of data in db, , steps said data goes through before can saved. these steps involved: user wants save app validates mandatory fields have values set if not valid, app shows message. if valid, app sends post request the controller maps dto domain model object , passes service layer service layer validates model according business rules. if not valid, throws validation exception if valid, model moves down data access layer, ef used commit changes db on trying commit, ef might throw validation exception (mapping) or database exception (bubbled db itself) if commit succeeds, model passed controller maps dto counterpart , displayed user if validation or database exception thrown, these displayed user so far came with: is enough display above steps or might there improvements diagram? in sequence diagrams show interaction between classes or objec

excel - C# ArgumentOutOfRangeException while reading ExcelWorksheet -

Image
i'm reading officeopenxml.excelworksheet , getting argumentoufofrangeexception on middle of collection. i'm reading process.information = sheet.cells[line, i++].text; . on line i = 22 while sheet.dimension.column = 28 . when i'm debugging , enumerate collection see exception thrown on method .text while .value method showing correct value. according exception stack trace, exception being thrown system.text.stringbuilder.insert() method ---- edit ---- after accepted answer realized problem not on read. reply same file column (import success or insuccess) , while i'm doing sheet formatation again same error, due method system.text.stringbuilder.insert(). i'm trying autofit column sheet.column(22).autofit() stack trace at system.text.stringbuilder.insert(int32 index, char* value, int32 valuecount) @ system.text.stringbuilder.insert(int32 index, char value) @ officeopenxml.style.xmlaccess.excelnumberformatxml.excelformattranslator.tonetformat(st

javascript can't get object property value -

Image
i have javascript object below: var row = { 'fileattribute' : { '.\k\ar- #%i\.n/a': true, 'size': '2040', 'type' : 'pdf' } }; but when try value of row.fileattribute['.\k\ar- #%i.n/a'] , undefined instead of true. i know it's beacuse property name contains special characters. row.fileattribute.hasownproperty('.\k\ar- #%i.n/a') returns false. i tried extract property values _.values(row.fileattribute['.\k\ar- #%i.n/a']) , got empty array. my console: here example of issue: http://jsfiddle.net/fvu2pqzz/8/ i appreciate help, thanks! you need use bracket notation console.info(row.entity.fileattribute['.kar- #%i.n/a']); var row = { 'entity' : { 'fileattribute' : { '.\k\ar- #%i\.n/a': true,

PHP array merge / map of two arrays -

i have 2 arrays, 1 contains options, , second 1 contains default values. the options arrays looks this: $options = array( "seriesa" => array( "a1" => array( "text" => "a1", "value" => "a-001" ), "a2" => array( "text" => "a2", "value" => "a-002" ) ), "seriesb" => array( "b1" => array( "text" => "b2", "value" => "b-001" ), "b2" => array( "text" => "b2", "value" => "b-002" ) ), ); and have array contains default value, , looks this $defaults= array( "seriesa" => "a-002", "seriesb" => "b-001", ); what end 1 array cont

npm install - npm err! fetch failed in jenkins? -

getting following errors in jenkins.. help npm err! fetch failed https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.5.tgz npm warn retry retry, error on last attempt: error: fetch failed status code 502 npm err! fetch failed https://registry.npmjs.org/uid-safe/-/uid-safe-1.0.1.tgz npm warn retry retry, error on last attempt: error: fetch failed status code 502 something cdn hosting of version 1.0.5. can force dependency using cookie-signature require 1.0.6. express dependent on module , able resolve issue so: "express": { "version": "~4.9.0", "from": "express@~4.9.0", "dependencies": { "cookie-signature": { "version": "1.0.6", "from": "cookie-signature@1.0.6" } } },

android - Recycler view in a recycler view -

i looking solution solves problem of dynamic list in turn contains dynamic list of rows. i have recycler view holds card view holds recyclerview. can see parent recycler view showing child recycler not showing up. {{recyclerview{cardview{recyclerview}}} getitemcount method being called other methods such oncreateviewholder , bind not being called. i have made sure both recycler views have linearlayoutmanager implemented , have setfixedsize true. i believe issue xml layout. maybe not coming in focus hence not calling overridden methods,as recylerview becomes unavailable.make sure padding,height , rest other things such child recyclerview visible.actually when implemented it, faced same issue , reason xml layout same reason second recyler not visible due overpadding , margin.

Makefile processing files with same extension -

this seems related how write makefile target , source files have same extension? . in question extensions same, input , output files seem in same directory , filenames being conditionally renamed. i have large collection of .txt files in ../src/ need processed, , dumped ./ (which directory called target/ ) txt files of same name. want use make , files in ../src/ have been changed updated in ./ . prototype working before put real code in. my makefile in ./ follows: dir = ../src inputs = $(wildcard $(dir)/*.txt) outputs = $(patsubst $(dir)/%.txt,%.txt,$(inputs)) all: $(outputs) .phony: $(inputs) check: @echo "dir = $(dir)" @echo "inputs = $(inputs)" @echo "outputs = $(outputs)" %.txt: $(dir)/%.txt sed -e "s/test/cat/g" "$<" > $@ for now, contents of ../src/ test1.txt , test2.txt . makefile stands now, running make test2.txt generates file expected. target/ $ make test2.txt sed -e "s

How to save credit card details in Paypal vault via Android and how to retreave them to use them in future -

i need integrate paypal payment in application. have integrated same reffering below links: https://developer.paypal.com/docs/classic/mobile/ht_mpl-itempayment-android/ http://www.theappguruz.com/blog/integrate-paypal-in-android now, if use credit card payment. can process payment using paypal. concerned issue: if need use credit card again perform other payment. need card should saved in vault of paypal server , should shown in application wallet. , required information such cvv no. or pin etc. should entered user , card can perform operation. using below link. doesn't clear thoughts how use it. https://developer.paypal.com/docs/integration/direct/rest-vault-overview/ can provide me or guidance same? we can call vault pay pal api using retrofit library , following steps mentioned in below 2 links of pay pal.first have call first restful pay pal api access token.once access token can call vault api of pay pal store credit card.below links pay pal restfu

java - Version and snapshot release to releases, only version release is needed. Why two releases? -

i created org.ciwise group , ciwise artifact. yesterday deployed 1.2.0-snapshot snapshot repo "mvn package gpg:sign deploy". fine. manually changed version 1.2.0 , did same. looked fine in maven console output. when visit releases repo, see 1.2.0-snapshot , 1.2.0 can me determine why snapshot in releases? expected 1 latest version 1.2.0 because changed version in pom.

swift - EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, sub code=0x0). error while making data structure -

i practicing array form of data structure swift. i made class "student" and there functions display() , delete() however, application not working. there error message exc_bad_instruction (code=exc_i386_invop, sub code=0x0). i think error "optional" problem. here code. class student { var studentarray = [[string]?]() var numberofstudents : int = 10; func display() { (var = 0; < numberofstudents ; i++) { print("{"); (var j = 0; j < 2; j++) { print(studentarray[i]![j] + " "); } print("}"); } } func delete( value : string) { var = 0 ( = 0; < numberofstudents ; i++) { if (value == studentarray[i]![1]) { break; } } if (i == numberofstudents - 1 ) { print("not found"); } else { (var k = i; k <

javascript - setTimeout() not working in return value -

i have add settimeout it's not working. want show question after 5 sec of end of sound. self.getquestiontext = function() { startsound('levelq', false); settimeout(function() { return self.questions[self.level() - 1].question;}, 5000); } settimeout() in asynchronous , returns value in callback function. change structure of js. instead of: self.getquestiontext = function () { startsound('levelq', false); settimeout(function () { return self.questions[self.level() - 1].question; }, 5000); } // rest of code use callback structure: self.getquestiontext = function () { startsound('levelq', false); settimeout(function () { self.getquestiontext = self.questions[self.level() - 1].question; // rest of code }, 5000); }

android - FirebaseAuthUserCollisionException? -

i using firebase documentation use facebook login android application. able login users using google , twitter. when click on login facebook, button changing logout button. should redirect login success activity, because configured firebaseauth.authstatelistener . i posting activity here, please let me know if doing wrong. public class mainactivity extends appcompatactivity implements googleapiclient.onconnectionfailedlistener { private static final string tag = "mainactivity"; private static final int google_rc_sign_in = 9001; private static final int twitter_rc_sign_in = 140; private firebaseauth mauth; private firebaseauth.authstatelistener mauthstatelistener; private googleapiclient mgoogleapiclient; callbackmanager callbackmanager; @bindview(r.id.google_signin_button) signinbutton mgooglesigninbutton; @bindview(r.id.facebook_login_button) loginbutton mfacebookloginbutton; @bindview(r.id.twitter_login_button) twitterlogi

jquery - FOS UserBundle Login from external Site (use as API in Cordova) -

i have project utilizes fos userbundle login. want write cordova app logs in project , gets data provide via json. i have this, works on local: $.get('http://192.168.10.30/app_dev.php/login', function (data) { */ token */ var $result = $(data).find('input:hidden[name="_csrf_token"]'); $.post('http://192.168.10.30/app_dev.php/login_check', { _csrf_token: $result.val(), target_path: 'mainpage', _username: 'username', _password: 'password' }).done(function (postdata) { console.log(postdata); }); }); postdata shows need. works on dev server, same origin. moving app cause give me cross origin alert, know that. question is, right way approach such thing? how else can "behind" login of project outside?

html - Show text on hover on polygon in SVG -

Image
is possible add text on hover svg polygon shape? my code this <svg> <polygon class="st0" points="0,1.833 638,1.833 383,348.833 0,348.833 "/> <polygon class="st0" points="0,355.333 649,355.333 891.5,664.833 0,664.833 "/> <polygon class="st0" points="392.5,348.833 514.75,181.333 645.25,348.833 "/> <polyline class="st0" points="518.875,174.908 644.667,2.021 1139.833,1.52 1139.75,663.583 897.25,663.583 "/> </svg> when checked many reference there examples single polygon, on code need 4 shape different text in svg tag. possible add text on hover multiple polygons? here fiddle have when hover want any advice appreciated yo can add <title>your text</title> tag inside <svg></svg> or <poligon></poligon> tag shows default tooltip text on it. updated jsfiddle source:

bash - Continue make command even if one operation within fails -

this question has answer here: make: how continue after command fails? 7 answers i'm looking way continue make command in event of error failure. i need way of wrapping command doesn't respond exit code 1. test: exit 1 ;\ echo 'hi' ;\ i need way wrap this: example: somecommand && othercommand ;\ echo 'hi' ;\ where somecommand can exit 1 (error) , not run othercommand or 0 run othercommand . prefixing recipe - tells make ignore errors returned line, other thing need run 2 recipes separately. example: -somecommand && othercommand echo 'hi'

perl - Why won't AnyEvent::child callbacks ever run if interval timer events are always ready? -

update issue can resolved using fixes present in https://github.com/zbentley/anyevent-impl-perl-improved/tree/io-starvation context: i integrating anyevent otherwise-synchronous code. synchronous code needs install watchers (on timers, child processes, , files), wait @ least 1 watcher complete, synchronous/blocking/legacy stuff, , repeat. i using pure-perl anyevent::loop -based event loop, enough purposes @ point; of need signal/process/timer tracking. the problem: if have callback can block event loop moment, child-process-exit events/callbacks never fire. simplest example make watches child process , runs interval timer. interval timer blocking before finishes: use anyevent; # start timer that, every 0.5 seconds, sleeps 1 second, prints "timer": $w2 = anyevent->timer( after => 0, interval => 0.5, cb => sub { sleep 1; # simulated blocking operation. if removed, works. "timer"; }, ); # fork off pid waits

mysql - Count the best from column league -

i have table builded in sql fiddle. query counting how longest run in column more withe value vg1 before come vg2. using 'pero' count it. working. now have column mix, , need edit query count best longest run column league='mix'. this current state of query: select count(*) results join (select max(str_to_date(datum, '%d.%m.%y')) d results more != 'vg1' , home = 'pero') dt on str_to_date(datum, '%d.%m.%y') > dt.d home = 'pero'; sqlfiddle: http://sqlfiddle.com/#!9/21dd8/1/0 new version: http://sqlfiddle.com/#!9/e8de48/3/0

c++ - Login not working in IE11 .But working properly on Chrome and Firefox -

there c++ firmware code used set cookie browser follows sprintf(sztmp, "set-cookie: cgisessid=%s; language=en; max-age=%d; version=1; expires=%s; path=/", m_szsid, p_uncookielifetime, outstr); fprintf( io.output, "%s\r\n", sztmp ); the cookie goes output stream , gets set in ie-11 when try retrieve cookie using name "cgisessid" null returned.from understand ie11 not storing cookie there way resolve this. tried following way: go settings->internet options-> privacy , selected accept cookies still not working . actually setting cookie login purpose. please let me know if can help. regards, sid

asp.net mvc - ViewResult class result not work when i submit a form method post for redirect to another view -

when sumit form want redirect page viewresult class. filter code : [validatespamfilter(duration: 60, isaddress: false, keeprequestincache: true)] // httppost method submit form . can add comment method . [system.web.mvc.httppost] public actionresult addcomment(commentadddto comments) and filtercontext.result = new viewresult { viewname = "~/error/index" }; this work actionresutland partialviewresult get methods. want uses actionresutland post method . because submit form method , below error '~/error/index' or master not found or no view engine supports searched locations. following locations searched:\r\n~/error/index"

c# - How to Insert label value into MS Access Database -

i tried inserting label value ms access codes below keep getting "syntax error in insert statement". please help. thanks private void button1_click(object sender, eventargs e) { label2.text = "born win"; label4.text = "£10"; connection = new oledbconnection(@"provider=microsoft.ace.oledb.12.0;data source =c:\users\kunle\documents\winners app\winnersbookshop.accdb;persist security info=false"); connection.open(); oledbcommand command = new oledbcommand(); command.connection = connection; try { command.commandtext = "insert transaction([title], [price]) values('" + label2.text + "','" + label4.text + "')"; command.commandtype = commandtype.text; command.executenonquery(); messagebox.show("successfully"); } catch (exception r) {

java - Cannot login with custom loginProcessingUrl -

i'm building rest service spring , using spring security. default solution loginform doesn't pass me. here it's websecurityconfig: public class websecurityconfig extends websecurityconfigureradapter { class postauthsuccesshandler implements authenticationsuccesshandler { @override public void onauthenticationsuccess(httpservletrequest httpservletrequest, httpservletresponse httpservletresponse, authentication authentication) throws ioexception, servletexception { httpservletresponse.setstatus(200); } } class postauthfailurehandler implements authenticationfailurehandler { @override public void onauthenticationfailure(httpservletrequest httpservletrequest, httpservletresponse httpservletresponse, authenticationexception e) throws ioexception, servletexception { httpservletresponse.setstatus(403); e.printstacktrace(new printwriter(httpservletresponse.getoutputstream())); }

How to make a Java console output a environment variable in Jenkins? -

Image
i new jenkins , though found few similar questions, none of solutions seemed work me way need to. might basic problem me it's big deal i'm struggling with. basically, built project executes java selenium code, displays session id in jenkins' console output , that's need add environment variables used in projects triggered after completion of one. i tried groovy scripts don't think understand enough how work , whatever given, wasn't hoped get. has done similar provide tips on how achieve that? many thanks there 2 options (in theory, 1 of them doesn't work, see 2. below) depending on whether printing under control or not. printing under control: write session id properties file, e.g. from-build-log.properties : sessionid=... add post-build action → trigger parameterized build on other projects → this plugin triggers builds on other projects, parameters predefined, or supplied finished build. every parameter passed tar

ios - Keep track of all running blocks -

i have list of objects. each of objects contains optional image value, needs dowloaded. want return list after images has been initialised(if any). have nsoperationqueues? func getfulllist(list:[anyobject], completion:(result: [anyobject]) -> void { item in list { downloadimage(item.url), completion: {(image) in item.image = image )} // know not work here completion(result: list) } untested code. func getfulllist(list:[anyobject], completion:(result: [anyobject]) -> void { let group = dispatch_group_create() item in list { dispatch_group_enter(group) downloadimage(item.url), completion: {(image) in item.image = image dispatch_group_leave(group) } )} dispatch_group_notify(group, dispatch_get_global_queue(dispatch_queue_priority_default, 0)) { completion(result: list) } }

Where is LogStash's log file on mac? -

i using .tar.gz package of logstash 2.3. logstash's log file locate? can find related info logstash 5.0. help! allen okay. found answer myself. log printed terminal. however, if want them printed log file, specify bin/logstash -l {path_to_log_file.txt}

javascript - Event displayed twice in fullcalendar -

Image
in calendar,i have 2 kinds of events. 1.ordinary events 2.holiday events i using 'eventsources' show events in calendar database. eventsources: ["/calendar/show_events","/calendar/show_holidays"] the holiday events given full background color title displayed @ middle. achieve, use 'eventafterrender' eventafterrender: function(event, element, view) { element.append(event.title); } so works fine. now, normal events listed/displayed twice in cell. can tell me why getting this. want events not duplicated. calendar sample image is:-

icu4j-2.6.1.jar: java.lang.IllegalStateException: Unknown tag! pos=40 poolCount = 47 -

recently working in migration project existing application required upgraded jboss5 jboss7 when deploying existing wars new jboss7 server, getting below warning. 016-06-07 12:21:05,841 warn [org.jboss.as.server.deployment] (msc service thread 1-4) jbas015852: not index class com/ibm/icu/impl/data/localeelements_zh__pinyin.class @ /../../web-inf/lib/icu4j-2.6.1.jar: java.lang.illegalstateexception: unknown tag! pos=40 poolcount = 47. i suppose remove these type of warnings. please suggest me. i have found 1 solution. looks icu4j-2.6.1.jar not compatible jboss7. so have changed version , using icu4j-4.8.1.jar instead of previous one. can not see warning.

c# - Linq-SQL Generic GetById with a custom Expression -

i've created generic target tables in database. i've added generic .where() expression containing 1 parameter in lambda expression. there way can add more 1 parameter in same expression? please ignore fact below method returns 1 item, make return ilist. here's method: public virtual t getbyid( int32 id, string somestringcolumn ) { parameterexpression itemparameter = expression.parameter( typeof( t ), "item" ); var whereexpression = expression.lambda<func<t, boolean>> ( expression.equal( expression.property( itemparameter, "id" ), expression.constant( id ) ), new[] { itemparameter } ); return context.set<t>().where( whereexpression ).firstordefault(); } my actual intentions method later perform contains() on "string" properties of target table "t". below , append above expression check if string property contains value in "some

Syntax for calling child relationship with a condition on the parent in Laravel -

i have model called 'tag' has self-referencing 'hasmany' relationship on itself. example have tag called uk , 'has many' child tags called london, liverpool, manchester etc. here relationship in tag model file: public function children() { return $this->hasmany('app\tag', 'tag_parent'); } i want list of child cities parent 'uk' tag. have code: $cities = tag::where('title', 'uk')->get()->children; i getting error saying children unknown. docs should works expected. $cities = tag::find($id)->children; so how list of child cities 'where' condition? thought tag::find($id) shortcut tag::where('id', $id)->get()? update exact error: errorexception in tagcontroller.php line 28: undefined property: illuminate\database\eloquent\collection::$children as @revo mentioned, use with method. it's called eager loading in laravel. tag::with('children')->w

XSLT handling same XML node in different ways in different places of the HTML document -

i want have template creating table of contents @ top of html document, , want able click each item in table more detailed information it, is, jumps appropriate detailed section further down in document. sort of like: table of contents: node1 (clicking takes bolded node1 below) node2 node3 other stuff ... ... node1 description: blah content: 1.55 version: 1.55 rough xslt code: // create table of contents <table border="1"> <tr bgcolor="#9acd32"> <th style="text-align:left">name</th> </tr> <xsl:for-each select=""> <xsl:apply-templates select="my_node"/> </xsl:for-each> // other stuff // create detailed view (code omitted because don't know how yet) // template node <xsl:template match="my_node"> <tr> <td><xsl:value-of select="../@name"/></td> <

Is it possible to Import * in typescript -

is possible import of exported classes , function in .ts file @ 1 using * import * './mymodule'; i don't want import * me './mymodule'; , call functions me.myfunc i want python from mymodule import * no, not possible. either have specifiy want import this: import {someclass, someinterface} './somemodule'; or import variable , call there stated: import * somemodule './somemodule'; you can import module without assigning variable it, if don't need functionality in module. useful, if sets global state: import './somemodule';

c# - Allow Upgrade of Application -

i trying allow upgrade of application. if user installs 1.0.0 next time release version can give them 1.1.0 , can install that. overwriting | removing | replacing first version there should installed one version in control panel -> uninstall or change program. my problems are: if don't set product id equal * (use $(var.productid)" instead) another version of product installed. installation of version can not continue ... if set equal * installs new version , have 2 versions installed. i have created simple wix application test this. <?xml version="1.0" encoding="utf-8"?> <?define productversion="!(bind.fileversion.myassemblydll)"?> <?define upgradecode="f4d7f199-28f6-45d5-ad99-7c62938274be"?> <?define productid="{6408d956-40da-4aee-883e-5425f1562004}"?> <?define version="1.2.0"?> <wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

Calling the Google API for Javascript in Ionic framework (working on web, not working on Android) -

i have log in users google, have imported google api (for javascript) in app, this: <script src="https://apis.google.com/js/client.js?onload=onloadcallback"></script> the onloadcallback this: function onloadcallback() { try { // set public api access key gapi.client.setapikey(my_api_key); gapi.client.load('plus', 'v1', function(){}); } catch (e) { console.console.log(e); } } then, have button that, upon clicking on it, triggers function singin(): var clientid = client_id web; //web //var clientid = client_id pc; // pc var scopes = 'https://www.googleapis.com/auth/plus.me'; $scope.signin = function() { var config = { 'client_id': clientid, 'scope': scopes, 'immediate': false }; gapi.auth.init(function(){ gapi.auth.authorize(config, function(){ var token = gapi.auth.gettoken(); if(!token.error){ $state.go('app.projects'); } }

node.js - How to consume npm modules from typescript? -

i'm giving shot @ typescript. works fine @ hello world stage. i'm trying use npm module : index.ts = import _ = require('lodash') console.log(_.toupper('hello, world !')) this doesn't work : tsc index.ts -> cannot find module 'lodash'. (2307) node-ts index.js -> cannot find module 'lodash'. (2307) looking @ typescript documentation , in google didn't help. other s/o questions either unanswered ( here , here ) or unrelated. elements : typescript 1.8 latest yes, lodash installed npm --save lodash , exists in filesystem (checked) i did typings --save lodash variants import * _ 'lodash' or const _ = require('lodash') don't work either i tried tweaking tsconfig.json options suggested in other answers "moduleresolution": "node" , "module": "commonjs" suggested in answers, still doesn't work how consume npm package in typescript ??

cmake - Build aruco 2.0.5 on Windows 8 -

i trying install aruco on windows machine using cmake 3.5.2 suggested the aruco developper . config: windows8 cmake 3.5.2 aruco 2.0.5 i can configure , generate aruco in cmake then go aruco\build -> right click-> open cmd -> type mingw32-make -> following error c:\aruco-2.0.5\build>mingw32-make scanning dependencies of target aruco [ 2%] building cxx object src/cmakefiles/aruco.dir/ar_omp.cpp.obj [ 4%] building cxx object src/cmakefiles/aruco.dir/cameraparameters.cpp.obj [ 6%] building cxx object src/cmakefiles/aruco.dir/cvdrawingutils.cpp.obj in file included c:\aruco-2.0.5\src\aruco.h:149:0, c:\aruco-2.0.5\src\cvdrawingutils.h:31, c:\aruco-2.0.5\src\cvdrawingutils.cpp:28: c:\aruco-2.0.5\src\markerdetector.h:160:40: warning: "/*" within comment [-wcomm ent] aruco_mip_36h12, //**** recommended ^ c:\aruco-2.0.5\src\markerdetector.h:212:60: warning: unused parameter 'r2' [-wun