I am trying to produce a dynamic table using PHP which looks something like this:
Paul 56 Paul 6 Paul 78 Paul 34 Paul 76 Mark 56 Mark 5 Mark 34 Mark 87 Mark 23 Mark 765 Basically what I want to produce is something like this: pre & lt; & Lt; Tr colspan = "2" & gt; Name: Paul & lt; / Tr & gt; & Lt; TR & gt; & Lt; TD & gt; 56 & lt; / TD & gt; & Lt; TD & gt; Edit & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; 6 & lt; / TD & gt; & Lt; TD & gt; Edit & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; 78 & lt; / TD & gt; & Lt; TD & gt; Edit & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; 34 & lt; / TD & gt; & Lt; TD & gt; Edit & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; 76 & gt; & Lt; TD & gt; Edit & lt; / TD & gt; & Lt; / TR & gt; & Lt; Tr colspan = "2" & gt; Name: Mark & lt; / Tr & gt; & Lt; TR & gt; & Lt; TD & gt; 56 & lt; / TD & gt; & Lt; TD & gt; Edit & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; 5 & lt; / TD & gt; & Lt; TD & gt; Edit & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; 34 & lt; / TD & gt; & Lt; TD & gt; Edit & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; 87 & lt; / TD & gt; & Lt; TD & gt; Edit & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; 23 / TD & gt; & Lt; TD & gt; Edit & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; 765 / td> & Lt; TD & gt; Edit & lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt;
How my PHP code looks so far:
& lt ;? Php $ name_holder = null; ($ I = 0; $ i & lt; Count ($ data); $ i ++) {If ($ name_holder! = $ Data [$ i] - & gt; name) {$ name_holder = $ data [$ i ] - & gt; Name; // sure what to do here ?? } Resonates "& lt; tr & gt;"; Echo "& lt; td align = 'left' & gt; $ Data [$ i] - & gt; Name. "& Lt; / td>"; Echo "& lt; td align = 'left' & gt; $ Data [$ i] - & gt; Bell. "& Lt; / td>"; Echo "& lt; / tr & gt;"; }? & Gt; Select
sql
, by name name by name checkin_tbl by name, name by ASC;
You do not need to group your data at the database level. It is possible to do this, but to read related data for each group, you need another SELECT
, and as a result, a large number of databases are being sent to the database.
I have chosen to read data using a direct query, which would be something like this:
SELECT name, by hour checkin_tbl ORDER by name ASC; I have not supplied the database code below, because it is not clear what database you are using (like MySQL) or what interface you are using (eg. .pdo). I have followed the data source using an array like this - I'm sure you swap it with fetchAll ()
or foreach ()
and one line . In this way, try to do something like this:
& lt ;? Php // data from your database $ rawData = [['Paul', 56], ['Paul', 6], ['Mark', 56], ['Mark', 5],]; // Let's reprint this $ = []; Foreign currency ($ pair as $ rawData) {$ name = $ pair [0]; If (! Isset ($ $ [$ name])) {$ out [$ name] = []; } // Pop up the value in the list $ $ [$ name] [] = $ pair [1]; } // Use this to see your structure #print_r ($ out); ? & Gt; & Lt ;! - This is your rendering section - & gt; & Lt ;? Php foreach ($ $ = $ data as $ & gt; $ data):? & Gt; & Lt; Tr colspan = "2" & gt; & Lt; Td> Name: & lt ;? Php echo htmlentities ($ name)? & Gt; & Lt; / Td> & Lt; / Tr & gt; & Lt ;? Php foreach ($ item as $ item):? & Gt; & Lt; Tr & gt; & Lt; Td> & Lt ;? Php echo hougements ($ item)? & Gt; & Lt; / Td> & Lt; Td> Edit & lt; / Td> & Lt; / Tr & gt; & Lt ;? Php endforeach? & Gt; & Lt ;? Php endforeach? & Gt;
My strategy is to format as much data as possible outside of the template - your code and another answer (at the time of writing) here in my opinion is a mix of logic and layout Is doing it, and you need to separate them.
This is the reason why I have switched to open / stop PHP tags in the rendering section: This is normally HTML with PHP Snippet where dynamic output is required. If you do this, you will benefit from tag matching and syntax color in your IDE.
I've added htmlentities ()
to avoid XSS.
I am upgrading to 2.40 version developed in mvc5 from mvc3, I've updated all the necessary references. I also upgraded the autofac reference for version 3.0.0.0. It was successfully created but to throw exceptions on running applications.
No scope is available with tag matching 'Autofac vobrakewost' in which the request was requested. It usually indicates that the request is being requested by a single interaction () component (or a similar scenario) registered as a per-HTTP request. Under web integration always requests reliance dependency dependency. Current or iialim scoppriver Request Lifetime, Never by Container
Attempted to use different checked positions
Builder. Registration Type (). (). Single instance ();
But no success.
Any solution.
Android for-loop getting stuck in endless loop -
i have jsonarray of jsonobjects in each of string key "kind". i'm trying loop through jsonarray , organize them "kind" utilize fill seperatedlistadapter. trying accomplish structure
{ communications[ { "header":"kind" communications[ {} {} {} {} ] } { "header":"kind" communications[ {} {} {} {} ] } ] }
the problem i'm having loop have created accomplish gets stuck in endless loop , crashes application. know going wrong this?
here's code know gets stuck in loop runs log "1" 1000 times though know there's 5 things in array i'm passing in.
for(int = 0; < communicationsfromfile.length(); i++){ jsonobject communication = communicationsfromfile.getjsonobject(i); log.v("communications", "kind = " + communication.getstring("kind")); log.v("communications", "newcomarray = " + newcomarray); if(newcomarray.length() != 0){ log.v("communications", "newcomarray isnotempty"); for(int = 0; < newcomarray.length();a++){ jsonobject iteminarray = newcomarray.getjsonobject(a); jsonarray communicationsforkind = iteminarray.getjsonarray("communications"); log.v("communications", "1"); if(iteminarray.getstring("header").equals(communication.getstring("kind"))){ log.v("communications", "header exists"); communicationsforkind.put(communication); iteminarray.put("communications", communicationsforkind); newcomarray.put(iteminarray); }else{ log.v("communications", "header not exist"); jsonobject additeminarray = new jsonobject(); jsonarray addarraytoitem = new jsonarray(); addarraytoitem.put(communication); additeminarray.put("header", communication.getstring("kind")); additeminarray.put("communications", addarraytoitem); newcomarray.put(additeminarray); } } }else{ jsonobject additeminarray = new jsonobject(); jsonarray addarraytoitem = new jsonarray(); addarraytoitem.put(communication); additeminarray.put("header", communication.getstring("kind")); additeminarray.put("communications", addarraytoitem); newcomarray.put(additeminarray); } }
in each iteration of inner loop, set new objects in newcomarray
. status a < newcomarray.length()
satisfied because a
, array length both grow @ same rate.
android
ios - AVPlayer change volume, vertical slider -
is there way alter volume on avplayer using vertical slider, mpvolumeview horizontal , doesn't seems exist way that. have used custom slider: on ios7 have volume property interact with, on ios6 seems solution audiomix trick, lastly 1 seems work "file" tracks not streaming content (i need utilize them). has came idea?
this worked me (iphone 5, ios 8.3):
mpvolumeview *volumeview = [[mpvolumeview alloc] initwithframe:cgrectmake(225, 270, 160, 30)]; cgaffinetransform sliderrotation = cgaffinetransformidentity; sliderrotation = cgaffinetransformrotate(sliderrotation,-(m_pi / 2)); volumeview.transform = sliderrotation; [self.view addsubview:volumeview];
ios iphone avfoundation avplayer
machine learning - Apache Spark ALS collaborative filtering results. They don't make sense -
i wanted seek out spark collaborative filtering using mllib explained in tutorial: https://databricks-training.s3.amazonaws.com/movie-recommendation-with-mllib.html algorithm based on paper "collaborative filtering implicit feedback datasets", doing matrix factorization.
everything , running using 10 1000000 movielens info set. info set split 80% training 10% test , 10% validation.
rmse baseline: 1.060505464225402 rmse (train) = 0.7697248827452756 rmse (validation) = 0.8057135933012889 model trained rank = 24, lambda = 0.1, , iterations = 10. the best model improves baseline 23.94%.
which values similar tutorial, although different training parameters.
i tried running algorithm several times , got recommendations don't create sense me. rating kids movies next results:
for ratings:
personal rating: toy story (1995) rating: 4.0 personal rating: jungle book, (1994) rating: 5.0 personal rating: lion king, (1994) rating: 5.0 personal rating: mary poppins (1964) rating: 4.0 personal rating: alice in wonderland (1951) rating: 5.0
results:
movies recommended you:
life of oharu, (saikaku ichidai onna) (1952) more (1998) who's singin' on there? (a.k.a. sings on there) (ko tamo peva) (1980) sundays , cybele (dimanches de ville d'avray, les) (1962) blue light, (das blaue licht) (1932) times of harvey milk, (1984) please vote me (2007) man planted trees, (homme qui plantait des arbres, l') (1987) shawshank redemption, (1994) only yesterday (omohide poro poro) (1991)
which except yesterday doesn't seem create sense.
if there out there knows how interpret results or improve ones appreciate sharing knowledge.
best regards
edit:
as suggested trained model more factors:
baseline error: 1.0587417035872992 rmse (train) = 0.7679883378412548 rmse (validation) = 0.8070339258049574 model trained rank = 100, lambda = 0.1, , numiter = 10.
and different personal ratings:
personal rating: star wars: episode vi - homecoming of jedi (1983) rating: 5.0 personal rating: mission: impossible (1996) rating: 4.0 personal rating: die hard: vengeance (1995) rating: 4.0 personal rating: batman forever (1995) rating: 5.0 personal rating: men in black (1997) rating: 4.0 personal rating: terminator 2: judgment day (1991) rating: 4.0 personal rating: top gun (1986) rating: 4.0 personal rating: star wars: episode v - empire strikes (1980) rating: 3.0 personal rating: alien (1979) rating: 4.0
the recommended movies are:
movies recommended you:
carmen (1983) silent lite (stellet licht) (2007) jesus (1979) life of oharu, (saikaku ichidai onna) (1952) heart of america (2003) for bible tells me (2007) more (1998) legend of leigh bowery, (2002) funeral, (ososhiki) (1984) longshots, (2008)
not 1 useful result.
edit2: using implicit feedback method, much improve results! same action movies above recommendations are:
movies recommended you:
star wars: episode iv - new hope (a.k.a. star wars) (1977) terminator, (1984) raiders of lost ark (indiana jones , raiders of lost ark) (1981) die hard (1988) godfather, (1972) aliens (1986) rock, (1996) independence day (a.k.a. id4) (1996) star trek ii: wrath of khan (1982) goldeneye (1995)
that's more expected! question why explicit version so-so-so bad
note code running not utilize implicit feedback, , not quite algorithm refer to. create sure not using als.trainimplicit
. may need different, lambda , rank. rmse of 0.88 "ok" info set; not clear example's values optimal or 1 toy test produced. utilize different value still here. maybe it's not optimal yet.
it stuff bugs in als implementation fixed since. seek comparing implementation of als if can.
i seek resist rationalizing recommendations since our brains inevitably find explanation random recommendations. but, hey, can did not action, horror, offense drama, thrillers here. find kids movies go hand in hand taste arty movies, since, kind of person filled out tastes movielens way when , rated kids movies not kids, parents, , maybe software engineer types old plenty have kids tend watch these sorts of foreign films see.
machine-learning apache-spark collaborative-filtering matrix-factorization
python - Extract an attribute value , Lxml -
i have next xml file:
'<?xml version="1.0" encoding="utf-8" standalone="yes"?>\r\n<w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingcanvas" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officedocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officedocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingdrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingdrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessinggroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingink" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingshape" mc:ignorable="w14 wp14"><w:body><w:p w:rsidr="00706a37" w:rsidrpr="004a1ce5" w:rsidrdefault="004a1ce5"><w:ppr><w:pstyle w:val="heading1"/><w:numpr><w:ilvl w:val="12"/><w:numid w:val="0"/></w:numpr><w:rpr><w:sz w:val="28"/><w:szcs w:val="28"/></w:rpr></w:ppr><w:commentrangestart w:id="0"/><w:r w:rsidrpr="004a1ce5"><w:rpr><w:sz w:val="28"/><w:szcs w:val="28"/></w:rpr><w:t>h</w:t></w:r><w:commentrangeend w:id="0"/><w:r w:rsidr="00a23794"><w:rpr><w:rstyle w:val="commentreference"/>
and need extract value of id
within <w:commentrangestart>
tag . have looked on many questions on , found next type:
i tried: (iterate on every p commentrangestart tag , , retrieve attrib. returned nothing.
for p in lxml_tree.xpath('.//w:p/commentrangestart',namespaces = {'w':w}): print p.attrib
i tried various combinations 'commentrangestart[@id]'
, commentrangestart/@id
none worked. referred many questions , 1 of them here . prefer way in go on every p , search comment tag. like:
for p in lxml_tree.xpath('.//w:p',namespaces = {'w':w}): p.xpath(./w:commentrangestart/...)
and on..
what's wrong expression.??
you need qualify namespace:
for p in root.xpath('.//w:p/w:commentrangestart', namespaces={'w':w}): print p.attrib
output:
{'{http://schemas.openxmlformats.org/wordprocessingml/2006/main}id': '0'}
alternative:
for id_ in root.xpath('.//w:p/w:commentrangestart/@w:id', namespaces={'w': w}): print id_
output:
0
python xml python-2.7 xpath lxml
scala - Why does Play 2.3.4 and jacoco4sbt > 2.1.4 fail with NoSuchMethodError? -
i'm trying utilize jacoco4sbt in play 2.3.4 (scala 2.10.4) app 2.1.4 seems work. when utilize .5 or .6, next error:
[error] (main/jacoco:fullclasspath) java.lang.nosuchmethoderror: org.objectweb.asm.methodvisitor.visitmethodinsn(iljava/lang/string;ljava/lang/string;ljava/lang/string;z)v
i tried add together asm-all
(versions 4.1 , 5.0.3) dependencies not help @ all.
so problem? need add together dependency?
they have indeed changed asm version 5.0.1, , couldn't reproduce issue.
project/build.properties
sbt.version=0.13.7-m3
project/plugins.sbt
addsbtplugin("com.typesafe.play" % "sbt-plugin" % "2.3.4")
plugins/jacoco4sbt.sbt
addsbtplugin("de.johoop" % "jacoco4sbt" % "2.1.6")
build.sbt
name := """play-jacoco""" version := "1.0-snapshot" enableplugins(playscala) scalaversion := "2.11.2" librarydependencies ++= seq( jdbc, anorm, cache, ws ) pipelinestages := seq(rjs, digest, gzip) jacoco.settings
when ran jacoco:cover
worked fine.
[play-uglify] $ jacoco:cover [info] compiling 2 scala sources /users/jacek/sandbox/play-uglify/target/scala-2.11/test-classes... slf4j: next set of substitute loggers may have been accessed slf4j: during initialization phase. logging calls during slf4j: phase not honored. however, subsequent logging calls these slf4j: loggers work expected. slf4j: see http://www.slf4j.org/codes.html#substitutelogger slf4j: org.apache.http.impl.client.defaulthttpclient slf4j: com.gargoylesoftware.htmlunit.incorrectnesslistenerimpl slf4j: com.gargoylesoftware.htmlunit.javascript.stricterrorreporter slf4j: com.gargoylesoftware.htmlunit.defaultcsserrorhandler slf4j: com.gargoylesoftware.htmlunit.javascript.configuration.javascriptconfiguration slf4j: com.gargoylesoftware.htmlunit.webclient slf4j: com.gargoylesoftware.htmlunit.javascript.javascriptengine slf4j: com.gargoylesoftware.htmlunit.webresponse [info] integrationspec [info] [info] application should [info] + work within browser [info] [info] total specification integrationspec [info] finished in 29 ms [info] 1 example, 0 failure, 0 error [info] applicationspec [info] [info] application should [info] + send 404 on bad request [info] + render index page [info] [info] total specification applicationspec [info] finished in 29 ms [info] 2 examples, 0 failure, 0 error [info] passed: total 3, failed 0, errors 0, passed 3 [info] [info] ------- jacoco coverage study -------- [info] [info] lines: 57.5% (>= required 0.0%) covered, 34 of 80 missed, ok [info] instructions: 72.12% (>= required 0.0%) covered, 522 of 1872 missed, ok [info] branches: 27.78% (>= required 0.0%) covered, 26 of 36 missed, ok [info] methods: 81.94% (>= required 0.0%) covered, 41 of 227 missed, ok [info] complexity: 76.73% (>= required 0.0%) covered, 57 of 245 missed, ok [info] class: 57.14% (>= required 0.0%) covered, 12 of 28 missed, ok [info] check /users/jacek/sandbox/play-uglify/target/scala-2.11/jacoco detail study [info] [success] total time: 6 s, completed oct 9, 2014 7:42:31
where differ?
scala sbt jacoco playframework-2.3
How to use php pattern Regex in Delphi -
most of time, when regex pattern php code, , need "traslate" delphi. big problem in delphi php escapes doesn't works in delphi, if ignore them of time ok. not in next example, if remove /x pattern, function preg_match_all doesn't output value.
this code in php:
$pattern = "/\n". "\s(counters?\\([^)]*\\))|\n". "\a(counters?\\([^)]*\\))|\n". "\s([\"']) ( (?:[^\"']|\\\\[\"'])+ )(?<!\\\\)\\3|\n". "\a([\"']) ( (?:[^\"']|\\\\[\"'])+ )(?<!\\\\)\\5|\n" . "\s([^\s\"']+)|\n" . "\a([^\s\"']+)\n". "/xi"; preg_match_all($pattern, '"file " counter(file)', $matches, preg_set_order);
this output:
array (size=2) 0 => array (size=7) 0 => string '"file "' (length=7) 1 => string '' (length=0) 2 => string '' (length=0) 3 => string '' (length=0) 4 => string '' (length=0) 5 => string '"' (length=1) 6 => string 'file ' (length=5) 1 => array (size=2) 0 => string ' counter(file)' (length=14)
this i've done in delphi:
type tmatches = array of array of string; var matches: tmatches; pattern := '/\n'+ '\s(counters?\\([^)]*\\))|\n'+ '\a(counters?\\([^)]*\\))|\n'+ '\s([\"'']) ( (?:[^\"'']|\\\\[\"''])+ )(?<!\\\\)\\3|\n'+ '\a([\"'']) ( (?:[^\"'']|\\\\[\"''])+ )(?<!\\\\)\\5|\n'+ '\s([^\s\"'']+)|\n'+ '\a([^\s\"'']+)\n'+ '/xi'; regexmatchall(pattern,'"page " counter(page)',matches);
the function regexmatchall here , works in of case:
procedure regexmatchall(pattern: string; subject: string; out matches: tmatches); var d, sd: integer; regex: tregex; reggroupcoll: tgroupcollection; regcoll: tmatchcollection; begin regex := tregex.create(pattern); regcoll := regex.matches(subject); setlength(matches, regcoll.count); // numero de coincidencias [array [x]] d := 0 regcoll.count - 1 begin reggroupcoll := regcoll.item[d].groups; setlength(matches[d], reggroupcoll.count); // numero de grupos [array [d][sd]] sd := 0 reggroupcoll.count - 1 matches[d][sd] := reggroupcoll.item[sd].value; end; end;
also alter \n #13#10, , doesn't matter, matches array empty.i know if hard pattern regex, if @ lastly can resolve issue, wonderful, there lot of php regex code , if can know how utilize in delphi going great delphi developers.
as far can see, php's regex back upwards built on pcre. delphi's appear using. although i'm guessing there because state this. however, think it's reasonably safe assumption.
the x
modifier in php corresponds pcre_extended
flag. in delphi corresponding setting roignorepatternspace
option. pass alternative when phone call matches
.
one aside. please don't post of import code using off-site links. should not have leave question larn code is. reader should able info direct question. is, reader wonder how reply discerns delphi regex library use, , calling matches
.
php regex delphi
Inserting an image to MySql type BLOB from python and show from MySql to PHP -
i trying store image url database base64, when seek show in webpage based on php, doesn't work..
here's python code:
import urllib3, io, requests pil import image import base64 url = 'www....com/pic.jpg' img_conn = urllib3.connection_from_url('www....com/') img_file = img_conn.urlopen('get', url) image.seek(0) resized_image = image.open(image) resized_image.thumbnail((75,75), image.antialias resized_image = base64.b64encode(resized_image.tostring())
the resized_image
added database column called pic
type longblob.
my php code looks this:
$sql = "select pic product limit 1"; $stmt = $pdo->prepare($sql); $stmt->execute(); $row = $stmt->fetch(); $decoded_image = base64_decode($row['pic']); $formimage = imagecreatefromstring($decoded_image);
i message:
php warning: imagecreatefromstring(): info not in recognized format in /home/...
what doing wrong? there way save image url within database?
php python base64 pillow
c# - Temporary disable certificate validation -
i need consume web service, has certificate , need disable authentication.
the server side can dummy server using "simulate" results or real 3rd side server utilize secured soap headers
i need able disable certificate validation in server when invoking dummy server, enable when invoking real server (which not ours)
i saw in post way disable this:
servicepointmanager.servercertificatevalidationcallback = delegate { homecoming true; };
which works perfectly.
the problem 1 time line of code executed can't seem "reverse" it
i need like:
if (testmode) { servicepointmanager.servercertificatevalidationcallback = delegate { homecoming true; }; } else { //enable certificate validation }
btw, code in c#.
any ideas ?
you need de-register callback, this:
declare remotecertificatevalidationcallback reference.
static remotecertificatevalidationcallback _callbacktrue;
then in initialization code, assign this:
_callbacktrue = (sender, cert, chain, sslpolicyerrors) => true;
then can register / deregister callback when testmode property changes:
// in setter testmode, when set true. servicepointmanager.servercertificatevalidationcallback += _callbacktrue; // in setter testmode, when set false servicepointmanager.servercertificatevalidationcallback -= _callbacktrue;
just create sure register callback when testmode goes 'false true' , de-register callback when goes 'true false'. i.e. registrations / deregistrations should symmetrical.
c# certificate
.net - One NServiceBus.Host for one EndPoint, what is the recommended approach -
i'm trying understand nservicebus given online documentation. can't wrap head around overall recommended setup of infrastructure. our app supposed able run both single machine , across multiple (logically different) sites (n stores-1 headquarter). nservicebus (i using v5 through nuget), don't understand notion of host , endpoints.
lets have 15 services (order service, item service, etc.).
do need 15 clients (15 class library projects code sending messages on bus), , 15 servers (one or more receiving messages handler classes handle service specific messages/commands)? 30 total.
should each service utilize own separate msmq?
for 15 "server" projects, in production environment need install nservicebus.host 15 times (hence creating 15 windows service instances). during debugging in vs, nserivcebus.host.exe started when start debugging.
so "host" 1 endpoint each host/server project. or can have single host , 15 endpoints within of it?
you can tell new esb pattern, input.
you don't need 15 class libraries. nservicebus can router messages based on namespace/type. eg: namespace messages of "message.orders" can routed "orders" queue.
in production possibility.. depends on volume of messages , logical grouping/partitioning. in development, have 1 queue messages.
again, deployment issue dictated logical partitioning. have scripted handle installation/un-installation of these services. have mine in powershell script.
nservicebus flexible on how , when partition messages. done @ configuration level in uat or production , outside development lifecycle. maintain in mind, 1 nservicebus host == 1 msmq
i started 1 service first, start partitioning based on volume/priority messages.
also, reason breakdown messages 15 classes, if want expose these assemblies external solutions without exposing other message types.
.net msmq nservicebus esb nservicebus4