Posts

Showing posts from April, 2010

How to convert a String data type to XML format in Java? -

i working on web application , values capture form passed stored procedure. now, 1 of parameters of stored procedure accepts xml string. parameter called "detailold" , have no clue how convert string values form xml string. can please me out? @override protected void dopost(httpservletrequest request, httpservletresponse response) throws servletexception, ioexception { // processrequest(request, response); printwriter out1 = response.getwriter(); out1.println("hey"); try { // processrequest(request, response); out1.println("servlet "); class.forname("com.microsoft.sqlserver.jdbc.sqlserverdriver"); } catch (classnotfoundexception ex) { logger.getlogger(connectioncheck.class.getname()).log(level.severe, null, ex); } connection conn = null; preparedstatement mystmt = null; int num = -1;

ios - Project wont run on simulator in xcode 8 -

after upgrading xcode8, project no longer run on simulator (runs on device) error: /users/johnsmith/library/developer/xcode/deriveddata/jt-fnslglvifmonzwhlgrchcqujqiwt/build/products/debug-iphonesimulator/ assets.bundle: directory command /usr/bin/codesign failed exit code 1 i have deleted entire deriveddata folder , cleaned project several times no success. ideas how fix please? if using cocoapods (especially older version), you'll notice resource bundle targets in pods project file don't have info.plist. set them using cocoapods generic info.plist , it'll run. not permanent solution. reset on next pod install https://forums.developer.apple.com/thread/66538 edit: if don't happen have generic plist file in project create new file info.plist in pods target support files/pods-<app name>/ , paste this <?xml version="1.0" encoding="utf-8"?> <!doctype plist public "-//apple//dtd plist 1.0//en" &q

javascript - in nodejs access variable outside callback like gloabal varaible -

this question has answer here: how return response asynchronous call? 21 answers var coll= ''; function test(callback){ mongoclient.connect(url, function(err, db) { if(err) throw err; coll=db callback(coll); }); } test(); console.log(coll) this code. when print 'coll' variable says undefined. how access variable outside of callback. getting error callback not function you not passing callback function argument test() function, therefore statement in test() function: callback(coll) , throw error ending script prior calling console.log(coll) .

Annotation processing with kapt Android Studio -

Image
i'm trying use kapt using annotation processor. ran few problems. annotation processor jar connected way: kapt files('libs/processor.jar') provided files('libs/processor.jar') 1) i'm using javapoet code generation. , saving class way javafile javafile = javafile.builder(package, typespec).build(); javafile.writeto(processingenv.getfiler()); but saves build\generated\source\kapt\release, , never debug folder regardless of build variant. 2) second problem generated file doesn't refresh, until press build->rebuild the kotlin-kapt plugin automatically select correct output directory based on built library/application variant. when building project single com.android.application module, android studio use application variant selected in "build variants" menu. this not true library modules, which, if not configured otherwise, publish release build variant – even when select "debug" modules i

php - How can I set column name as the name of .csv file's column? -

Image
i have code creates .csv export of table. here code: public function export(request $request){ header('content-type: application/excel'); header('content-disposition: attachment; filename="export.csv"'); $tb_name_alias = $request->tb_name; $convert_alias_to_table_name = array('person' => "app\\persons"); $tb_name = $convert_alias_to_table_name[$tb_name_alias]; $arr = $tb_name::all()->toarray(); $newarr = array(); $size_of_outer_array = sizeof($arr); ( $i = 0; $i < $size_of_outer_array; $i++ ) { $newarr[] = implode(",",$arr[$i]); } $fp = fopen('php://output', 'w'); foreach ( $newarr $line ) { $val = explode(",", $line); fputcsv($fp, $val); } fclose($fp); } it works well, when import again, looks this: as see, column names aren't real .. col1 , col2 , etc ..! need set names column names. id , name

core data - Swift3 CoreData with Extension -

i'm working on core data extensions, , having errors below. terminating app due uncaught exception 'nsinvalidargumentexception', reason: 'executefetchrequest:error: not valid nsfetchrequest.' it's working on host app still, crashing on extensions same codes. debugger stopped when executed managedobjectcontext.fetch(request) func getdatastring() -> string { var result = "" let entitydescription = nsentitydescription.entity(forentityname: "datastring", in: managedobjectcontext)! let request : nsfetchrequest<nsfetchrequestresult> = datastring.fetchrequest() request.entity = entitydescription { let results = try managedobjectcontext.fetch(request) printdebug(message: "\tdatastring count : \(results.count)") if results.count > 0 { let row = results[0] as! nsmanagedobject result = row.value(forkey: "data") as! string }

ios - Open different view on the same viewcontroller -

Image
i have implemented third party menu, , when user pressed on 1 of categories, tableview (not navigation bar or menu, in different viewcontroller) should change different view. when modal segue, navigation bar + menu gone. when push segue, menu gone + want user stay on "same page", not having press button. does have idea on how this? in advance.

c++ - Why for(int i=0; i<10; ++i) and for(int i=0; i<10; i++) return the same? -

why for(int i=0; i<10; i++) std::cout << << std::endl; and for(int i=0; i<10; ++i) std::cout << << std::endl; return same: 0 1 2 3 4 5 6 7 8 9 i expecting pre-increment return: 1 2 3 4 5 6 7 8 9 10 since increments self before return, right? a for loop like for(int i=0; i<10; i++) std::cout << << std::endl; is same following: { int = 0; // loop initializer while (i < 10) // loop condition (and actual loop) { std::cout << << std::endl; // loop body i++; // loop post-expression } } now changing loop "post-expression" i++ ++i not make difference, since result thrown away, , it's performed @ end of loop.

jsf 2 - How to cancel a resize o drag event on Primefaces Schedule -

i have primefaces schedule component: <h:form> <p:growl id="messages" showdetail="true" /> <h:panelgrid columnclasses="value"> <h3>lazy schedule</h3> <p:schedule value="#{visorbean.eventmodel}" timeformat="h:mm" draggable="true" firsthour="8" mintime="8:00" maxtime="22:00" resizable="true" axisformat="h:mm" view="agendaweek"> <p:ajax event="eventmove" listener="#{viwerbean.oneventmove}" update="messages" /> <p:ajax event="eventresize" listener="#{viwerbean.oneventresize}" update="messages" /> </p:schedule> </h:panelgrid> </h:form> and backing bean: public void oneventmove(scheduleentryresizeevent event) { string msg;

perl - Indexing symbol files with P4Index zero files found -

i trying setup symbol server, , hence need symbols indexed map source version. i running p4index on folder solution resides. my disc files , folders: .\calculatordemo\bin\ output produced .\calculatordemo\calculatorapp\ contains source .\calculatordemo\calculatordll\ contains source .\calculatordemo\calculatortest\ contains source in version control path in depot is: //sw/main/internal/calculatordemo/ and workspace is: c:\projects\dev\sw\main\internal\calculatordemo\ when try index no files found.. c:\projects\dev\sw\main\internal\calculatordemo>p4index -debug --- ssindex.cmd [status] : server ini file: c:\program files (x86)\windows kits\10\debuggers\x64\srcsrv\srcsrv.ini ssindex.cmd [status] : source root : c:\projects\dev\sw\main\internal\calculatordemo ssindex.cmd [status] : symbols root : c:\projects\dev\sw\main\internal\calculatordemo ssindex.cmd [status] : control system : p4 ssindex.cmd [status] : p4 program name:

c++ - Is Qt's meta system really that tedious? -

i use qt's reflection mechanism since c++ lacks of feature. seems work, calling macros , helper functions tedious. example register enum proper meta type had go through following steps: declare enum inside of wrapper class contains q_gadget macro. register enum using q_enum macro after that. register class containing enum: q_declare_metatype(myclass) call qregistermetatype<..>() type of wrapping class , each declared enum. now know of steps can omitted if part of full functionality not required. not looking for, need use enums within signals , need able the meta method of signal , query it's parameters type. but still can't thinking there must better/simpler way this. unfortunately, can't less that. q_gadget (or q_object , qobject subclasses) means "generate meta-object information class". q_enum means "generate meta-enum information particular enum". 1 might argue (public?) enumerations in registered class sho

How to run if-else in jexl? -

here 3 int parameters:a,b,c. , 1 string parameter:d. here code in java: if (a>1) return c+d; if (b<2) return c-d; if (d.equals("123") return c*d; return c+1; how turn above code jexl? tried many times, including using var. return null. probably use jexl expression instead of script. can use ternary conditional in expression. if-else, return, for, while should used in script: jexlengine jexl = new jexlbuilder().create(); jexlscript script = jexl.createscript(scripttext); result = script.execute(context); see http://commons.apache.org/proper/commons-jexl/reference/syntax.html from javadoc: an expression different script - reference single expression, not multiple statements. implies 'if','for','while','var' , blocks '{'... '}'are not allowed in expressions. a script valid jexl syntax executed given set of jexlcontext variables. script group of statements, separated semicolons. statemen

deep learning - caffe reshape / upsample fully connected layer -

Image
assuming have layer this: layer { name: "fully-connected" type: "innerproduct" bottom: "bottom" top: "top" inner_product_param { num_output: 1 } } the output batch_size x 1. in several papers (for exmaple link1 page 3 picture on top, or link2 page 4 on top)i have seen used such layer in end come 2d image pixel-wise prediction. how possible transform 2d image? thinking of reshape or deconvolution, cannot figure out how work. simple example helpful update: input images 304x228 , ground_truth (depth images) 75x55. ################# main net ################## layer { name: "conv1" type: "convolution" bottom: "data" top: "conv1" param { lr_mult: 1 decay_mult: 1 } param { lr_mult: 2 decay_mult: 0 } convolution_param { num_output: 96 kernel_size: 11 stride: 4 weight_filler { type: "gaussian" std: 0.01 }

ruby on rails - rvm couldn't install in macOS Sierra -

Image
i following http://railsapps.github.io/installrubyonrails-mac.html set ror environment unfortunately while installing rvm having following issue, , couldn't resolve it. it's not issue warning. you need run following command in order load /.profile source ~/.profile

excel - download .xls file in php(cpanel) using href -

i had .xls file in report folder <a href="http://website.com/report/saleslist.xls" download> <input type="button" class="btn btn-success" value="download report"> </a> was not working. instead: <a href="http://website.com/images/123.png" download> <input type="button" class="btn btn-success" value="download image"> </a> was working. need give permission .xls format files? thanks. change permission of .xls file, chmod($file,0644) in php file auto generating excel file.

javascript - importing goes wrong with systemjs -

i'm trying use existing js library ( validate.js ) in both client , server. i installed using npm, , compiles both server , client. when using in server works great, when execute in browser throws error. the same file used in both cases: import validate = require("validate.js"); export function requestvalidator(data: any): { return (validate any)(data, constraints, { allowempty: true }); } validate asserted any becuase otherwise get: ts2349: cannot invoke expression type lacks call signature. the .d.ts i'm using is: declare module "validate.js" { export interface validatejs { (attributes: any, constraints: any, options?: any): any; async(attributes: any, constraints: any, options?: any): promise<any>; single(value: any, constraints: any, options?: any): any; } export const validate: validatejs; export default validate; } the module exports function, , works in server, in client w

google maps - GMSMarker icon from center (iOS) -

i switched apple maps google maps. issue can't seem find answer how make icon gmsmarker start center rather bottom of image. an example of mean current location dot icon starts centered @ coordinates meant express. gmsmarkers icons start bottom of icon. you can change start position of marker icon property groundanchor . google maps sdk ios documentation : the ground anchor specifies point in icon image anchored marker's position on earth's surface. point specified within continuous space [0.0, 1.0] x [0.0, 1.0], (0,0) top-left corner of image, , (1,1) bottom-right corner. example : the below example rotates marker 90°. setting groundanchor property 0.5,0.5 causes marker rotated around center, instead of base. cllocationcoordinate2d position = cllocationcoordinate2dmake(51.5, -0.127); cllocationdegrees degrees = 90; gmsmarker *london = [gmsmarker markerwithposition:position]; london.groundanchor = cgpointmake(0.5, 0.5); london.r

MongoDB Aggregate lookup in Go (mgo.v2) -

i'm trying implement $lookup functionality in 1 of mongodb queries in go (golang) using mgo package. below collections: folders: "_id" : objectid("22222222222222"), "name" : "media", "level" : 1, "userids": [objectid("4444444444444")] documents: "_id" : objectid("11111111111111"), "title" : "media management", "body" : bindata(0,"pvq6z2nbm4265duo/e2xsyxa5bxko="), "level" : 1, "folderid" : objectid("22222222222222"), // foreign key/field "userids" : [objectid("44444444444444")] below query i've written runs on shell: var query = [ { "$lookup": { "from": "documents", "localfield": "_id", "foreignfield": "folderid", "as": "documents",

javascript - Line break on one enter, paragraph break on two consecutive enter keys on TinyMCE -

tinymce great editor tool. want achieve following : whenever press enter key, new line break (br) should added , cursor should after it. whenever press enter key consecutively 2 times, paragraph(p) tag should added. whenever press enter key consecutively 3 or more times, same behaviour can replicated. ps: pressing shift + enter not solution, can't educate our users. if can't achieved in tinymce, please suggest me more editors, can achieved. normal js/ jquery solution(without editor framework) appreciated too. thank you.

c++ - Opencv with fedora 23 Qt: The program has unexpectedly finished -

the program has unexpectedly finished. starting /home/tamercan/build-myfirst2-desktop_qt_5_7_0_gcc_64bit-debug/myfirst2... /home/tamercan/build-myfirst2-desktop_qt_5_7_0_gcc_64bit-debug/myfirst2 crashed. this main.cpp #include <opencv2/core/base.hpp> #include <opencv2/core/mat.hpp> #include <opencv2/core/types.hpp> #include <opencv2/highgui/highgui_c.h> #include <opencv2/highgui.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/objdetect/objdetect_c.h> #include <opencv2/objdetect.hpp> #include <opencv2/videoio.hpp> #include <iostream> #include <vector> using namespace cv; using namespace std; int main(int argc, char* argv[]) { videocapture cap(0); // open video camera no. 0 namedwindow("myvideo",cv_window_autosize); //create window called "myvideo" // load face cascade (.xml file) cascadeclassifier face_cascade; face_cascade.load( "xml/haarca

haskell - How do I get a Html from a WidgetT site m ()? -

i'm building mail import network.mail.mime.ses , , html part of email needs html value. i can html this: import text.blaze.html.renderer.utf8 (renderhtml) emailhtml :: html emailhtml = renderhtml $(shamletfile "templates/email.hamlet") however, template i'm using should have reference static file. want reference @{staticr img_myimage_jpg} , using urls not work shamlet . instead, think need use whamlet , if use whamletfile renderhtml , compiler error. using whamletfile produces compiler error: handler/proxy.hs:71:55: couldn't match expected type `blaze-markup-0.7.1.0:text.blaze.internal.markupm ()' actual type `widgett site12 m12 ()' in stmt of 'do' block: (aswidgett ghc.base.. towidget) ((blaze-markup-0.7.1.0:text.blaze.internal.preescapedtext ghc.base.. data.text.pack) "</pre>\n\ \</td>\n\ \</

fetch - Access proxy through URL's server for free internet mobile -

Image
i found backdoor on mobile operators, can permit me access free internet although balance zero with backdoor, can access internet through domain of operator's home page. i discovered queries through domain not blocked, , leech data going domain ip address other (example: webproxy) so, can access internet through webproxy using webproxy surf web not good can create proxy server this? please me! need sourcecode build proxy server , local proxy this.

senti wordnet - How to predict sentiment using sentiwordnet -

i need sentiment analysis on csv files containing movie reviews. i'm using sentiwordnet sentiment analysis.the main problem facing in main() function .here can find polarity of single sentence.(string sentence="i love hate current political climate.")but want use complete csv file , find polarity of each review.the path sentiwordnet "c:\users\intel\desktop\sentiment final\finalsentiment.txt" package swn3; import java.io.bufferedreader; import java.io.file; import java.io.fileinputstream; import java.io.filereader; import java.io.inputstreamreader; import java.util.arrays; import java.util.hashmap; import java.util.iterator; import java.util.scanner; import java.util.set; import java.util.vector; public class swn3 { private string pathtoswn = "c:\\users\\intel\\desktop\\sentiment final\\finalsentiment.txt"; private hashmap<string, double> _dict; public swn3(){ _dict = new hashmap<string, double>();

How to swap string in C? -

i trying make function in c swap 2 string variables went wrong , program crashes. please have @ code , tell me made mistake: #include <string.h> void strswap(char name1[], char name2[]) // swap 2 strings { int lengthname1, lengthname2; lengthname1 = strlen(name1); lengthname2 = strlen(name2); char temporaryname1[100]; char temporaryname2[100]; int x; int y; // till declaration (int x = 0; x < lengthname1; lengthname1++) { temporaryname1[x] = name1[x]; name1[x] = ' '; } // copying value of name1 in temporaryname1 (int y = 0; y < lengthname2; lengthname2++) { temporaryname2[x] = name2[x]; name2[x] = ' '; } // copying value of name2 in temporaryname2 (int x = 0; x < lengthname1; lengthname1++) { name1[x] = temporaryname2[x]; } (int y = 0; y < lengthname2; lengthname2++) { name2[x] = temporaryname1[x]; } } #include <stdio

MobileFirst client properties does not seems to change -

Image
in project if change server host using build settings , deploy target , client properties not change in wlclient.properties file , context path changes new one, server host url pointing local host ,also 1 thing have noted wlbuildid property missing in file my version : 7.1.0.00.20150901-2103 what have done : changed server url in right click > run > build setting , deploy target , rebuild project after rebuilding wlclient.properties file wlserverhost property doesn't change attached settings screen along this i tracked down problem , bug in build have installed. i installed mobile first plugin eclipse market of version 7.1.0.00.2015 has bug, removed plugin , downloaded package ibm mobile firsts website of build version 7.1.0.00.2016 has fix bug , rectified now. the point note package in eclipse's market has changed new build in issue fixed. thank

python - can`t upgrade pip to the newest version 9.0.1 (OS:ubuntu 16.04LTS) -

os: ubuntu 16.04lts python: 2.7.12 + anaconda2-4.2.0 (64 bit) i typed pip install --upgrade $tf_binary_url install tensorflow terminal showed pip verson 8.1.1 , version 9.0.1 available. then typed pip install --upgrade pip upgrade showed requirement up-to-date: pip in ./anaconda2/lib/python2.7/site-packages , i still can't use pip version 9.0.1 install tensorflow. know what's going on ?? i had same problem. not sure going on. use both python , python3 , have both pip , pip3. chance did following , seems have fixed problem. pip3 install -u pip resulting in collecting pip using cached pip-9.0.1-py2.py3-none-any.whl installing collected packages: pip found existing installation: pip 8.1.2 uninstalling pip-8.1.2: uninstalled pip-8.1.2 installed pip-9.0.1

java - Split regex in Scala keeping delimiter -

i'm trying split string using regex rules: the string should split 2 the first part containing @ least 2 characters the second part made of characters starting first number (after second character) e.g. ab1234 = ab , 1234 , c56789 = c5 , 6789 , zyx3939y = zyx , 3939y i have regex working, loses character splitting on: val t = request.number.split("(?<=.{2})[0-9]{1}", 2) println(t(0), t(1)) gives: (ab,234) (c5,789) (ezy,9393y) what correct regex , there easier way of doing this? you better off using span , splitat methods on string . val (twofirst, rest) = request.number.splitat(2) val (nonumber, tail) = rest.span(!_.isdigit) (twofirst + nonumber, tail) the first val splits input after second character. second val splits input finds digit.

sql - Remove duplicate rows when multiple fields collectively provide unique ID -

i have table historical census database in 4 fields collectively identify each individual. 4 fields represent different levels of governmental areas, making table this: kommnr kretsnr bostnr persnr fornvn ettnvn [mncpl] [area] [rsdnc] [prsn] [firstn] [lastn] ← english 0101 001 0001 001 john doe 0101 001 0001 002 richard doe 0101 001 0001 003 johnny doe 0101 001 0002 001 jane doe as can seen, individuals identified combining 4 numbers (short text format) municipality, area, residence , person. personal id numbers have been added other databases, pending implementation in one. the database working holds 900k posts, , have ended ~12k duplicates, need remove. example table [t3 3 clean]: kommnr kretsnr bostnr persnr fornvn ettnvn [mncpl] [area] [rsdnc] [prsn] [firstn] [lastn] ← english 0101 001a 0003 5 ole christian elingsen 0101 001a 0003 5

java - App crashes when writing to SQLite Database in Android -

this question has answer here: what nullpointerexception, , how fix it? 12 answers i have developed app, user registration seems crash app. have checked cannot find cause, if can assist. code below. java class public class signup extends appcompatactivity { databasehelper helper = new databasehelper(this); @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_sign_up); } public void onsignupclick (view view) { if (view.getid() == r.id.bsignup) { edittext name = (edittext)findviewbyid(r.id.tfusername); edittext email = (edittext)findviewbyid(r.id.tfemail); edittext uname = (edittext)findviewbyid(r.id.tfuname); edittext pass1 = (edittext)findviewbyid(r.id.tfpass1); //edittext pass2 = (edittext)findviewbyid(r.id.tfpass2);

maven - JFrog Artifactory doesn't request user/password when deploying -

we have setup artifactory using google cloud click deploy. i have added settings.xml file: <servers> <server> <username>deployer</username> <password>hello</password> <id>company-central</id> </server> </servers> i have added following pom.xml: <distributionmanagement> <repository> <id>company-central</id> <name>company-central</name> <url>http://oururl/artifactory/libs-release-local</url> </repository> </distributionmanagement> when run mvn deploy following error: [error] failed execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project auth0test: failed deploy artifacts: ... return code is: 401, reasonphrase: unauthorized. -> [help 1] looking @ artifactory logs, request coming in anonymous: 2016-11-08 11:40:49,035 [denied deploy] libs-release-local:/auth0tes

java - How Can I pass Both TimeMatrix and DistanceMatrix in optaplanner -

i fetching timematrix(n*n) , distance matrix google api ,so how add in optaplanner vrp solver.what default vehicle speed optaplanner using routing? can change speed? this answer explains how pass actual distance matrix solver,like can pass actual time matrix solver.please help.. adjust vehicle routing example model roadlocation has separate distance matrix distance , time. put soft constraint both of them, each it's own weight. have weighted function of distance , time.

c# - “column ”Id“ of relation ”vip_clients“ does not exist” exception -

Image
i trying add data base vipclient. here chart database: model: public class vipclient { public long id { get; set; } public virtual client client { get; set; } public string comment { get; set; } public datetime creationtime { get; set; } } mapping: public class vipclientmap : imappingentity<vipclient> { public void map(entitytypebuilder<vipclient> builder) { builder.fornpgsqltotable("vip_clients", "clients"); builder.haskey(entity => entity.id); builder .hasone(entity => entity.client) .withmany() .hasforeignkey("vip_client_id"); builder .property(entity => entity.comment) .hascolumnname("vip_client_comment") .isrequired(); builder .property(entity => entity.creationtime) .hascolumnname("creation_time") .isrequired(); }

cucumber - Maven build configuration Team city - Pass variable to feature file -

i have cucumber feature file scenario performing smoke test , track server should passed dynamically , below https://tk2.dev.summitenergy.com should passed parameter variable( not hardcoded) scenario: ra login functionality given open firefox , start " https://tk2.dev.summitenergy.com " when enter "atesting" , "testing@2" user should login successfully for have given "maven_opts="-dprop=%teamcity.project.id%" mvn surefire:test" in additional command line parameters feild while build configuration , not sure if correct way can please suggest me correct way thanks ramesh as cucumber in maven executed junit test, please try set following value in additional maven command line parameters -dargline="-dprop=%teamcity.project.id%" note, not need put maven_opts field's value also, goals separate field, too. test goal should specified

linux - What is JAVA exec()uting? -

i'm on linux , have java application (jar archive) using exec() it's stuff. need find out commands application exec()uting... tried strace , jstack without results. suppose app calling exec("ls"), can find ls command grepping output of above programs? so question is: there simple way watch java application executing exec() ? edit better situation overview: suppose in java app have button onclick listener calls static function class.in function exec("ls"); called. when click button see in strace: futex(0x7f14a6f799d0, futex_wait, 4968, nulldownload button clicked ! trying scp from... <unfinished ...> trying scp from.. sout in button handler right before calling exec() . another edit: thank guys, i'm talking os point of view... suppose i'm sysadmin , downloaded jar. want know (from outside) jar doing - i'm interested in programs started exec() so tried strace shows nothing calling command exec... maybe logging low level

Iterate through complex multidimensional array (Trie data structure on PHP , code Improvement) -

recently faced coding challenge had build simple trie in php, managed using php , foreach loops i'm not happy code (seems not solid should be) i'm trying implement using php's iterators. so, have complex array ( trie ), example: array( 'a' => array(), 'b' => array( 'a' => array( 'c' => array( 'o' => array( 'n' => array() ) ) ) ), 'x' => array( 'x' => array( 'x' => array() ) ) ); and want check if 'bacon' it's word stored on trie, process find should iterating through array , check if each node it's nested , exists, instance: need in root element key 'b', inside array array['b'] , need check if there array['b']['a'] , ['b']['a']['c'] , on. with foreach loop able

angularjs - only one instance of babel/polyfill is allowed with angular ui-router -

currently, work school project , want show charts angularjs , meteor. i want use ui-router plugin. when try use it, following error: error: 1 instance of babel/polyfill allowed @ object.eval (eval @ <anonymous> (http://localhost:3000/packages/jquery.js?hash=22a0055f59bd150c435c5aba34c7c59076b8bcd9:397:22), <anonymous>:2872:9) @ object.1.180 (eval @ <anonymous> (http://localhost:3000/packages/jquery.js?hash=22a0055f59bd150c435c5aba34c7c59076b8bcd9:397:22), <anonymous>:2875:4) @ s (eval @ <anonymous> (http://localhost:3000/packages/jquery.js?hash=22a0055f59bd150c435c5aba34c7c59076b8bcd9:397:22), <anonymous>:2863:254) @ e (eval @ <anonymous> (http://localhost:3000/packages/jquery.js?hash=22a0055f59bd150c435c5aba34c7c59076b8bcd9:397:22), <anonymous>:2863:425) @ eval (eval @ <anonymous> (http://localhost:3000/packages/jquery.js?hash=22a0055f59bd150c435c5aba34c7c59076b8bcd9:397:22), <anonymous>:2863:443) @ eval (eval @ <a

Mouse hover in selenium using Java -

need perform hover on electronics highlighted on below image cd.get("http://flipkart.com/"); cd.manage().window().maximize(); actions mobile = new actions(cd); webelement electronics= cd.findelement( by.xpath(".//*[@id='container']/div/header/div[2]/div/ul/li[1]/a/span")); //electronics.click(); mobile.movetoelement(electronics); mobile.build().perform(); this post contains same question yours, please consider viewing first answer, accepted. ps : please let me know if worked, else can search solutions! luck.

java - XSLT: XTSE0010: An fo:block element must not contain an xsl:param element -

i passing few parameters java code xsl style sheet generating pdf using xsl:fo, error: xtse0010: fo:block element must not contain xsl:param element this stylesheet (partly): <fo:flow flow-name="xsl-region-body"> <fo:block> <xsl:value-of select="reportcontent/client/clientid"/> </fo:block> <fo:block font-weight="bold"> <xsl:value-of select="reportcontent/client/clientname" /> </fo:block> <fo:block> <xsl:value-of select="reportcontent/client/clientaddress" /> ,<xsl:value-of select="reportcontent/client/clienttown" /> </fo:block> <fo:block> <xsl:value-of select="reportcontent/reportinterval/startdate"/> - <xsl:value-of select="reportcontent/reportinterval/enddate"/> </fo:block> <fo:block page-break-inside="auto"&g