Posts

java - JBoss Hibernate Unable to locate persister error -

i've run bit of trouble again after fixing previous issue . tried many common fixes none seems working me. here relevant files project: hibernate.cfg.xml <?xml version='1.0' encoding='utf-8'?> <!doctype hibernate-configuration public "-//hibernate/hibernate configuration dtd 3.0//en" "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <!-- database connection settings --> <property name="connection.driver_class">com.mysql.jdbc.driver</property> <property name="connection.url">jdbc:mysql://localhost:3306/accountdb</property> <property name="connection.username">root</property> <property name="connection.password">pass</property> <!-- hibernate properties --> <property name="show_sql">true</property...

c++ - std::is_same equivalent for unspecialised template types -

in 1 project have found possibility stay dry lot of code except small parts stay same template specialisations of template. here small working example i'm doing check templated class i'm using: template<typename t> class a{}; template<typename t> class b{}; template<template<class> class c> void do_stuff() { if(std::is_same<a<int>,c<int>>::value) { // stuff } else if(std::is_same<b<int>,c<int>>::value) // stuff b } } int main() { do_stuff<a>(); } what instead using std::is_same<a,c>::value to determine template type. there function me or missing pattern work better in case? i see like template<template<class> class c, typename t> void do_stuff(); do_stuff<a,t>(); but seems wrong way me. you write is_same_template trait partially specialized when 2 template template parameters same: template <template <typename...> clas...

java - How to replace a repeating char at only a particular place in String? -

i have string : hi/i/jack/there which contains multiple '/' between values. , these values not of fixed length(can length) and need replace second occurrence of '/' string means output should be.. hi/iamjack/there how should achieve this? tried string.replace , logic it's replacing occurrences need 2nd occurrence replace. , i'm restricted use string only(not stringbuilder or else) count / each element in string string s = "hi/i/jack/there"; for(int i=0,count=0;i<s.length();i++) { if(s.charat(i)=='/')// if i'th element '/' { count++; if(count==2)//it's second '/' { //separate 2 part second '/' , add want @ middle s = s.substring(0,i) + "am" +s.substring(i+1,s.length()); } } }

ravendb - How to migrate NServiceBus Sagas from one Raven database to another? -

i need copy several types of sagas 1 database another. on different servers. i'm going export smuggler this: raven.smuggler out http://localhost:8080/ dump.raven --database=host1 --metadata-filter=raven-entity-name=testsaga and import dump new database. the question is : safe or need care additional things indexes or something? if going point nservicebus server that, need create indexes well

php - Laravel Ajax Search -

Image
i trying create search form, searches record in database table while user typing search field. controller public function search() { // search term $term = input::get('term'); // search members table $members = db::table('members') ->where(concat("members.member_first_name,' ',members.member_last_name"), 'like', "$term") ->orwhere(concat("members.member_last_name,' ',members.member_first_name"), 'like', "$term") ->orwhere(concat("members.member_name_affix,' ',members.member_last_name,' ',members.member_first_name"), 'like', "$term") ->orwhere(concat("members.member_first_name,' ',members.member_name_affix,' ',members.member_last_name"), 'like', "$term") ->orwhere('members.member_first_name...

selenium - Visual Studio Team Services (was Visual Studio Online) TestResults - Open attachment in browser -

we're using mstest team services (was visual studio online) builds run our selenium tests and, failed ones, i'm taking screenshot in testcleanup added test results using testcontext . now, when i'm checking test results failed tests, , want open attachment (a .png image), team services prompting download instead of displaying in browser, become pain when have new build of app , lot stuff changed causing multiple tests fail. is there possibility force team services or browser open images in browser? i'm open changing type of attachment, potential "hacks" determine team services display image in browser, browser extensions, etc. there isn't option configure @ vsts/vso side now, have submit feature request on vsts user voice, refer link details: open attachments of test result web portal in browser . however, if using firefox, know there open in browser add-on allow open document browser directly.

javascript - Login page with ionic, transaction errors -

i have issue, beginner this. login page ionic, error says : referenceerror: res not defined @ object.loginuser ( http://localhost:8100/js/services.js:41:25 ) @ scope.$scope.dologin ( http://localhost:8100/js/controllers.js:23:22 ) @ fn (eval @ compile ( http://localhost:8100/lib/ionic/js/ionic.bundle.js:27638:15 ), :4:212) @ http://localhost:8100/lib/ionic/js/ionic.bundle.js:65427:9 @ scope.$eval ( http://localhost:8100/lib/ionic/js/ionic.bundle.js:30395:28 ) @ scope.$apply ( http://localhost:8100/lib/ionic/js/ionic.bundle.js:30495:25 ) @ htmlanchorelement. ( http://localhost:8100/lib/ionic/js/ionic.bundle.js:65426:13 ) @ defaulthandlerwrapper ( http://localhost:8100/lib/ionic/js/ionic.bundle.js:16787:11 ) @ htmlanchorelement.eventhandler ( http://localhost:8100/lib/ionic/js/ionic.bundle.js:16775:9 ) @ triggermouseevent ( http://localhost:8100/lib/ionic/js/ionic.bundle.js:2953:7 ) error trans [object sqltransaction] my controllers.js : ...