Posts

C# wpf binding to a binding -

i'm writing questionnnaire library c# wpf. in have usercontrol called multiplechoiceoption . has dependencyproperty optiontype . if optiontype "combobox" insert combobox. i want able bind itemssource of combobox dependencyproperty of multiplechoiceoption created this: public static readonly dependencyproperty multiplechoicecomboboxitemsproperty = dependencyproperty.register("comboboxitems", typeof(list<string>), typeof(multiplechoiceoption)); ... public list<string> optiontext { { return getvalue(multiplechoiceoptiontextproperty) list<string>; } set { setvalue(multiplechoiceoptiontextproperty, value); } } if optiontype "combobox" add combobox , set binding this: case "combobox": var combobox = new combobox { horizontalalignment = horizontalalignment.right }; var b = new binding() ...

esb - Suitabaility of API solutions for consuming external APIs -

lets have api management solution ibm, or wso2, od mulesoft. in papers can see scenarios, api tools used publishing internal services outside world. can use same solution when want consume external services internall systems? api management tools suitable scenario? or should rather use internal esb common contact point consuming external services? i think possible in solutions mulesoft, esb , api management functinality connected in 1 product. of vendors have different products these capabilities. thank you

oracle10g - Missing Mandatory parameters error in oracle form builder -

i'm using oracle 10g version , i'm trying connect oracle developer suite 10g it. when try make form, encounter error after give user,password , host string. error: ora-06604: error occurred @ recursive sql level 1 ora-01009: missing mandatory parameter what should do?

amazon web services - Backup strategy for large number of files -

i working on web application handle close million image files (< 100k in size), uploaded users. application relies on sql database references images. images held on local disk on web application server, looking @ possible solutions backup these images. i'd avoid rsync or creation of single-file archives these slow number of files being considered. complete picture, database backed on nightly basis. the 2 options i've far identified following: create web service on amazon ec2 receives image assets web application @ same time being uploaded users web application. received assets stored on ebs drive snapshotted on nightly basis @ time coincide database backup on database server. ensures data integrity between image backup , database backup. upload images amazon s3 @ same time uploaded web application. the s3 option seems simpler , more scalable solution, concern not possible take snapshot backups of image library coincide database backups. in case of database fai...

Make an Iterable array of objects in PHP for Twig -

i'm trying pass array of objects parameter view rendering. problem when try iterate on , check if it's iterable, isn't. this how buil array: public function filtracalciatori($mintiritotali, $mintiriporta, $mingolfatti, $mingolsubiti, $minassist, $minfallifatti, $minfallisubiti, $minpercentualepassaggiriusciti, $minammonizioni, $minespulsioni, $maxtiritotali, $maxtiriporta, $maxgolfatti, $maxgolsubiti, $maxassist, $maxfallifatti, $maxfallisubiti, $maxpercentualepassaggiriusciti, $maxammonizioni, $maxespulsioni) { $statement = $this->conn->prepare( "select calciatore, sum(tiri_totali) tiri_totali, sum(tiri_porta) tiri_porta, sum(falli_fatti) falli_fatti, sum(falli_subiti) falli_subiti, (sum(percentuale_passaggi_riusciti) / count('calciatore')) perce...

linux - Python TypeError: 'module' object is not callable -

i run piece of code on mac in idle , works fine. when tried run same code on linux machine command line gave me error: traceback (most recent call last): file "time.py", line 1, in <module> import time file "/home/ugrad/user/time.py", line 3, in <module> t1 = time.time() typeerror: 'module' object not callable here code: import time t1 = time.time() size = 10000000 in range(size): = += 100 *= 35 val = (a == 839248637) t2 = time.time() res = t2-t1 print(res) what doing wrong here? you named file time.py import time loads file instead python time module. change name different - ie. time-test.py

mongodb count value of one field based on other -

i have collection named genre_collection of following structure : user | genres ---------------- 1 | comedy 1 | action 1 | thriller 1 | comedy 1 | action 2 | war 2 | adventure 2 | war 2 | thriller i'm trying find count each genre each user i.e. ideal final result : 1 | comedy |2 1 | action |1 1 | thriller |1 2 | war |2 2 | adventure |1 2 | thriller |1 any helps useful. you can aggregation using $group try : db.genre_collection.aggregate([ { $group:{ _id:{ genre:"$genres", user:"$user" }, count:{ $sum:1 } } } ]) output: { "_id" : { "genre" : "adventure", "user" : 2 }, "count" : 1 } { "_id" : { "genre" : "action", "user" : 1 }, "count" : 2 } { "_id" : { ...